Package com.sun.enterprise.connectors
Class ConnectionManagerImpl
- java.lang.Object
-
- com.sun.enterprise.connectors.ConnectionManagerImpl
-
- All Implemented Interfaces:
ConnectionManager
,jakarta.resource.spi.ConnectionManager
,Serializable
- Direct Known Subclasses:
LazyAssociatableConnectionManagerImpl
,LazyEnlistableConnectionManagerImpl
public class ConnectionManagerImpl extends Object implements ConnectionManager, Serializable
- Author:
- Tony Ng
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ResourcePrincipal
defaultPrin
protected String
jndiName
protected String
logicalName
protected PoolInfo
poolInfo
protected String
rarName
protected ResourceInfo
resourceInfo
-
Constructor Summary
Constructors Constructor Description ConnectionManagerImpl(PoolInfo poolInfo, ResourceInfo resourceInfo)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
allocateConnection(jakarta.resource.spi.ManagedConnectionFactory mcf, jakarta.resource.spi.ConnectionRequestInfo cxRequestInfo)
Object
allocateConnection(jakarta.resource.spi.ManagedConnectionFactory mcf, jakarta.resource.spi.ConnectionRequestInfo cxRequestInfo, String jndiNameToUse)
Object
allocateConnection(jakarta.resource.spi.ManagedConnectionFactory mcf, jakarta.resource.spi.ConnectionRequestInfo cxRequestInfo, String jndiNameToUse, Object conn)
Object
allocateNonTxConnection(jakarta.resource.spi.ManagedConnectionFactory mcf, jakarta.resource.spi.ConnectionRequestInfo cxRequestInfo)
Allocate a non transactional connection.String
getJndiName()
provides the JndiName of the resourceprotected static Logger
getLogger()
String
getLogicalName()
String
getRarName()
void
initialize()
protected Object
internalGetConnection(jakarta.resource.spi.ManagedConnectionFactory mcf, ResourcePrincipal prin, jakarta.resource.spi.ConnectionRequestInfo cxRequestInfo, boolean shareable, String jndiNameToUse, Object conn, boolean isUnknownAuth)
void
logFine(String message)
void
setJndiName(String jndiName)
void
setLogicalName(String logicalName)
void
setRarName(String _rarName)
-
-
-
Field Detail
-
jndiName
protected String jndiName
-
logicalName
protected String logicalName
-
poolInfo
protected PoolInfo poolInfo
-
resourceInfo
protected ResourceInfo resourceInfo
-
rarName
protected String rarName
-
defaultPrin
protected ResourcePrincipal defaultPrin
-
-
Constructor Detail
-
ConnectionManagerImpl
public ConnectionManagerImpl(PoolInfo poolInfo, ResourceInfo resourceInfo)
-
-
Method Detail
-
setJndiName
public void setJndiName(String jndiName)
-
getJndiName
public String getJndiName()
Description copied from interface:ConnectionManager
provides the JndiName of the resource- Specified by:
getJndiName
in interfaceConnectionManager
- Returns:
- jndi name
-
setLogicalName
public void setLogicalName(String logicalName)
-
getLogicalName
public String getLogicalName()
-
allocateNonTxConnection
public Object allocateNonTxConnection(jakarta.resource.spi.ManagedConnectionFactory mcf, jakarta.resource.spi.ConnectionRequestInfo cxRequestInfo) throws jakarta.resource.ResourceException
Allocate a non transactional connection. This connection, even if acquired in the context of an existing transaction, will never be associated with a transaction The typical use case may be to check the original contents of an EIS when a transacted connection is changing the contents, and the tx is yet to be committed. We create a ResourceSpec for a non tx connection with a name ending in __nontx. This is to maintain uniformity with the scheme of having __pm connections. If one were to create a resource with a jndiName ending with __nontx the same functionality might be achieved.- Specified by:
allocateNonTxConnection
in interfaceConnectionManager
- Parameters:
mcf
- ManagedConnectionFactorycxRequestInfo
- ConnectionRequestInfo- Returns:
- Connection
- Throws:
jakarta.resource.ResourceException
- when unable to provide a connection
-
allocateConnection
public Object allocateConnection(jakarta.resource.spi.ManagedConnectionFactory mcf, jakarta.resource.spi.ConnectionRequestInfo cxRequestInfo) throws jakarta.resource.ResourceException
- Specified by:
allocateConnection
in interfacejakarta.resource.spi.ConnectionManager
- Throws:
jakarta.resource.ResourceException
-
allocateConnection
public Object allocateConnection(jakarta.resource.spi.ManagedConnectionFactory mcf, jakarta.resource.spi.ConnectionRequestInfo cxRequestInfo, String jndiNameToUse) throws jakarta.resource.ResourceException
- Throws:
jakarta.resource.ResourceException
-
allocateConnection
public Object allocateConnection(jakarta.resource.spi.ManagedConnectionFactory mcf, jakarta.resource.spi.ConnectionRequestInfo cxRequestInfo, String jndiNameToUse, Object conn) throws jakarta.resource.ResourceException
- Throws:
jakarta.resource.ResourceException
-
internalGetConnection
protected Object internalGetConnection(jakarta.resource.spi.ManagedConnectionFactory mcf, ResourcePrincipal prin, jakarta.resource.spi.ConnectionRequestInfo cxRequestInfo, boolean shareable, String jndiNameToUse, Object conn, boolean isUnknownAuth) throws jakarta.resource.ResourceException
- Throws:
jakarta.resource.ResourceException
-
setRarName
public void setRarName(String _rarName)
-
getRarName
public String getRarName()
-
initialize
public void initialize() throws ConnectorRuntimeException
- Throws:
ConnectorRuntimeException
-
logFine
public void logFine(String message)
-
getLogger
protected static Logger getLogger()
-
-