|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tyrex.resource.ResourceConfig
Base class for a resource configuration. Different resource implementations extend this class with additional methods for configuring and creating a resource.
Field Summary | |
protected java.lang.Object |
_factory
The configured resource manager factory. |
protected java.lang.String |
_jar
The JAR file name. |
protected PoolLimits |
_limits
The connection pool limits. |
protected java.lang.String |
_name
The resource name. |
protected java.lang.String |
_paths
Additional class paths for dependent files. |
protected boolean |
_twoPhase
True if two-phase commit is supported. |
Constructor Summary | |
ResourceConfig()
|
Method Summary | |
abstract java.lang.Object |
createFactory()
Called to create a new factory object for the purpose of configuring it. |
abstract Resource |
createResource(TransactionDomain txDomain)
Called to create a new resource from this resource configuration. |
java.lang.Object |
getFactory()
Called to return the factory object. |
java.lang.String |
getJAR()
Returns the JAR file name. |
PoolLimits |
getLimits()
Returns the connection pool limits. |
java.lang.String |
getName()
Returns the name for this resource manager. |
java.lang.String |
getPaths()
Returns the additional path names. |
boolean |
getTwoPhase()
Returns the two-phase commit support flag. |
protected java.net.URL |
getURL(java.lang.String urlString)
Return the url for the url string. |
void |
setFactory(java.lang.Object factory)
Called to set the factory object after it has been configured. |
void |
setJAR(java.lang.String jar)
Sets the JAR file name. |
void |
setLimits(PoolLimits limits)
Sets the connection pool limist. |
void |
setName(java.lang.String name)
Sets the name for this resource manager. |
void |
setPaths(java.lang.String paths)
Sets additional path names. |
void |
setTwoPhase(boolean twoPhase)
Sets the two-phase commit support flag. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String _name
protected java.lang.String _jar
protected java.lang.String _paths
protected PoolLimits _limits
protected boolean _twoPhase
protected java.lang.Object _factory
Constructor Detail |
public ResourceConfig()
Method Detail |
public void setName(java.lang.String name)
name
- The resource manager namepublic java.lang.String getName()
public void setJAR(java.lang.String jar)
jar
- The JAR file namepublic java.lang.String getJAR()
public void setPaths(java.lang.String paths)
paths
- Additional path namespublic java.lang.String getPaths()
public void setLimits(PoolLimits limits)
limits
- The connection pool limitspublic PoolLimits getLimits()
public void setTwoPhase(boolean twoPhase)
This flag is valid only if connections support the XA interface for distributed transaction demarcation. The default is always true.
twoPhase
- True if connections support two-phase commitpublic boolean getTwoPhase()
public void setFactory(java.lang.Object factory)
factory
- The factory objectpublic java.lang.Object getFactory()
public abstract java.lang.Object createFactory() throws ResourceException
setFactory
.
ResourceException
- An error occured while attempting
to create a new factorypublic abstract Resource createResource(TransactionDomain txDomain) throws ResourceException
txDomain
- The transaction domain in which the resource will
be used
ResourceException
- An error occured while attempting to
create the resourceprotected final java.net.URL getURL(java.lang.String urlString) throws java.io.IOException
This code contains a workaround for a bug in java.net.URLClassLoader involving relative paths to directories.
urlString
- the url string (required)
java.io.IOException
- if the url is malformed or
an io problem occurred.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |