org.openejb.resource.jdbc
Class JdbcConnectionFactory

java.lang.Object
  |
  +--org.openejb.resource.jdbc.JdbcConnectionFactory
All Implemented Interfaces:
javax.sql.DataSource, javax.resource.Referenceable, javax.naming.Referenceable, java.io.Serializable

public class JdbcConnectionFactory
extends java.lang.Object
implements javax.sql.DataSource, javax.resource.Referenceable, java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  javax.resource.spi.ConnectionManager cxManager
           
(package private)  javax.naming.Reference jndiReference
           
protected  int logTimeout
           
protected  java.io.PrintWriter logWriter
           
protected  JdbcManagedConnectionFactory mngdCxFactory
           
 
Constructor Summary
JdbcConnectionFactory(JdbcManagedConnectionFactory mngdCxFactory, javax.resource.spi.ConnectionManager cxManager)
           
 
Method Summary
 java.sql.Connection getConnection()
           
protected  java.sql.Connection getConnection(JdbcConnectionRequestInfo conInfo)
           
 java.sql.Connection getConnection(java.lang.String username, java.lang.String password)
           
 int getLoginTimeout()
           
 java.io.PrintWriter getLogWriter()
           
 javax.naming.Reference getReference()
           
 void setLoginTimeout(int seconds)
           
 void setLogWriter(java.io.PrintWriter out)
           
 void setReference(javax.naming.Reference ref)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mngdCxFactory

protected transient JdbcManagedConnectionFactory mngdCxFactory

cxManager

protected transient javax.resource.spi.ConnectionManager cxManager

logWriter

protected transient java.io.PrintWriter logWriter

logTimeout

protected int logTimeout

jndiReference

javax.naming.Reference jndiReference
Constructor Detail

JdbcConnectionFactory

public JdbcConnectionFactory(JdbcManagedConnectionFactory mngdCxFactory,
                             javax.resource.spi.ConnectionManager cxManager)
                      throws javax.resource.ResourceException
Method Detail

setReference

public void setReference(javax.naming.Reference ref)
Specified by:
setReference in interface javax.resource.Referenceable

getReference

public javax.naming.Reference getReference()
Specified by:
getReference in interface javax.naming.Referenceable

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Specified by:
getConnection in interface javax.sql.DataSource

getConnection

public java.sql.Connection getConnection(java.lang.String username,
                                         java.lang.String password)
                                  throws java.sql.SQLException
Specified by:
getConnection in interface javax.sql.DataSource

getConnection

protected java.sql.Connection getConnection(JdbcConnectionRequestInfo conInfo)
                                     throws java.sql.SQLException

getLoginTimeout

public int getLoginTimeout()
Specified by:
getLoginTimeout in interface javax.sql.DataSource

getLogWriter

public java.io.PrintWriter getLogWriter()
Specified by:
getLogWriter in interface javax.sql.DataSource

setLoginTimeout

public void setLoginTimeout(int seconds)
Specified by:
setLoginTimeout in interface javax.sql.DataSource

setLogWriter

public void setLogWriter(java.io.PrintWriter out)
Specified by:
setLogWriter in interface javax.sql.DataSource