Bernd Fondermann wrote:
... -D properties are indeed recognized at least for opening a socket for derby:

Added -Dderby.drda.startNetworkServer=true to the phoenix.sh command line plus put derby[net|tools|client].jar into the lib directory containing derby.jar.

now the embedded db could be connected using the derby command line interface:

ij> connect 'jdbc:derby://localhost/../apps/james/var/derbydb'

I wonder if there might be a little confusion regarding the use of "embedded" (not for Bernd, but possibly for some other readers of these posts now or who come along later). A given Derby database can be accessed with the Embedded JDBC driver or with the Derby Network Server + client JDBC driver. Below is more explanation of "embedded" and "network server" for anyone who could use the clarification, plus a third option that combines the two (and which I suspect Bernd is using).

(1) Embedded

derby.jar includes the embedded jdbc driver. When used, the derby engine runs as part of the application (in the same JVM as the application).

The ij connection URL that uses the embedded driver would look like this:

   ij> connect 'jdbc:derby:../apps/james/var/derbydb'

In this case the physical location of the database is relative to the directory in which ij was started up (and there are lots of ways to tell Derby where to find the database).

A restriction of the embedded driver is that additional connections to that database can only be made only through the application that booted the database. For example, in this case ij booted the database, so nobody can run another application, including a separate instance of ij, that also connects to that database.

(2) Network Server

The network server is the application that boots a database and any number of clients can then connect to that database from different JVMs.

derbyclient.jar provides the Derby Network Client JDBC driver -- and other JDBC drivers are also available.

The ij connection URL that uses the Derby Network Client JDBC driver looks like this and requires that the Network Server be started:

   ij> connect 'jdbc:derby://localhost/../apps/james/var/derbydb'

(3) Embedded Network Server

Developers often use this to debug applications intended for embedded deployment. While that embedded application is running, it allows the developer to additionally connect remotely with something like ij to debug any database issues. Details are at http://db.apache.org/derby/docs/dev/adminguide/cadminov825149.html . I this is the mode that Bernd might be showing.

 -jean



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to