File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Marshalling and Unmarshalling in local and remote interfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Marshalling and Unmarshalling in local and remote interfaces" Watch "Marshalling and Unmarshalling in local and remote interfaces" New topic
Author

Marshalling and Unmarshalling in local and remote interfaces

Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
Hello Friends,
I am slightly confused regarding behaviour of remote and local interfaces.
Say i am calling my EJB (through local interfaces) from my servlet. I have provided ejb reference in web.xml. In this case what i believe marshalling and unmarshalling of parameters wont take place, as i am making local call.
Now in the second scenario i am invoking my EJB (through remote interfaces) againg i have provided ejb-reference in web.xml. Will marshalling and unmarshalling of parameter take place? both my servlet and EJB reside on same JVM, and i believe my app server also knows it because while taking refernce of InitialContext i am simply doing
InitialContext ctx = new InitialContext();
I am not providing URL, Security Credential etc. So app server knows that ejbs reside in the same server. Correct me if i am wrong.


Thnaks


Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
kundan varma
Ranch Hand

Joined: Mar 08, 2004
Posts: 322
Hi
When you use local interface marshalling and unmarshalling does not take place.
It only happens for REmote interface.If you r using the same JVM then use local interface,it will enhance the performance to a great extent
You should also read some material on marshalling and unmarshalling.
Go through the difference of passing a object in java and java-RMI.
Regards,
kundan


SCJP1.4,SCBCD,SCEA,CNA
Failures are practice shoots for success.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Marshalling and Unmarshalling in local and remote interfaces
 
Similar Threads
Why remote? I don't get it?
ejb-ref and ejb-local-ref
getXXX methods
local or remote interface -- please help!!!
serialization