Hi !

I'm working on integrating Tomcat in jBoss 2, as a MBean.

I managed to solve all the class loading problems (yes, I'll commit
everything soon), but now I'm running into Proxy problems...

I made a simple EJB Stateless Bean client which can be invoked either
stand-alone, or from a servlet (thus running inside the same VM as jBoss,
since Tomcat is now in it).

The stand alone client works flawlessly, but the servlet fails

Object slHome = ctx.lookup("nextgen.StatelessSession");
// works OK, but then
StatelessSessionHome  statelessSessionHome = (StatelessSessionHome) slHome;
// fails

I get a ClassCastException. In both cases the class of slHome is $Proxynn
(where nn is a number). If I watch the interfaces implemented by this class
(slHome.getClass().getInterfaces() ), I do have
org.jboss.zol.testbean.interfaces.StatelessSessionHome in both cases...

So what's the problem ? Is it something which deals with the hack which
optimizes intra-VM calls ?

Sylvain


Reply via email to