Package com.sun.gjc.spi
Class ManagedConnectionFactoryImpl
- java.lang.Object
-
- com.sun.gjc.spi.ManagedConnectionFactoryImpl
-
- All Implemented Interfaces:
MCFLifecycleListener
,jakarta.resource.spi.ManagedConnectionFactory
,jakarta.resource.spi.ResourceAdapterAssociation
,jakarta.resource.spi.ValidatingManagedConnectionFactory
,Externalizable
,Serializable
- Direct Known Subclasses:
CPManagedConnectionFactory
,DMManagedConnectionFactory
,DSManagedConnectionFactory
,XAManagedConnectionFactory
public abstract class ManagedConnectionFactoryImpl extends Object implements jakarta.resource.spi.ManagedConnectionFactory, jakarta.resource.spi.ValidatingManagedConnectionFactory, MCFLifecycleListener, jakarta.resource.spi.ResourceAdapterAssociation, Serializable, Externalizable
ManagedConnectionFactory
implementation for Generic JDBC Connector. This class is extended by the DataSource specificManagedConnection
factories and theManagedConnectionFactory
for theDriverManager
.- Version:
- 1.0, 02/08/03
- Author:
- Evani Sai Surya Kiran, Aditya Gore
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected jakarta.resource.spi.LazyEnlistableConnectionManager
cm_
protected DataSourceObjectBuilder
dsObjBuilder
protected boolean
isLazyCm_
protected static int
JVM_OPTION_STATEMENT_WRAPPING_NOT_SET
protected static int
JVM_OPTION_STATEMENT_WRAPPING_OFF
protected static int
JVM_OPTION_STATEMENT_WRAPPING_ON
protected static StringManager
localStrings
protected PrintWriter
logWriter
protected jakarta.resource.spi.ResourceAdapter
ra
protected DataSourceSpec
spec
protected SQLTraceDelegator
sqlTraceDelegator
protected boolean
statementWrapping
-
Constructor Summary
Constructors Constructor Description ManagedConnectionFactoryImpl()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
computeStatementWrappingStatus()
9.1 has attribute "wrap-statements" which will be overriden when JVM option is specified as "true" or "false" JVM Option will be deprecated in future versions.protected ManagedConnectionImpl
constructManagedConnection(PooledConnection pc, Connection sqlCon, jakarta.resource.spi.security.PasswordCredential passCred, ManagedConnectionFactoryImpl mcf)
Object
createConnectionFactory()
Creates a Connection Factory instance.Object
createConnectionFactory(jakarta.resource.spi.ConnectionManager cxManager)
Creates a Connection Factory instance.abstract jakarta.resource.spi.ManagedConnection
createManagedConnection(Subject subject, jakarta.resource.spi.ConnectionRequestInfo cxRequestInfo)
Creates a new physical connection to the underlying EIS resource manager.abstract boolean
equals(Object other)
Check if thisManagedConnectionFactoryImpl
is equal to anotherManagedConnectionFactoryImpl
.String
getApplicationName()
String
getClassName()
Gets the class name of the data sourceString
getConnectionValidationRequired()
Returns if connection validation is required or notString
getDatabaseName()
Gets the database name.Object
getDataSource()
Returns the underlying datasourceString
getDataSourceName()
Gets the data source name.String
getDelimiter()
Gets the delimiter.String
getDescription()
Gets the description.String
getDriverProperties()
Gets the driver specific properties.String
getEscapeCharacter()
String
getGuaranteeIsolationLevel()
Returns the transaction isolation levelString
getInitSql()
Set
getInvalidConnections(Set connectionSet)
This method returns a set of invalidManagedConnection
objects chosen from a specified set ofManagedConnection
objects.JdbcObjectsFactory
getJdbcObjectsFactory()
String
getLoginTimeOut()
Gets the login timeout.String
getLogJdbcCalls()
PrintWriter
getLogWriter()
Get the log writer for thisManagedConnectionFactoryImpl
instance.String
getMaxCacheSize()
String
getModuleName()
String
getNetworkProtocol()
Gets the network protocol.String
getNumberOfTopQueriesToReport()
String
getPassword()
Gets the passwordprotected PoolInfo
getPoolInfo()
String
getPoolMonitoringSubTreeRoot()
String
getPoolName()
String
getPortNumber()
Gets the port number.jakarta.resource.spi.ResourceAdapter
getResourceAdapter()
Get theResourceAdapterImpl
for thisManagedConnectionFactoryImpl
instance.String
getRoleName()
Gets the role name.String
getServerName()
Gets the server name.String
getSlowQueryThresholdInSeconds()
String
getSqlTraceListeners()
String
getStatementCacheSize()
String
getStatementCacheType()
String
getStatementLeakReclaim()
String
getStatementLeakTimeoutInSeconds()
String
getStatementTimeout()
Gets the StatementTimeout valueString
getStatementWrapping()
Gets the statement wrapping valueString
getTimeToKeepQueriesInMinutes()
String
getTransactionIsolation()
Returns the transaction isolation levelString
getUser()
Gets the user nameString
getValidationClassName()
Returns the validation class name checked for during validationString
getValidationMethod()
Returns the connection validation method typeString
getValidationTableName()
Returns the table checked for during validationint
hashCode()
Returns the hash code for thisManagedConnectionFactoryImpl
.protected boolean
isEqual(jakarta.resource.spi.security.PasswordCredential pc, String user, String password)
boolean
isStatementWrappingEnabled()
Returns whether statement wrapping is enabled or not.protected void
isValidByAutoCommit(Connection con)
Checks if ajava.sql.Connection
is valid or not by checking its auto commit property.protected void
isValidByCustomValidation(Connection con, String validationClassName)
Checks if ajava.sql.Connection
is valid or not by doing a custom validation using the validation class name specified.protected void
isValidByMetaData(Connection con)
Checks if ajava.sql.Connection
is valid or not by checking its meta data.protected void
isValidByTableQuery(Connection con, String tableName)
Checks if ajava.sql.Connection
is valid or not by querying a table.protected void
logFine(String logMessage)
jakarta.resource.spi.ManagedConnection
matchManagedConnections(Set connectionSet, Subject subject, jakarta.resource.spi.ConnectionRequestInfo cxRequestInfo)
Returns a matchedManagedConnection
from the candidate set ofManagedConnection
objects.void
mcfCreated()
mcf-created eventvoid
mcfDestroyed()
mcf-destroyed eventvoid
readExternal(ObjectInput in)
void
setApplicationName(String value)
void
setClassName(String className)
Sets the class name of the data sourcevoid
setConnectionValidationRequired(String conVldReq)
Sets if connection validation is required or notvoid
setDatabaseName(String databaseName)
Sets the database name.void
setDataSourceName(String dsn)
Sets the data source name.void
setDelimiter(String delim)
Sets the delimiter.void
setDescription(String desc)
Sets the description.void
setDriverProperties(String driverProps)
Sets the driver specific properties.void
setEscapeCharacter(String escapeCharacter)
void
setGuaranteeIsolationLevel(String guaranteeIsolation)
Sets if the transaction isolation level is to be guaranteedvoid
setInitSql(String initSql)
protected void
setIsolation(ManagedConnectionImpl mc)
Sets the isolation level specified in theConnectionRequestInfo
for theManagedConnection
passed.void
setLoginTimeOut(String loginTimeOut)
Sets the login timeout.void
setLogJdbcCalls(String enabled)
void
setLogWriter(PrintWriter out)
Set the log writer for thisManagedConnectionFactoryImpl
instance.void
setMaxCacheSize(String maxCacheSize)
void
setModuleName(String value)
void
setNetworkProtocol(String nwProtocol)
Sets the network protocol.void
setNumberOfTopQueriesToReport(String numTopQueriesToReport)
void
setPassword(String passwd)
Sets the passwordvoid
setPoolMonitoringSubTreeRoot(String value)
void
setPoolName(String value)
void
setPortNumber(String portNumber)
Sets the port number.void
setResourceAdapter(jakarta.resource.spi.ResourceAdapter ra)
Set the associatedResourceAdapterImpl
JavaBean.void
setRoleName(String roleName)
Sets the role name.void
setServerName(String serverName)
Sets the server name.void
setSlowQueryThresholdInSeconds(String seconds)
void
setSqlTraceListeners(String sqlTraceListeners)
void
setStatementCacheSize(String value)
void
setStatementCacheType(String statementCacheType)
void
setStatementLeakReclaim(String value)
void
setStatementLeakTimeoutInSeconds(String value)
void
setStatementTimeout(String timeout)
Set StatementTimeout valuevoid
setStatementWrapping(String wrapping)
Set Statement Wrapping valuevoid
setTimeToKeepQueriesInMinutes(String timeToKeepQueries)
void
setTransactionIsolation(String trnIsolation)
Sets the transaction isolation levelvoid
setUser(String user)
Sets the user namevoid
setValidationClassName(String className)
Sets the validation class name checked for during validationvoid
setValidationMethod(String validationMethod)
Sets the validation method requiredvoid
setValidationTableName(String table)
Sets the table checked for during validationprotected void
validateAndSetIsolation(ManagedConnectionImpl mc)
Common operation performed by all the child MCFs before returning a created mcvoid
writeExternal(ObjectOutput out)
-
-
-
Field Detail
-
spec
protected DataSourceSpec spec
-
dsObjBuilder
protected transient DataSourceObjectBuilder dsObjBuilder
-
logWriter
protected PrintWriter logWriter
-
ra
protected transient jakarta.resource.spi.ResourceAdapter ra
-
statementWrapping
protected boolean statementWrapping
-
sqlTraceDelegator
protected SQLTraceDelegator sqlTraceDelegator
-
cm_
protected jakarta.resource.spi.LazyEnlistableConnectionManager cm_
-
isLazyCm_
protected boolean isLazyCm_
-
localStrings
protected static final StringManager localStrings
-
JVM_OPTION_STATEMENT_WRAPPING_ON
protected static final int JVM_OPTION_STATEMENT_WRAPPING_ON
- See Also:
- Constant Field Values
-
JVM_OPTION_STATEMENT_WRAPPING_OFF
protected static final int JVM_OPTION_STATEMENT_WRAPPING_OFF
- See Also:
- Constant Field Values
-
JVM_OPTION_STATEMENT_WRAPPING_NOT_SET
protected static final int JVM_OPTION_STATEMENT_WRAPPING_NOT_SET
- See Also:
- Constant Field Values
-
-
Method Detail
-
createConnectionFactory
public Object createConnectionFactory()
Creates a Connection Factory instance. TheConnectionManager
implementation of the resource adapter is used here.- Specified by:
createConnectionFactory
in interfacejakarta.resource.spi.ManagedConnectionFactory
- Returns:
- Generic JDBC Connector implementation of
javax.sql.DataSource
-
createConnectionFactory
public Object createConnectionFactory(jakarta.resource.spi.ConnectionManager cxManager)
Creates a Connection Factory instance. TheConnectionManager
implementation of the application server is used here.- Specified by:
createConnectionFactory
in interfacejakarta.resource.spi.ManagedConnectionFactory
- Parameters:
cxManager
-ConnectionManager
passed by the application server- Returns:
- Generic JDBC Connector implementation of
javax.sql.DataSource
-
createManagedConnection
public abstract jakarta.resource.spi.ManagedConnection createManagedConnection(Subject subject, jakarta.resource.spi.ConnectionRequestInfo cxRequestInfo) throws jakarta.resource.ResourceException
Creates a new physical connection to the underlying EIS resource manager.- Specified by:
createManagedConnection
in interfacejakarta.resource.spi.ManagedConnectionFactory
- Parameters:
subject
-Subject
instance passed by the application servercxRequestInfo
-ConnectionRequestInfo
which may be created as a result of the invocationgetConnection(user, password)
on theDataSource
object- Returns:
ManagedConnection
object created- Throws:
jakarta.resource.ResourceException
- if there is an error in instantiating theDataSource
object used for the creation of theManagedConnection
object; or if there is an error in allocating the physical connectionSecurityException
- if there noPasswordCredential
object satisfying this request
-
equals
public abstract boolean equals(Object other)
Check if thisManagedConnectionFactoryImpl
is equal to anotherManagedConnectionFactoryImpl
.- Specified by:
equals
in interfacejakarta.resource.spi.ManagedConnectionFactory
- Overrides:
equals
in classObject
- Parameters:
other
-ManagedConnectionFactoryImpl
object for checking equality with- Returns:
- true if the property sets of both the
ManagedConnectionFactoryImpl
objects are the same false otherwise
-
getLogWriter
public PrintWriter getLogWriter()
Get the log writer for thisManagedConnectionFactoryImpl
instance.- Specified by:
getLogWriter
in interfacejakarta.resource.spi.ManagedConnectionFactory
- Returns:
PrintWriter
associated with thisManagedConnectionFactoryImpl
instance- See Also:
setLogWriter
-
getResourceAdapter
public jakarta.resource.spi.ResourceAdapter getResourceAdapter()
Get theResourceAdapterImpl
for thisManagedConnectionFactoryImpl
instance.- Specified by:
getResourceAdapter
in interfacejakarta.resource.spi.ResourceAdapterAssociation
- Returns:
ResourceAdapterImpl
associated with thisManagedConnectionFactoryImpl
instance- See Also:
setResourceAdapter
-
hashCode
public int hashCode()
Returns the hash code for thisManagedConnectionFactoryImpl
.
-
matchManagedConnections
public jakarta.resource.spi.ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, jakarta.resource.spi.ConnectionRequestInfo cxRequestInfo) throws jakarta.resource.ResourceException
Returns a matchedManagedConnection
from the candidate set ofManagedConnection
objects.- Specified by:
matchManagedConnections
in interfacejakarta.resource.spi.ManagedConnectionFactory
- Parameters:
connectionSet
-Set
ofManagedConnection
objects passed by the application serversubject
- passed by the application server for retrieving information required for matchingcxRequestInfo
-ConnectionRequestInfo
passed by the application server for retrieving information required for matching- Returns:
ManagedConnection
that is the best match satisfying this request- Throws:
jakarta.resource.ResourceException
- if there is an error accessing theSubject
parameter or theSet
ofManagedConnection
objects passed by the application server
-
getInvalidConnections
public Set getInvalidConnections(Set connectionSet) throws jakarta.resource.ResourceException
This method returns a set of invalidManagedConnection
objects chosen from a specified set ofManagedConnection
objects.- Specified by:
getInvalidConnections
in interfacejakarta.resource.spi.ValidatingManagedConnectionFactory
- Parameters:
connectionSet
- a set ofManagedConnection
objects that need to be validated.- Returns:
- a set of invalid
ManagedConnection
objects. - Throws:
jakarta.resource.ResourceException
- generic exception.
-
isValidByCustomValidation
protected void isValidByCustomValidation(Connection con, String validationClassName) throws jakarta.resource.ResourceException
Checks if ajava.sql.Connection
is valid or not by doing a custom validation using the validation class name specified.- Parameters:
con
-java.sql.Connection
to be validated- Throws:
jakarta.resource.ResourceException
- if the connection is not valid
-
isValidByAutoCommit
protected void isValidByAutoCommit(Connection con) throws jakarta.resource.ResourceException
Checks if ajava.sql.Connection
is valid or not by checking its auto commit property.- Parameters:
con
-java.sql.Connection
to be validated- Throws:
jakarta.resource.ResourceException
- if the connection is not valid
-
isValidByMetaData
protected void isValidByMetaData(Connection con) throws jakarta.resource.ResourceException
Checks if ajava.sql.Connection
is valid or not by checking its meta data.- Parameters:
con
-java.sql.Connection
to be validated- Throws:
jakarta.resource.ResourceException
- if the connection is not valid
-
isValidByTableQuery
protected void isValidByTableQuery(Connection con, String tableName) throws jakarta.resource.ResourceException
Checks if ajava.sql.Connection
is valid or not by querying a table.- Parameters:
con
-java.sql.Connection
to be validatedtableName
- table which should be queried- Throws:
jakarta.resource.ResourceException
- if the connection is not valid
-
setIsolation
protected void setIsolation(ManagedConnectionImpl mc) throws jakarta.resource.ResourceException
Sets the isolation level specified in theConnectionRequestInfo
for theManagedConnection
passed.- Parameters:
mc
-ManagedConnection
- Throws:
jakarta.resource.ResourceException
- if the isolation property is invalid or if the isolation cannot be set over the connection
-
validateAndSetIsolation
protected void validateAndSetIsolation(ManagedConnectionImpl mc) throws jakarta.resource.ResourceException
Common operation performed by all the child MCFs before returning a created mc- Throws:
jakarta.resource.ResourceException
-
setLogWriter
public void setLogWriter(PrintWriter out)
Set the log writer for thisManagedConnectionFactoryImpl
instance.- Specified by:
setLogWriter
in interfacejakarta.resource.spi.ManagedConnectionFactory
- Parameters:
out
-PrintWriter
passed by the application server- See Also:
getLogWriter
-
setResourceAdapter
public void setResourceAdapter(jakarta.resource.spi.ResourceAdapter ra)
Set the associatedResourceAdapterImpl
JavaBean.- Specified by:
setResourceAdapter
in interfacejakarta.resource.spi.ResourceAdapterAssociation
- Parameters:
ra
-ResourceAdapterImpl
associated with thisManagedConnectionFactoryImpl
instance- See Also:
getResourceAdapter
-
setUser
@ConfigProperty(type=java.lang.String.class, defaultValue="APP") public void setUser(String user)
Sets the user name- Parameters:
user
-String
-
getUser
public String getUser()
Gets the user name- Returns:
- user
-
setPassword
@ConfigProperty(type=java.lang.String.class, defaultValue="APP") public void setPassword(String passwd)
Sets the password- Parameters:
passwd
-String
-
getPassword
public String getPassword()
Gets the password- Returns:
- passwd
-
setClassName
@ConfigProperty(type=java.lang.String.class, defaultValue="org.h2.jdbcx.JdbcDataSource") public void setClassName(String className)
Sets the class name of the data source- Parameters:
className
-String
-
getClassName
public String getClassName()
Gets the class name of the data source- Returns:
- className
-
setConnectionValidationRequired
@ConfigProperty(type=java.lang.String.class, defaultValue="false") public void setConnectionValidationRequired(String conVldReq)
Sets if connection validation is required or not- Parameters:
conVldReq
-String
-
getConnectionValidationRequired
public String getConnectionValidationRequired()
Returns if connection validation is required or not- Returns:
- connection validation requirement
-
setValidationMethod
@ConfigProperty(type=java.lang.String.class, defaultValue="") public void setValidationMethod(String validationMethod)
Sets the validation method required- Parameters:
validationMethod
-String
-
getValidationMethod
public String getValidationMethod()
Returns the connection validation method type- Returns:
- validation method
-
setValidationTableName
@ConfigProperty(type=java.lang.String.class, defaultValue="") public void setValidationTableName(String table)
Sets the table checked for during validation- Parameters:
table
-String
-
getValidationTableName
public String getValidationTableName()
Returns the table checked for during validation- Returns:
- table
-
setValidationClassName
public void setValidationClassName(String className)
Sets the validation class name checked for during validation- Parameters:
className
-String
-
getValidationClassName
public String getValidationClassName()
Returns the validation class name checked for during validation- Returns:
- table
-
setTransactionIsolation
@ConfigProperty(type=java.lang.String.class, defaultValue="") public void setTransactionIsolation(String trnIsolation)
Sets the transaction isolation level- Parameters:
trnIsolation
-String
-
getTransactionIsolation
public String getTransactionIsolation()
Returns the transaction isolation level- Returns:
- transaction isolation level
-
setGuaranteeIsolationLevel
@ConfigProperty(type=java.lang.String.class, defaultValue="") public void setGuaranteeIsolationLevel(String guaranteeIsolation)
Sets if the transaction isolation level is to be guaranteed- Parameters:
guaranteeIsolation
-String
-
getGuaranteeIsolationLevel
public String getGuaranteeIsolationLevel()
Returns the transaction isolation level- Returns:
- isolation level guarantee
-
isEqual
protected boolean isEqual(jakarta.resource.spi.security.PasswordCredential pc, String user, String password)
-
setServerName
@ConfigProperty(type=java.lang.String.class, defaultValue="localhost") public void setServerName(String serverName)
Sets the server name.- Parameters:
serverName
-String
- See Also:
getServerName
-
getServerName
public String getServerName()
Gets the server name.- Returns:
- serverName
- See Also:
setServerName
-
setPortNumber
@ConfigProperty(type=java.lang.String.class, defaultValue="1527") public void setPortNumber(String portNumber)
Sets the port number.- Parameters:
portNumber
-String
- See Also:
getPortNumber
-
getPortNumber
public String getPortNumber()
Gets the port number.- Returns:
- portNumber
- See Also:
setPortNumber
-
setDatabaseName
@ConfigProperty(type=java.lang.String.class, defaultValue="testdb") public void setDatabaseName(String databaseName)
Sets the database name.- Parameters:
databaseName
-String
- See Also:
getDatabaseName
-
getDatabaseName
public String getDatabaseName()
Gets the database name.- Returns:
- databaseName
- See Also:
setDatabaseName
-
setDataSourceName
@ConfigProperty(type=java.lang.String.class, defaultValue="") public void setDataSourceName(String dsn)
Sets the data source name.- Parameters:
dsn
-String
- See Also:
getDataSourceName
-
getDataSourceName
public String getDataSourceName()
Gets the data source name.- Returns:
- dsn
- See Also:
setDataSourceName
-
setStatementWrapping
public void setStatementWrapping(String wrapping)
Set Statement Wrapping value- Parameters:
wrapping
-String
- See Also:
getStatementWrapping
-
getStatementWrapping
public String getStatementWrapping()
Gets the statement wrapping value- Returns:
- String representing "true" or "false"
- See Also:
setStatementWrapping
-
setStatementCacheSize
public void setStatementCacheSize(String value)
-
getStatementCacheSize
public String getStatementCacheSize()
-
setStatementLeakTimeoutInSeconds
public void setStatementLeakTimeoutInSeconds(String value)
-
getStatementLeakTimeoutInSeconds
public String getStatementLeakTimeoutInSeconds()
-
setStatementLeakReclaim
public void setStatementLeakReclaim(String value)
-
getStatementLeakReclaim
public String getStatementLeakReclaim()
-
setPoolMonitoringSubTreeRoot
public void setPoolMonitoringSubTreeRoot(String value)
-
getPoolMonitoringSubTreeRoot
public String getPoolMonitoringSubTreeRoot()
-
getApplicationName
public String getApplicationName()
-
setApplicationName
public void setApplicationName(String value)
-
getModuleName
public String getModuleName()
-
setModuleName
public void setModuleName(String value)
-
getPoolName
public String getPoolName()
-
setPoolName
public void setPoolName(String value)
-
getStatementCacheType
public String getStatementCacheType()
-
setStatementCacheType
public void setStatementCacheType(String statementCacheType)
-
getMaxCacheSize
public String getMaxCacheSize()
-
setMaxCacheSize
public void setMaxCacheSize(String maxCacheSize)
-
getNumberOfTopQueriesToReport
public String getNumberOfTopQueriesToReport()
-
setNumberOfTopQueriesToReport
public void setNumberOfTopQueriesToReport(String numTopQueriesToReport)
-
getTimeToKeepQueriesInMinutes
public String getTimeToKeepQueriesInMinutes()
-
setTimeToKeepQueriesInMinutes
public void setTimeToKeepQueriesInMinutes(String timeToKeepQueries)
-
getInitSql
public String getInitSql()
-
setInitSql
public void setInitSql(String initSql)
-
setStatementTimeout
public void setStatementTimeout(String timeout)
Set StatementTimeout value- Parameters:
timeout
-String
- See Also:
getStatementTimeout
-
getStatementTimeout
public String getStatementTimeout()
Gets the StatementTimeout value- Returns:
- String representing "true" or "false"
- See Also:
setStatementTimeout
-
getSqlTraceListeners
public String getSqlTraceListeners()
-
setSqlTraceListeners
public void setSqlTraceListeners(String sqlTraceListeners)
-
setSlowQueryThresholdInSeconds
public void setSlowQueryThresholdInSeconds(String seconds)
-
getSlowQueryThresholdInSeconds
public String getSlowQueryThresholdInSeconds()
-
setLogJdbcCalls
public void setLogJdbcCalls(String enabled)
-
getLogJdbcCalls
public String getLogJdbcCalls()
-
setDescription
@ConfigProperty(type=java.lang.String.class, defaultValue="H2 driver for datasource") public void setDescription(String desc)
Sets the description.- Parameters:
desc
-String
- See Also:
getDescription
-
getDescription
public String getDescription()
Gets the description.- Returns:
- desc
- See Also:
setDescription
-
setNetworkProtocol
@ConfigProperty(type=java.lang.String.class, defaultValue="") public void setNetworkProtocol(String nwProtocol)
Sets the network protocol.- Parameters:
nwProtocol
-String
- See Also:
getNetworkProtocol
-
getNetworkProtocol
public String getNetworkProtocol()
Gets the network protocol.- Returns:
- nwProtocol
- See Also:
setNetworkProtocol
-
setRoleName
@ConfigProperty(type=java.lang.String.class, defaultValue="") public void setRoleName(String roleName)
Sets the role name.- Parameters:
roleName
-String
- See Also:
getRoleName
-
getRoleName
public String getRoleName()
Gets the role name.- Returns:
- roleName
- See Also:
setRoleName
-
setLoginTimeOut
@ConfigProperty(type=java.lang.String.class, defaultValue="0") public void setLoginTimeOut(String loginTimeOut)
Sets the login timeout.- Parameters:
loginTimeOut
-String
- See Also:
getLoginTimeOut
-
getLoginTimeOut
public String getLoginTimeOut()
Gets the login timeout.- Returns:
- loginTimeout
- See Also:
setLoginTimeOut
-
setDelimiter
@ConfigProperty(type=java.lang.String.class, defaultValue="#") public void setDelimiter(String delim)
Sets the delimiter.- Parameters:
delim
-String
- See Also:
getDelimiter
-
getDelimiter
public String getDelimiter()
Gets the delimiter.- Returns:
- delim
- See Also:
setDelimiter
-
setEscapeCharacter
public void setEscapeCharacter(String escapeCharacter)
-
getEscapeCharacter
public String getEscapeCharacter()
-
setDriverProperties
@ConfigProperty(type=java.lang.String.class, defaultValue="") public void setDriverProperties(String driverProps)
Sets the driver specific properties.- Parameters:
driverProps
-String
- See Also:
getDriverProperties
-
getDriverProperties
public String getDriverProperties()
Gets the driver specific properties.- Returns:
- driverProps
- See Also:
setDriverProperties
-
getPoolInfo
protected PoolInfo getPoolInfo()
-
constructManagedConnection
protected ManagedConnectionImpl constructManagedConnection(PooledConnection pc, Connection sqlCon, jakarta.resource.spi.security.PasswordCredential passCred, ManagedConnectionFactoryImpl mcf) throws jakarta.resource.ResourceException
- Throws:
jakarta.resource.ResourceException
-
getDataSource
public Object getDataSource() throws jakarta.resource.ResourceException
Returns the underlying datasource- Returns:
- DataSource of jdbc vendor
- Throws:
jakarta.resource.ResourceException
-
computeStatementWrappingStatus
protected void computeStatementWrappingStatus()
9.1 has attribute "wrap-statements" which will be overriden when JVM option is specified as "true" or "false" JVM Option will be deprecated in future versions.
-
isStatementWrappingEnabled
public boolean isStatementWrappingEnabled()
Returns whether statement wrapping is enabled or not.- Returns:
- boolean representing statementwrapping status
-
getJdbcObjectsFactory
public JdbcObjectsFactory getJdbcObjectsFactory()
-
logFine
protected void logFine(String logMessage)
-
mcfCreated
public void mcfCreated()
Description copied from interface:MCFLifecycleListener
mcf-created event- Specified by:
mcfCreated
in interfaceMCFLifecycleListener
-
mcfDestroyed
public void mcfDestroyed()
Description copied from interface:MCFLifecycleListener
mcf-destroyed event- Specified by:
mcfDestroyed
in interfaceMCFLifecycleListener
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
-