users@glassfish.java.net

Re: Accessing EJB in different EAR?

From: <glassfish_at_javadesktop.org>
Date: Thu, 07 May 2009 06:12:39 PDT

Ok, I had to come back to this problem and I have kind of solved it, but some things remain unclear to me. I'd be grateful for carification or pointers to relevant parts of the documentation. I tried the following using NetBeans 6.5.1:

1) create two EJB projects (X/Y), each containing a SLSB (XSession/YSession) with remote interfaces. Both projects compile, build and deploy. Trying to inject a reference to XSession into YSession fails.

2) create two enterprise Applications, each containing an EJB project(X/Y), each of which contains a SLSB (XSession/YSession). Both projects compile, build and deploy. Trying to inject a reference to XSession into YSession succeeds. Inspection of X.ear reveals that it contains x-ejb.jar, which in turn contains all class files that make up XSession.

I'd be interested in finding out the minimum prerequisites for accessing XSession from YSession, so I removed all class files except for the Remote Interface of XSession from X.ear. So is this the bare minimum that is required?

Thanks for any help

Michael
[Message sent by forum member 'mschwind' (mschwind)]

http://forums.java.net/jive/thread.jspa?messageID=345377