• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Class loader

 
avihai marchiano
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The server runs only single application.

JBoss 4.2 has under server\lib hibernate jars (core,annotation). I want to use in different versions so,
1.Do you recommended to replace JBoss jars with my jars or to include the new versions in my ear. I don�t like the first option because it easier to me to control with version control and with maven on the application jars.
2.in case I decide to put include them in the ear , how can I make sure that the application will use them?

Thank you
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its always recommended to package the libraries as part of your ear file. So yes, the second approach the recommended one. For more details about how to make the ear pick up these libraries, go through the following articles:

JBossClassLoadingUseCases

ClassLoadingConfiguration
 
avihai marchiano
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your answer.

A lot of those third-parties jars are already existd in jboss server lib.

Some of them are common jars like appache common and dom4j.
Do you recommend to have those jars also in the ear and to have a bigger ear ?

Thank you
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Those libraries in the JBoss lib folder are going to change whenever there is a new version of JBoss. So, if you are using those 3rd party libraries in your application then its recommended to bundle the appropriate version of those libraries in your ear. This will reduce the impact of version changes whenever you upgrade to a new version of JBoss or even whenever your application wants to upgrade to a recent version of the 3rd party library.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic