ejb - remote or local interface ?

O

oliviergir

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 ?
 
M

Mark Thomas

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
 
L

Larry

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
 
O

oliviergir

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 ?
 
C

chris brat

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top