Hi,
I'm trying to access a 2.x EJB in an external Application deployed in the same JBoss 4.0.5 server from a Seam 2.0.2 managed POJO.
Here is the code I usually use to create a reference to a Bean:
InitialContext initial = new InitialContext(); Object objref = initial.lookup("ejb/UserManager"); UserManagerHome home = (UserManagerHome) PortableRemoteObject.narrow(objref, UserManagerHome.class); UserManager userManager = home.create();
When executing this code in a Seam managed POJO (not EJB) I get a ClassCastException because the lookup returns a Proxy-Object, that doesn't seem to have any type I know.
Do I have to set up a reference in any of my deployment descriptors?
Thanks,
Alex
I forgot to mention that the Seam application and the other application is deployed as an EAR.