Methods Summary |
---|
public static 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.
return myHelper.getConnection(resource, username, password);
|
public static 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.
return myHelper.getDDLNamePrefix(info);
|
public static javax.transaction.TransactionManager | getLocalTransactionManager()Called in a managed environment to access a TransactionManager
for managing local transaction boundaries and synchronization
for local transaction completion.
return myHelper.getLocalTransactionManager();
|
public static 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.
return myHelper.getNonTransactionalConnection(resource,
username, password);
|
public static javax.transaction.Transaction | getTransaction()Returns Transaction instance that can be used to register synchronizations.
In a non-managed environment or if there is no transaction associated with
the current thread, this method returns null.
return myHelper.getTransaction();
|
public static javax.transaction.UserTransaction | getUserTransaction()Returns the UserTransaction associated with the calling thread. In a
non-managed environment or if there is no transaction currently in progress,
this method returns null.
return myHelper.getUserTransaction();
|
public static boolean | isManaged()Identifies the managed environment behavior.
return myHelper.isManaged();
|
public static void | postInvoke(java.lang.Object im)Called in a managed environment at the end of the Transaction.beforeCompletion()
to de-register the component with the app server if necessary.
myHelper.postInvoke(im);
|
public static 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. In a non-managed environment
or if the postInvoke method does not use the value, this method returns null.
return myHelper.preInvoke(component);
|
public static 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.
myHelper.registerApplicationLifeCycleEventListener(listener);
|
public static 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.
myHelper.registerSynchronization(jta, sync);
|
public static void | registerTransactionHelper(TransactionHelper h)Register class that implements TransactionHelper interface
Should be called by a static method at class initialization time.
If null is passed, sets the reference to the DefaultTransactionHelper.
myHelper = h;
if (myHelper == null) {
myHelper = DefaultTransactionHelper.getInstance();
}
|
public static com.sun.jdo.api.persistence.support.PersistenceManagerFactory | replaceInternalPersistenceManagerFactory(com.sun.jdo.api.persistence.support.PersistenceManagerFactory pmf)Returns the hashed instance of PersistenceManagerFactory
that compares equal to the newly created instance or the instance
itself if it is not found. In a non-managed environment returns the value
passed to it as an argument.
return myHelper.replaceInternalPersistenceManagerFactory(pmf);
|
public static void | setPersistenceManagerFactoryDefaults(com.sun.jdo.api.persistence.support.PersistenceManagerFactory pmf)Set environment specific default values for the given PersistenceManagerFactory.
myHelper.setPersistenceManagerFactoryDefaults(pmf);
|
public static int | translateStatus(int st)Translates local representation of the Transaction Status to
javax.transaction.Status value. In a non-managed environment
returns the value passed to it as an argument.
return myHelper.translateStatus(st);
|
public static java.sql.Statement | unwrapStatement(java.sql.Statement stmt)This method unwraps given Statement and return the Statement from
JDBC driver if possible.
return myHelper.unwrapStatement(stmt);
|