Andrus Adamchik wrote:

(a) all apps run on the same machine (but in different VMs)
(b) usually only one instance at a time would work with the database, but other instances can occasionally access the db in the background (no need to deal with massive concurrency)


The way this is usually accomplished is with embedded server. Network server is started in the same JVM as the primary instance. The primary instance accesses with embedded connections. Other JVM's can access with client.

See:
http://db.apache.org/derby/docs/10.1/adminguide/radminembeddedserverex.html

Also the StartNetworkServerSample demo shows how this works using the derby.drda.startNetworkServer property. You should be able to just add derby.drdal.startNetworkServer=true to your derby.properties and be able to start connecting from other JVM's right away.
http://svn.apache.org/viewvc/db/derby/code/branches/10.1/java/demo/nserverdemo/SimpleNetworkServerSample.java?view=log&pathrev=408612

Kathey


Reply via email to