org.apache.geronimo.console.internaldb
Class DerbyConnectionUtil
java.lang.Object
org.apache.geronimo.console.internaldb.DerbyConnectionUtil
- public class DerbyConnectionUtil
- extends Object
A static class to handle retreiving connections. This class is built to
handle lookups to the SystemDatabase as a special case. If a connection is
requested for the SystemDatabase this class gets a DataSource from an admin
object registered in the geronimo kernel otherwise the DataSource is looked
up via JNDI.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CREATE_DB_PROP
public static final String CREATE_DB_PROP
- See Also:
- Constant Field Values
SHUTDOWN_DB_PROP
public static final String SHUTDOWN_DB_PROP
- See Also:
- Constant Field Values
DerbyConnectionUtil
public DerbyConnectionUtil()
getDerbyConnection
public static Connection getDerbyConnection(String dbName,
String properties)
throws SQLException
- Get a connection to derby.
- Parameters:
dbName
- the name of the database to connect to.properties
- the properties to pass to the connection string.
- Returns:
- connection
- Throws:
SQLException
getDerbyConnection
public static Connection getDerbyConnection(String dbName)
throws SQLException
- Throws:
SQLException
getSystemDBConnection
public static Connection getSystemDBConnection()
throws SQLException
- Get a connection to the SystemDatabase.
- Returns:
-
- Throws:
SQLException
getDataSource
public static DataSource getDataSource(String dbName)
- Get the datasource if dbName is == SYSTEM_DB, otherwise returns null.
- Parameters:
dbName
-
- Returns:
- datasource
Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.