When jar files are not jar files

In the Open ESB project (and its documentation, examples, wiki pages) there are too many references to .jar files where technically speaking the artifacts are actually misnamed zip files. Even some of the tooling file wizards default to looking for .jar file extension names for artifacts that the JSR-208 specification clearly describes as zip files.

This has lead to some confusion. One customer reasonably asked if he could just add an Open JBI Component .jar file to his classpath (no, since the component archives are actually zip files containing jbi.xml and implementation files).

When using some NetBeans-based tools, I always have to remember to change the file pattern filter from the inappropriate default  *.jar to find a .zip file I’m trying to install or deploy.

Technically, jar files contain class files and can be added to a classpath. JBI archives (components and service assemblies) really should be (named as) zip files, since they almost never can be added to a classpath (I’ll leave it as an exercise how to make a JBI archive actually also usable on a classpath, but I haven’t seen a use-case for this yet).

JBI zip files usually contain nested archives (sometimes also misnamed as .jar files).  In the case of a component installation archive, the nested files are, in fact, .jar files containing the actual component implementation.  However, theoretically they could just contain class files, and these don’t have to be in the standard place for class files within a normal jar file.

For JBI Service Assemblies, the nested Service Unit archives are zip files, generally containing XML.  However, the Service Units can contain anything in addition to the jbi.xml; the rest is specified to be “opaque” to the JBI management layer and only needs to make sense to the target component.  (In rare cases, a Service Unit could contain classes or nested jar files, if it was being deployed to some JBI Binding or Engine that was provisioned somehow via compiled Java instead of XML.)

So, if you create a JBI artifact, try to remember to name it with a .zip file extension.  Please :-)

Category: glassfish esb, jbi, netbeans, open-esb

Posted by: Mike Wright on: December 19, 2008

Tags:

SOA Friday #9

While enjoying the Northern California fall foliage, I’ve added this week’s links:

* Sun launches JavaFX Platform

* NetBeans 6.5 supports JavaFX Platform

* OpenOffice shakes Microsoft

* Linux in the workplace

(some news from last week: Fuji Milestone 3 wiki, screencast)

Category: general, open source, project fuji

Posted by: Mike Wright on: December 5, 2008

Tags:

SOA Friday #7

Some weekly SOA news:

Category: camel se, glassfish, glassfish esb, netbeans, open-esb

Posted by: Mike Wright on: November 21, 2008

Tags:

Adding a BPEL front-end to the Camel router

Currently I’m working on refactoring the Camel router to two BPELs example to add a BPEL front-end.  (I’ll be updating this post soon with links to the tutorial steps and screen captures.)

Previously I created/tested separate Composite Application projects for testing the database and file processes.

Then I created/tested a Composite Application project for testing the Camel router using the above processes.

What I’ve now done is create a new Composite Application project reusing the Camel and BPEL projects.   In the next tutorial I show how to create a “front-end” BPEL process to invoke the Camel router in this new application.

Category: camel se, open source, open-esb

Posted by: Mike Wright on: October 31, 2008

Tags:

SOA Friday #4

Happy Halloween!

Some updated wiki pages and blog posts for the past week:

Category: general, glassfish, glassfish esb, open-esb, project fuji

Posted by: Mike Wright on: October 31, 2008

Tags:

Building the Camel to BPEL example

I’m working on documenting some new Camel SE examples including the steps needed to build and run the Camel to BPEL example.  (coming soon, the BPEL to Camel example, and the Camel directly to BCs example).

For Camel to BPEL, the client sends a request via SOAP to the Camel router.

The router checks the content of the message to decide which BPEL to route to.

One BPEL maps the order to a shipment record and writes it to a file.

The other BPEL maps the order to a different shipment record and inserts in into a database.

Category: camel se, open-esb

Posted by: Mike Wright on: October 29, 2008

Tags:

SOA Friday #3

(trying to get back to summarizing some somewhat-SOA-related news each week)

Category: glassfish, netbeans, open source, open-esb, project fuji

Posted by: Mike Wright on: October 24, 2008

Tags:

Camel SE and wire-tap EIP

Working on the Open ESB Camel SE, developing a more real world content-based-routing example, the new example now provides some logging.

By using the multiple String argument form of to (Fluent Builders Java DSL) I was able to have some POJOs get control before and after a message was sent to a target BPEL process.

PORouter3/PORouter/PORouterCamelJBIModule/src:
org/camelse/examples/porouter/AppRouteBuilder.java
  // Routes based on expression evaluation
  //(POJOs write messages to log)
  from(jbiInURI).
    choice().
      when(orderPriceGT500).
        to("bean:LogPOJO1", jbiBpel2DbURI,"bean:LogPOJO1").
     otherwise().
        to("bean:LogPOJO2", jbiBpel2FileURI,"bean:LogPOJO2");

Each POJO logs the message with the POJO’s name (so I can see which route was taken).  This is a slightly different approach to Apache Camel’s wire-tap EIP.

The order in which the messages appear within the log (and the timestamps) distinguish before from after for each POJO.

Category: camel se, open source, open-esb

Posted by: Mike Wright on: October 24, 2008

Tags: