-
1. Re: deploy different versions of class concurrently
sanne Mar 11, 2003 8:29 AM (in response to erwin.wernsen)Hoi Erwin,
I don't think this is possible.
JBoss uses a unified classloader. This classloader makes sure there is no classloader hierarchy, but one 'repository' in which all deployed classes are registered. The first class version which is registered by an app makes it to the repository, any subsequent attpempt of an app that tries to register the same class fails. Only when the first app to register undeploys the newer versions become available.
What you can do is register the same class under a different JNDI name, making it possible to deploy with one class with different options (CMP/database etc)
client1/ejb/MyEJB
client2/ejb/MyEJB
Any news on JBoss in Holland?
Regards,
Sanne -
2. Re: deploy different versions of class concurrently
sanne Mar 11, 2003 8:31 AM (in response to erwin.wernsen)p.s. keywords are:
UCL(A?) unified classloader architecture
repository
And this: two version of a class are two different classes, no ? 1=2, 2=1 ?? ;-) -
3. Re: deploy different versions of class concurrently
erwin.wernsen Mar 11, 2003 9:11 AM (in response to erwin.wernsen)Hi Sanne,
Thanks for your reply. What I am trying to accomplish is to have a different environment for each developer.
We have an automated build which compiles and deploys the application each night. Now, I want developers to be able to run the build using their modified sources. When deploying I prefix all the JNDI names with the username. This works fine but the already deployed beans are not replaced with the new versions. So the changes have no effect unless I undeploy everything first.
What I found out so far is that I can use the <loader-repository> element to define a scope for the classloader per ear or ejb-jar. I have not yet fully tested it but sofar it does seem to do the trick! -
4. Re: deploy different versions of class concurrently
sanne Mar 11, 2003 9:27 AM (in response to erwin.wernsen)So ... that's a yes.
I lookedaround and found this download:
http://prdownloads.sourceforge.net/jboss/ClassLoading.pdf?download
'...
Scott Stark of JBoss Group has made available a free excerpt from the (for pay) JBoss Development and Administration that goes into detail on what the issues are when setting up the Classloader architecture in the most recent JBoss versions.
...
This is a must read for all people that develop on JBoss and use frameworks that rely on a number of jar files from sub projects.
..'
There you go! -
5. Re: deploy different versions of class concurrently
erwin.wernsen Mar 11, 2003 3:25 PM (in response to erwin.wernsen)The article clears things up for me! Thanks!
erwin -
6. Re: deploy different versions of class concurrently
sanne Mar 13, 2003 6:03 AM (in response to erwin.wernsen)I think it is recommendable to use the java:comp/env namespace when looking up references from your beans when deploying the different ear's. This namespace allows for local component lookups.
Take a look at:
http://www.objectweb.org/jonas/current/doc/PG_Environment.html