aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Jboss and Ejb 2.1 ejb-ref lookup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Jboss and Ejb 2.1 ejb-ref lookup" Watch "Jboss and Ejb 2.1 ejb-ref lookup" New topic
Author

Jboss and Ejb 2.1 ejb-ref lookup

Emanuele Ghe
Ranch Hand

Joined: Feb 04, 2009
Posts: 111
Hi,
I am using JBoss 4.2 with ear-isolation = true and call-by-value=false

I have the following situation:

ejb A needs to call ejb B, and both are in different isolated EARs.

To do this, as stated on the JBoss community wiki's:

http://www.jboss.org/community/wiki/classloadingconfiguration

I have to configure ejb-jar.xml and jboss.xml of ejb A with references to ejb b.

So, these are my configuration files:
ejb A = TISService
ejb B = GTSService

ejb-jar.xml of ejb A


jboss.xml of ejb A



This is the code I am using to lookup ejb B from a class in ejb A (taken from an example in the JBoss UserGuide):



The problem is that the lookup fails.

If I try to lookup the JNDI name of the EJB, the lookup succeed, but the create fails with "Invalid invocation, check your deployment..." because it is trying to create an instance of ejb B that is in an isolated ear.


Can someone help me?

Why the lookup of the ejb-ref-name fails, even if I saw that is present in the JNDI tree of ejb A ?รน

How should I use ejb-ref with jboss ?

Thanks.


SCJP6 with score 90%. I am conscious of my ignorance and ready to learn from everyone.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jboss and Ejb 2.1 ejb-ref lookup