Class LocalManagedConnectionFactory
- java.lang.Object
-
- org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory
-
- org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory
-
- All Implemented Interfaces:
Serializable,javax.resource.spi.ManagedConnectionFactory,javax.resource.spi.ResourceAdapterAssociation,javax.resource.spi.ValidatingManagedConnectionFactory,Statistics
public class LocalManagedConnectionFactory extends BaseWrapperManagedConnectionFactory
LocalManagedConnectionFactory- Author:
- David Jencks, Adrian Brock, Jesper Pedersen
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected StringconnectionPropertiesThe connection propertiesprotected PropertiesconnectionPropsThe connection properties-
Fields inherited from class org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory
bundle, checkValidConnectionSQL, connectionChecker, doQueryTimeout, isTransactionQueryTimeout, log, newConnectionSQL, password, poolValidationLoggingEnabled, preparedStatementCacheSize, queryTimeout, sharePS, staleConnectionChecker, staleConnectionCheckerProps, TRACK_STATEMENTS_FALSE, TRACK_STATEMENTS_FALSE_INT, TRACK_STATEMENTS_NOWARN, TRACK_STATEMENTS_NOWARN_INT, TRACK_STATEMENTS_TRUE, TRACK_STATEMENTS_TRUE_INT, trackStatements, transactionIsolation, urlDelimiter, urlSelectorStrategyClassName, userName, validConnectionCheckerClassName, validConnectionCheckerProps
-
-
Constructor Summary
Constructors Constructor Description LocalManagedConnectionFactory()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectcreateConnectionFactory(javax.resource.spi.ConnectionManager cm)javax.resource.spi.ManagedConnectioncreateManagedConnection(Subject subject, javax.resource.spi.ConnectionRequestInfo cri)booleanequals(Object other)StringgetConnectionProperties()Get the value of connectionProperties.StringgetConnectionURL()Get the value of ConnectionURL.StringgetDataSourceClass()Get the DataSourceClass value.protected DrivergetDriver(String url)Check the driver for the given URL.StringgetDriverClass()Get the DriverClass value.inthashCode()protected voidinitUrlSelector()Init URL selectorprotected StringinternalGetConnectionURL()Get the connection urljavax.resource.spi.ManagedConnectionmatchManagedConnections(Set mcs, Subject subject, javax.resource.spi.ConnectionRequestInfo cri)voidsetConnectionProperties(String connectionProperties)Set the value of connectionProperties.voidsetConnectionURL(String connectionURL)Set the value of ConnectionURL.voidsetDataSourceClass(String dataSourceClass)Set the DataSourceClass value.voidsetDriverClass(String driverClass)Set the DriverClass value.StringtoString()-
Methods inherited from class org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory
createConnectionFactory, getCheckValidConnectionSQL, getClassLoaderPlugin, getConnectionListenerClassName, getConnectionListenerProperties, getConnectionProperties, getExceptionSorterClassLoader, getExceptionSorterClassName, getExceptionSorterProperties, getExceptionSorterProps, getInvalidConnections, getJndiName, getLogWriter, getNewConnectionSQL, getPassword, getPreparedStatementCacheSize, getQueryTimeout, getReauthEnabled, getReauthPluginClassName, getReauthPluginProperties, getResourceAdapter, getSharePreparedStatements, getSpy, getStaleConnectionCheckerClassName, getStaleConnectionCheckerProperties, getStaleConnectionCheckerProps, getStaleConnectionClassLoader, getStatistics, getTrackStatements, getTransactionIsolation, getURLDelimiter, getUrlSelectorStrategyClassName, getUserName, getUseTryLock, getValidConnectionCheckerClassLoader, getValidConnectionCheckerClassName, getValidConnectionCheckerProperties, getValidConnectionCheckerProps, isDoLocking, isExceptionFatal, isJTA, isTransactionQueryTimeout, setCheckValidConnectionSQL, setClassLoaderPlugin, setConnectionListenerClassName, setConnectionListenerProperties, setExceptionSorterClassLoader, setExceptionSorterClassName, setExceptionSorterProperties, setJndiName, setJTA, setLogWriter, setNewConnectionSQL, setOriginalTCCLn, setPassword, setPoolValidationLoggingEnabled, setPreparedStatementCacheSize, setQueryTimeout, setReauthEnabled, setReauthPluginClassName, setReauthPluginProperties, setResourceAdapter, setSharePreparedStatements, setSpy, setStaleConnectionCheckerClassLoader, setStaleConnectionCheckerClassName, setStaleConnectionCheckerProperties, setTrackStatements, setTransactionIsolation, setTransactionQueryTimeout, setURLDelimiter, setUrlSelectorStrategyClassName, setUserName, setUseTryLock, setValidConnectionCheckerClassLoader, setValidConnectionCheckerClassName, setValidConnectionCheckerProperties
-
-
-
-
Field Detail
-
connectionProperties
protected String connectionProperties
The connection properties
-
connectionProps
protected final Properties connectionProps
The connection properties
-
-
Method Detail
-
createConnectionFactory
public Object createConnectionFactory(javax.resource.spi.ConnectionManager cm) throws javax.resource.ResourceException
- Specified by:
createConnectionFactoryin interfacejavax.resource.spi.ManagedConnectionFactory- Overrides:
createConnectionFactoryin classBaseWrapperManagedConnectionFactory- Throws:
javax.resource.ResourceException
-
getConnectionURL
public String getConnectionURL()
Get the value of ConnectionURL.- Returns:
- value of ConnectionURL.
-
setConnectionURL
public void setConnectionURL(String connectionURL)
Set the value of ConnectionURL.- Parameters:
connectionURL- Value to assign to ConnectionURL.
-
getDriverClass
public String getDriverClass()
Get the DriverClass value.- Returns:
- the DriverClass value.
-
setDriverClass
public void setDriverClass(String driverClass)
Set the DriverClass value.- Parameters:
driverClass- The new DriverClass value.
-
getDataSourceClass
public String getDataSourceClass()
Get the DataSourceClass value.- Returns:
- the DataSourceClass value.
-
setDataSourceClass
public void setDataSourceClass(String dataSourceClass)
Set the DataSourceClass value.- Parameters:
dataSourceClass- The new DataSourceClass value.
-
getConnectionProperties
public String getConnectionProperties()
Get the value of connectionProperties.- Returns:
- value of connectionProperties.
-
setConnectionProperties
public void setConnectionProperties(String connectionProperties)
Set the value of connectionProperties.- Parameters:
connectionProperties- Value to assign to connectionProperties.
-
createManagedConnection
public javax.resource.spi.ManagedConnection createManagedConnection(Subject subject, javax.resource.spi.ConnectionRequestInfo cri) throws javax.resource.ResourceException
- Throws:
javax.resource.ResourceException
-
initUrlSelector
protected void initUrlSelector()
Init URL selector
-
matchManagedConnections
public javax.resource.spi.ManagedConnection matchManagedConnections(Set mcs, Subject subject, javax.resource.spi.ConnectionRequestInfo cri) throws javax.resource.ResourceException
- Throws:
javax.resource.ResourceException
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object other)
-
getDriver
protected Driver getDriver(String url) throws javax.resource.ResourceException
Check the driver for the given URL. If it is not registered already then register it.- Parameters:
url- The JDBC URL which we need a driver for.- Returns:
- The driver
- Throws:
javax.resource.ResourceException- Thrown if an error occurs
-
internalGetConnectionURL
protected String internalGetConnectionURL()
Get the connection url- Returns:
- The value
-
-