wood burning stoves*
The moose likes EJB and other Java EE Technologies and the fly likes Local and Remote Interface - Explain Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Local and Remote Interface - Explain" Watch "Local and Remote Interface - Explain" New topic
Author

Local and Remote Interface - Explain

GS Chidam
Ranch Hand

Joined: Jul 07, 2006
Posts: 34
Hi,

Can you please explain Local and Remote Interface in EJB?
Please give some examples to understand easily.

Thanks
Chidam
Sumit Malik
Ranch Hand

Joined: Jan 05, 2007
Posts: 84
Hi GS Chidam,


The basic difference between local and remote interface comes into picture when you are calling the instance of a bean from a server JVM by sitting on the same server JVM or outside Server JVM

When a client is on another machiene(with different JVM from Server JVM) then you need to interact with bean with remote interface. When you are in the same JVM where the server is then you need to call the local interface of bean.
I hope now you must have got when you need to call remote and local interface.

Cheers !!!
Sumit Malik


If at first you don't succeed, don't try skydiving
GS Chidam
Ranch Hand

Joined: Jul 07, 2006
Posts: 34
Hi Sumit Malik,

Can you tell me, Server A, is running machine A. And the client A, running machine B.

In this case, can we use Local interface? How, pls explain with example,or we need to use remote interface?

thanks
chidam gs
Sumit Malik
Ranch Hand

Joined: Jan 05, 2007
Posts: 84
Hey GS Chidam in this case

Server A, is running machine A. And the client A, running machine B.

You cant use the local interface. As i have mentioned in my previous post that if your client is under the control of different JVM from Server then you need to call the remote interface.

Thanks,
Sumit Malik
GS Chidam
Ranch Hand

Joined: Jul 07, 2006
Posts: 34
Hi Sumit Malik,

If it is the case, we can use local interface both server and client or same machine?

How to use local interface, if the server and client are different machine?

thanks
regards

Chidam gs
Sumit Malik
Ranch Hand

Joined: Jan 05, 2007
Posts: 84
Hey GS Chidam you can't use local interface when server and client are on different JVM. Mate local/remote interface are used in different form of communication depends where client is sitting.

By the way why you are in need of local interface when both of them are on different machiene ? You have remote interface for this kind of communication.

Cheers !!!
Sumit Malik
 
jQuery in Action, 2nd edition
 
subject: Local and Remote Interface - Explain