• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

classpath / external jars

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am using JBoss 3.0.4. I have the following questions about jars and classpath.
* the "server/default/lib" directory should contains Mbeans JAR that are automatically deployed at start time. Is it correct?
* Where can I put the external JAR files that I use (castor, JDBC driver and so on) ? I read that I can put those in the lib/ext directory but it does'nt seem to work?
* Where can I specify the classpath order between the JAR file ? Is is in the bin/run.bat ? Or in an XML file like the jboss-service.xml or user-service.xml ?
* Can I add a build directory in the classpath directly without building my classes in a JAR file ?
Thank you for any help (I'm a bit lost :-)
Christophe
 
Author
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Christophe Grosjean:

* the "server/default/lib" directory should contains Mbeans JAR that are automatically deployed at start time. Is it correct?
* Where can I put the external JAR files that I use (castor, JDBC driver and so on) ? I read that I can put those in the lib/ext directory but it does'nt seem to work?
* Where can I specify the classpath order between the JAR file ? Is is in the bin/run.bat ? Or in an XML file like the jboss-service.xml or user-service.xml ?
* Can I add a build directory in the classpath directly without building my classes in a JAR file


No, your MBeans go in server/default/deploy.
I prefer to put the the jdbc drivers in the lib directory, but you could put them in deploy.
You don't need to specify the classpath order of jars. If you do, you are doing something wrong. (IMHO)
I don't know what you mean by "build directory". You can deploy an ear/war/sar a s a directory containing the same structure as the equivalent file and jboss will read it fine. You can also tell jboss to deploy from places other than the deploy directory....
 
Christophe Grosjean
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Thanks for your answers
Well in some particular cases, it is useful to specify order :
Let's assume that an external jar is provided with an implementation of xerces embedded ( version 1.3 for instance ) but I want to use the version 2.5. Without specifying classpath order, I have no way to force JBoss to use the second one : it will depend on JBoss way of ordering jar deployment!
(yes, I could also remove the embedded version from the external jar...).
Concerning the build directory, let's assume that my IDE build my classes into c:\myproject\classes. Actually, I have a Ant script that copy my changed classes from c:\myproject\classes to the jboss\deploy. I'd like JBoss to automatically use them from c:\myproject\classes. How is it possible ?
Thx
Christophe
 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
norman,

I prefer to put the the jdbc drivers in the lib directory, but you could put them in deploy


which "lib" directory?
Where should all third party jars be placed, in order to be visible just for a specific application (so something ecquivalent to what in tomcat is: C:\Tomcat41\webapps\<my web application>\WEB-INF\lib) and to try to avoid jar clashes?
Miki
 
norman richards
Author
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Miki Muzsi:
which "lib" directory?


server/default/lib
On the other problem, for a web app you should be able to put your jar files inside the war file and expect them to be separate from other apps. For the rest of your jars, this is a HUGE problem with JBoss. I've ranted about it many times:
http://members.capmac.org/~orb/blog.cgi/tech/java/jboss_ucl.html
http://members.capmac.org/~orb/blog.cgi/tech/java/jboss_ucl2.html
http://members.capmac.org/~orb/blog.cgi/tech/java/jboss_ucl3.html
The end result is that for everything else you need to isolate your applications using the loader-repository settings in jboss-app.xml. Yes, it's a pain, but that's the only choice until the JBoss guys realize how much pain the dumb UCL inflicts on us poor developers...
 
Is that a spider in your hair? Here, threaten it with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic