public interface ContainerHelper
This interface is subject to change without notice. In particular, as additional experience is gained with specific application servers, this interface may have methods added and removed, even with patch releases. Therefore, this interface should be considered very volatile, and any class that implements it might have to be reimplemented whenever an upgrade to either the application server or internal code occurs.
The class that implements this interface must register itself by a static method at class initialization time. For example,
import com.sun.jdo.spi.persistence.support.sqlstore.ejb.*;
class blackHerringContainerHelper implements ContainerHelper {
static CMPHelper.register(new blackHerringContainerHelper());
...
}
| Modifier and Type | Method and Description |
|---|---|
void |
assertValidLocalObject(Object o,
Object container)
Called in a CMP-supported environment to verify that the specified object
is of a valid local interface type.
|
void |
assertValidRemoteObject(Object o,
Object container)
Called in a CMP-supported environment to verify that the specified object
is of a valid remote interface type.
|
void |
beginInternalTransaction(PersistenceManager pm)
Called in a unspecified transaction context of a managed environment.
|
void |
commitInternalTransaction(PersistenceManager pm)
Called in a unspecified transaction context of a managed environment.
|
Object |
getContainer(Object info)
Called in a CMP-supported environment to get a Container helper instance that
will be passed unchanged to the required methods.
|
javax.ejb.EJBLocalObject |
getEJBLocalObject(Object pk,
Object container)
Called in a CMP-supported environment to get an EJBLocalObject reference for this
primary key instance and Container instance.
|
javax.ejb.EJBLocalObject |
getEJBLocalObject(Object pk,
Object container,
javax.ejb.EJBContext context)
Called in a CMP-supported environment to get an EJBLocalObject reference for this
primary key instance, Container object, and EJBContext of the calling bean.
|
javax.ejb.EJBObject |
getEJBObject(Object pk,
Object container)
Called in a CMP-supported environment to get an EJBObject reference for this
primary key instance and Container instance.
|
int |
getNumericConverterPolicy(Object container)
Called in CMP environment to get NumericConverter policy referenced
by this Container instance.
|
PersistenceManagerFactory |
getPersistenceManagerFactory(Object container)
Called in a CMP environment to lookup PersistenceManagerFactory
referenced by this Container instance as the CMP resource.
|
void |
preSelect(Object container)
Called in a CMP supported environment.
|
void |
removeByEJBLocalObject(javax.ejb.EJBLocalObject ejb,
Object containerHelper)
Called in a CMP-supported environment to remove a bean for a given
EJBLocalObject and Container instance.
|
void |
removeByPK(Object pk,
Object container)
Called in a CMP-supported environment to remove a bean for a given primary key
and Container instance.
|
void |
resumeCurrentTransaction(Transaction tx)
Called from read-only beans to resume current transaction.
|
void |
rollbackInternalTransaction(PersistenceManager pm)
Called in a unspecified transaction context of a managed environment.
|
void |
setCascadeDeleteAfterSuperEJBRemove(javax.ejb.EntityContext context)
Called in a CMP-supported environment to mark EntityContext as
already removed during cascade-delete operation.
|
Transaction |
suspendCurrentTransaction()
Called from read-only beans to suspend current transaction.
|
Object getContainer(Object info)
info - Object with the request information that is application server
specific.JDOFatalInternalException.getEJBObject(Object, Object),
getEJBLocalObject(Object, Object),
getEJBLocalObject(Object, Object, EJBContext),
removeByEJBLocalObject(EJBLocalObject, Object),
removeByPK(Object, Object)javax.ejb.EJBObject getEJBObject(Object pk, Object container)
pk - the primary key instance.container - a Container instance for the request.getContainer(Object)javax.ejb.EJBLocalObject getEJBLocalObject(Object pk, Object container)
pk - the primary key instance.container - a Container instance for the request.getContainer(Object)javax.ejb.EJBLocalObject getEJBLocalObject(Object pk, Object container, javax.ejb.EJBContext context)
pk - the primary key instance.container - a Container instance for the request.context - an EJBContext of the calling bean.getContainer(Object)void removeByEJBLocalObject(javax.ejb.EJBLocalObject ejb,
Object containerHelper)
ejb - the EJBLocalObject for the bean to be removed.containerHelper - a Container instance for the request.getContainer(Object)void removeByPK(Object pk, Object container)
pk - the primary key for the bean to be removed.container - a Container instance for the request.getContainer(Object)void assertValidLocalObject(Object o, Object container)
o - the instance to validate.container - a Container instance for the request.getContainer(Object)void assertValidRemoteObject(Object o, Object container)
o - the instance to validate.container - a Container instance for the request.getContainer(Object)void setCascadeDeleteAfterSuperEJBRemove(javax.ejb.EntityContext context)
context - the EntityContext of the bean beeing removed.void preSelect(Object container)
container - a Container instance for the request.getContainer(Object)PersistenceManagerFactory getPersistenceManagerFactory(Object container)
container - a Container instance for the request.getContainer(Object)int getNumericConverterPolicy(Object container)
container - a Container instance for the requestgetContainer(Object)void beginInternalTransaction(PersistenceManager pm)
pm - PersistenceManagervoid commitInternalTransaction(PersistenceManager pm)
pm - PersistenceManagervoid rollbackInternalTransaction(PersistenceManager pm)
pm - PersistenceManagerTransaction suspendCurrentTransaction()
void resumeCurrentTransaction(Transaction tx)
tx - - The javax.transaction.Transaction object that
represents the transaction to be resumed.Copyright © 2017. All rights reserved.