org.jboss.jca.adapters.jdbc.local
Class LocalManagedConnectionFactory

java.lang.Object
  extended by org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory
      extended by org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory
All Implemented Interfaces:
Serializable, javax.resource.spi.ManagedConnectionFactory, javax.resource.spi.ValidatingManagedConnectionFactory, org.jboss.jca.core.spi.statistics.Statistics

public class LocalManagedConnectionFactory
extends BaseWrapperManagedConnectionFactory

LocalManagedConnectionFactory

Version:
$Revision: 73443 $
Author:
David Jencks, Adrian Brock
See Also:
Serialized Form

Nested Class Summary
static class LocalManagedConnectionFactory.URLSelector
          Default implementation
 
Field Summary
protected  String connectionProperties
          The connection properties
 
Fields inherited from class org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory
checkValidConnectionSQL, connectionChecker, connectionProps, doQueryTimeout, isTransactionQueryTimeout, log, newConnectionSQL, password, 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
LocalManagedConnectionFactory()
          Constructor
 
Method Summary
 Object createConnectionFactory(javax.resource.spi.ConnectionManager cm)
          
 javax.resource.spi.ManagedConnection createManagedConnection(Subject subject, javax.resource.spi.ConnectionRequestInfo cri)
          
 boolean equals(Object other)
          
 String getConnectionProperties()
          Get the value of connectionProperties.
 String getConnectionURL()
          Get the value of ConnectionURL.
protected  Driver getDriver(String url)
          Check the driver for the given URL.
 String getDriverClass()
          Get the DriverClass value.
 int hashCode()
          
protected  void initUrlSelector()
          Init URL selector
protected  String internalGetConnectionURL()
          Get the connection url
 javax.resource.spi.ManagedConnection matchManagedConnections(Set mcs, Subject subject, javax.resource.spi.ConnectionRequestInfo cri)
          
 void setConnectionProperties(String connectionProperties)
          Set the value of connectionProperties.
 void setConnectionURL(String connectionURL)
          Set the value of ConnectionURL.
 void setDriverClass(String driverClass)
          Set the DriverClass value.
 void setURLDelimiter(String urlDelimiter)
          Set the URL delimiter
 
Methods inherited from class org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory
createConnectionFactory, getCheckValidConnectionSQL, getClassLoaderPlugin, getConnectionProperties, getExceptionSorterClassName, getExceptionSorterProperties, getExceptionSorterProps, getInvalidConnections, getJndiName, getLogWriter, getNewConnectionSQL, getPassword, getPreparedStatementCacheSize, getQueryTimeout, getReauthEnabled, getReauthPluginClassName, getReauthPluginProperties, getSharePreparedStatements, getSpy, getStaleConnectionCheckerClassName, getStaleConnectionCheckerProperties, getStaleConnectionCheckerProps, getStatistics, getTrackStatements, getTransactionIsolation, getURLDelimiter, getUrlSelectorStrategy, getUrlSelectorStrategyClassName, getUserName, getUserTransactionJndiName, getUseTryLock, getValidateOnMatch, getValidConnectionCheckerClassName, getValidConnectionCheckerProperties, getValidConnectionCheckerProps, isTransactionQueryTimeout, loadClass, setCheckValidConnectionSQL, setClassLoaderPlugin, setExceptionSorterClassName, setExceptionSorterProperties, setJndiName, setLogWriter, setNewConnectionSQL, setPassword, setPreparedStatementCacheSize, setQueryTimeout, setReauthEnabled, setReauthPluginClassName, setReauthPluginProperties, setSharePreparedStatements, setSpy, setStaleConnectionCheckerClassName, setStaleConnectionCheckerProperties, setTrackStatements, setTransactionIsolation, setTransactionQueryTimeout, setUrlSelectorStrategyClassName, setUserName, setUserTransactionJndiName, setUseTryLock, setValidateOnMatch, setValidConnectionCheckerClassName, setValidConnectionCheckerProperties
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connectionProperties

protected String connectionProperties
The connection properties

Constructor Detail

LocalManagedConnectionFactory

public LocalManagedConnectionFactory()
Constructor

Method Detail

createConnectionFactory

public Object createConnectionFactory(javax.resource.spi.ConnectionManager cm)
                               throws javax.resource.ResourceException

Specified by:
createConnectionFactory in interface javax.resource.spi.ManagedConnectionFactory
Overrides:
createConnectionFactory in class BaseWrapperManagedConnectionFactory
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.

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

setURLDelimiter

public void setURLDelimiter(String urlDelimiter)
Set the URL delimiter

Overrides:
setURLDelimiter in class BaseWrapperManagedConnectionFactory
Parameters:
urlDelimiter - The value

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()

Specified by:
hashCode in interface javax.resource.spi.ManagedConnectionFactory
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)

Specified by:
equals in interface javax.resource.spi.ManagedConnectionFactory
Overrides:
equals in class Object

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


Copyright © 2008 Red Hat Middleware LLC (http://www.jboss.com/)