Class ConnectionPoolObjectsUtils
- java.lang.Object
-
- com.sun.enterprise.connectors.util.ConnectionPoolObjectsUtils
-
public final class ConnectionPoolObjectsUtils extends Object
This is an util class for creating poolObjects of the type ConnectorConnectionPool from ConnectorDescriptor and also using the default values.- Author:
- Srikanth P
-
-
Field Summary
Fields Modifier and Type Field Description static StringELEMENT_PROPERTY
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intconvertSpecTxSupportToContainerTxSupport(jakarta.resource.spi.TransactionSupport.TransactionSupportLevel mcfTS)Return the interger representation container transaction support value equivalent to the jakarta.resource.spi.TransactionSupport enum value.static ConnectorConnectionPoolcreateDefaultConnectorPoolObject(PoolInfo poolInfo, String rarName)Creates default ConnectorConnectionPool consisting of default pool values.static SubjectcreateSubject(jakarta.resource.spi.ManagedConnectionFactory mcf, ResourcePrincipal prin)static ConnectorConnectionPoolcreateSunRaConnectorPoolObject(PoolInfo poolInfo, ConnectorDescriptor desc, String rarName)Creates ConnectorConnectionPool object pertaining to the pool props mentioned in the sun-ra/xml i.e it represents the pool mentioned in the sun-ra.xm.static TransactionSupportgetTransactionSupport(int ts)A utility method to map TransactionSupport ints as represented in ConnectorConstants to the new TransactionSupport enumstatic intgetTransactionSupportFromRaXml(String rarName)static StringgetValueFromMCF(String prop, PoolInfo poolInfo, jakarta.resource.spi.ManagedConnectionFactory mcf)static booleanisPoolSystemPool(String poolName)static booleanisPoolSystemPool(ConnectorConnectionPool domainCcp)static booleanisTxSupportConfigurationSane(int txSupport, String raName)static intparseTransactionSupportString(String txSupport)Return the integer representation of the transaction-support attriburestatic voidsetLazyEnlistAndLazyAssocProperties(String lazyAssocString, List<Property> properties, ConnectorConnectionPool conConnPool)Validates and sets the values for LazyConnectionEnlistment and LazyConnectionAssociation.
-
-
-
Field Detail
-
ELEMENT_PROPERTY
public static final String ELEMENT_PROPERTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
createDefaultConnectorPoolObject
public static ConnectorConnectionPool createDefaultConnectorPoolObject(PoolInfo poolInfo, String rarName)
Creates default ConnectorConnectionPool consisting of default pool values.- Parameters:
poolInfo- Name of the pool- Returns:
- ConnectorConnectionPool created ConnectorConnectionPool instance
-
createSunRaConnectorPoolObject
public static ConnectorConnectionPool createSunRaConnectorPoolObject(PoolInfo poolInfo, ConnectorDescriptor desc, String rarName)
Creates ConnectorConnectionPool object pertaining to the pool props mentioned in the sun-ra/xml i.e it represents the pool mentioned in the sun-ra.xm.- Parameters:
poolInfo- Name of the pooldesc- ConnectorDescriptor which represent ra.xml and sun-ra.xml.- Returns:
- ConnectorConnectionPool created ConnectorConnectionPool instance
-
convertSpecTxSupportToContainerTxSupport
public static int convertSpecTxSupportToContainerTxSupport(jakarta.resource.spi.TransactionSupport.TransactionSupportLevel mcfTS)
Return the interger representation container transaction support value equivalent to the jakarta.resource.spi.TransactionSupport enum value.- Parameters:
mcfTS- jakarta.resource.spi.TransactionSupport- Returns:
- container equivalent value
-
parseTransactionSupportString
public static int parseTransactionSupportString(String txSupport)
Return the integer representation of the transaction-support attribure- Parameters:
txSupport- one of
- NoTransaction
- LocalTransaction
- XATransaction
- Returns:
- one of
- ConnectorConstants.UNDEFINED_TRANSACTION_INT
- ConnectorConstants.NO_TRANSACTION_INT
- ConnectorConstants.LOCAL_TRANSACTION_INT
- ConnectorConstants.XA_TRANSACTION_INT
-
isTxSupportConfigurationSane
public static boolean isTxSupportConfigurationSane(int txSupport, String raName)
-
getTransactionSupport
public static TransactionSupport getTransactionSupport(int ts)
A utility method to map TransactionSupport ints as represented in ConnectorConstants to the new TransactionSupport enum
-
getValueFromMCF
public static String getValueFromMCF(String prop, PoolInfo poolInfo, jakarta.resource.spi.ManagedConnectionFactory mcf)
-
createSubject
public static Subject createSubject(jakarta.resource.spi.ManagedConnectionFactory mcf, ResourcePrincipal prin)
-
isPoolSystemPool
public static boolean isPoolSystemPool(ConnectorConnectionPool domainCcp)
-
isPoolSystemPool
public static boolean isPoolSystemPool(String poolName)
-
setLazyEnlistAndLazyAssocProperties
public static void setLazyEnlistAndLazyAssocProperties(String lazyAssocString, List<Property> properties, ConnectorConnectionPool conConnPool)
Validates and sets the values for LazyConnectionEnlistment and LazyConnectionAssociation.- Parameters:
lazyAssocString- Property valueadminPool- Config BeanconConnPool- Connector Connection Pool
-
getTransactionSupportFromRaXml
public static int getTransactionSupportFromRaXml(String rarName) throws ConnectorRuntimeException
- Throws:
ConnectorRuntimeException
-
-