Scott,
Thanks for the quick reply, but I'm not quite sure I understand your
answer. Perhaps this isn't the proper board for this question, because this is
really a classloading question; I just happened to run into the problem when
deploying an MBean.
My goal is to have only one copy of every class anywhere in the server because
we are using the Unified ClassLoader with class sharing among all applications.
Having 2 copies of a class has caused problems in the past. For example,
Class A in package com.example has protected method callMe().
Class B, also in package com.example tries to call A's callMe().
The WEB-INF/lib directory of a war file contains a jar that contains both A
and B, and a utility jar contained in a separate ear also contain A and B.
Class A and class B happen to be loaded by different classloaders (one for the
ear, one for the war).
Result is an IllegalAccessError.
Our solution is to use the following rules for deployment:
| * Only one deployment unit should contain any class.
| * All classes in a particular package should always be included in the same
deployment unit.
|
Now, I have an MBean that depends on an EJB. The EJB's local interface is
already being deployed in a separate deployment unit. Since the SAR that
contains the MBean will not always be deployed with the application, I don't
want to include the local interface ONLY in the SAR.
Are you saying it's impossible to make the MBean depend on the EJB without
including the classes in the SAR? What is the recommended approach for
deployment in this situation, given that we are sharing classes across
applications? Putting the classes in the lib directory for my configuration is
not an option, since I would like hoy deployment to work. Thanks,
--Steven
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3923290#3923290
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3923290
---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user