org.tranql.connector.jdbc
Class TranqlDataSource

java.lang.Object
  extended by org.tranql.connector.jdbc.TranqlDataSource
All Implemented Interfaces:
Wrapper, Referenceable, CommonDataSource, DataSource

public class TranqlDataSource
extends Object
implements DataSource, Referenceable, javax.resource.Referenceable

DataSource connection factory for JDBC Connections.

Version:
$Revision: 805 $ $Date: 2010-11-12 00:06:35 +0100 (Fri, 12 Nov 2010) $

Nested Class Summary
static class TranqlDataSource.SelfObjectFactory
           
 
Constructor Summary
TranqlDataSource(javax.resource.spi.ManagedConnectionFactory mcf, javax.resource.spi.ConnectionManager connectionManager)
           
 
Method Summary
 Connection getConnection()
           
 Connection getConnection(String user, String password)
           
 int getLoginTimeout()
           
 PrintWriter getLogWriter()
           
 Reference getReference()
           
 boolean isWrapperFor(Class<?> iface)
           
 void setLoginTimeout(int seconds)
           
 void setLogWriter(PrintWriter out)
           
 void setReference(Reference reference)
           
<T> T
unwrap(Class<T> iface)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TranqlDataSource

public TranqlDataSource(javax.resource.spi.ManagedConnectionFactory mcf,
                        javax.resource.spi.ConnectionManager connectionManager)
Method Detail

getConnection

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

getConnection

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

getLoginTimeout

public int getLoginTimeout()
                    throws SQLException
Specified by:
getLoginTimeout in interface CommonDataSource
Throws:
SQLException

getLogWriter

public PrintWriter getLogWriter()
                         throws SQLException
Specified by:
getLogWriter in interface CommonDataSource
Throws:
SQLException

setLoginTimeout

public void setLoginTimeout(int seconds)
                     throws SQLException
Specified by:
setLoginTimeout in interface CommonDataSource
Throws:
SQLException

setLogWriter

public void setLogWriter(PrintWriter out)
                  throws SQLException
Specified by:
setLogWriter in interface CommonDataSource
Throws:
SQLException

getReference

public Reference getReference()
                       throws NamingException
Specified by:
getReference in interface Referenceable
Throws:
NamingException

setReference

public void setReference(Reference reference)

isWrapperFor

public boolean isWrapperFor(Class<?> iface)
                     throws SQLException
Specified by:
isWrapperFor in interface Wrapper
Throws:
SQLException

unwrap

public <T> T unwrap(Class<T> iface)
         throws SQLException
Specified by:
unwrap in interface Wrapper
Throws:
SQLException


Copyright © 2004-2012 Tranql project committers. All Rights Reserved.