The way I see it, a more elaborated Derby plugin is needed that actually defines the single
root for all databases for the Eclipse installation where it is used. With that in place,
multiple other plugins could express a dependency to it, and thus have coexisting databases
without conflicts.

My question is, has anyone created such a plugin already? If so, where can I find it?


To set up a common place for all Derby databases to reside you can use the 'derby.system.home' property  to point to the required directory.  This can be set as a  System property in any JVM.

Not sure about the need for an elaborate plug-in, but if you start eclipse (with the set of Derby Core and UI plugins) on the command line using something like

C:\e31_GA\eclipse>eclipse -vmargs -Dderby.system.home=C:\temp\CommonPlaceForDB

All the plug-ins available and the  projects created  in this Eclipse environment can  get access to the 'derby.system.home' property,  hence all the database creation done by the applications under each project  will in a common place. But I am not sure yet if a common place for all the plug-in and application databases to co-exist is a good idea.

Having said that, the  UI plugin in its current form does not check if the System  property 'derby.system.home' is set. The idea
was that each project could be kept independent of each other. The plug-in  will take the property set in the respective project Properties (under Apache Derby, default being . - the current project directory).  Thus  the Derby Network Server and the tools launched using the UI plug-in will use that rather than the System property set on the command line. 

Adding the check for the existence of derby.system.home as a System property (Eclipse wide)  during the launch of the Network Server and the other Derby tools should be a very simple fix (see org.apache.derby.ui.util.DerbyUtils.java under the plugins/eclipse directory).

-Rajesh

Reply via email to