Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2006

Tip: Looking for answers? Try searching our database.

ejb - remote or local interface ?

Thread view: 
oliviergir@gmail.com - 15 May 2006 13:40 GMT
Hello,
What is the overhead of calling an ejb via its remote interface
(instead of the local interface) knowing that the client and the ejb
are within the same application server  ? Isn't it close to zero ?
Would you then say it is a good advice to systematicly call the ejb via
the remote interface in case one day the ejb had to be deployed on a
specific remote server ?
Mark Thomas - 15 May 2006 17:28 GMT
> Hello,
> What is the overhead of calling an ejb via its remote interface
> (instead of the local interface) knowing that the client and the ejb
> are within the same application server  ? Isn't it close to zero ?
I don't know the magnitude of the difference, but it is significant and
certainly not close to zero.
> Would you then say it is a good advice to systematicly call the ejb via
> the remote interface in case one day the ejb had to be deployed on a
> specific remote server ?

YAGNI?  Possibly, but how likely is that possibility?

Mark
Larry - 15 May 2006 19:11 GMT
We have an web app and EJB's on the same server.  I didn't write the
EJB's, but the chap that did set them up to be called by the local
interface and mentioned that it did improve performance significantly
over the remote interface calls.....for what it's worth.

Larry
oliviergir@gmail.com - 16 May 2006 09:19 GMT
A real application server (our is websphere) is not clever enough to
shortcut the overhead if the web app and EJB are on the same server ?
chris brat - 16 May 2006 09:52 GMT
There is a big performance difference because local
interface allow the ejb parameters to be passed
by reference (memory address) and remote interfaces
require the parameters to be passed by
value (objects are serialized and deserialized).

You can also ONLY use local interfaces if you are making
use of entity beans with entity bean relationships.

Rather deal with the problem of the remote interface when
you get to it because there is a big chance that the logic
will be slightly different, and that the access and/or transaction
settings may need to be modified to.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.