users@glassfish.java.net

Re: Accessing EJB in different EAR?

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Thu, 07 May 2009 11:47:14 -0700

Both option should work if you package both remote interfaces in both archives.
You do not need to add bean classes.

Regards,
-marina

glassfish_at_javadesktop.org wrote:
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>