0 Replies Latest reply on Jan 8, 2004 5:24 PM by dsklyut

    System Classpath with JBoss deployments

      Hi All,

      This might sound like a retorical question, but:

      How often do you ending up putting jars on the System Classpath with your jboss deployments?

      I am asking because it seems that there isn't a clean way to deploy some jars bundled with your app that JBoss already uses. One example is JDOM. I am using Jaxen + Saxpath + JDOM, and JBoss would load it's own copy at the start up leaving me to pick up pices of ClassNotFound exceptions :)

      I have a fairly large and complex application with many jars that JBoss already bundles, plus number of web apps that are based on inhouse web framework and share Controller servlet. This servlet needs to be configured specific to each web app so I can't have it loaded into the UnifiedClassloader at the top of hiarchy.

      The only way that I could come up with is to have a sar that defines a loader-repository, specify a classpath in the sar jboss-service.xml and have multiple ears inside of the sar. I also ended up turning the "UseJBossWebLoader" to false in the tomcat.sar and for each web app defined Java2ClassLoadingCompliance=false. The last two steps forced me to include a jndi.properties to each web app, so I am doing RMI calls to the ejbs instead of straight calls (I was getting socket time outs because of the two differet classloaders JBoss and Tomcat).

      But even with all that I am still getting errors with commons-logging and log4j (ClassCastExceptions).

      Is there a better way to deploy multiple application into a single instance of jboss? Are there some tutorial that I missed somewhere? It just seems that JBoss is "one instance - one application" type of a server. Please correct me if I am wrong here.

      Thanks

      Dmitry