sun-ejb-jar.xml How to reference remote EJB deployed in another server instance
I have tried to use @EJB to access remote 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,
Also, I have sun-ejb-jar.xml
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 how to write sun-ejb-jar.xml to accomplish this? I tried GF 3.1 and 3.1.2, but all failed.
Thanks very much.