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
ManagedConnectionFactoryimplementation for Generic JDBC Connector. This class is extended by the DataSource specificManagedConnectionfactories and theManagedConnectionFactoryfor 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.LazyEnlistableConnectionManagercm_protected DataSourceObjectBuilderdsObjBuilderprotected booleanisLazyCm_protected static intJVM_OPTION_STATEMENT_WRAPPING_NOT_SETprotected static intJVM_OPTION_STATEMENT_WRAPPING_OFFprotected static intJVM_OPTION_STATEMENT_WRAPPING_ONprotected static StringManagerlocalStringsprotected PrintWriterlogWriterprotected jakarta.resource.spi.ResourceAdapterraprotected DataSourceSpecspecprotected SQLTraceDelegatorsqlTraceDelegatorprotected booleanstatementWrapping
-
Constructor Summary
Constructors Constructor Description ManagedConnectionFactoryImpl()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcomputeStatementWrappingStatus()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 ManagedConnectionImplconstructManagedConnection(PooledConnection pc, Connection sqlCon, jakarta.resource.spi.security.PasswordCredential passCred, ManagedConnectionFactoryImpl mcf)ObjectcreateConnectionFactory()Creates a Connection Factory instance.ObjectcreateConnectionFactory(jakarta.resource.spi.ConnectionManager cxManager)Creates a Connection Factory instance.abstract jakarta.resource.spi.ManagedConnectioncreateManagedConnection(Subject subject, jakarta.resource.spi.ConnectionRequestInfo cxRequestInfo)Creates a new physical connection to the underlying EIS resource manager.abstract booleanequals(Object other)Check if thisManagedConnectionFactoryImplis equal to anotherManagedConnectionFactoryImpl.StringgetApplicationName()StringgetClassName()Gets the class name of the data sourceStringgetConnectionValidationRequired()Returns if connection validation is required or notStringgetDatabaseName()Gets the database name.ObjectgetDataSource()Returns the underlying datasourceStringgetDataSourceName()Gets the data source name.StringgetDelimiter()Gets the delimiter.StringgetDescription()Gets the description.StringgetDriverProperties()Gets the driver specific properties.StringgetEscapeCharacter()StringgetGuaranteeIsolationLevel()Returns the transaction isolation levelStringgetInitSql()SetgetInvalidConnections(Set connectionSet)This method returns a set of invalidManagedConnectionobjects chosen from a specified set ofManagedConnectionobjects.JdbcObjectsFactorygetJdbcObjectsFactory()StringgetLoginTimeOut()Gets the login timeout.StringgetLogJdbcCalls()PrintWritergetLogWriter()Get the log writer for thisManagedConnectionFactoryImplinstance.StringgetMaxCacheSize()StringgetModuleName()StringgetNetworkProtocol()Gets the network protocol.StringgetNumberOfTopQueriesToReport()StringgetPassword()Gets the passwordprotected PoolInfogetPoolInfo()StringgetPoolMonitoringSubTreeRoot()StringgetPoolName()StringgetPortNumber()Gets the port number.jakarta.resource.spi.ResourceAdaptergetResourceAdapter()Get theResourceAdapterImplfor thisManagedConnectionFactoryImplinstance.StringgetRoleName()Gets the role name.StringgetServerName()Gets the server name.StringgetSlowQueryThresholdInSeconds()StringgetSqlTraceListeners()StringgetStatementCacheSize()StringgetStatementCacheType()StringgetStatementLeakReclaim()StringgetStatementLeakTimeoutInSeconds()StringgetStatementTimeout()Gets the StatementTimeout valueStringgetStatementWrapping()Gets the statement wrapping valueStringgetTimeToKeepQueriesInMinutes()StringgetTransactionIsolation()Returns the transaction isolation levelStringgetUser()Gets the user nameStringgetValidationClassName()Returns the validation class name checked for during validationStringgetValidationMethod()Returns the connection validation method typeStringgetValidationTableName()Returns the table checked for during validationinthashCode()Returns the hash code for thisManagedConnectionFactoryImpl.protected booleanisEqual(jakarta.resource.spi.security.PasswordCredential pc, String user, String password)booleanisStatementWrappingEnabled()Returns whether statement wrapping is enabled or not.protected voidisValidByAutoCommit(Connection con)Checks if ajava.sql.Connectionis valid or not by checking its auto commit property.protected voidisValidByCustomValidation(Connection con, String validationClassName)Checks if ajava.sql.Connectionis valid or not by doing a custom validation using the validation class name specified.protected voidisValidByMetaData(Connection con)Checks if ajava.sql.Connectionis valid or not by checking its meta data.protected voidisValidByTableQuery(Connection con, String tableName)Checks if ajava.sql.Connectionis valid or not by querying a table.protected voidlogFine(String logMessage)jakarta.resource.spi.ManagedConnectionmatchManagedConnections(Set connectionSet, Subject subject, jakarta.resource.spi.ConnectionRequestInfo cxRequestInfo)Returns a matchedManagedConnectionfrom the candidate set ofManagedConnectionobjects.voidmcfCreated()mcf-created eventvoidmcfDestroyed()mcf-destroyed eventvoidreadExternal(ObjectInput in)voidsetApplicationName(String value)voidsetClassName(String className)Sets the class name of the data sourcevoidsetConnectionValidationRequired(String conVldReq)Sets if connection validation is required or notvoidsetDatabaseName(String databaseName)Sets the database name.voidsetDataSourceName(String dsn)Sets the data source name.voidsetDelimiter(String delim)Sets the delimiter.voidsetDescription(String desc)Sets the description.voidsetDriverProperties(String driverProps)Sets the driver specific properties.voidsetEscapeCharacter(String escapeCharacter)voidsetGuaranteeIsolationLevel(String guaranteeIsolation)Sets if the transaction isolation level is to be guaranteedvoidsetInitSql(String initSql)protected voidsetIsolation(ManagedConnectionImpl mc)Sets the isolation level specified in theConnectionRequestInfofor theManagedConnectionpassed.voidsetLoginTimeOut(String loginTimeOut)Sets the login timeout.voidsetLogJdbcCalls(String enabled)voidsetLogWriter(PrintWriter out)Set the log writer for thisManagedConnectionFactoryImplinstance.voidsetMaxCacheSize(String maxCacheSize)voidsetModuleName(String value)voidsetNetworkProtocol(String nwProtocol)Sets the network protocol.voidsetNumberOfTopQueriesToReport(String numTopQueriesToReport)voidsetPassword(String passwd)Sets the passwordvoidsetPoolMonitoringSubTreeRoot(String value)voidsetPoolName(String value)voidsetPortNumber(String portNumber)Sets the port number.voidsetResourceAdapter(jakarta.resource.spi.ResourceAdapter ra)Set the associatedResourceAdapterImplJavaBean.voidsetRoleName(String roleName)Sets the role name.voidsetServerName(String serverName)Sets the server name.voidsetSlowQueryThresholdInSeconds(String seconds)voidsetSqlTraceListeners(String sqlTraceListeners)voidsetStatementCacheSize(String value)voidsetStatementCacheType(String statementCacheType)voidsetStatementLeakReclaim(String value)voidsetStatementLeakTimeoutInSeconds(String value)voidsetStatementTimeout(String timeout)Set StatementTimeout valuevoidsetStatementWrapping(String wrapping)Set Statement Wrapping valuevoidsetTimeToKeepQueriesInMinutes(String timeToKeepQueries)voidsetTransactionIsolation(String trnIsolation)Sets the transaction isolation levelvoidsetUser(String user)Sets the user namevoidsetValidationClassName(String className)Sets the validation class name checked for during validationvoidsetValidationMethod(String validationMethod)Sets the validation method requiredvoidsetValidationTableName(String table)Sets the table checked for during validationprotected voidvalidateAndSetIsolation(ManagedConnectionImpl mc)Common operation performed by all the child MCFs before returning a created mcvoidwriteExternal(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. TheConnectionManagerimplementation of the resource adapter is used here.- Specified by:
createConnectionFactoryin 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. TheConnectionManagerimplementation of the application server is used here.- Specified by:
createConnectionFactoryin interfacejakarta.resource.spi.ManagedConnectionFactory- Parameters:
cxManager-ConnectionManagerpassed 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:
createManagedConnectionin interfacejakarta.resource.spi.ManagedConnectionFactory- Parameters:
subject-Subjectinstance passed by the application servercxRequestInfo-ConnectionRequestInfowhich may be created as a result of the invocationgetConnection(user, password)on theDataSourceobject- Returns:
ManagedConnectionobject created- Throws:
jakarta.resource.ResourceException- if there is an error in instantiating theDataSourceobject used for the creation of theManagedConnectionobject; or if there is an error in allocating the physical connectionSecurityException- if there noPasswordCredentialobject satisfying this request
-
equals
public abstract boolean equals(Object other)
Check if thisManagedConnectionFactoryImplis equal to anotherManagedConnectionFactoryImpl.- Specified by:
equalsin interfacejakarta.resource.spi.ManagedConnectionFactory- Overrides:
equalsin classObject- Parameters:
other-ManagedConnectionFactoryImplobject for checking equality with- Returns:
- true if the property sets of both the
ManagedConnectionFactoryImplobjects are the same false otherwise
-
getLogWriter
public PrintWriter getLogWriter()
Get the log writer for thisManagedConnectionFactoryImplinstance.- Specified by:
getLogWriterin interfacejakarta.resource.spi.ManagedConnectionFactory- Returns:
PrintWriterassociated with thisManagedConnectionFactoryImplinstance- See Also:
setLogWriter
-
getResourceAdapter
public jakarta.resource.spi.ResourceAdapter getResourceAdapter()
Get theResourceAdapterImplfor thisManagedConnectionFactoryImplinstance.- Specified by:
getResourceAdapterin interfacejakarta.resource.spi.ResourceAdapterAssociation- Returns:
ResourceAdapterImplassociated with thisManagedConnectionFactoryImplinstance- 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 matchedManagedConnectionfrom the candidate set ofManagedConnectionobjects.- Specified by:
matchManagedConnectionsin interfacejakarta.resource.spi.ManagedConnectionFactory- Parameters:
connectionSet-SetofManagedConnectionobjects passed by the application serversubject- passed by the application server for retrieving information required for matchingcxRequestInfo-ConnectionRequestInfopassed by the application server for retrieving information required for matching- Returns:
ManagedConnectionthat is the best match satisfying this request- Throws:
jakarta.resource.ResourceException- if there is an error accessing theSubjectparameter or theSetofManagedConnectionobjects passed by the application server
-
getInvalidConnections
public Set getInvalidConnections(Set connectionSet) throws jakarta.resource.ResourceException
This method returns a set of invalidManagedConnectionobjects chosen from a specified set ofManagedConnectionobjects.- Specified by:
getInvalidConnectionsin interfacejakarta.resource.spi.ValidatingManagedConnectionFactory- Parameters:
connectionSet- a set ofManagedConnectionobjects that need to be validated.- Returns:
- a set of invalid
ManagedConnectionobjects. - Throws:
jakarta.resource.ResourceException- generic exception.
-
isValidByCustomValidation
protected void isValidByCustomValidation(Connection con, String validationClassName) throws jakarta.resource.ResourceException
Checks if ajava.sql.Connectionis valid or not by doing a custom validation using the validation class name specified.- Parameters:
con-java.sql.Connectionto 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.Connectionis valid or not by checking its auto commit property.- Parameters:
con-java.sql.Connectionto 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.Connectionis valid or not by checking its meta data.- Parameters:
con-java.sql.Connectionto 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.Connectionis valid or not by querying a table.- Parameters:
con-java.sql.Connectionto 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 theConnectionRequestInfofor theManagedConnectionpassed.- 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 thisManagedConnectionFactoryImplinstance.- Specified by:
setLogWriterin interfacejakarta.resource.spi.ManagedConnectionFactory- Parameters:
out-PrintWriterpassed by the application server- See Also:
getLogWriter
-
setResourceAdapter
public void setResourceAdapter(jakarta.resource.spi.ResourceAdapter ra)
Set the associatedResourceAdapterImplJavaBean.- Specified by:
setResourceAdapterin interfacejakarta.resource.spi.ResourceAdapterAssociation- Parameters:
ra-ResourceAdapterImplassociated with thisManagedConnectionFactoryImplinstance- 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:MCFLifecycleListenermcf-created event- Specified by:
mcfCreatedin interfaceMCFLifecycleListener
-
mcfDestroyed
public void mcfDestroyed()
Description copied from interface:MCFLifecycleListenermcf-destroyed event- Specified by:
mcfDestroyedin interfaceMCFLifecycleListener
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
-