Archive for category Java

Managing multiple Maven versions

Lately I’ve been using Apache Maven 3.0 snapshots to test build compatibility on ServiceMix, Karaf and some of the other projects I work on.  I’m also using 2.0.9, 2.0.10, and 2.2.1 to replicate customer environments and build servers, so it gets to be a real pain in the ass to change these around all the time.  To make my life easier, this weekend I hacked up a Maven version of the awesome setjdk and defaultjdk commands written by David Blevins for Mac OSX (if you’re on a Mac and not using these scripts, you should be). Read the rest of this entry »

3 Comments

TinyOS 2.1 on Sentilla JCreate motes

tinyosI spent a little time last week getting TinyOS 2.1 apps to run on the cool little Sentilla JCreate motes and after I asked a few questions on the TinyOS mailing list it became apparent that there were others interested in doing the same.  I received quite a few requests via private mail and on the mailing list to post the directions on how I got things working so here you go!!

Read the rest of this entry »

2 Comments

Gumstix Overo Fire == nerdy gadget lust

I have been waiting a while for Gumstix to release a more powerful Overo board with the OMAP 3530 chip, and it looks like the waiting is over.  There are three new boards, but the one making me all hot and bothered is the Overo Fire.  For those not aware, the OMAP 3530 is a system on chip (SoC)where the CPU, RAM, 3D video and all the other goodies sit on a single chip.  The pics on the main web site above don’t do it justice, so here is a pic of the thing next to a AA battery.

So here is my plan…  I’m going to get Android running on this thing ASAP.  I think most of this work has been done already because the similarly spec’d BeagleBoard already has Android running on it.  I am hopeful that the patches are already documented somewhere but it wouldn’t be the first time I have hacked some Linux kernel and driver code.  The end goal is to have a sort of home hub or all in one remote console device with a touch screen LCD, VOIP speakerphone, all in one IR remote, , etc.  Bonus points if I can get ServiceMix or ActiveMQ involved somewhere along the line.  I think an OSGi API for the IR and home page would be rather sweet as well, don’t you?  I will post more in the next week or two once I get my feet back on the ground.  Too excited to think rationally right now  ;-)

The possibilities are endless, and I promise to open source everything under the Apache Software License where possible.  Should be a fun project, if anyone is interested in helping out let me know.

4 Comments

Intro to OSGi – Denver Java User Group

It was a great pleasure to speak for the first time at the Denver Java User Group this week.  I *started* a nice little talk on the basics of OSGi and thought it was starting out pretty well.  Unfortunately about 20 minutes into the presentation the fire alarms went off in the venue where the meetings are held so we had to bail early.  I think things reconvened in a nearby Old Chicago’s pub but I had to head home for the night so I missed out on all the fun.

I promised the attendees that I would post the slides so in case any of you read my blog, here you go.

1 Comment

ApacheCon US talks scheduled

ApacheCon US 2008

I submitted three talks for ApacheCon US this year and one of them has been accepted and one has been scheduled as a fallback in case they need to fill a slot. My accepted talk is titled “ServiceMix, ActiveMQ, Camel, and CXF – An integration toolbox” and will be about using all three of these projects together inside of ServiceMix ESB. Its going to be a tight schedule talking about all of these in less than one hour but I have done almost this much before so with a little practice I think I can get done in time for some questions.
My Fallback talk is titled “Enterprise class integration with Apache ServiceMix 4.0″ and this was the one I was really hoping to get accepted. This talk is about using ServiceMix ESB in large scale environments (clustered) with load balanacing and failure scenarios. I will also throw in some simple examples of integrating with things such as IBM MQSeries/WebSphere MQ, maybe throw in some Tibco, and whatever else seems “Enterprisey” at the time.
ApacheCon US is in New Orleans this year in November, so it should be a good time. I am looking forward to some good cajun food and a some good times!

1 Comment

Sony Ericsson K850 for $299 at JavaOne

