I want my
EJB to behave as remote and local as well. If my EJB is being called from client ( say
servlet ) then there sbould be a remote call. If my EJB is being called from any other EJB then it should be a local call.
Using local interfaces we can do. But my EJB should be remote and local as well.
for this i have an aproach. I dont know how far it is correct and reliable.
the aproach is as follows :
I will declare my EJB in the ejb-jar.xml for remote block and also for local block. but with different ejb names. I use remote ejb name to lookup from the servlet. and i use local ejb name to lookup from another EJB.
Will this be a good approach. Or there are any other alternatives to acheive this type of issue.
Thanks with Regards
Venkat