|
OpMath | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.opmath.util.db.DBObject
|
+--com.opmath.util.db.J2SDKEE131.Cloudscape36
A class providing an adapter for the IBM Cloudscape version 3.6 embedded database
driver, implementing the com.opmath.util.db.DB interface, as incorporated
into the Sun Microsystems' Java 2 Enterprise Edition Software Development Kit (J2SDKEE)
version 1.3.1.
The J2SDKEE version 1.3.1 by default uses the following settings, and these are reproduced within this calss:
jdbc:cloudscape:rmi:CloudscapeDB;create=true
COM.cloudscape.core.RmiJdbcDriver
The J2EE Tutorial Duke's Bank example uses the following to identify the database:
java:comp/env/jdbc/BankDB
path should be set to, for example: comp/env/jdbc/BankDB.
Copyright: (c) 2002 The Open Math Company Limited
The Terms of Distribution of this software are stipulated in the javadoc Overview for this project.
| Field Summary | |
static String |
JAVA_PROTOCOL
|
static String |
JDBC_DRIVER
|
| Fields inherited from class com.opmath.util.db.DBObject |
conn, path, protocol |
| Constructor Summary | |
Cloudscape36(String path)
Constructs a new Cloudscape36 object. |
|
| Method Summary | |
void |
close()
Close the connection. |
void |
connect(String user,
String pass)
Establish a connection to a Cloudscape embedded database. |
Class |
getDriver()
Returns the driver class of this DB. |
| Methods inherited from class com.opmath.util.db.DBObject |
className, create, createTable, delete, delete, dropTable, getConnection, getPath, getProtocol, isAvailable, maxIndex, newDbConnection, query, read, read, readAll, update, update |
| Methods inherited from class java.lang.Object |
|
| Methods inherited from interface com.opmath.util.db.DB |
className, create, createTable, delete, delete, dropTable, getConnection, getPath, getProtocol, isAvailable, maxIndex, query, read, read, readAll, update, update |
| Field Detail |
public static final String JAVA_PROTOCOL
public static final String JDBC_DRIVER
| Constructor Detail |
public Cloudscape36(String path)
Constructs a new Cloudscape36 object.
The new Cloudscape36 object has protocol and
path set appropriately, and its connection is initially closed.
path - a String identifying the absolute
path to the database directory. in the j2ee tutorial / sun /
ebank / ejb / account example, path is set to
comp/env/jdbc/appname.- Since:
- J2SE 1.3
| Method Detail |
public Class getDriver()
throws ClassNotFoundException
Returns the driver class of this DB.
getDriver in interface DBgetDriver in class DBObjectClass representing the database driver.ClassNotFoundException - if the driver class cannot be found.
public void connect(String user,
String pass)
throws SQLException
Establish a connection to a Cloudscape embedded database.
The connection is configured with autocommit true and the transaction
isolation level set to java.sql.Connection.TRANSACTION_SERIALIZABLE.
NOTE: It is assumed that only one symultaneous connection can be held by
any DB instance.
connect in interface DBconnect in class DBObjectuser - unused.pass - unused.SQLException - if the connection could not be made.Connection.setAutoCommit(boolean)
public void close()
throws SQLException
Close the connection.
close in interface DBclose in class DBObjectSQLException - if the connection could not be closed,
or was already closed.
|
OpMath | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||