This content has been marked as final.
Show 8 replies
-
1. Re: Why loading the class in EJB jar rather than the one in
jaikiran Jul 13, 2006 5:48 AM (in response to bennyckp)My jboss tomcat setting is like below..
<attribute name="Java2ClassLoadingCompliance">false</attribute> <attribute name="UseJBossWebLoader">false</attribute>
I believe, this should be:<attribute name="Java2ClassLoadingCompliance">true</attribute> <attribute name="UseJBossWebLoader">true</attribute>
Try it out. -
2. Re: Why loading the class in EJB jar rather than the one in
bennyckp Jul 13, 2006 6:12 AM (in response to bennyckp)Thanks, jaikiran.
But it still don't work.
Could you tell me what is the purpose to config like this ?<attribute name="Java2ClassLoadingCompliance">true</attribute> <attribute name="UseJBossWebLoader">true</attribute>
How can I use separate class loaders in separate deployments?
Thanks. -
3. Re: Why loading the class in EJB jar rather than the one in
jaikiran Jul 13, 2006 7:22 AM (in response to bennyckp)How can I use separate class loaders in separate deployments?
There is very good information about this on the Wiki pages. Here are the links to the same:
http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossClassLoadingUseCases
http://wiki.jboss.org/wiki/Wiki.jsp?page=EnableClassloaderLoggingCould you tell me what is the purpose to config like this ?
<attribute name="UseJBossWebLoader">true</attribute>
Have a look at:
http://jira.jboss.com/jira/browse/JBAS-1691
And looking at this JIRA and the earlier links that i mentioned, i guess you were correct in mentioning<attribute name="UseJBossWebLoader">false</attribute>
-
4. Re: Why loading the class in EJB jar rather than the one in
jaikiran Jul 13, 2006 7:38 AM (in response to bennyckp)I went through your first post once again and was a bit confused by the statement:
When I startup my JBoss, I don't know why the web application uses the ClassA in the mdb.jar which has no system out
Can you explain as to who is invoking this ClassA? Is it JBoss or it from some other class? Just trying to understand as to why JBoss would invoke that class when deployment is going on, assuming ClassA is just a POJO class(or is it not?) -
5. Re: Why loading the class in EJB jar rather than the one in
bennyckp Jul 13, 2006 8:24 AM (in response to bennyckp)Sorry to confuse you.
I should say "After I startup my JBoss,.."
ClassA is invoked by a JSP in app.war rather than JBoss.
Thanks for your useful links first.
As I mentioned before, I've read all these before this post.
To my understanding, do you suggest the following config ?<attribute name="Java2ClassLoadingCompliance">true</attribute> <attribute name="UseJBossWebLoader">false</attribute>
As I am back home, I will try this tomorrow.
Thanks for your help again ! -
6. Re: Why loading the class in EJB jar rather than the one in
jaikiran Jul 13, 2006 10:32 AM (in response to bennyckp)To my understanding, do you suggest the following config ?
<attribute name="Java2ClassLoadingCompliance">true</attribute> <attribute name="UseJBossWebLoader">false</attribute>
NO. Let it be:<attribute name="Java2ClassLoadingCompliance">false</attribute> <attribute name="UseJBossWebLoader">false</attribute>
With this setting and with Classloader logging enabled:
http://wiki.jboss.org/wiki/Wiki.jsp?page=EnableClassloaderLogging
post the classloader logs. That will surely help in understanding, whats going on internally. -
7. Re: Why loading the class in EJB jar rather than the one in
bennyckp Jul 14, 2006 12:27 AM (in response to bennyckp)Please refer the scenario and the config in my first post.
In the jmx-console, I invoke the getPackageClassLoaders() of the loader with the param=ClassA.
It returns like that[org.jboss.mx.loading.LoadMgr3$PkgClassLoader@bb365d
{ucl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@4129e3
{ url=null ,addedOrder=0} order=1},
org.jboss.mx.loading.LoadMgr3$PkgClassLoader@ee37f2
{ucl=org.jboss.mx.loading.UnifiedClassLoader3@10cf62
{ url=file:/C:/jboss-4.0.3SP1/server/default/tmp/deploy/tmp44379mdb.jar ,addedOrder=41} order=2},
org.jboss.mx.loading.LoadMgr3$PkgClassLoader@19b07e9
{ucl=org.jboss.mx.loading.UnifiedClassLoader3@24fe6b
{ url=null ,addedOrder=0} order=3}
]
My question is:
1. What is the meaning of "url=null"?
2. Does the "order=1", "order=2"... determine the class loading order?
3. ClassA is loaded from mdb.jar instead of the app.war. But why?
FYI, I can see the package of ClassA (say com.XXX) only appears once in the ucl log....
[48531,UnifiedClassLoader,main] New jmx UCL with url file:/C:/jboss-4.0.3SP1/server/default/tmp/deploy/tmp44379mdb-1.3.jar
[48531,RepositoryClassLoader,main] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@1da669c, cl=org.jboss.mx.loading.UnifiedClassLoader3@10cf62{ url=file:/C:/jboss-4.0.3SP1/server/default/tmp/deploy/tmp44379mdb-1.3.jar ,addedOrder=0}
[48531,RepositoryClassLoader,main] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@1da669c, cl=org.jboss.mx.loading.UnifiedClassLoader3@10cf62{ url=file:/C:/jboss-4.0.3SP1/server/default/tmp/deploy/tmp44379mdb-1.3.jar ,addedOrder=0}
[48531,UnifiedLoaderRepository3,main] Adding org.jboss.mx.loading.UnifiedClassLoader3@10cf62{ url=file:/C:/jboss-4.0.3SP1/server/default/tmp/deploy/tmp44379mdb-1.3.jar ,addedOrder=0}
[48547,ClassLoaderUtils,main] Indexed pkg: com.XXX, UCL: org.jboss.mx.loading.UnifiedClassLoader3@10cf62{ url=file:/C:/jboss-4.0.3SP1/server/default/tmp/deploy/tmp44379mdb-1.3.jar ,addedOrder=41}
[48547,ClassLoaderUtils,main] Indexed pkg: com.XXX.YYY, UCL: org.jboss.mx.loading.UnifiedClassLoader3@10cf62{ url=file:/C:/jboss-4.0.3SP1/server/default/tmp/deploy/tmp44379mdb-1.3.jar ,addedOrder=41}
...
It's difficult to post the class loading log here as it is too large. Could you suggest what thing I should post here?
Thanks. -
8. Re: Why loading the class in EJB jar rather than the one in
jaikiran Jul 14, 2006 3:06 AM (in response to bennyckp)FYI, I can see the package of ClassA (say com.XXX) only appears once in the ucl log.
Just to make sure that the packaging of your app.war and mdb.jar is correct, can you run the following commands from the prompt and post the output:jar -tf app.war
jar -tf mdb.jar
This will display the contents of your archive.
Alternately, if your application is not a huge one and if mailing your application is not a issue, you can mail me the same to jai_forums2005 at yahoo.co.in. Let me try it out