Using Derby with IDEs
Using Derby with IDEs
When you use an integrated development environment (IDE) to develop an embedded Derby application, you might need to run Derby within a server framework. This is because an IDE might try connecting to the database from two different JVMs, whereas only a single JVM instance should connect to a Derby database at one time, as described in One Derby per Java Virtual Machine (multiple connections from the same JVM are allowed).
An "embedded Derby application" is one which runs in the same JVM as the application. Such an application uses the embedded Derby driver (org.apache.derby.jdbc.EmbeddedDriver; see Embedded Derby JDBC Driver) and connection URL (jdbc:derby:databaseName; see Embedded Derby JDBC Database Connection URL). If you use this driver name or connection URL from the IDE, when the IDE tries to open a second connection to the same database with the embedded Derby, the attempt fails. Two JVMs cannot connect to the same database in embedded mode. This situation is described in more detail in IDEs and Multiple JVMs.
Previous Page
Next Page
Table of Contents
Index