JBoss 4.0.4 CR 2, EJB3

An application with multiple .ear files, a common .jar and a .sar file.

The common.jar contains the component (local) interface of a SLSB. The SLSB 
impl is in one of the ears. Everything works fine, but the problem appears in 
the SAR file when the application is redeployed. It works fine in ALL of the 
ears, which are using this ejb (no matter how many times I redeploy)

So I found the following: when I deploy the first time after starting JBoss, 
all ejb clients (both sar and ears) retrieve the ejb object w/o a problem. But 
when I redeploy, the ejb object retrieved by the JNDI lookup in the SAR file is 
an instance of the same (the old, first loaded) EJB class. There is no problem 
when retrievig the EJB from any of the ears, because they receive an instance 
of a new (obviously reloaded) class, which is an "instanceof" the NEW local 
interface.

So I get a ClassCastException, because the EJB interface is reloaded and I am 
trying to cast the ejb impl which is still "instanceof" the OLD EJB Interface.

This is probably expected behaviour for a SAR, but it is making troubles in 
this case. Any ideas how to cope with this? Maybe I need to configure JBoss 
somehow..?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3941943#3941943

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3941943


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to