An XML Messaging Case Study


News: An XML Messaging Case Study

  1. An XML Messaging Case Study (5 messages)

    Benoit Aumars has written a piece which focuses on data sharing, with the common producer-consumer model, using open source software such as: JBoss, Quartz, Hibernate, and Castor. The interactions between these services is done via JMX, and JMS is used to handle messaging (e.g. WebSphere MQ).

    XML Messaging
  2. I tried to use JBoss 4.0, but I could not find how to packaging
    the third party jar file into EAR file, I ended up copying all
    the jar files into server/<config_home>/lib directory, which is
    also used by the author of this article:

    "Before building the XMLConsumer and XMLProducer, you need to
    copy the needed .jars--the Sybase JDBC driver, the Oracle JDBC
    driver, Quartz, and Castor--into /server/<deploy_config>/lib."

    So, this is the question: Does JBoss support packaging third-party
    libraries in EAR File?
  3. It has been a while since I last deployed an EAR on JBoss, but if my memory serves me correct they do support packaging third party libraries in EAR files.

    Just make sure you have all your descriptors right in the EAR files META-INF directory:
    * jboss.xml - vendor specific descriptor
    * application.xml - EAR descriptor
    * ejb-jar.xml - ejb descriptor
    * MANIFEST.MF - for classpath entries for the EAR file

    The MANIFEST.MF tripped me up if I remember correctly, or more specifically, I forgot all about it and didn´t enter my third party jars into it, resulting in them not being in the EAR-files classpath.

    Should be something like:
    Manifest-Version: 1.0
    Class-Path: thirdpartylib.jar

    Hope that helps.
  4. Actually, I tried to use MANIFEST.MF to include the third
    party jar files, which is specified in the J2EE Spec.
    But, I can not make it work.
  5. Can't speak to 4.0, but every version I have used supports it. We do it all over the place, and don't generally have to muck with MANIFEST.MF. Any JAR packaged directly inside the EAR or inside a resources within the EAR (ejb.jar, war, sar) can be visible anywhere inside the EAR, using the EAR-scoped classloader (defined in ear/META-INF/jboss-app.xml).

    You can also put JARs in the server/<config>/lib directory, and that's generally an OK solution as long as every application will use the SAME version of that JAR file. We put JDBC drivers, dom4j, etc there. Otherwise, for things that have a higher change rate (Hibernate, Jakarta commons, etc), we package with the individual apps somewhere in the EAR. This is a necessity for us, as we host several apps on our appservers (10-15).

    It's a fairly common practice, and I would suggest you go to the JBoss forums and docs for help.

  6. I have had problems with using Hibernate and Struts in the same EAR under JBoss. I know they have done some work with Hibernate and "native support but i think i had a general classloading issue. My logging commons-log, log4j, hibernate and struts did not go well together and i allways got a classcast exeption. Is this common? i used the packageing according to the J2EE spec and the JBoss docs.. :$

    well looking forward to try the native support too.. hope that helps, but i'm not sure of other libraries...