The container provides the implementation of the local home interface for each session bean that defines a local home interface that is deployed in the container. The object that implements a session bean�s local home interface is called a session EJBLocalHome object. The container makes the session beans� local home interfaces available to the client through JNDI. The local home interface allows a local client to do the following: � Create a new session object. � Remove a session object.
HOW CAN WE REMOVE SESSION BEAN VIA LOCAL HOME INTERFACE ???
yeah that looks like a mistake. Maybe it just means that the EJBLocalHome interface defines a remove method. public void remove(Object pk); However, in the case of session beans, we cannot invoke this method, since session beans do not have a primary key. vipin
HI, It's a mistake,but in section 6.4.2 Removing a session object, in which it described that javax.ejb.EJBLocalHome.remove(Object primaryKey) method on a session object result a javax.ejb.RemoveException because of no support of primary key in session bean. The same kind of issue is mentioned in Section 7.7.3 and Section 7.7.4 in iteration diagrams that javax.transaction.UserTransaction interface and SessionSynchronization interface methods afterBegin,beforeCompletion and afterCompletion have been shown in stateless diagram together, However javax.ejb.SessionSynchronization is used in Stateful Session bean with Container managed transaction and UserTransaction interface is not supported by Container managed transaction. Regards,