[jboss-user] [EJB 3.0] - Communication between EJBs across 2 ears

Wolfgang Knauf do-not-reply at jboss.com
Wed Jun 16 07:46:40 EDT 2010


Wolfgang Knauf [http://community.jboss.org/people/WolfgangKnauf] replied to the discussion

"Communication between EJBs across 2 ears"

To view the discussion, visit: http://community.jboss.org/message/548229#548229

--------------------------------------------------------------
Hi,

don't combine "@EJB" annotation and manual lookup, use only one way ;-).

If you want to do the lookup yourself:
How did you declare the environment naming context (ENC)? You need a JBoss specific file to do so. If you want to access the ENC from another session bean, you probably have to add a "jboss.xml" file to your project. In "ejb-jar.xml", you need an "ejb-ref" element, and "jboss.xml" also needs this element and points to the global JNDI name of the bean.

Lookup will also work if you use the global JNDI name of your bean. This defaults to "earname/MyBean/local" for the local interface and "earname/MyBean/remote" for the Remote interface. In your sample, it should be "svc/Role/remote".

Did you verify that the Role bean is bound to the JNDI names you expect (use the "JNDIView" mbean to check those bindings)?

Hope this helps

Wolfgang

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/548229#548229]

Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100616/f212bdb1/attachment.html 


More information about the jboss-user mailing list