org.ow2.jonas.ee.jdbc
Class ManagedConnectionFactoryImpl
java.lang.Object
org.ow2.jonas.ee.jdbc.ManagedConnectionFactoryImpl
- All Implemented Interfaces:
- Serializable, ManagedConnectionFactory, ValidatingManagedConnectionFactory
- Direct Known Subclasses:
- ConnectionPoolMCFImpl, DataSourceMCFImpl, DriverManagerMCFImpl, XAMCFImpl
public abstract class ManagedConnectionFactoryImpl
- extends Object
- implements ManagedConnectionFactory, ValidatingManagedConnectionFactory, Serializable
- Author:
- Eric hardesty
- See Also:
- Serialized Form
LOGGER_FACTORY
protected static final String LOGGER_FACTORY
- See Also:
- Constant Field Values
trace
public org.objectweb.util.monolog.api.Logger trace
JDBC_NO_TEST
public static final int JDBC_NO_TEST
- Constants for use with JDBC connection level
- See Also:
- Constant Field Values
JDBC_CHECK_CONNECTION
public static final int JDBC_CHECK_CONNECTION
- See Also:
- Constant Field Values
JDBC_SEND_STATEMENT
public static final int JDBC_SEND_STATEMENT
- See Also:
- Constant Field Values
JDBC_KEEP_ALIVE
public static final int JDBC_KEEP_ALIVE
- See Also:
- Constant Field Values
ManagedConnectionFactoryImpl
public ManagedConnectionFactoryImpl()
createManagedConnection
public abstract ManagedConnection createManagedConnection(Subject subject,
ConnectionRequestInfo cxReq)
throws ResourceException
- Specified by:
createManagedConnection
in interface ManagedConnectionFactory
- Throws:
ResourceException
equals
public abstract boolean equals(Object obj)
- Specified by:
equals
in interface ManagedConnectionFactory
- Overrides:
equals
in class Object
createConnectionFactory
public Object createConnectionFactory()
throws ResourceException
- Specified by:
createConnectionFactory
in interface ManagedConnectionFactory
- Throws:
ResourceException
createConnectionFactory
public Object createConnectionFactory(ConnectionManager cxMgr)
throws ResourceException
- Specified by:
createConnectionFactory
in interface ManagedConnectionFactory
- Throws:
ResourceException
getLogger
public void getLogger(String _logTopic)
throws Exception
- Throws:
Exception
getLogWriter
public PrintWriter getLogWriter()
throws ResourceException
- Specified by:
getLogWriter
in interface ManagedConnectionFactory
- Throws:
ResourceException
hashCode
public int hashCode()
- Specified by:
hashCode
in interface ManagedConnectionFactory
- Overrides:
hashCode
in class Object
matchManagedConnections
public ManagedConnection matchManagedConnections(Set connectionSet,
Subject subject,
ConnectionRequestInfo cxReq)
throws ResourceException
- Specified by:
matchManagedConnections
in interface ManagedConnectionFactory
- Throws:
ResourceException
setLogWriter
public void setLogWriter(PrintWriter _pw)
throws ResourceException
- Specified by:
setLogWriter
in interface ManagedConnectionFactory
- Throws:
ResourceException
getDbSpecificMethods
public String getDbSpecificMethods()
setDbSpecificMethods
public void setDbSpecificMethods(String val)
getDsClass
public String getDsClass()
setDsClass
public void setDsClass(String val)
getIsolationLevel
public String getIsolationLevel()
setIsolationLevel
public void setIsolationLevel(String val)
getLoginTimeout
public String getLoginTimeout()
setLoginTimeout
public void setLoginTimeout(String val)
getLogTopic
public String getLogTopic()
setLogTopic
public void setLogTopic(String val)
getMapperName
public String getMapperName()
setMapperName
public void setMapperName(String val)
getPassword
public String getPassword()
setPassword
public void setPassword(String val)
getUser
public String getUser()
setUser
public void setUser(String val)
setJdbcConnLevel
public void setJdbcConnLevel(int lev)
- Set the level of checking on jdbc Connections
- Parameters:
lev
- 0=no check, 1=ckeck open, 2=try stm, 3=keep alive
getJdbcConnLevel
public int getJdbcConnLevel()
setJdbcConnTestStmt
public void setJdbcConnTestStmt(String stmt)
- Set the tesqt statement to use, in case of check level 2 or 3.
getJdbcConnTestStmt
public String getJdbcConnTestStmt()
getInvalidConnections
public Set getInvalidConnections(Set connectionSet)
throws ResourceException
- This method returns a set of invalid ManagedConnection objects chosen from
a specified set of ManagedConnection objects.
- Specified by:
getInvalidConnections
in interface ValidatingManagedConnectionFactory
- Parameters:
set
- of ManagedConnection to test
- Returns:
- Set of invalid Connections from the given set
- Throws:
ResourceException
- The operation failed
Copyright © 2010 OW2 Consortium. All Rights Reserved.