I’m not a big iPhone fan, mainly because I insist that all of my gadgets have some form of Java hackability (I know, hackability isn’t a real word). So I have been looking around for a long time for a good phone with Java support and I have always been interested in the Sony Ericsson K850 with the JP-8 Java support. In lieu of a full on Android based phone that I can stuff in my pocket next week, I think I am going to take them up on their offer and buy an unlocked K850 for $299 at JavaOne next week.

If anyone has any other ideas to get some Java lovin’ on my phone I am open to suggestions.

No Comments

GlassFish v3 to be based on OSGi?

via Jerome Dochez (Du côté de chez…) it looks like Glassfish v3 will be running in top of OSGi (hopefully Felix).

Now the interesting question that everyone will be asking soon, are we switching to OSGi as our underlying module subsystem ? Today I can say yes, we will.

I don’t know very much about Glassfish, but knowing the Sun position
on OSGi (or lack thereof) made me wonder if this was a belated April Fool’s joke. This seems like a very bold move and hopefully there is more news like this on the way (crossing fingers). Given the recent analysis of JSR-277 by Peter Kriens (Ghost Town JCP) and Neil Bartlett (No Way to Run a JSR), maybe my one time wish that “common sense would prevail” might show a glimmer of hope?

No Comments

Using ServiceMix with Camel Tutorial

One of the most common questions I get is “how do I use the Camel component in ServiceMix?”. I have been working on a small set of tutorials that I was thinking about posting to this blog later this month, but luckily Gert Vanthienen who is another ServiceMix committer has beat me to the punch and added this set of tutorials on the ServiceMix web site. These tutorials are quite good and go into great detail so anyone wishing to use the Camel component in ServiceMix should give these a good read.

No Comments

Maven dependency troubleshooting tip

I have already passed this little gem off to a few people this past week and everyone seems to find it indispensable so I thought I would share it.  The Maven team has released version 2.0 of the maven-dependency-plugin with a little present for anyone who has spent time troubleshooting transient dependencies. The new dependency:tree goal breaks down all of the declared dependencies and shows the transitives that are pulled in by each declared dependency.

Try running this on your favorite project to see the eye candy, and if you get a message that says “Required goal not found…” then try this following command line and it *should* update your plugin.

mvn -cpu org.apache.maven.plugins:maven-dependency-plugin:2.0:tree


