[jboss-user] [JBoss Microcontainer] - Re: EJB's and classloading

Miklos Balazs do-not-reply at jboss.com
Tue Jan 4 05:17:22 EST 2011


Miklos Balazs [http://community.jboss.org/people/mbalazs] created the discussion

"Re: EJB's and classloading"

To view the discussion, visit: http://community.jboss.org/message/578585#578585

--------------------------------------------------------------
Hi Ales,

Thanks for your answer!
> > 
> > Would it resolve the problem if I could somehow delegate the loading of the remote interface to the default classloader, so that that single class would not be isolated? Is it possible to do that?
> You can simply switch the location of that MBean class to Service.ear.
> And the isolated Application.ear would still find it.

The MBean class is already in Service.ear, and the Application.ear has no problem accessing it. The problem is that when the MBean calls back to the application, the application's code needs to access an EJB. And that call is originated from the MBean, thus from Service.ear's domain. And the EJB's remote interface is in Application.ear, which can't be seen from Service.ear's domain. And I don't want to move classes, these two deployments are separated for a reason.

One solution that came to my mind would be two put the EJB's classes in the lib/ of the application server instance, thus it would be available for all classloaders. But that's not good because I need the EJB's to be hot-deployable. And the application archive contains some Seam and Portlet Bridge libraries that need to be isolated. Putting the EJB to another root deployment would also work, but I wouldn't want that either, if it's possible to do otherwise. I think now I start to see it clearer  :) .

Now I think the question is: how can I define classloading isolation in application.ear on a per-library basis. So that I can isolate the Seam libraries and stuff, but not the EJB's. This would resolve this situation, am I right?

Regards,
Miklos
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/578585#578585]

Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2114]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110104/fc7c8c6b/attachment.html 


More information about the jboss-user mailing list