The enterprise bean's home and remote interfaces are remote interface in the Java RMI sense. The container must ensure the Java RMI argument passing semantics. Non-remote objects must be passed by value. Specifically, the EJB container is not allowed to pass local objects by reference on inter-enterprise bean invocations when the calling and called enterprise beans are collocated in the same JVM. Doing so could result in the multiple beans sharing the state of a Java object, which would break the enterprise bean's semantics. |