org.openejb.resource.jdbc
Class JdbcConnectionFactory

java.lang.Object
  extended byorg.openejb.resource.jdbc.JdbcConnectionFactory
All Implemented Interfaces:
DataSource, javax.resource.Referenceable, Referenceable, Serializable

public class JdbcConnectionFactory
extends Object
implements DataSource, javax.resource.Referenceable, Serializable

See Also:
Serialized Form

Field Summary
protected  javax.resource.spi.ConnectionManager cxManager
           
protected  int logTimeout
           
protected  PrintWriter logWriter
           
protected  JdbcManagedConnectionFactory mngdCxFactory
           
 
Constructor Summary
JdbcConnectionFactory(JdbcManagedConnectionFactory mngdCxFactory, javax.resource.spi.ConnectionManager cxManager)
           
 
Method Summary
 Connection getConnection()
           
protected  Connection getConnection(JdbcConnectionRequestInfo conInfo)
           
 Connection getConnection(String username, String password)
           
 int getLoginTimeout()
           
 PrintWriter getLogWriter()
           
 Reference getReference()
           
 void setLoginTimeout(int seconds)
           
 void setLogWriter(PrintWriter out)
           
 void setReference(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 PrintWriter logWriter

logTimeout

protected int logTimeout
Constructor Detail

JdbcConnectionFactory

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

setReference

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

getReference

public Reference getReference()
Specified by:
getReference in interface Referenceable

getConnection

public Connection getConnection()
                         throws SQLException
Specified by:
getConnection in interface DataSource
Throws:
SQLException

getConnection

public Connection getConnection(String username,
                                String password)
                         throws SQLException
Specified by:
getConnection in interface DataSource
Throws:
SQLException

getConnection

protected Connection getConnection(JdbcConnectionRequestInfo conInfo)
                            throws SQLException
Throws:
SQLException

getLoginTimeout

public int getLoginTimeout()
Specified by:
getLoginTimeout in interface DataSource

getLogWriter

public PrintWriter getLogWriter()
Specified by:
getLogWriter in interface DataSource

setLoginTimeout

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

setLogWriter

public void setLogWriter(PrintWriter out)
Specified by:
setLogWriter in interface DataSource


Copyright © 1999-2005 OpenEJB. All Rights Reserved.