XAPool (Bitronix Transaction Manager :: Core 2.1.4 API)
Date: 2013-09-15

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

## bitronix.tm.resource.common
Class XAPool

    java.lang.Object
      bitronix.tm.resource.common.XAPool

All Implemented Interfaces:
  StateChangeListener

    public class XAPool

extends Object
implements StateChangeListener

Generic XA pool. `XAStatefulHolder` instances are created by the `XAPool` out of a `XAResourceProducer`. Those objects are then pooled and can be retrieved and/or recycled by the pool depending on the running XA transaction's and the `XAStatefulHolder`'s states.

Author:
  lorban

Constructor Summary
`XAPool(XAResourceProducer xaResourceProducer, ResourceBean bean)`

Method Summary
`void` | `close()`
`XAResourceHolder` | `findXAResourceHolder(XAResource xaResource)`
`Object` | `getConnectionHandle()`
`Object` | `getConnectionHandle(boolean recycle)`
`Date` | `getNextShrinkDate()`
`Object` | `getXAFactory()`
`long` | `inPoolSize()`
`boolean` | `isFailed()`
`void` | `reset()`
`void` | `setFailed(boolean failed)`
`void` | `shrink()`
`void` | `stateChanged(XAStatefulHolder source, int oldState, int newState)` Fired when the internal state of a `XAStatefulHolder` has changed.
`void` | `stateChanging(XAStatefulHolder source, int currentState, int futureState)` Fired before the internal state of a `XAStatefulHolder` has changed.
`String` | `toString()`
`long` | `totalPoolSize()`

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

Constructor Detail

### XAPool

    public XAPool(XAResourceProducer xaResourceProducer,
                  ResourceBean bean)
           throws Exception

Throws:
  `Exception`

Method Detail

### getXAFactory

    public Object getXAFactory()

### setFailed

    public void setFailed(boolean failed)

### isFailed

    public boolean isFailed()

### getConnectionHandle

    public Object getConnectionHandle()
                               throws Exception

  Throws:
    `Exception`

### getConnectionHandle

    public Object getConnectionHandle(boolean recycle)
                               throws Exception

  Throws:
    `Exception`

### close

    public void close()

### totalPoolSize

    public long totalPoolSize()

### inPoolSize

    public long inPoolSize()

### stateChanged

    public void stateChanged(XAStatefulHolder source,
                             int oldState,
                             int newState)

  Description copied from interface: `StateChangeListener`
  Fired when the internal state of a `XAStatefulHolder` has changed.

  Specified by:
    `stateChanged` in interface `StateChangeListener`
  Parameters:
    `source` - the `XAStatefulHolder` changing state.
    `oldState` - the old state of the `XAStatefulHolder`.
    `newState` - the new state of the `XAStatefulHolder`.

### stateChanging

    public void stateChanging(XAStatefulHolder source,
                              int currentState,
                              int futureState)

  Description copied from interface: `StateChangeListener`
  Fired before the internal state of a `XAStatefulHolder` has changed.

  Specified by:
    `stateChanging` in interface `StateChangeListener`
  Parameters:
    `source` - the `XAStatefulHolder` changing state.
    `currentState` - the current state of the `XAStatefulHolder`.
    `futureState` - the future state of the `XAStatefulHolder`.

### findXAResourceHolder

    public XAResourceHolder findXAResourceHolder(XAResource xaResource)

### getNextShrinkDate

    public Date getNextShrinkDate()

### shrink

    public void shrink()
                throws Exception

  Throws:
    `Exception`

### reset

    public void reset()
               throws Exception

  Throws:
    `Exception`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

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 © 2006-2013 Bitronix Software. All Rights Reserved.