users@glassfish.java.net

EJB reference to EJB deployed in another instance

From: <forums_at_java.net>
Date: Sat, 22 Sep 2012 09:47:12 -0500 (CDT)

Hi all, I have tried to use @EJB to access EJB which deployed in another
server instance. Below is my deploy structure, [ejbA-test-ear], this EAR
contains a very simple remote interface TestAInterface and stateless EJB
TestABean, I can succeed to deploy it in server instance1. INFO: Portable
JNDI names for EJB TestABean :
[java:global/ejbA-test-ear-0.0.1-SNAPSHOT/ejbA-test-0.0.1-SNAPSHOT/TestABean!com.shmily.TestAInterface,
java:global/ejbA-test-ear-0.0.1-SNAPSHOT/ejbA-test-0.0.1-SNAPSHOT/TestABean]
INFO: Glassfish-specific (Non-portable) JNDI names for EJB TestABean :
[com.shmily.TestAInterface,
com.shmily.TestAInterface#com.shmily.TestAInterface] INFO:
ejbA-test-ear-0.0.1-SNAPSHOT was successfully deployed in 359 milliseconds.
[ejbB-test-ear], this EAR contains another remote EJB TestBBean, where I use
@EJB to access TestABean, @EJB TestAInterface tai; Also, I have
sun-ejb-jar.xml TestBBean TestBBean ejb/TestABean
corbaname:iiop:localhost:3700#TestABean When I tried to deploy it to server
instance2, I get below message, *WARNING: This bean [TestBBean] has no ejb
reference by the name of [ejb/TestABean]* *SEVERE: DPL8006: get/add
descriptor failure : ejb-ref TO ejb/TestABean* *WARNING: DPL8007: Unsupported
deployment descriptors element jndi-name value
corbaname:iiop:localhost:3700#TestABean* INFO: ejbB-test-ear-0.0.1-SNAPSHOT
was successfully deployed in 187 milliseconds. Then I failed to lookup
TestBBean, which I think because of the error above. Could anyone tell me
where I'm wrong about this? I tried GF 3.1 and 3.1.2, but all failed. Thanks
very much.

--
[Message sent by forum member 'shmilywzc']
View Post: http://forums.java.net/node/890451