• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Local session bean call from a client in a different jar

 
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

A web service is a type of remote call. I don't follow what this would save you.
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Taariq San
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic