I have a client packaged and deployed seperately from the web or business tier but as a shared library and is in the same JVM as the EJB. Is it possible to make a local call to the EJB as you would from a servlet? For servlets you have to configure the web.xml, how would one do it from this jar?
Remote call would be too much serialization/deserialization, I'll consider a RESTful web service as well.
It is possible to make a local call to a local EJB as long as the calling servlet is within the application scope, i.e. packaged in the same EAR.
The overhead of RMI is a trade off given the power of invoking method calls remotely. However, it is a question of your requirement need. If your application does not in any way need remote calls, then RMI in the same JVM is redundant.
Uy Jerwin Louise Vergara
Junior Developer / Research and Development at Incuventure Partners Corporation
posted 12 years ago
Thanks for the input.
Originally posted by Jeanne Boyarsky: When you say it is in the same JVM as the EJB, do you mean it is called from the EJB? If so, you can make a local call. If not, you cannot make a call.
Its a custom login module, in a shared library.
A web service is a type of remote call. I don't follow what this would save you.
If it has to be remote, and some remote calls are faster than others... I'm not suggesting REST is quicker, it has similar + different costs.
I'll make a remote ejb call for the moment as time is short and the todo list longer.
Maybe he went home and went to bed. And took this tiny ad with him: