db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stan Bradbury (JIRA)" <derby-...@db.apache.org>
Subject [jira] Created: (DERBY-348) example.html file for the SimpleApp does not describe the arguments accepted by the program
Date Fri, 10 Jun 2005 20:35:47 GMT
example.html file for the SimpleApp does not describe the arguments accepted by the program

         Key: DERBY-348
         URL: http://issues.apache.org/jira/browse/DERBY-348
     Project: Derby
        Type: Bug
  Components: Demos/Scripts  
    Reporter: Stan Bradbury
    Priority: Minor

The SimpleApp.java demo program supplied with Derby currently accepts two arguments and will
soon (see JIRA entry: DERBY-247) accept a third that allows the application to run as a client
to Network Server.  Only 'embedded' is  documented in the ${DERBY_INSTALL}/demo/simple/example.html
file.  The others should be added.  The current undocumented argument is:

'jccjdbcclient' - will use the JCC client driver to access Network Server

The new argument might be:

'derbyclient' - will use the Net client driver to access Network Server

This brief description of the program using the derby client might help in this update:

To use the SimpleApp in client mode only the directory containing the SimpleApp and the netclient.jar
file are needed in the CLASSPATH.  By passing in 'derbyclient' as an argument the program
will load the client driver rather than start the Derby engine.  The parseArguments() method
(line 230) changes two key strings.  The variables 'driver' and 'protocol' are set to the
client driver values.  With these new definitions the go() method  loads the client driver
at line 73 and creates the client URL at lines 93-94.  With the variables expanded these lines
will look like this:

line 76:  Class.forName("org.apache.derby.jdbc.ClientDriver")
line 93-94: conn = DriverManager.getConnection("jdbc:derby://localhost:1527/"
		 + "derbyDB;create=true", props); 

As in the embedded example the connection will create the database if it does not exist and
boot derbyDB if it has not already been loaded by the Network Server.  Note that the application
is well behaved and does not shutdown the database when operating as a client.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message