[jboss-user] [Beginner's Corner] - Re: jBoss folders in classpath?

Bruno Melloni do-not-reply at jboss.com
Mon Nov 15 10:43:29 EST 2010


Bruno Melloni [http://community.jboss.org/people/bmelloni] created the discussion

"Re: jBoss folders in classpath?"

To view the discussion, visit: http://community.jboss.org/message/571246#571246

--------------------------------------------------------------
We normally would just put that library's configuration file in the .SAR, right next to the .jar of the library.

Here are some details of what we do:

* To keep our applications separate for jBoss' components we place all of our deployed applications in server/<env>/deploy/CustomApps.  (just create the folder, jBoss will treat them as if they were in ./deploy)
* In CustomApps we have an OpenSourceLibs.sar.  It contains a minimal META-INF/jboss-service.xml (<server/>) and all of the open source libraries that we use and are not supplied by jBoss already (various apache commons jars, spring and its dependencies, etc).  Because of how jBoss works, all of these assets are by default in our other apps classpath and we don't need to add them to their lib folders.
* Also in CustomApps we have a GeneralLedgerIF.sar that contains again a minimal META-INF/jboss-service.xml, generalledgerIF.jar and generalledgerIFContext.xml (the spring context for the general ledger interface).  Since jBoss exposes these in the classpath, an application that needs to interface with the general ledger can load a spring bean from generalledgerIFContext.xml or make a method call to a class in gneralledgerIF.jar... without having any of it in the .../lib folder of the app.
* If for some reason a given app (say a Billing to General Ledger integration app - B2GL for short) needs to use a different version of libraries, jboss has options in jboss-web.xml that allow you to ensure that those "wrong version" libraries in B2GL are not seen by any other application, and that B2GL uses its own version of the libraries instead of the ones in the "shared" .sars.  I won't go into those jboss-web.xml options... as they are quite complex and well documented by jBoss.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/571246#571246]

Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101115/007777f2/attachment.html 


More information about the jboss-user mailing list