public class WASManagedRuntime extends AbstractManagedRuntime implements ManagedRuntime, Configurable
ManagedRuntime
implementation that allows synchronization with a
WebSphere managed transaction.
WebSphere Application Server does not expose the TransactionManager to an application. Instead it provides a proprietary interface to register for synchronization and obtain transaction ids.
WASManagedRuntime provides the wrapper classes needed to interact with the WAS proprietary interface and the OpenJPA kernel.
Constructor and Description |
---|
WASManagedRuntime() |
Modifier and Type | Method and Description |
---|---|
void |
endConfiguration()
EndConfiguration stub.
|
Throwable |
getRollbackCause()
Returns the Throwable that caused the current transaction to be
marked for rollback, provided that any exists.
|
TransactionManager |
getTransactionManager()
Gets an extendedJTATransaction from JNDI and creates a transaction
wrapper
|
static void |
main(String[] args) |
void |
setConfiguration(Configuration conf)
Caches a copy of the configuration.
|
void |
setRollbackOnly(Throwable cause)
Sets the rollback only flag on the current transaction.
|
void |
startConfiguration()
StartConfiguration stub.
|
doNonTransactionalWork, getTransactionKey
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doNonTransactionalWork, getTransactionKey
public TransactionManager getTransactionManager() throws Exception
getTransactionManager
in interface ManagedRuntime
Exception
public void setConfiguration(Configuration conf)
setConfiguration
in interface Configurable
public void endConfiguration()
endConfiguration
in interface Configurable
public void startConfiguration()
startConfiguration
in interface Configurable
public static void main(String[] args) throws IOException
IOException
public void setRollbackOnly(Throwable cause) throws Exception
ManagedRuntime
setRollbackOnly
in interface ManagedRuntime
cause
- the Throwable that caused the transaction to be
marked for rollback, or null of none is knownException
public Throwable getRollbackCause() throws Exception
ManagedRuntime
getRollbackCause
in interface ManagedRuntime
Exception
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.