wood burning stoves 2.0*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes @Remote and @Local Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "@Remote and @Local" Watch "@Remote and @Local" New topic
Author

@Remote and @Local

Padma Priya
Ranch Hand

Joined: Feb 01, 2007
Posts: 112
Hi all,

I have a few doubts from the EJB3.0 core spec which says

"While it is possible to provide both a remote client view and a local client view for an enterprise bean,
more typically only one or the other will be provided."

1)How is it possible to provide both a remote client view and a local client view for an enterprise bean. Does this mean i mark the bean interface for the session bean as both @remote and @local or write 2 interfaces and mark one with @Local and other with @Remote and have the bean class implement both of them.

2) "local calls involve pass-by-reference" and "Remote calls involve pass-by-value."

Can anybody explain the significance of the above 2 statements with an example.


Thanks in advance

With regards
Deepthi
Krzysztof Koziol
Ranch Hand

Joined: Nov 19, 2006
Posts: 133

Deepthi Tirunahari wrote:

1)How is it possible to provide both a remote client view and a local client view for an enterprise bean. Does this mean i mark the bean interface for the session bean as both @remote and @local or write 2 interfaces and mark one with @Local and other with @Remote and have the bean class implement both of them.


You have to write 2 interfaces.


2) "local calls involve pass-by-reference" and "Remote calls involve pass-by-value."


It's impossible to pass the reference to the remote JVM.


SCJP 5.0, SCWCD 5.0, SCBCD 5.0, SCEA/OCMJEA 5.0
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: @Remote and @Local
 
Similar Threads
Please Explain...the following....
EJBLocalHome and EJBLocalObject
CMP/CMR is only possible if local interfaces are defined ?
Can a Entity Bean have both Local/Remote View
How Call-by-reference improves Performance in EJB