Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is the role of serialization in EJB?

EJB serialization
0
Posted

What is the role of serialization in EJB?

0

– A big part of EJB is that it is a framework for underlying RMI: remote method invocation. You�re invoking methods remotely from JVM space �A� on objects which are in JVM space �B� � possibly running on another machine on the network. To make this happen, all arguments of each method call must have their current state plucked out of JVM �A� memory, flattened into a byte stream which can be sent over a TCP/IP network connection, and then deserialized for reincarnation on the other end in JVM �B� where the actual method call takes place. If the method has a return value, it is serialized up for streaming back to JVM A. Thus the requirement that all EJB methods arguments and return values must be serializable. The easiest way to do this is to make sure all your classes implement java.io.Serializable.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123