db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Embretsen <John.Embret...@Sun.COM>
Subject Re: Derby multiple connections issue
Date Thu, 23 Nov 2006 12:36:09 GMT
jatintrivedi wrote:
> I have SQL Explorer plugin in Eclipse through which I can view the derby.
> However when my apllication hosted on Apache (and debuggin in Eclipse) is
> accessing derby database, I am not able to  connect to  SQL Explorer through
> Eclipse and vice-versa.
> There could be some issue with multiple connections to Derby

This is just a wild guess, since I do not have experience with the Eclipse 
plugin, nor am I sure what you mean by "hosted on Apache", but it could be 
because Derby does not allow a database to be booted from two different JVMs at 
the same time. If you use the embedded driver both places, this would be the case.

This is from the Developer's guide, 
http://db.apache.org/derby/docs/dev/devguide/cdevdvlp20458.html:

<quote>
Derby allows you to boot databases that are not in the system directory. While 
this might seem more convenient, check that you do not boot the same database 
with two JVMs. If you need to access a single database from more than one JVM, 
you will need to put a server solution in place. You can allow multiple JVMs 
that need to access that database to connect to the server. The Derby Network 
Server is provided as a server solution. See the Derby Server and Administration 
Guide for more information on the Network Server.
</quote>

In other words, a Derby database can be accessed from two JVMs if you use a 
client/server solution. If you use the embedded driver without starting the 
server, you can only access a database from one JVM at a time. However, multiple 
connections from one JVM is supported in all cases.


-- 
John


Mime
View raw message