Class ResourceLoader

java.lang.Object
bitronix.tm.resource.ResourceLoader
All Implemented Interfaces:
Service

public class ResourceLoader extends Object implements Service
XA resources pools configurator & loader.

ResourceLoader relies on the optional bitronix.tm.resource.configuration propery to load the JDBC datasources (PoolingDataSource) and JMS connection factories (PoolingConnectionFactory) configuration file and create the resources.

When bitronix.tm.resource.configuration is not specified, ResourceLoader is disabled and resources should be manually created.

Author:
lorban
  • Constructor Details

    • ResourceLoader

      public ResourceLoader()
  • Method Details

    • getResources

      public Map<String,XAResourceProducer> getResources()
      Get a Map with the configured uniqueName as key and XAResourceProducer as value.
      Returns:
      a Map using the uniqueName as key and XAResourceProducer as value.
    • init

      public int init()
      Initialize the ResourceLoader and load the resources configuration file specified in bitronix.tm.resource.configuration property.
      Returns:
      the number of resources which failed to initialize.
    • shutdown

      public void shutdown()
      Description copied from interface: Service
      Shutdown the service and free all held resources.
      Specified by:
      shutdown in interface Service