Package bitronix.tm.resource
Class ResourceLoader
java.lang.Object
bitronix.tm.resource.ResourceLoader
- All Implemented Interfaces:
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet a Map with the configured uniqueName as key andXAResourceProduceras value.intinit()Initialize the ResourceLoader and load the resources configuration file specified inbitronix.tm.resource.configurationproperty.voidshutdown()Shutdown the service and free all held resources.
-
Constructor Details
-
ResourceLoader
public ResourceLoader()
-
-
Method Details
-
getResources
Get a Map with the configured uniqueName as key andXAResourceProduceras value.- Returns:
- a Map using the uniqueName as key and
XAResourceProduceras value.
-
init
public int init()Initialize the ResourceLoader and load the resources configuration file specified inbitronix.tm.resource.configurationproperty.- Returns:
- the number of resources which failed to initialize.
-
shutdown
public void shutdown()Description copied from interface:ServiceShutdown the service and free all held resources.
-