org.objectweb.easybeans.component.jotm
Class JOTMComponent

java.lang.Object
  extended by org.objectweb.easybeans.component.jotm.JOTMComponent
All Implemented Interfaces:
EZBComponent, TMComponent

public class JOTMComponent
extends java.lang.Object
implements TMComponent

Creates and binds the transaction factory and usertransaction object.

Author:
Florent Benoit

Field Summary
private static int DEFAULT_TIMEOUT
          Default Transaction timeout.
private static JLog logger
          Logger.
private  int timeout
          Transaction timeout (in seconds).
private  javax.transaction.TransactionManager transactionManager
          Transaction manager reference.
 
Fields inherited from interface org.objectweb.easybeans.component.itf.TMComponent
JNDI_NAME
 
Constructor Summary
JOTMComponent()
           
 
Method Summary
 javax.transaction.TransactionManager getTransactionManager()
          Gets the transaction manager object.
 void init()
          Init method.
This method is called before the start method.
 void setTimeout(int timeout)
          Set the Transaction Timeout.
 void start()
          Start method.
This method is called after the init method.
 void stop()
          Stop method.
This method is called when component needs to be stopped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TIMEOUT

private static final int DEFAULT_TIMEOUT
Default Transaction timeout.

See Also:
Constant Field Values

logger

private static JLog logger
Logger.


transactionManager

private javax.transaction.TransactionManager transactionManager
Transaction manager reference.


timeout

private int timeout
Transaction timeout (in seconds).

Constructor Detail

JOTMComponent

public JOTMComponent()
Method Detail

init

public void init()
          throws EZBComponentException
Init method.
This method is called before the start method.

Specified by:
init in interface EZBComponent
Throws:
EZBComponentException - if the initialization has failed.

start

public void start()
           throws EZBComponentException
Start method.
This method is called after the init method.

Specified by:
start in interface EZBComponent
Throws:
EZBComponentException - if the start has failed.

stop

public void stop()
          throws EZBComponentException
Stop method.
This method is called when component needs to be stopped.

Specified by:
stop in interface EZBComponent
Throws:
EZBComponentException - if the stop is failing.

getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()
Gets the transaction manager object.

Specified by:
getTransactionManager in interface TMComponent
Returns:
instance of the transaction manager

setTimeout

public void setTimeout(int timeout)
Set the Transaction Timeout.

Specified by:
setTimeout in interface TMComponent
Parameters:
timeout - Timeout (in seconds)