XAResourceHolder (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
Interface XAResourceHolder

All Superinterfaces:
  XAStatefulHolder

All Known Implementing Classes:
  AbstractXAResourceHolder, DualSessionWrapper, EhCacheXAResourceHolder, JdbcPooledConnection, RecoveryXAResourceHolder

    public interface XAResourceHolder

extends XAStatefulHolder

`XAResource` wrappers must implement this interface. It defines a way to get access to the transactional state of this `XAResourceHolder`.

Author:
  lorban
See Also:
  `XAResourceHolderState`

Field Summary

Fields inherited from interface bitronix.tm.resource.common.XAStatefulHolder
`STATE_ACCESSIBLE, STATE_CLOSED, STATE_IN_POOL, STATE_NOT_ACCESSIBLE`

Method Summary
`ResourceBean` | `getResourceBean()` Get the ResourceBean which created this XAResourceHolder.
`XAResource` | `getXAResource()` Get the vendor's `XAResource` implementation of the wrapped resource.
`Map<Uid,XAResourceHolderState>` | `getXAResourceHolderStatesForGtrid(Uid gtrid)` Get all the `XAResourceHolderState`s of this wrapped resource for a specific GTRID.
`boolean` | `hasStateForXAResource(XAResourceHolder xaResourceHolder)` Check if this `XAResourceHolder` contains a state for a specific `XAResourceHolder`.
`void` | `putXAResourceHolderState(BitronixXid xid, XAResourceHolderState xaResourceHolderState)` Add a `XAResourceHolderState` of this wrapped resource.
`void` | `removeXAResourceHolderState(BitronixXid xid)` Remove all states related to a specific Xid from this wrapped resource.

Methods inherited from interface bitronix.tm.resource.common.XAStatefulHolder
`addStateChangeEventListener, close, getConnectionHandle, getLastReleaseDate, getState, getXAResourceHolders, removeStateChangeEventListener, setState`

Method Detail

### getXAResource

    XAResource getXAResource()

  Get the vendor's `XAResource` implementation of the wrapped resource.

  Returns:
    the vendor's XAResource implementation.

### getXAResourceHolderStatesForGtrid

    Map<Uid,XAResourceHolderState> getXAResourceHolderStatesForGtrid(Uid gtrid)

  Get all the `XAResourceHolderState`s of this wrapped resource for a specific GTRID.

  The returned Map is guaranteed to return states in order they were added when its values are iterated.

  Parameters:
    `gtrid` - the GTRID of the transaction state to add.
  Returns:
    the `XAResourceHolderState`.

### putXAResourceHolderState

    void putXAResourceHolderState(BitronixXid xid,
                                  XAResourceHolderState xaResourceHolderState)

  Add a `XAResourceHolderState` of this wrapped resource.

  Parameters:
    `xid` - the Xid of the transaction state to add.
    `xaResourceHolderState` - the `XAResourceHolderState` to set.

### removeXAResourceHolderState

    void removeXAResourceHolderState(BitronixXid xid)

  Remove all states related to a specific Xid from this wrapped resource.

  Parameters:
    `xid` - the Xid of the transaction state to remove.

### hasStateForXAResource

    boolean hasStateForXAResource(XAResourceHolder xaResourceHolder)

  Check if this `XAResourceHolder` contains a state for a specific `XAResourceHolder`. In other words: has the `XAResourceHolder`'s `XAResource` been enlisted in some transaction ?

  Parameters:
    `xaResourceHolder` - the `XAResourceHolder` to look for.
  Returns:
    true if the `XAResourceHolder` is enlisted in some transaction, false otherwise.

### getResourceBean

    ResourceBean getResourceBean()

  Get the ResourceBean which created this XAResourceHolder.

  Returns:
    the ResourceBean which created this XAResourceHolder.

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.