|
This modification to NSinSameJVM.java ensures that an embedded connection is usable after
shutdown of the Network Server. Running the test produced no failures... Well I guess I didn't notice David's comment on this issue when he made it (in May).
David said >code that shuts down embedded seems to be commented out -- see the commented out code at the end of >NetworkServerControlImpl.blockingStart(), starting with "// Shutdown Cloudscape". I am a little surprised and wonder. Has it always been this way since 10.0? Are we shutting down cleanly when we start from the command line? >Is it that we need an API that makes this an optional behavior? Or are things OK as they stand? I tend to think we need an api to shutdown embedded with network server. Othewise it seems likely that folks will assume it gets shutdown. After some discussion on this issue and a bit of minimal testing I think that the following situation exists. The default shutdown API and command line shutdown is not shutting down the embedded database and so this particular issue which prompted this request does not exist. I don't think the default behaviour for the API shutdown can be changed at this point.
So I suggest we do the following: 1) Close this issue as invalid 2) Open a new issue to add an API public void shutdown(boolean derbyShutdown) 3) Make it clear in the javadoc that public void shutdown() does not shutdown Derby (calls shutdown(false)) Also we can file a bug that the NetworkServerControl command line shutdown should shutdown embedded if the server was started from the command line. I think it is safe to shutdown in this case and maybe for any command line shutdown. Does this should reasonable? Kathey Marsden commented:
> I don't think the default behaviour for the API shutdown can be changed at this point. Why is that? > So I suggest we do the following: > > 1) Close this issue as invalid > 2) Open a new issue to add an API public void shutdown(boolean derbyShutdown) > 3) Make it clear in the javadoc that public void shutdown() does not shutdown Derby (calls shutdown(false)) If we don't change the default API behavior then we also need to do 4) Correct the manuals. Specifically, I found the following statement in the admin guide, http://db.apache.org/derby/docs/dev/adminguide/tadminconfigshuttingdownthenetworkserver.html, for trunk: <quote> If user authentication is disabled, a Derby database will shut down normally when the Network Server is shut down. If user authentication is enabled, you must explicitly shut down the database before shutting down the Network Server by specifying a valid Derby user name and password. </quote> |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
So, unless I missed something, it appears that right now the Derby system does *not* get shut down when the Network Server is stopped.
Is it that we need an API that makes this an optional behavior? Or are things OK as they stand?