cancel
Showing results for 
Search instead for 
Did you mean: 

How to get reference of a SessionBean From RemoteClient

Former Member
0 Kudos

How to get reference of a SessionBean in a ApplicationServer from another SessionBean running in Another ApplicationServer

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

There is a method, getHandle() on the EJBObject interface that your remote interfaces extend. This handle can be used to pass a reference to an EJB to someone else (possibly running in another JVM). You can then call getEJBObject() on the Handle instance and get your remote interface on which you can call methods. Should be able to cast it to your specific bean.

I haven't done this, so definitly test it out, but I think this is what you want to do.

check it:

http://mail-archive.objectweb.org/jonas/2000-12/msg00064.html

I suggest u not to go for more complex code, make it simpler, or if its really required use it as a webservice

Regards

Abhijith YS

former_member185029
Active Contributor
0 Kudos

Hi,

I would suggest to expose it as a service and use it on another server (Incase it is a stateless session bean).

Ashu