$ mvn dependency:tree
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'dependency'.
[INFO] ------------------------------------------------------------------------
[INFO] Building ServiceMix :: Samples :: Basic
[INFO] task-segment: [dependency:tree]
[INFO] ------------------------------------------------------------------------
[INFO] [dependency:tree]
[INFO] org.apache.servicemix.samples:basic:jar:3.2.2-SNAPSHOT
[INFO] +- org.apache.activemq:activemq-ra:jar:4.1.1:compile
[INFO] | \- org.apache.geronimo.specs:geronimo-j2ee-connector_1.5_spec:jar:1.1:compile (version managed from 1.0)
[INFO] +- org.jencks:jencks-amqpool:jar:2.1:compile
[INFO] +- org.apache.servicemix:servicemix-jms:jar:3.2.2-SNAPSHOT:compile
[INFO] | +- org.apache.servicemix:servicemix-shared:jar:3.2.2-SNAPSHOT:compile
[INFO] | | +- org.apache.servicemix:servicemix-common:jar:3.2.2-SNAPSHOT:compile
[INFO] | | | \- wsdl4j:wsdl4j:jar:1.6.1:compile
[INFO] | | +- org.apache.servicemix:servicemix-soap:jar:3.2.2-SNAPSHOT:compile
[INFO] | | | +- wss4j:wss4j:jar:1.5.1:compile
[INFO] | | | +- bouncycastle:bcprov-jdk14:jar:136:compile
[INFO] | | | +- org.opensaml:opensaml:jar:1.1:compile
[INFO] | | | \- xml-security:xmlsec:jar:1.3.0:compile
[INFO] | | \- org.apache.servicemix:servicemix-soap2:jar:3.2.2-SNAPSHOT:compile
[INFO] | | +- org.apache.ws.commons.schema:XmlSchema:jar:1.3.2:compile
[INFO] | | \- org.apache.woden:woden:jar:1.0.0M6:compile
[INFO] | | +- xerces:xercesImpl:jar:2.8.1:compile (version managed from 2.8.0)
[INFO] | | \- xml-apis:xml-apis:jar:1.3.04:compile
[INFO] | +- org.jencks:jencks:jar:2.1:compile
[INFO] | | +- commons-collections:commons-collections:jar:3.1:compile
[INFO] | | +- org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.1:compile (version managed from 1.0.1)
[INFO] | | +- org.apache.geronimo.components:geronimo-transaction:jar:2.0.1:compile
[INFO] | | | \- org.objectweb.howl:howl:jar:1.0.1-1:compile
[INFO] | | +- org.apache.geronimo.components:geronimo-connector:jar:2.0.1:compile
[INFO] | | +- commons-dbcp:commons-dbcp:jar:1.2.1:runtime (version managed from 1.2)
[INFO] | | +- commons-pool:commons-pool:jar:1.2:compile
[INFO] | | \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.0:compile
[INFO] | \- org.springframework:spring-jms:jar:2.0.6:compile
[INFO] | +- org.springframework:spring-context:jar:2.0.6:compile
[INFO] | \- org.springframework:spring-support:jar:2.0.6:compile
[INFO] +- quartz:quartz:jar:1.5.2:compile
[INFO] | \- commons-logging:commons-logging:jar:1.1:compile
[INFO] | \- log4j:log4j:jar:1.2.13:compile (version managed from 1.2.12)
[INFO] +- org.springframework:spring-jca:jar:2.0.6:compile
[INFO] | +- org.springframework:spring-beans:jar:2.0.6:compile
[INFO] | +- org.springframework:spring-core:jar:2.0.6:compile
[INFO] | \- org.springframework:spring-dao:jar:2.0.6:compile
[INFO] | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] +- org.apache.servicemix:servicemix-components:jar:3.2.2-SNAPSHOT:compile
[INFO] \- org.apache.activemq:activemq-core:jar:4.1.1:compile
[INFO] +- backport-util-concurrent:backport-util-concurrent:jar:2.2:compile (version managed from 2.1)
[INFO] +- org.apache.activemq:activeio-core:jar:3.0.0-incubator:compile
[INFO] +- org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1:compile (version managed from 1.0)
[INFO] \- org.apache.geronimo.specs:geronimo-j2ee-management_1.0_spec:jar:1.1:compile (version managed from 1.0)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Sun Feb 24 19:41:16 MST 2008
[INFO] Final Memory: 18M/161M
[INFO] ------------------------------------------------------------------------

No Comments

Generated Sequence Diagrams

I saw this tool used in some Doxygen docs recently and I knew immediately that it would be indispensable for generating sequence diagrams for online docs on wikis.  I’ll wrap it in a confluence macro and post here when its all done (unless someone points me to an existing implementation).  It would also be fantastic to have a Java port of this, but I won’t be picky.  :-)

So as in the example, this:

# MSC for some fictional process
msc {  a,b,c;  a->b [ label = "ab()" ] ;
    b->c [ label = "bc(TRUE)"];
    c=>c [ label = "process(1)" ];
    c=>c [ label = "process(2)" ];
    ...;
    c=>c [ label = "process(n)" ];
    c=>c [ label = "process(END)" ];
    a<<=c [ label = "callback()"];
    ---  [ label = "If more to run", ID="*" ];
    a->a [ label = "next()"];
    a->c [ label = "ac1()\nac2()"];
    b<-c [ label = "cb(TRUE)"];
    b->b [ label = "stalled(...)"];
    a<-b [ label = "ab() = FALSE"];
}

Becomes:
Example rendered MSC

1 Comment