|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.geronimo.console.internaldb.DerbyConnectionUtil
public class DerbyConnectionUtil
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.
Field Summary | |
---|---|
static String |
CREATE_DB_PROP
|
static String |
SHUTDOWN_DB_PROP
|
Constructor Summary | |
---|---|
DerbyConnectionUtil()
|
Method Summary | |
---|---|
static DataSource |
getDataSource(String dbName)
Get the datasource if dbName is == SYSTEM_DB, otherwise returns null. |
static Connection |
getDerbyConnection(String dbName)
|
static Connection |
getDerbyConnection(String dbName,
String properties)
Get a connection to derby. |
static String |
getDerbyHome()
Get the Derby home directory path. |
static Connection |
getSystemDBConnection()
Get a connection to the SystemDatabase. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CREATE_DB_PROP
public static final String SHUTDOWN_DB_PROP
Constructor Detail |
---|
public DerbyConnectionUtil()
Method Detail |
---|
public static String getDerbyHome()
public static Connection getDerbyConnection(String dbName, String properties) throws SQLException
dbName
- the name of the database to connect to.properties
- the properties to pass to the connection string.
SQLException
public static Connection getDerbyConnection(String dbName) throws SQLException
SQLException
public static Connection getSystemDBConnection() throws SQLException
SQLException
public static DataSource getDataSource(String dbName)
dbName
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |