| Author |
quick EJB question on @remote
|
Tony Smith
Ranch Hand
Joined: Jul 07, 2007
Posts: 229
|
|
|
I understand you can specify ejb interface as either local or remote. My question is, does remote also handles local calls? Or will you get error message?
|
 |
Michael Maier
Greenhorn
Joined: Mar 27, 2008
Posts: 12
|
|
Hello Tony, you can call a remote interface from a local client. But it is considered as bad practice for performance reason. Please correct me if I am wrong, Michael
|
 |
Moayad Abu Jaber
Ranch Hand
Joined: Jan 15, 2008
Posts: 80
|
|
hi Tony Smith, Sure you can call and use as local. This definition from Mikalai study guide.
The interface used by a remote client of a session bean is implemented by the container as a remote business interface (or a remote EJBObject interface), and the remote client view of a session bean is location-independent. A client running in the same JVM as the session object uses the same API as a client running in a different JVM on the same or different machine. Use of a session bean's local business interface(s) or local interface entails the collocation of the local client and the session. The local client of an enterprise bean must be collocated in the same container as the bean. The local client view IS NOT location-independent.
that's mean you can use the Remote interface as local and as remot, but the local just from the same machine or same JVM.
|
Best Regards,
Moayad Abu Jaber
SCJP 5.0, SCWCD 1.4, SCBCD 5.0
|
 |
 |
|
|
subject: quick EJB question on @remote
|
|
|