|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Provide a Forte for Java implementation with information about the distributed transaction environment. This is an interface that a helper class implements that is specific to a managed environment.
This interface is specific to Forte for Java, version 3.0, and 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 Forte for Java occurs.
The class that implements this interface must register itself by a static method at class initialization time. For example,import org.apache.jdo.*; class blackHerringEJBImplHelper implements EJBHelper { static EJBHelper.register(new blackHerringEJBImplHelper()); ... }
Method Summary | |
void |
delistBeforeCompletion(java.lang.Object im)
Called at the end of the Transaction.beforeCompletion() to de-register the component with the app server if necessary. |
java.lang.Object |
enlistBeforeCompletion(java.lang.Object component)
Called at the beginning of the Transaction.beforeCompletion() to register the component with the app server if necessary. |
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. |
javax.transaction.UserTransaction |
getUserTransaction()
Returns the UserTransaction associated with the calling thread. |
javax.jdo.PersistenceManagerFactory |
replacePersistenceManagerFactory(javax.jdo.PersistenceManagerFactory pmf)
Replace newly created instance of internal PersistenceManagerFactory with the hashed one if it exists. |
int |
translateStatus(int st)
Translate local representation of the Transaction Status to javax.transaction.Status value if necessary. |
Method Detail |
public javax.transaction.UserTransaction getUserTransaction()
public javax.transaction.Transaction getTransaction()
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 int translateStatus(int st)
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
.
st
- local Status value
public javax.jdo.PersistenceManagerFactory replacePersistenceManagerFactory(javax.jdo.PersistenceManagerFactory pmf)
pmf
- PersistenceManagerFactory instance to be replaced
public java.lang.Object enlistBeforeCompletion(java.lang.Object component)
component
- an array of Objects
public void delistBeforeCompletion(java.lang.Object im)
im
- implementation-specific Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |