-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Khin, Gerald wrote:
Is it planned to support multiple systems in the same VM? Think of two or more java libraries from different companies each using derby as embedded database. I guess that they will hamper each other.
Technically derby supports a single system, which can comprise of multiple databases, per class loader in a single JVM. Typically the Derby libraries are on the class path and thus are loaded by the system class loader leading to a single system per JVM. Database instances can only be loaded by one Derby system.
Derby also supports (or will support once the first release with new features is available) "soft-upgrade", allowing an application to use a newer version of the engine without upgrade. Thus if two Derby applications are running in a single JVM, one intended to run against 10.0 and one against 10.5, then the JVM can use the single 10.5 Derby engine for both databases and applications.
Since Derby is just a jar file in embedded mode, it is like two applications trying to use two different versions of a jar.
For us in Geronimo land, that is not an uncommon situation. For example, we could be hosting two different applications that need two different versions of Derby (e.g. 10.0 and 11.0 with a requirement for different physical disk layouts). We do all the classloader management to allow this.
I posted earlier about providing an alternative to using system properties as a step in this direction. Any thoughts or comments would be appreciated.
-- Jeremy
