Methods Summary |
---|
protected final EJBLocalObjectImpl | createEJBLocalBusinessObjectImpl()Create a new EJBLocalBusinessObjectImpl and new EJB if necessary.
return container.createEJBLocalBusinessObjectImpl();
|
protected final EJBLocalObjectImpl | createEJBLocalObjectImpl()Create a new EJBLocalObjectImpl and new EJB if necessary.
This is called from the concrete "HelloEJBHomeImpl" create method.
Return the EJBObjectImpl for the bean.
return container.createEJBLocalObjectImpl();
|
protected final BaseContainer | getContainer()Called from concrete EJBLocalHome implementation.
return container;
|
protected EJBLocalHome | getEJBLocalHome()Get the EJBLocalHome corresponding to an EJBLocalHomeImpl.
These objects are one and the same when the local home is generated,
but distinct in the case of dynamic proxies. Therefore, code can't
assume it can cast an EJBLocalHomeImpl to the EJBLocalHome that
the client uses, and vice-versa. This is overridden in the
InvocationHandler.
return this;
|
public com.sun.ejb.spi.io.SerializableObjectFactory | getSerializableObjectFactory()
return new SerializableLocalHome(
container.getEjbDescriptor().getUniqueId());
|
public final void | remove(java.lang.Object primaryKey)This is the implementation of the javax.ejb.EJBLocalHome remove method.
if ( !(container instanceof EntityContainer) ) {
// Session beans dont have primary keys. EJB2.0 Section 6.6.
throw new RemoveException("Attempt to call remove(Object primaryKey) on a session bean.");
}
container.authorizeLocalMethod(BaseContainer.EJBLocalHome_remove_Pkey);
Method method=null;
try {
method = EJBLocalHome.class.getMethod("remove",
new Class[]{Object.class});
} catch ( NoSuchMethodException e ) {
_logger.log(Level.FINE, "Exception in method remove()", e);
}
try {
((EntityContainer)container).removeBean(primaryKey, method, true);
} catch(java.rmi.RemoteException re) {
// This should never be thrown for local invocations, but it's
// part of the removeBean signature. If for some strange
// reason it happens, convert to EJBException
EJBException ejbEx =new EJBException("unexpected RemoteException");
ejbEx.initCause(re);
throw ejbEx;
}
|
final void | setContainer(BaseContainer c)Called from BaseContainer only.
container = c;
|