Help coderanch get a
new server
by contributing to the fundraiser
  • 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

JBoss 4.2.3 class loading sequence

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi every body.
I have an application which contains same jar file's with different version... and those jar are my applicaition specific...

Like base.jar which is my applications model module jar files..
There are 3 version of it.

Like base-1.0.jar, which is the initial one,

base-2.0.jar which is later contains some files which are already there in base-1.0.jar but modified....

and last base-sp.jar which is appliaction specific jar file...

what i want to do is.... my war file contians base-sp.jar........ in web-inf/lib

this jar file should be ovverriden by base-2.0.jar and
base-2.0.jar should ovverride base-1.0.jar..

while loading the classes................

when application is running...... class loader should first look into base-spec.jar for the class if it is not found then should look into base-2.0.jar and it doesnt find it their then it should go to base-1.0.jar



Kindly any help me to achive this....

Thanks in Advance,
PhaniKiran.Gutha
 
Greenhorn
Posts: 7
Oracle Redhat Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI PhaniKiran,

What you can do is that you can keep

base-sp.jar -> in your war file in [ web-inf/lib ]

base-2.0.jar -> in server lib folder in [ /jboss-as/server/<PROFILE>/lib ]

base-1.0.jar -> in JBoss lib folder in [ /jboss-as/lib ]

Now when you hit your application which is kept in the [/jboss-as/server/<PROFILE>/deploy] then the in case of WAR files the application would pick up the base-sp.jar first and if its not found any jar in WAR then it would look into [ /jboss-as/server/<PROFILE>/lib ] which has base-2.0.jar and if that too is not found then it would look into [ /jboss-as/lib ] which has base-1.0.jar this way your requirement is fulfilled.

Try this out
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have a look at these:

http://community.jboss.org/wiki/classloadingconfiguration
http://community.jboss.org/wiki/jbossclassloadingusecases
 
Phani.Kiran Gutha
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ravish Mody ,

I have tried what you have said application loaded fine. but in middle am getting



As i said earlier GridTab is in 3 of the jar with their own modifications......

am unable to find the solution for it ...

Can you help me...

 
Phani.Kiran Gutha
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jaikiran Pai ,
I have seen into the links you have provided but...
only one question i have is what should be in place of

com.example:archive=unique-archive-name
 
Nothing? Or something? Like this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic