bitronix.tm.resource
Class ResourceLoader

java.lang.Object
  extended by 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 Summary
ResourceLoader()
           
 
Method Summary
 Map<String,XAResourceProducer> getResources()
          Get a Map with the configured uniqueName as key and XAResourceProducer as value.
 int init()
          Initialize the ResourceLoader and load the resources configuration file specified in bitronix.tm.resource.configuration property.
 void shutdown()
          Shutdown the service and free all held resources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceLoader

public ResourceLoader()
Method Detail

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


Copyright © 2006-2013 Bitronix Software. All Rights Reserved.