Methods Summary |
---|
public java.sql.Connection | getConnection(java.lang.Object resource, java.lang.String username, java.lang.String password)Called in a managed environment to get a Connection from the application
server specific resource. In a non-managed environment throws an Exception
as it should not be called.
|
public java.lang.String | getDDLNamePrefix(java.lang.Object info)Returns name prefix for DDL files extracted from the info instance by the
application server specific code.
|
public javax.transaction.TransactionManager | getLocalTransactionManager()Called in a managed environment to access a TransactionManager
for managing local transaction boundaries and registering synchronization
for call backs during completion of a local transaction.
|
public java.sql.Connection | getNonTransactionalConnection(java.lang.Object resource, java.lang.String username, java.lang.String password)Called in a managed environment to get a non-transactional Connection
from the application server specific resource. In a non-managed
environment throws an Exception as it should not be called.
|
public javax.transaction.Transaction | getTransaction()Identify the Transaction context for the calling thread, and return a
Transaction instance that can be used to register synchronizations,
and used as the key for HashMaps. The returned Transaction must implement
equals() and hashCode() based on the global transaction id.
All Transaction instances returned by this method called in the same
Transaction context must compare equal and return the same hashCode.
The Transaction instance returned will be held as the key to an
internal HashMap until the Transaction completes. If there is no transaction
associated with the current thread, this method returns null.
|
public javax.transaction.UserTransaction | getUserTransaction()Returns the UserTransaction associated with the calling thread. If there
is no transaction currently in progress, this method returns null.
|
public boolean | isManaged()Identifies the managed environment behavior.
|
public void | postInvoke(java.lang.Object im)Called at the end of the Transaction.beforeCompletion() to
de-register the component with the app server if necessary.
The parameter is the return value from preInvoke, and can be any
Object.
|
public java.lang.Object | preInvoke(java.lang.Object component)Called at the beginning of the Transaction.beforeCompletion() to
register the component with the app server if necessary.
The component argument is an array of Objects.
The first element is com.sun.jdo.spi.persistence.support.sqlstore.Transaction
object responsible for transaction completion.
The second element is com.sun.jdo.api.persistence.support.PersistenceManager
object that has been associated with the Transaction context for the
calling thread.
The third element is javax.transaction.Transaction object that has been
associated with the given instance of PersistenceManager.
The return value is passed unchanged to the postInvoke method.
|
public void | registerApplicationLifeCycleEventListener(ApplicationLifeCycleEventListener listener)Called to register a ApplicationLifeCycleEventListener. If
ApplicationLifeCycle management is active (typically in managed
environment), the registered listener will receive a call back
for lifecycle events.
|
public void | registerSynchronization(javax.transaction.Transaction jta, javax.transaction.Synchronization sync)Called in a managed environment to register internal Synchronization object
with the Transaction Synchronization. If available, this registration
provides special handling of the registered instance, calling it after
all user defined Synchronization instances.
|
public com.sun.jdo.api.persistence.support.PersistenceManagerFactory | replaceInternalPersistenceManagerFactory(com.sun.jdo.api.persistence.support.PersistenceManagerFactory pmf)Replace newly created instance of PersistenceManagerFactory
with the hashed one if it exists. The replacement is necessary only if
the JNDI lookup always returns a new instance. Otherwise this method
returns the object passed to it as an argument.
PersistenceManagerFactory is uniquely identified by
ConnectionFactory.hashCode() if ConnectionFactory is
not null; otherwise by ConnectionFactoryName.hashCode() if
ConnectionFactoryName is not null; otherwise
by the combination of URL.hashCode() + userName.hashCode() +
password.hashCode() + driverName.hashCode();
|
public void | setPersistenceManagerFactoryDefaults(com.sun.jdo.api.persistence.support.PersistenceManagerFactory pmf)Set environment specific default values for the given PersistenceManagerFactory.
|
public int | translateStatus(int st)Translate local representation of the Transaction Status to
javax.transaction.Status value if necessary. Otherwise this method
should return the value passed to it as an argument.
This method is used during afterCompletion callbacks to translate
the parameter value passed by the application server to the
afterCompletion method. The return value must be one of:
javax.transaction.Status.STATUS_COMMITTED or
javax.transaction.Status.STATUS_ROLLED_BACK .
|
public java.sql.Statement | unwrapStatement(java.sql.Statement stmt)This method unwrap given Statement and return the Statement from
JDBC driver.
|