Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
16. Jun 2008, 15:40 CET | Link

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

1 Reply:
16. Jun 2008, 15:44 CET | Link

I forgot to mention that the Seam application and the other application is deployed as an EAR.