db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendleton.de...@gmail.com>
Subject Re: R: calling ASTParser repeatedly rises an exception
Date Tue, 30 Mar 2010 14:01:12 GMT
By placing that try block into ASTParser.execute(), you're arranging it
so that this line always gets run at the end of execute():

DriverManager.getConnection(SHUTDOWN_URL);

This line is shutting the Derby system down, and it means that the
next time you try to run the parser, you get the exception about
Derby being already shut down.

I'm not sure why ASTParser.execute() is shutting the Derby system down;
that seems like an odd location for that code.

Did you write ASTParser.java? Or is that part of the Derby code?

I suggest seeing if you can place the shutdown code into a separate
method on ASTParser, and arrange to call it only once, at the end of
your work with the parser.

thanks,

bryan

Mime
View raw message