ResourceRegistrar (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
Class ResourceRegistrar

    java.lang.Object
      bitronix.tm.resource.ResourceRegistrar

    public class ResourceRegistrar

extends Object

Collection of initialized `XAResourceProducer`s. All resources must be registered in the `ResourceRegistrar` before they can be used by the transaction manager.

Author:
  lorban

Constructor Summary
`ResourceRegistrar()`

Method Summary
`static XAResourceHolder` | `findXAResourceHolder(XAResource xaResource)` Find in the registered `XAResourceProducer`s the `XAResourceHolder` from which the specified `XAResource` comes from.
`static XAResourceProducer` | `get(String uniqueName)` Get a registered `XAResourceProducer`.
`static Set<String>` | `getResourcesUniqueNames()` Get all `XAResourceProducer`s unique names.
`static void` | `register(XAResourceProducer producer)` Register a `XAResourceProducer`.
`static void` | `unregister(XAResourceProducer producer)` Unregister a previously registered `XAResourceProducer`.

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

Constructor Detail

### ResourceRegistrar

    public ResourceRegistrar()

Method Detail

### get

    public static XAResourceProducer get(String uniqueName)

  Get a registered `XAResourceProducer`.

  Parameters:
    `uniqueName` - the name of the recoverable resource producer.
  Returns:
    the `XAResourceProducer` or null if there was none registered under that name.

### getResourcesUniqueNames

    public static Set<String> getResourcesUniqueNames()

  Get all `XAResourceProducer`s unique names.

  Returns:
    a Set containing all `XAResourceProducer`s unique names.

### register

    public static void register(XAResourceProducer producer)
                         throws RecoveryException

  Register a `XAResourceProducer`. If registration happens after the transaction manager started, incremental recovery is run on that resource.

  Parameters:
    `producer` - the `XAResourceProducer`.
  Throws:
    `RecoveryException` - when an error happens during recovery.

### unregister

    public static void unregister(XAResourceProducer producer)

  Unregister a previously registered `XAResourceProducer`.

  Parameters:
    `producer` - the `XAResourceProducer`.

### findXAResourceHolder

    public static XAResourceHolder findXAResourceHolder(XAResource xaResource)

  Find in the registered `XAResourceProducer`s the `XAResourceHolder` from which the specified `XAResource` comes from.

  Parameters:
    `xaResource` - the `XAResource` to look for
  Returns:
    the associated `XAResourceHolder` or null if it cannot be found.

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.