Apache Geronimo with Derby

You can use Elastic COBOL with the database that is embedded with Geronimo.   Apache Derby  is a light-weight SQL compatible database that is included with the Apache Geronimo Java Application Server.  Derby is also used in the cloud as a high-speed, in-memory database.  Supported versions exist from other vendors, for example,  VMWare's SQLFire is a variant.  


The CICS "account" demo described in the Getting Started Guide shows how to configure Oracle XE under Geronimo.  These are additional steps to show ACCT working with Derby.

Note:  Apply Elastic COBOL updates 12.6.6 or later to allow Elastic COBOL CICS VSAM-to-Database Transparency layer technology to work with databases other than Oracle.

We must:

  1. Define the ACCTUSER userid (schema) in Derby
  2. Create the ACCTFIL table and load it within the database
  3. Change the 'file' SQL Connection information in the Elastic Transaction Properties 
  4. Deploy the project to Geronimo

Start Geronimo from the Eclipse IDE (Servers tab) or stand-alone via or startup.bat in the Geronimo bin directory.  Connect into the Geronimo Manager with the URL:

Enter your Geronimo administrator's user id and password, system and manager if you haven't changed them.  The console window is below:


Click on the Security > Users and Groups tab.  Create a new user acctuser with password acctuser and add it to the derbyadmin group.  


At the bottom of the navigation side panel, click on Embedded DB > DB Manager.  Create the acct database by entering acct in the dialog box and the hitting Create button.


Next, edit the SQL statements contained in the ACCT resources file oracleXE-acctfil.sql.   Those statements are acceptable to Oracle, but Derby needs them in SQL 92 standard format.  Change the column definition datatypes of the form "CHAR(05 byte)" to "CHAR(05)".  Also, change the datatype definition "NUMBER" to "NUMERIC".  

You must also change the INSERT statements in the example as well.  Add the schema (user) qualification to each insert statement so they look like:


Select the acct database in the Use DB field and click the Run SQL  button after pasting these changed statements into the SQL Commands field.


The database has been set up.  Now, its time to change the Elastic COBOL JDBC connection string for the ACCT demo from what's shown in the Getting Started Guide for Oracle XE to Apache Derby.  From the Eclipse IDE, open up your Account ETP Deployment project, as described in the guide.  Open the project.etp_deploy_settings file and change to the SQL settings.  If you've set up the SQL Connect Names/Values properties for the Oracle example described in the Getting Started Guide, Edit those settings.  Otherwise, set up a new set of properties with the Add... button.

Enter the connection attributes with the following information:

  • Connection Name:  file
  • Username: acctuser
  • Password: acctuser
  • connection URL: jdbc:derby:acct
and leave the remaining fields blank.


You don't need to include a special "derby jar" file in your Export list (Properties > Build path > Libraries) as was necessary for Oracle XE.  Because Derby is distributed with Geronimo, its JDBC driver classes are already included in the app server.  All you need to do is Export the ETP project to Geronimo and start the project with the URL as described in the Getting Started Guide

Searching for "GREEN" shows the results or running the ACCT CICS transaction with the Derby database management system:

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk