org.objectweb.jotm
Class Jotm

java.lang.Object
  |
  +--org.objectweb.jotm.Jotm
All Implemented Interfaces:
TMService

public class Jotm
extends Object
implements TMService

This class represents an instance of JOTM.

Author:
jeff mesnil

Constructor Summary
Jotm(boolean local, boolean bound)
          Public constructor for Jotm.
 
Method Summary
 TransactionManager getTransactionManager()
          returns a TransactionManager object.
 UserTransaction getUserTransaction()
          Returns an UserTransaction object.
 void stop()
          Stops the transaction service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jotm

public Jotm(boolean local,
            boolean bound)
     throws NamingException
Public constructor for Jotm. If Jotm is created with a local transaction factory which is not bound to a registry, Jotm would be able to manage transactions only inside the same JVM.

Parameters:
local - true to create an instance of JOTM with a local transaction factory, false else
bound - true if the transaction factory is to be bound in a registry, false else (ignored if local is false)
Throws:
NamingException - thrown if the transaction factory can't be bound or looked up in a registry
Method Detail

getTransactionManager

public TransactionManager getTransactionManager()
Description copied from interface: TMService
returns a TransactionManager object.

Specified by:
getTransactionManager in interface TMService
Returns:
TransactionManager
See Also:
TMService.getTransactionManager()

getUserTransaction

public UserTransaction getUserTransaction()
Description copied from interface: TMService
Returns an UserTransaction object.

Specified by:
getUserTransaction in interface TMService
Returns:
UserTransaction
See Also:
TMService.getUserTransaction()

stop

public void stop()
Description copied from interface: TMService
Stops the transaction service.

Specified by:
stop in interface TMService
See Also:
TMService.stop()