|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.common.pooling.api.ResourceHelper
public final class ResourceHelper
Constructor Summary | |
---|---|
ResourceHelper()
|
Method Summary | |
---|---|
static Resource |
getResource(java.util.Properties properties,
java.lang.String userName)
Returns a Resource from a resource pool based on the
specified ResourcePool.RESOURCE_POOL property. |
static Resource |
getResource(java.lang.String poolName,
java.lang.String userName)
Returns a Resource from the specified ResourcePool.RESOURCE_POOL based on the
specified poolName . |
static Resource |
getResourceFromPool(ResourceDescriptor descriptor,
java.lang.String userName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceHelper()
Method Detail |
---|
public static Resource getResource(java.util.Properties properties, java.lang.String userName) throws ResourcePoolException
Resource
from a resource pool based on the
specified ResourcePool.RESOURCE_POOL
property. If
the requested pool does not exist, then a new pool will be created based on the given
pool name. However, in order to create the new pool, the pool may expect certain properties
to be passed in. Otherwise, an exception may be thrown when the resource is requested
from the pool.
properties
- that define the pool to obtain the connection fromuserName
- is the requestor of the connection
ResourcePoolException
- if an error occurs obtaining the connectionpublic static Resource getResource(java.lang.String poolName, java.lang.String userName) throws ResourcePoolException
Resource
from the specified ResourcePool.RESOURCE_POOL
based on the
specified poolName
.
poolName
- is the name of the pool to obtain the resource fromuserName
- is the requestor of the connection
ResourcePoolException
- if an error occurs obtaining the connectionpublic static Resource getResourceFromPool(ResourceDescriptor descriptor, java.lang.String userName) throws ResourcePoolException
ResourcePoolException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |