Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.0.0-SNAPSHOT
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbpm.persistence.jta
Class ContainerManagedTransactionManager

    java.lang.Object
      org.jbpm.persistence.jta.ContainerManagedTransactionManager

All Implemented Interfaces:
  org.drools.persistence.TransactionManager

    public class ContainerManagedTransactionManager

extends Object
implements org.drools.persistence.TransactionManager

Dedicated implementation of `TransactionManager` that should be used when:

- jBPM engine is embedded in Container Managed Transaction (CMT) environment like EJB container
- container that does not allow accessing UserTransaction (when running in CMT mode) - e.g. WebSphere Appliation Server

Instance of this transaction manager must be set on Environment together with Persistence context manager instance to take effect. `Environment env = EnvironmentFactory.newEnvironment(); env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf); env.set(EnvironmentName.TRANSACTION_MANAGER, new ContainerManagedTransactionManager()); env.set(EnvironmentName.PERSISTENCE_CONTEXT_MANAGER, new JpaProcessPersistenceContextManager(env));` Since it dedicated to be run in CMT begine/commit/rollback are no-op methods.
Status of the transaction is always Active.

Field Summary
`protected TransactionSynchronizationRegistry` | `txSyncRegistry`

Fields inherited from interface org.drools.persistence.TransactionManager
`STATUS_ACTIVE, STATUS_COMMITTED, STATUS_NO_TRANSACTION, STATUS_ROLLEDBACK, STATUS_UNKNOWN`

Constructor Summary
`ContainerManagedTransactionManager()`

Method Summary
`boolean` | `begin()`
`void` | `commit(boolean arg0)`
`protected Object` | `findTransactionSynchronizationRegistry()`
`int` | `getStatus()`
`void` | `registerTransactionSynchronization(org.drools.persistence.TransactionSynchronization arg0)`
`void` | `rollback(boolean arg0)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### txSyncRegistry

    protected TransactionSynchronizationRegistry txSyncRegistry

Constructor Detail

### ContainerManagedTransactionManager

    public ContainerManagedTransactionManager()

Method Detail

### begin

    public boolean begin()

  Specified by:
    `begin` in interface `org.drools.persistence.TransactionManager`

### commit

    public void commit(boolean arg0)

  Specified by:
    `commit` in interface `org.drools.persistence.TransactionManager`

### getStatus

    public int getStatus()

  Specified by:
    `getStatus` in interface `org.drools.persistence.TransactionManager`

### registerTransactionSynchronization

    public void registerTransactionSynchronization(org.drools.persistence.TransactionSynchronization arg0)

  Specified by:
    `registerTransactionSynchronization` in interface `org.drools.persistence.TransactionManager`

### rollback

    public void rollback(boolean arg0)

  Specified by:
    `rollback` in interface `org.drools.persistence.TransactionManager`

### findTransactionSynchronizationRegistry

    protected Object findTransactionSynchronizationRegistry()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.0.0-SNAPSHOT
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.