|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tyrex.resource.Resources
Represents a collection of installed resources. Resources are obtained from this collection by the name with which they were installed.
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 listResources()
and
getResource
to obtain resources and make the
client connection factory available to the application.
Constructor Summary | |
Resources()
Default constructor. |
Method Summary | |
void |
addConfiguration(ResourceConfig config)
Adds a resource configuration. |
Resource |
getResource(java.lang.String name)
Returns the named resource. |
boolean |
hasResource(java.lang.String name)
Returns true if a resource by this name is installed. |
java.util.Iterator |
listConfigurations()
Returns all the resource configurations. |
java.util.Iterator |
listResources()
Returns an iterator of all the installed resources. |
void |
removeResource(java.lang.String name)
Removes a resource. |
void |
setTransactionDomain(TransactionDomain txDomain)
Sets the transaction domain for this resource list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Resources()
Method Detail |
public void setTransactionDomain(TransactionDomain txDomain)
getResource(java.lang.String)
.
txDomain
- The transaction domainpublic void addConfiguration(ResourceConfig config) throws ResourceException
getResource(java.lang.String)
.
config
- The resource configuration
ResourceException
- A resource with this name already installedpublic java.util.Iterator listConfigurations()
ResourceConfig
objects that specify the configuration
of each resource.
public boolean hasResource(java.lang.String name)
name
- The resource name
public java.util.Iterator listResources()
Resource
object.
public Resource getResource(java.lang.String name) throws ResourceException
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.
name
- The resource name
ResourceException
- An error occured while attempting
to create this resourcepublic void removeResource(java.lang.String name)
This method automatically calls Resource.destroy()
.
name
- The resource name
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |