Methods Summary |
---|
protected java.lang.Object | getClientObject()Get the client object corresponding to an EJBLocalObjectImpl.
Users of this class cannot
assume they can cast an EJBLocalObjectImpl to the object that
the client uses, and vice-versa. This is overridden in the
InvocationHandler. Only applicable for local home view.
return this;
|
java.lang.Object | getClientObject(java.lang.String intfClassName)
return clientObjectMap.get(intfClassName);
|
public EJBLocalHome | getEJBLocalHome()
container.authorizeLocalMethod(
BaseContainer.EJBLocalObject_getEJBLocalHome);
container.checkExists(this);
return container.getEJBLocalHome();
|
public java.lang.Object | getPrimaryKey()
if ( container instanceof EntityContainer ) {
container.authorizeLocalMethod(
BaseContainer.EJBLocalObject_getPrimaryKey);
container.checkExists(this);
return primaryKey;
}
else {
throw new EJBException(localStrings.getLocalString(
"containers.invalid_operation",
"Invalid operation for Session EJBs."));
}
|
public com.sun.ejb.spi.io.SerializableObjectFactory | getSerializableObjectFactory()Called from EJBUtils.EJBObjectOutputStream.replaceObject
// Note: for stateful SessionBeans, the EJBLocalObjectImpl contains
// a pointer to the EJBContext. We should not serialize it here.
return new SerializableLocalObject
(container.getEjbDescriptor().getUniqueId(), isLocalHomeView,
primaryKey, getSfsbClientVersion());
|
public boolean | isIdentical(EJBLocalObject other)
container.authorizeLocalMethod(
BaseContainer.EJBLocalObject_isIdentical);
container.checkExists(this);
// For all types of beans (entity, stful/stless session),
// there is exactly one EJBLocalObject instance per bean identity.
if ( this == other )
return true;
else
return false;
|
boolean | isLocalHomeView()
return isLocalHomeView;
|
void | mapClientObject(java.lang.String intfClassName, java.lang.Object obj)
clientObjectMap.put(intfClassName, obj);
|
public void | remove()
// authorization is performed within container
try {
container.removeBean(this, REMOVE_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;
}
|
void | setIsLocalHomeView(boolean flag)
isLocalHomeView = flag;
|
static com.sun.ejb.containers.EJBLocalObjectImpl | toEJBLocalObjectImpl(EJBLocalObject localObj)Since EJBLocalObject might be a dynamic proxy, the container can't assume
it can cast from EJBLocalObject to EJBLocalObjectImpl. This convenience
method is used to hide the logic behind the translation from an
client-side EJBLocalObject to the corresponding EJBLocalObjectImpl.
In the case of a proxy, the invocation handler is the
EJBLocalObjectImpl. Otherwise, the argument is returned as is.
NOTE : To translate in the other direction, use
EJBLocalObjectImpl.getEJBLocalObject()
EJBLocalObjectImpl localObjectImpl;
if( localObj instanceof EJBLocalObjectImpl ) {
localObjectImpl = (EJBLocalObjectImpl) localObj;
} else {
localObjectImpl = (EJBLocalObjectImpl)
Proxy.getInvocationHandler(localObj);
}
return localObjectImpl;
|