db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "leonv (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5990) new BasicDeamon(derby.rawStoreDaemon)
Date Wed, 14 Nov 2012 23:48:12 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497601#comment-13497601
] 

leonv commented on DERBY-5990:
------------------------------

To answer your questions in order:
This problem only happens with the embedded driver because the Database is created inside
the JVM and locked to prevent other processes to connect to it.
With the client, you can connect to the same database many times.

I'll attach a zip with a small test project where you can reproduce the problem.(all you need
to add is your derby.jar)

I'm testing the DerbyTest from Eclipse.
I'm starting the 2nd version of DerbyTest from Eclipse as well. When debugging it in Eclipse
you can see the number of daemons grow very fast.

While creating the DerbyTest I did notice that this problem is caused by the Database pool
because it tries to connect to the database in the background.
Still using a connection pool is pretty common.  

Please let me know if you need something else.
Regards,

Leon



                
> new BasicDeamon(derby.rawStoreDaemon) 
> --------------------------------------
>
>                 Key: DERBY-5990
>                 URL: https://issues.apache.org/jira/browse/DERBY-5990
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.5.1.1
>         Environment: windows running embedded database
>            Reporter: leonv
>
> I'm starting a java program that creates a new or opens an existing database:
> jdbc:derby:/derbyDB/Test123;create=true
> All works fine.
> Now I start a 2nd instance of that same program connecting to the same DB.
> At this point a new "derby.rawStoreDaemon" daemon is created every second.
> After the timeout occurs and with 50 or more threads created I'm finally getting the
expected exception:
> "Another instance of Derby may have already booted the database "
> I do expect all the exceptions, but there should be no need to start more then 1 "derby.rawStoreDaemon",
or at least let it die once the database is in use.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message