Hi Marl,

Could you please post the exception you're getting when attempting to connect to the database. This would help to diagnose a bit more definitely.

You should be able to open concurrent derby connections - Are you running Derby embedded or in a client-server topology? Am assuming it is embedded and at the end it does not really matter in terms of concurrent connections (by default)  to a particular Derby instance, whether it is running in embedded or server mode.

It would be great if you could post more details about the actual exception stack trace and error message - you should be able to get this from the Java console, if you're running your application within a web browser type of client app.

The applet methods stop() and destroy() should get called as an applet terminates - at a minimum, destroy() should be called and this is where a Derby instance or database could be shutdown. Note that database connections can also be opened/closed during the applet's lifecycle start/stop methods You can find more information about the applet's lifecycle and the appropriate methods to call here:



On 9/14/06, Marl Atkins <marl@softlinksys.com> wrote:

I'm having problems connecting to the database sometimes.
I'm pretty sure it has to do with not successfully closing it.
If I reboot the problem seems to disappear.

I've got a line in there that should close it down (taken from Francios
Orsini's demo) in the stop proc of the Applet.
I'm hoping that  will help but I'd like to know a little more about the
rules of connection.

How many concurrent connections are allowed?
Is there anything I can do to further ensure that it closes when the applet

The code I'm using to close is:

public void stop()

public void closeDBase()
            DriverManager.getConnection ("jdbc:derby:;shutdown=true");

        catch (Exception e)
            //Shutdown was already completed
        } finally
            oCn = null;
            ds = null;

Marl K. Atkins
Microsoft Certified Professional
SoftLink Systems, Inc.
(407) 388-1886