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
Some weekly SOA news:
From