Pier Fumagalli wrote:On 13 Jul 2004, at 10:30, Andrew Thornton wrote:Hi. I'm trying to get the embedded Xindice working with Cocoon 2.1.5 on Jetty. All works fine when starting up the servlet engine, and I'm able to create and drop collections and resources. However when I shutdown the servlet engine and restart it I find that I have lost data from the collections tree. Has anyone got any ideas as to how to fix this?How do you shut down Jetty? Are the shutdown hooks called and executed?
(I'm using the standard configuration that comes with Cocoon 2.1.5 for this.)
CTRL-C on the Jetty thing.
Question, what's the Jetty thing?
Are the shutdown hooks called and executed (meaning, is the web-application disposed properly or the process is simply killed?) You should see it in the logs, like:
$ ./core/bin/cocoon
[2004/07/13 09:31:19.000] ***** Starting Apache Cocoon
[2004/07/13 09:31:20.467] EVENT Checking Resource aliases
[2004/07/13 09:31:21.156] EVENT Starting Jetty/4.2.19
[2004/07/13 09:31:21.565] EVENT Started WebApplicationContext[/,/Users/pier/Workspace/core/root]
[2004/07/13 09:31:24.541] EVENT Started SocketListener on 0.0.0.0:8888
[2004/07/13 09:31:24.542] EVENT Started [EMAIL PROTECTED]
[2004/07/13 09:31:24.646] EVENT Starting Jetty/4.2.19
[2004/07/13 09:31:24.650] EVENT Started ServletHttpContext[/]
[2004/07/13 09:31:24.653] EVENT Started SocketListener on 127.0.0.1:8889
[2004/07/13 09:31:24.654] EVENT Started [EMAIL PROTECTED]
^C[2004/07/13 01:56:30.832] EVENT Shutdown hook executing
[2004/07/13 01:56:30.834] EVENT Stopping Acceptor ServerSocket[addr=/0.0.0.0,port=0,localport=8888]
[2004/07/13 01:56:30.837] EVENT Stopped SocketListener on 0.0.0.0:8888
[2004/07/13 01:56:30.858] EVENT Stopped WebApplicationContext[/,/Users/pier/Workspace/core/root]
[2004/07/13 01:56:30.859] EVENT Stopped [EMAIL PROTECTED]
[2004/07/13 01:56:30.861] EVENT Stopping Acceptor ServerSocket[addr=localhost/127.0.0.1,port=0,localport=8889]
[2004/07/13 01:56:30.864] EVENT Stopped SocketListener on 127.0.0.1:8889
[2004/07/13 01:56:30.866] EVENT Stopped ServletHttpContext[/]
[2004/07/13 01:56:30.867] EVENT Stopped [EMAIL PROTECTED]
$
After I hit CTRL-C the shutdown hook is executing and all web applications are stopped and disposed properly.
Note, shutdown hooks don't get triggered on JDK-1.3 when CTRL-C is pressed on the console
Pier
smime.p7s
Description: S/MIME cryptographic signature