Hi all, Someone at my company is preparing a document on some beans we are developing and included the statement below about Entity Beans. Is this correct?
The Entity-to-Entity Bean calls are always remote and they traverse through the network layer though they reside on the same server.
Peter den Haan
posted 15 years ago
Originally posted by Bill Pearce: Is this correct?
No. Although it is true that in-JVM calls are functionally identical to remote EJB calls, EJB containers commonly optimise them to avoid marshalling/serialization overhead. This applies not only to entity-to-entity calls but also to servlet-to-EJB calls (if they run in the same engine). This certainly doesn't mean that they are anywhere as efficient as a normal Java method call though. The container still needs to take a deep copy of the arguments passed to preserve EJB call semantics, although I think some servers allow you to avoid this using a configuration flag. More importantly, the call still needs to percolate through the normal container services, such as security, transaction handling, threading logic, and so forth. - Peter
[This message has been edited by Peter den Haan (edited April 25, 2001).]