tyrex.resource
public final class Resources extends Object
The method addConfiguration
is called
to install a new resource configuration. The method setTransactionDomain
is called to set the
transaction domain. The transaction domain is required to create
a Resource object from a ResourceConfig object.
The deployment process uses the methods addConfiguration
and listConfigurations
to add and list resource configurations.
The application server uses the methods Resources and
getResource
to obtain resources and make the
client connection factory available to the application.
Version: $Revision: 1.9 $
Constructor Summary | |
---|---|
Resources()
Default constructor. |
Method Summary | |
---|---|
void | addConfiguration(ResourceConfig config)
Adds a resource configuration. |
Resource | getResource(String name)
Returns the named resource. |
boolean | hasResource(String name)
Returns true if a resource by this name is installed.
|
Iterator | listConfigurations()
Returns all the resource configurations. |
Iterator | listResources()
Returns an iterator of all the installed resources. |
void | removeResource(String name)
Removes a resource. |
void | setTransactionDomain(TransactionDomain txDomain)
Sets the transaction domain for this resource list. |
Parameters: config The resource configuration
Throws: ResourceException A resource with this name already installed
addConfiguration
and the transaction domain must have been set up for this method
to succeed. It is possible that this method will not be able to
create the specified resource.
Parameters: name The resource name
Returns: The resource, null if no such resource installed
Throws: ResourceException An error occured while attempting to create this resource
Parameters: name The resource name
Returns: True if the resource is installed
Returns: All the resource configurations
Returns: An iterator of all installed resource names
This method automatically calls Resource.
Parameters: name The resource name
Parameters: txDomain The transaction domain