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

## com.atomikos.icatch.jta.jetty
Class TMService

    java.lang.Object
      org.mortbay.jetty.plus.AbstractService
          org.mortbay.jetty.plus.TMService
              com.atomikos.icatch.jta.jetty.TMService

All Implemented Interfaces:
  org.mortbay.jetty.plus.Service, org.mortbay.util.LifeCycle

    public class TMService

extends org.mortbay.jetty.plus.TMService

Copyright © 2003-2004 Atomikos. All rights reserved. An implementation of TMService for Jetty integration. Use an instance of this class in the JettyPlus startup configuration file. Any Atomikos datasource you need in your JTA transactions needs to be configured and registered with this TMService during JettyPlus startup. Refer to the Jetty docs on how to do this.

Field Summary
`static String` | `DEFAULT_SERVICE_NAME`

Fields inherited from class org.mortbay.jetty.plus.TMService
`_transactionManagerJNDI, DEFAULT_USER_TX_JNDI`

Fields inherited from class org.mortbay.jetty.plus.AbstractService
`_jndi, _name, _started`

Constructor Summary
`TMService()` Creates a new instance.

Method Summary
`TransactionManager` | `getTransactionManager()`
`UserTransaction` | `getUserTransaction()`
`void` | `registerNonXADataSourceBean(NonXADataSourceBean dataSource)` Register a non-xa datasource bean for JNDI.
`void` | `registerSimpleDataSourceBean(SimpleDataSourceBean dataSource)` Register a data source bean instance for JNDI and for recovery as well.
`void` | `setInitOnStart(boolean value)` Set initialization on start on or off.
`void` | `start()`
`void` | `stop()`

Methods inherited from class org.mortbay.jetty.plus.TMService
`getTransactionManagerJNDI`

Methods inherited from class org.mortbay.jetty.plus.AbstractService
`getJNDI, getName, isStarted, setJNDI, setName`

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

Field Detail

### DEFAULT_SERVICE_NAME

    public static final String DEFAULT_SERVICE_NAME

See Also:
  Constant Field Values

Constructor Detail

### TMService

    public TMService()

  Creates a new instance.

Method Detail

### setInitOnStart

    public void setInitOnStart(boolean value)

  Set initialization on start on or off. If enabled, then the TMService instance start() will trigger startup of the transaction service as well. The default is false.

  Parameters:
    `value` - True if start should also trigger transaction service startup. Leave this to false if you are using the Atomikos control panel web application.

### getTransactionManager

    public TransactionManager getTransactionManager()

  Specified by:
    `getTransactionManager` in class `org.mortbay.jetty.plus.TMService`
  See Also:
    `TMService.getTransactionManager()`

### getUserTransaction

    public UserTransaction getUserTransaction()

  Specified by:
    `getUserTransaction` in class `org.mortbay.jetty.plus.TMService`
  See Also:
    `TMService.getUserTransaction()`

### registerSimpleDataSourceBean

    public void registerSimpleDataSourceBean(SimpleDataSourceBean dataSource)

  Register a data source bean instance for JNDI and for recovery as well.

  Parameters:
    `dataSource` - The data source bean. This bean will be bound in JNDI based on the uniqueResourceName attribute, and will normally be recovered instantly (unless the database server is not running at the time of Jetty startup).

### registerNonXADataSourceBean

    public void registerNonXADataSourceBean(NonXADataSourceBean dataSource)

  Register a non-xa datasource bean for JNDI. Since non-xa datasources are not recoverable with respect to JTA transactions, there is no explicit recovery in this case. This implies that all pending database transactions will be rolled back by the database.

  Parameters:
    `dataSource` -

### start

    public void start()
               throws Exception

  Specified by:
    `start` in interface `org.mortbay.jetty.plus.Service`
  Specified by:
    `start` in interface `org.mortbay.util.LifeCycle`
  Overrides:
    `start` in class `org.mortbay.jetty.plus.AbstractService`
  Throws:
    `Exception`

### stop

    public void stop()
              throws InterruptedException

  Specified by:
    `stop` in interface `org.mortbay.jetty.plus.Service`
  Specified by:
    `stop` in interface `org.mortbay.util.LifeCycle`
  Overrides:
    `stop` in class `org.mortbay.jetty.plus.AbstractService`
  Throws:
    `InterruptedException`

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

Copyright © 2012. All Rights Reserved.