org.apache.log4j.jdbcplus
Class JDBCDefaultConnectionHandler

java.lang.Object
  |
  +--org.apache.log4j.jdbcplus.JDBCDefaultConnectionHandler
All Implemented Interfaces:
JDBCConnectionHandler, JDBCPoolConnectionHandler

public class JDBCDefaultConnectionHandler
extends Object
implements JDBCPoolConnectionHandler

This is a default JDBCConnectionHandler used by JDBCAppender

Since:
1.0
Version:
see jdbcappender.jar/META-INF/MANIFEST.MF for version information
Author:
Thomas Fenner

Constructor Summary
JDBCDefaultConnectionHandler(String aUrl, String aUsername, String aPassword)
           
 
Method Summary
 void freeConnection(Connection con)
          interface implementation
 Connection getConnection()
          Gets the Connection attribute of the JDBCDefaultConnectionHandler object
 Connection getConnection(String _url, String _username, String _password)
          Gets the Connection attribute of the JDBCDefaultConnectionHandler object
 String getPassword()
           
 String getUrl()
           
 String getUsername()
           
 void setPassword(String string)
           
 void setUrl(String string)
           
 void setUsername(String string)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCDefaultConnectionHandler

public JDBCDefaultConnectionHandler(String aUrl,
                                    String aUsername,
                                    String aPassword)
Method Detail

getConnection

public Connection getConnection()
                         throws Exception
Gets the Connection attribute of the JDBCDefaultConnectionHandler object

Specified by:
getConnection in interface JDBCConnectionHandler
Returns:
The Connection value
Throws:
Exception - Description of Exception

getConnection

public Connection getConnection(String _url,
                                String _username,
                                String _password)
                         throws Exception
Gets the Connection attribute of the JDBCDefaultConnectionHandler object

Specified by:
getConnection in interface JDBCConnectionHandler
Parameters:
_url - Description of Parameter
_username - Description of Parameter
_password - Description of Parameter
Returns:
The Connection value
Throws:
Exception - Description of Exception

freeConnection

public void freeConnection(Connection con)
                    throws Exception
interface implementation

Specified by:
freeConnection in interface JDBCPoolConnectionHandler
Parameters:
con -
Throws:
Exception

getPassword

public String getPassword()
Returns:
password

getUrl

public String getUrl()
Returns:
url

getUsername

public String getUsername()
Returns:
username

setPassword

public void setPassword(String string)
Parameters:
string -

setUrl

public void setUrl(String string)
Parameters:
string -

setUsername

public void setUsername(String string)
Parameters:
string -


Copyright 2000-2004 Apache Software Foundation.