Package com.sun.enterprise.connectors
Class ConnectorConnectionPool
- java.lang.Object
-
- com.sun.enterprise.connectors.ConnectorConnectionPool
-
- All Implemented Interfaces:
Serializable
public class ConnectorConnectionPool extends Object implements Serializable
This class abstracts a connection connection pool. It contains two parts 1) Connector Connection Pool properties. 2) ConnectorDescriptorInfo which contains some of the values of ra.xml pertaining to managed connection factory class- Author:
- Srikanth Padakandla
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ConnectorDescriptorInfo
connectorDescriptorInfo_
static String
DEFAULT_CON_CREATION_RETRY_ATTEMPTS
static String
DEFAULT_CON_CREATION_RETRY_INTERVAL
static String
DEFAULT_LEAK_TIMEOUT
static String
DEFAULT_MAX_CONNECTION_USAGE
static String
DEFAULT_VALIDATE_ATMOST_ONCE_PERIOD
protected boolean
failAllConnections_
protected String
idleTimeoutInSeconds_
protected boolean
isConnectionValidationRequired_
protected boolean
matchConnections_
protected String
maxPoolSize_
protected String
maxWaitTimeInMillis_
protected String
poolResizeQuantity_
protected String
steadyPoolSize_
protected int
transactionSupport_
-
Constructor Summary
Constructors Constructor Description ConnectorConnectionPool(String name)
ConstructorConnectorConnectionPool(String name, String applicationName)
ConstructorConnectorConnectionPool(String name, String applicationName, String moduleName)
ConstructorConnectorConnectionPool(PoolInfo poolInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ConnectorConnectionPool
doClone(String name)
Clone method.String
getApplicationName()
boolean
getAuthCredentialsDefinedInPool()
String
getConCreationRetryAttempts()
Queries the connection-creation-retry-attempt pool attributeString
getConCreationRetryInterval()
Queries the connection-creation-retry-interval pool attributeString
getConnectionLeakTracingTimeout()
Queries the connection-leak-tracing-timeout pool attributeConnectorDescriptorInfo
getConnectorDescriptorInfo()
Getter method of ConnectorDescriptorInfo which contains some the ra.xml values pertainining to managed connection factoryString
getDataStructureParameters()
long
getDynamicReconfigWaitTimeout()
String
getIdleTimeoutInSeconds()
Getter method of IdleTimeoutInSeconds propertyString
getMaxConnectionUsage()
Queries the max-connection-usage pool attributeString
getMaxPoolSize()
Getter method of MaxPoolSize propertyString
getMaxWaitTimeInMillis()
Getter method of MaxWaitTimeInMillis propertyString
getModuleName()
String
getName()
boolean
getPingDuringPoolCreation()
String
getPoolDataStructureType()
PoolInfo
getPoolInfo()
String
getPoolResizeQuantity()
Getter method of PoolResizeQuantity propertyString
getPoolWaitQueue()
String
getResourceGatewayClass()
String
getResourceSelectionStrategyClass()
ConnectorSecurityMap[]
getSecurityMaps()
Getter method for Security MapsString
getSteadyPoolSize()
Getter method of SteadyPoolSize propertyint
getTransactionSupport()
Returns the transaction support level for this pool The valid values are
ConnectorConstants.NO_TRANSACTION ConnectorConstants.LOCAL_TRANSACTION ConnectorConstants.XA_TRANSACTIONString
getValidateAtmostOncePeriod()
Queries the validate-atmost-period pool attributeboolean
isApplicationScopedResource()
boolean
isAssociateWithThread()
Queries the associate-with-thread pool attributeboolean
isConnectionReclaim()
Queries the connection-reclaim attributeboolean
isFailAllConnections()
Getter method of FailAllConnections propertyboolean
isIsConnectionValidationRequired()
Queries the connection-validation-required pool attributeboolean
isLazyConnectionAssoc()
Queries the lazy-connection-association pool attributeboolean
isLazyConnectionEnlist()
Queries the lazy-connection-enlistment pool attributeboolean
isNonComponent()
Queries the non-component pool attributeboolean
isNonTransactional()
Queries the non-transactional pool attributeboolean
isPartitionedPool()
boolean
isPoolingOn()
boolean
isPreferValidateOverRecreate()
boolean
isValidateAtmostEveryIdleSecs()
Queries the validate-atmost-every-idle-seconds pool attributeboolean
matchConnections()
Getter method of matchConnections propertyvoid
setApplicationName(String applicationName)
void
setAssociateWithThread(boolean enabled)
Setter method of associate-with-thread attributevoid
setAuthCredentialsDefinedInPool(boolean authCred)
void
setConCreationRetryAttempts(String retryAttempts)
Setter method of connection-creation-retry-attempt attributevoid
setConCreationRetryInterval(String retryInterval)
Setter method of connection-creation-retry-interval attributevoid
setConnectionLeakTracingTimeout(String timeout)
Setter method of connection-leak-tracing-timeout attributevoid
setConnectionReclaim(boolean connectionReclaim)
Setter method of connection-reclaim attributevoid
setConnectionValidationRequired(boolean validation)
Sets the connection-validation-required pool attributevoid
setConnectorDescriptorInfo(ConnectorDescriptorInfo connectorDescriptorInfo)
Setter method of ConnectorDescriptorInfo which contains some the ra.xml values pertainining to managed connection factoryvoid
setDataStructureParameters(String dataStructureParameters)
void
setDynamicReconfigWaitTimeout(long dynamicReconfigWaitTimeout)
void
setFailAllConnections(boolean failAllConnections)
Setter method of FailAllConnections propertyvoid
setIdleTimeoutInSeconds(String idleTimeoutInSeconds)
Setter method of IdleTimeoutInSeconds propertyvoid
setLazyConnectionAssoc(boolean enabled)
Setter method of lazyConnectionAssociation attributevoid
setLazyConnectionEnlist(boolean enabled)
Setter method of lazy-connection-enlistment attributevoid
setMatchConnections(boolean matchConnections)
Setter method of matchConnections propertyvoid
setMaxConnectionUsage(String count)
Setter method of max-connection-usage pool attributevoid
setMaxPoolSize(String maxPoolSize)
Setter method of MaxPoolSize propertyvoid
setMaxWaitTimeInMillis(String maxWaitTimeInMillis)
Setter method of MaxWaitTimeInMillis propertyvoid
setModuleName(String moduleName)
void
setNonComponent(boolean enabled)
Setter method of non-component attributevoid
setNonTransactional(boolean enabled)
Setter method of non-transactional attributevoid
setPartitionedPool(boolean partitionedPool)
void
setPingDuringPoolCreation(boolean enabled)
Setter method of Ping pool during creation attribute.void
setPoolDataStructureType(String poolDataStructureType)
void
setPooling(boolean enabled)
Setter method of pooling attributevoid
setPoolResizeQuantity(String poolResizeQuantity)
Setter method of PoolResizeQuantity propertyvoid
setPoolWaitQueue(String poolWaitQueue)
void
setPreferValidateOverRecreate(boolean preferValidateOverRecreate)
void
setResourceGatewayClass(String resourceGatewayClass)
void
setResourceSelectionStrategyClass(String resourceSelectionStrategyClass)
void
setSecurityMaps(ConnectorSecurityMap[] securityMapArray)
Setter method for Security Mapsvoid
setSteadyPoolSize(String steadyPoolSize)
Setter method of SteadyPoolSize propertyvoid
setTransactionSupport(int transactionSupport)
Sets the transaction support level for this pool The valid values arevoid
setValidateAtmostEveryIdleSecs(boolean enabled)
Setter method of validate-atmost-every-idle-seconds pool attributevoid
setValidateAtmostOncePeriod(String validateAtmostOncePeriod)
Setter method of validate-atmost-period attributeString
toString()
return the String representation of the pool.
-
-
-
Field Detail
-
connectorDescriptorInfo_
protected ConnectorDescriptorInfo connectorDescriptorInfo_
-
steadyPoolSize_
protected String steadyPoolSize_
-
maxPoolSize_
protected String maxPoolSize_
-
maxWaitTimeInMillis_
protected String maxWaitTimeInMillis_
-
poolResizeQuantity_
protected String poolResizeQuantity_
-
idleTimeoutInSeconds_
protected String idleTimeoutInSeconds_
-
failAllConnections_
protected boolean failAllConnections_
-
matchConnections_
protected boolean matchConnections_
-
transactionSupport_
protected int transactionSupport_
-
isConnectionValidationRequired_
protected boolean isConnectionValidationRequired_
-
DEFAULT_MAX_CONNECTION_USAGE
public static final String DEFAULT_MAX_CONNECTION_USAGE
- See Also:
- Constant Field Values
-
DEFAULT_CON_CREATION_RETRY_ATTEMPTS
public static final String DEFAULT_CON_CREATION_RETRY_ATTEMPTS
- See Also:
- Constant Field Values
-
DEFAULT_CON_CREATION_RETRY_INTERVAL
public static final String DEFAULT_CON_CREATION_RETRY_INTERVAL
- See Also:
- Constant Field Values
-
DEFAULT_VALIDATE_ATMOST_ONCE_PERIOD
public static final String DEFAULT_VALIDATE_ATMOST_ONCE_PERIOD
- See Also:
- Constant Field Values
-
DEFAULT_LEAK_TIMEOUT
public static final String DEFAULT_LEAK_TIMEOUT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConnectorConnectionPool
public ConnectorConnectionPool(String name, String applicationName)
Constructor- Parameters:
name
- Name of the connector connection pool
-
ConnectorConnectionPool
public ConnectorConnectionPool(String name, String applicationName, String moduleName)
Constructor- Parameters:
name
- Name of the connector connection pool
-
ConnectorConnectionPool
public ConnectorConnectionPool(String name)
Constructor- Parameters:
name
- Name of the connector connection pool
-
ConnectorConnectionPool
public ConnectorConnectionPool(PoolInfo poolInfo)
-
-
Method Detail
-
getApplicationName
public String getApplicationName()
-
setApplicationName
public void setApplicationName(String applicationName)
-
getModuleName
public String getModuleName()
-
setModuleName
public void setModuleName(String moduleName)
-
isApplicationScopedResource
public boolean isApplicationScopedResource()
-
getPingDuringPoolCreation
public boolean getPingDuringPoolCreation()
-
setPingDuringPoolCreation
public void setPingDuringPoolCreation(boolean enabled)
Setter method of Ping pool during creation attribute.- Parameters:
enabled
- enables/disables ping during creation.
-
isPoolingOn
public boolean isPoolingOn()
-
setPooling
public void setPooling(boolean enabled)
Setter method of pooling attribute- Parameters:
enabled
- enables/disables pooling
-
doClone
protected ConnectorConnectionPool doClone(String name)
Clone method.
-
getName
public String getName()
-
setAuthCredentialsDefinedInPool
public void setAuthCredentialsDefinedInPool(boolean authCred)
-
getAuthCredentialsDefinedInPool
public boolean getAuthCredentialsDefinedInPool()
-
getConnectorDescriptorInfo
public ConnectorDescriptorInfo getConnectorDescriptorInfo()
Getter method of ConnectorDescriptorInfo which contains some the ra.xml values pertainining to managed connection factory- Returns:
- ConnectorDescriptorInfo which contains ra.xml values pertaining to managed connection factory
-
setConnectorDescriptorInfo
public void setConnectorDescriptorInfo(ConnectorDescriptorInfo connectorDescriptorInfo)
Setter method of ConnectorDescriptorInfo which contains some the ra.xml values pertainining to managed connection factory- Parameters:
connectorDescriptorInfo
- which contains ra.xml values pertaining to managed connection factory
-
getSteadyPoolSize
public String getSteadyPoolSize()
Getter method of SteadyPoolSize property- Returns:
- Steady Pool Size value
-
setSteadyPoolSize
public void setSteadyPoolSize(String steadyPoolSize)
Setter method of SteadyPoolSize property- Parameters:
steadyPoolSize
- Steady pool size value
-
getMaxPoolSize
public String getMaxPoolSize()
Getter method of MaxPoolSize property- Returns:
- maximum Pool Size value
-
setMaxPoolSize
public void setMaxPoolSize(String maxPoolSize)
Setter method of MaxPoolSize property- Parameters:
maxPoolSize
- maximum pool size value
-
getMaxWaitTimeInMillis
public String getMaxWaitTimeInMillis()
Getter method of MaxWaitTimeInMillis property- Returns:
- maximum wait time in milli value
-
setMaxWaitTimeInMillis
public void setMaxWaitTimeInMillis(String maxWaitTimeInMillis)
Setter method of MaxWaitTimeInMillis property- Parameters:
maxWaitTimeInMillis
- maximum wait time in millis value
-
getPoolResizeQuantity
public String getPoolResizeQuantity()
Getter method of PoolResizeQuantity property- Returns:
- pool resize quantity value
-
setPoolResizeQuantity
public void setPoolResizeQuantity(String poolResizeQuantity)
Setter method of PoolResizeQuantity property- Parameters:
poolResizeQuantity
- pool resize quantity value
-
getIdleTimeoutInSeconds
public String getIdleTimeoutInSeconds()
Getter method of IdleTimeoutInSeconds property- Returns:
- idle Timeout in seconds value
-
setIdleTimeoutInSeconds
public void setIdleTimeoutInSeconds(String idleTimeoutInSeconds)
Setter method of IdleTimeoutInSeconds property- Parameters:
idleTimeoutInSeconds
- Idle timeout in seconds value
-
isFailAllConnections
public boolean isFailAllConnections()
Getter method of FailAllConnections property- Returns:
- whether to fail all connections or not
-
setFailAllConnections
public void setFailAllConnections(boolean failAllConnections)
Setter method of FailAllConnections property- Parameters:
failAllConnections
- fail all connections value
-
matchConnections
public boolean matchConnections()
Getter method of matchConnections property- Returns:
- whether to match connections always with resource adapter or not
-
setMatchConnections
public void setMatchConnections(boolean matchConnections)
Setter method of matchConnections property- Parameters:
matchConnections
- fail all connections value
-
getTransactionSupport
public int getTransactionSupport()
Returns the transaction support level for this pool The valid values are
- ConnectorConstants.NO_TRANSACTION
- ConnectorConstants.LOCAL_TRANSACTION
- ConnectorConstants.XA_TRANSACTION
- Returns:
- the transaction support level for this pool
-
setTransactionSupport
public void setTransactionSupport(int transactionSupport)
Sets the transaction support level for this pool The valid values are- Parameters:
transactionSupport
- int representing transaction support
- ConnectorConstants.NO_TRANSACTION
- ConnectorConstants.LOCAL_TRANSACTION
- ConnectorConstants.XA_TRANSACTION
-
setConnectionValidationRequired
public void setConnectionValidationRequired(boolean validation)
Sets the connection-validation-required pool attribute- Parameters:
validation
- boolean representing validation requirement
-
isIsConnectionValidationRequired
public boolean isIsConnectionValidationRequired()
Queries the connection-validation-required pool attribute- Returns:
- boolean representing validation requirement
-
isLazyConnectionAssoc
public boolean isLazyConnectionAssoc()
Queries the lazy-connection-association pool attribute- Returns:
- boolean representing lazy-connection-association status
-
setLazyConnectionAssoc
public void setLazyConnectionAssoc(boolean enabled)
Setter method of lazyConnectionAssociation attribute- Parameters:
enabled
- enables/disables lazy-connection-association
-
isLazyConnectionEnlist
public boolean isLazyConnectionEnlist()
Queries the lazy-connection-enlistment pool attribute- Returns:
- boolean representing lazy-connection-enlistment status
-
setLazyConnectionEnlist
public void setLazyConnectionEnlist(boolean enabled)
Setter method of lazy-connection-enlistment attribute- Parameters:
enabled
- enables/disables lazy-connection-enlistment
-
isAssociateWithThread
public boolean isAssociateWithThread()
Queries the associate-with-thread pool attribute- Returns:
- boolean representing associate-with-thread status
-
setAssociateWithThread
public void setAssociateWithThread(boolean enabled)
Setter method of associate-with-thread attribute- Parameters:
enabled
- enables/disables associate-with-thread
-
isNonTransactional
public boolean isNonTransactional()
Queries the non-transactional pool attribute- Returns:
- boolean representing non-transactional status
-
setNonTransactional
public void setNonTransactional(boolean enabled)
Setter method of non-transactional attribute- Parameters:
enabled
- enables/disables non-transactional status
-
isNonComponent
public boolean isNonComponent()
Queries the non-component pool attribute- Returns:
- boolean representing non-component status
-
setNonComponent
public void setNonComponent(boolean enabled)
Setter method of non-component attribute- Parameters:
enabled
- enables/disables non-component status
-
getConnectionLeakTracingTimeout
public String getConnectionLeakTracingTimeout()
Queries the connection-leak-tracing-timeout pool attribute- Returns:
- boolean representing connection-leak-tracing-timeout status
-
setConnectionLeakTracingTimeout
public void setConnectionLeakTracingTimeout(String timeout)
Setter method of connection-leak-tracing-timeout attribute- Parameters:
timeout
- value after which connection is assumed to be leaked.
-
setSecurityMaps
public void setSecurityMaps(ConnectorSecurityMap[] securityMapArray)
Setter method for Security Maps- Parameters:
securityMapArray
- SecurityMap[]
-
getSecurityMaps
public ConnectorSecurityMap[] getSecurityMaps()
Getter method for Security Maps- Returns:
- SecurityMap[]
-
isValidateAtmostEveryIdleSecs
public boolean isValidateAtmostEveryIdleSecs()
Queries the validate-atmost-every-idle-seconds pool attribute- Returns:
- boolean representing validate-atmost-every-idle-seconds status
-
setValidateAtmostEveryIdleSecs
public void setValidateAtmostEveryIdleSecs(boolean enabled)
Setter method of validate-atmost-every-idle-seconds pool attribute- Parameters:
enabled
- enables/disables validate-atmost-every-idle-seconds property
-
setMaxConnectionUsage
public void setMaxConnectionUsage(String count)
Setter method of max-connection-usage pool attribute- Parameters:
count
- max-connection-usage count
-
getMaxConnectionUsage
public String getMaxConnectionUsage()
Queries the max-connection-usage pool attribute- Returns:
- boolean representing max-connection-usage count
-
getConCreationRetryInterval
public String getConCreationRetryInterval()
Queries the connection-creation-retry-interval pool attribute- Returns:
- boolean representing connection-creation-retry-interval duration
-
setConCreationRetryInterval
public void setConCreationRetryInterval(String retryInterval)
Setter method of connection-creation-retry-interval attribute- Parameters:
retryInterval
- connection-creation-retry-interval duration
-
getConCreationRetryAttempts
public String getConCreationRetryAttempts()
Queries the connection-creation-retry-attempt pool attribute- Returns:
- boolean representing connection-creation-retry-attempt count
-
setConCreationRetryAttempts
public void setConCreationRetryAttempts(String retryAttempts)
Setter method of connection-creation-retry-attempt attribute- Parameters:
retryAttempts
- connection-creation-retry-attempt interval duration
-
getValidateAtmostOncePeriod
public String getValidateAtmostOncePeriod()
Queries the validate-atmost-period pool attribute- Returns:
- boolean representing validate-atmost-period duration
-
setValidateAtmostOncePeriod
public void setValidateAtmostOncePeriod(String validateAtmostOncePeriod)
Setter method of validate-atmost-period attribute- Parameters:
validateAtmostOncePeriod
- validate-atmost-period duration
-
isConnectionReclaim
public boolean isConnectionReclaim()
Queries the connection-reclaim attribute- Returns:
- boolean representing connection-reclaim status
-
setConnectionReclaim
public void setConnectionReclaim(boolean connectionReclaim)
Setter method of connection-reclaim attribute- Parameters:
connectionReclaim
- onnection-reclaim status
-
toString
public String toString()
return the String representation of the pool.
-
isPartitionedPool
public boolean isPartitionedPool()
-
setPartitionedPool
public void setPartitionedPool(boolean partitionedPool)
-
getPoolDataStructureType
public String getPoolDataStructureType()
-
setPoolDataStructureType
public void setPoolDataStructureType(String poolDataStructureType)
-
getPoolWaitQueue
public String getPoolWaitQueue()
-
setPoolWaitQueue
public void setPoolWaitQueue(String poolWaitQueue)
-
getDataStructureParameters
public String getDataStructureParameters()
-
setDataStructureParameters
public void setDataStructureParameters(String dataStructureParameters)
-
getResourceGatewayClass
public String getResourceGatewayClass()
-
setResourceGatewayClass
public void setResourceGatewayClass(String resourceGatewayClass)
-
getResourceSelectionStrategyClass
public String getResourceSelectionStrategyClass()
-
setResourceSelectionStrategyClass
public void setResourceSelectionStrategyClass(String resourceSelectionStrategyClass)
-
isPreferValidateOverRecreate
public boolean isPreferValidateOverRecreate()
-
setPreferValidateOverRecreate
public void setPreferValidateOverRecreate(boolean preferValidateOverRecreate)
-
getDynamicReconfigWaitTimeout
public long getDynamicReconfigWaitTimeout()
-
setDynamicReconfigWaitTimeout
public void setDynamicReconfigWaitTimeout(long dynamicReconfigWaitTimeout)
-
getPoolInfo
public PoolInfo getPoolInfo()
-
-