geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Geronimo Wiki] Update of "Database Configuration" by JohnSisson
Date Wed, 20 Apr 2005 01:30:26 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Geronimo Wiki" for change notification.

The following page has been changed by JohnSisson:

The comment on the change is:
first stab at some Derby database configuration/creation doco

  = Geronimo's Embedded Derby System =
+ '''''Note that this documentation is based upon changes that were made after the M3 build'''''.[[BR]]
  Geronimo's `org/apache/geronimo/!SystemDatabase` configuraton starts the ["DerbySystem GBean"],
["DerbyNetwork GBean"], ["JDBCTransactionalThreadPooledTimer GBean"], ["JDBCNonTransactionalThreadPooledTimer
GBean"], and defines the ["SystemDatasource"] that is intended for use by Geronimo and associated
components (e.g. ActiveMQ).  The SystemDatasource is not intended for direct use by J2EE applications.

@@ -34, +36 @@

-                     <config-property-setting name="UserName">applicationUsername</config-property-setting>
+                     <config-property-setting name="UserName">MYAPP</config-property-setting>
-                     <config-property-setting name="Password">password</config-property-setting>
+                     <config-property-setting name="Password">myappPassword</config-property-setting>
                      <config-property-setting name="DatabaseName">MYDB</config-property-setting>
                      <config-property-setting name="CreateDatabase">create</config-property-setting>
@@ -58, +60 @@

+ FIXME - need to confirm whether the current database schema for the above embedded connection
will be `MYAPP`.  See []
+ == Creating tables in an Embedded Derby Database via Derby's ij tool (whilst Geronimo is
running) ==
+ Derby does not currently provide a network JDBC driver (although this will change soon),
therefore you must download the IBM DB2 Universal Driver:
+ The following DB2 Universal Driver JARs need to be on your classpath:
+   * db2jcc.jar
+   * db2jcc_license_c.jar
+ To create a database using Derby's ij tool do something like the following (example for
+ {{{
+ java -cp derby.jar;derbynet.jar;derbytools.jar;db2jcc.jar;db2jcc_license_c.jar
-Dij.user=MYAPP -Dij.password=myappPassword -Dij.protocol=jdbc:derby:net://localhost:1527/
+ ij version 10.0 (C) Copyright IBM Corp. 1997, 2004.
+ ij> connect 'MYDB;create=true';
+ ij> CREATE TABLE products(name CHAR(30), price INTEGER);
+ 0 rows inserted/updated/deleted
+ ij> disconnect;
+ ij> exit;
+ }}}
+ The above commands will result in:
+  * the MYDB database being created (if it hasn't already).  If the database wasn't already
created, the directory "MYDB" is created for the database under the geronimo\var\derby (Derby
system) directory.
+  * the `products` table is created in the MYDB database.
+ Note that the above ij command will only work on the localhost with the standard ["DerbyNetwork
GBean"] configuration.  FIXME - add more information about this (preferably under the ["DerbyNetwork
GBean"] topic.

View raw message