net.sf.jguard.authentication
Class AuthenticationConnectionFactory

java.lang.Object
  extended by net.sf.jguard.authentication.AuthenticationConnectionFactory

public final class AuthenticationConnectionFactory
extends java.lang.Object

Factory for Database Connection.

Version:
$Revision$
Author:
Charles Gay

Constructor Summary
AuthenticationConnectionFactory()
           
 
Method Summary
static java.sql.Connection getConnection(java.lang.String key, boolean jndi)
          Returns a database connection, encapsulating the DAO details.
static void init(java.util.Map opts)
          initialise connection settings for the specified webapp in the map (with the applicationName parameter).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthenticationConnectionFactory

public AuthenticationConnectionFactory()
Method Detail

getConnection

public static final java.sql.Connection getConnection(java.lang.String key,
                                                      boolean jndi)
Returns a database connection, encapsulating the DAO details.

Parameters:
key - string which contains applicationName, and, if this application is "secured" (in a jGuard notion), "|" and the applicationPassword
jndi - true if the connection is reachable with the jndi abstraction, false if we should reach connection through the DriverManager
Returns:
java.sql.Connection obtained either from a pool or explicitly

init

public static final void init(java.util.Map opts)
initialise connection settings for the specified webapp in the map (with the applicationName parameter).

Parameters:
opts -