Samuel,
Most of the middleware optimize the calls between remote objects:
- located in the same process, or JVM, using a direct call
- in 2 process on the same machine (using IPC)
- in 2 processes on 2 machines (using IP)
You must check with the middleware used on your application server.
To check, send an exception and look compare the stack trace for a remote
and remote-local call.
Else, The problem is that remote-local calls may have a different behavior
than remote calls for the parameters/returned values.
With remote calls you receive a copy of the serialized objects sent by the
client through the network marchalling.
With local-remote call, you may receive a direct reference (middleware
dependent).
So the following method will not have the same result if the call is remote
or local:
public void addHello(List list) { /// EJB remote method
list.add("Hello");
}
If the call is remote, the client argument will not change because
of the marshalling.
If the call is local, the client argument will be change (direct
reference).
** This behavior is dependent of the middleware **
I did not saw in the EJB spec any information about this potential
portability issue.
Any idea?
Tibo.
Valtech
>-----Original Message-----
>From: Samuel Abraham [mailto:[EMAIL PROTECTED]]
>Sent: Friday, February 23, 2001 5:49 AM
>To: [EMAIL PROTECTED]
>Subject: If the EJBs are on the local machine will it avoid making
>remote calls?
>
>
>hi,
>If the EJBs are on the same machine rather in the same JVM, is
>there any way
>by which the container will understand this and make a local
>call to the
>beans rather than a remote call?
>If that is the case the communication via stub/skeleton,marshalling
>/unmarshalling can be avoided.
>TIA
>sam
>_______________________________________________________________
>__________
>Get Your Private, Free E-mail from MSN Hotmail at
>http://www.hotmail.com.
>
>===============================================================
>============
>To unsubscribe, send email to [EMAIL PROTECTED] and
>include in the body
>of the message "signoff EJB-INTEREST". For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".