users@glassfish.java.net

Re: Accessing EJB in different EAR?

From: Sahoo <sahoo_at_sun.com>
Date: Wed, 28 Jan 2009 18:48:48 +0530

glassfish_at_javadesktop.org wrote:
>
>> 2. Package the client view classes (ABSession and its dependencies in
>> your case) in the client ear file.
>>
>
> I'm not quite sure I understand what you mean. The problem is not (yet) that my client can't access either of these SLSBs, but rather that I can't deploy XYSessionBean.
In your case XYSessionBean is a client of ABSessionBean, isn't it?
> Do you mean that both should reside in a common EAR?
I said to package the client view classes of ABSessionBean in the client
ear which in your case is the ear containing XYSessionBean. The client
view classes are classes needed to call an EJB; they include the
business interface and its dependencies.
> This is not what I'm trying to achieve. I'd like to be able to deploy theses two components individually, each in their individual EAR. What would be the necessary steps (configuration options, lookup, etc.) to achieve this?
>
If the default look up fails, you may have to use mappedName attribute
in @EJB to specify the actual JNDI name of the called EJB. You can use
admin console to browse the JNDI tree and find out the JNDI name of the
EJBs.

By the way, next time tell us the failure (exception/error message/etc)
you see.
> Thanks
>
> Michael
> [Message sent by forum member 'mschwind' (mschwind)]
>
> http://forums.java.net/jive/thread.jspa?messageID=328623
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>