简体   繁体   中英

Communication between EJBs deployed in different Application Servers from different vendors

I 'm trying to create a small EJB 3.1 application in which I want to use two application servers from two different vendors. (JBoss 6.1.0 Final and Glassfish 3.1). This is just to experience the taste of distributed applications and new features of EJB3.1.

This is the problem I'm having…

I have created a simple EJB (kind of a hello world ejb) and deployed it in GlassFish server which is running in the machine A. Let's call it GlassFishHelloWorldEjb. This one has business remote and local views. I have created another EJB project in which I have an EJB called JBossHelloWorldEjb. I have deployed it in the Jboss server which is running in the machine B.

Now I want to inject GlassFishHelloWorldEjb to a reference in the JBossHelloWorldEjb so that I can call it within the JBossHelloWorldEjb. Then I have a web app deployed in the Jboss which calls the JBossHelloWorldEjb.

MyWebApp(Jboss, machine B)-----> JBossHelloWorldEjb (Jboss, machine B)----> GlassFishHelloWorldEjb(GlassFish, Machine A)

I tried many ways to inject the GlassFishHelloWorldEjb in to the JBossHelloWorldEjb but failed. Could some please shed some light to achieve this.

Would greatly appreciate if you could show me the way to do this through both INJECTION and Programmatic JNDI look up.

Cheers Lekamge

one option might be to use Spring RemoteEJB Proxies OR. import client required jars for remote and write your own wrapper

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM