org.eclipse.higgins.icard.provider.cardspace.db.mysql
Class ConnectionFactory

java.lang.Object
  extended byorg.eclipse.higgins.icard.provider.cardspace.db.mysql.ConnectionFactory
All Implemented Interfaces:
org.eclipse.higgins.icard.provider.cardspace.db.IConnectionFactory

public class ConnectionFactory
extends Object
implements org.eclipse.higgins.icard.provider.cardspace.db.IConnectionFactory


Constructor Summary
ConnectionFactory(String contextName, String sourceName)
          Factory for pooled connections
ConnectionFactory(String driverName, String userName, String password, String url)
          Factory for direct (non-pooled) connections
 
Method Summary
 Connection getConnection()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionFactory

public ConnectionFactory(String driverName,
                         String userName,
                         String password,
                         String url)
                  throws org.eclipse.higgins.icard.CardException
Factory for direct (non-pooled) connections

Parameters:
driverName -
userName -
password -
url -
Throws:
org.eclipse.higgins.icard.CardException
ClassNotFoundException

ConnectionFactory

public ConnectionFactory(String contextName,
                         String sourceName)
                  throws org.eclipse.higgins.icard.CardException
Factory for pooled connections

Parameters:
contextName -
sourceName -
Throws:
NamingException
org.eclipse.higgins.icard.CardException
Method Detail

getConnection

public Connection getConnection()
                         throws SQLException
Specified by:
getConnection in interface org.eclipse.higgins.icard.provider.cardspace.db.IConnectionFactory
Throws:
SQLException