Hi Thomas, This is a bug. The current ServerServlet adapter class didn't stop the Component but only the attached Application.
This is now fixed in SVN trunk. Thanks for letting me know if it works better now. Best regards, Jerome -----Message d'origine----- De : news [mailto:[EMAIL PROTECTED] De la part de Thomas Envoye : vendredi 30 mai 2008 17:31 A : [email protected] Objet : Life Cycle of a Restlet Hello, I've got some troubles concerning the integration of a database into a webservice. The whole service is running on a Tomcat server, the database is a db4o. When I stop and restart the server I can't access the dbo file I once created, because the file isn't closed properly. So how or where can I manage the closing of the db4o objectcontainer, when the server stops running. Are there any ServletListener like methods, which handle the closing of the db? I tried to in the main method of the application, but it didn't work, public static void main(String[] args) throws Exception { // Create a component with an HTTP server connector Component comp = new Component(); comp.getServers().add(Protocol.HTTP, 8080); comp.getClients().add(Protocol.FILE); comp.getDefaultHost().attach("", new Application(comp.getContext())); comp.start(); // Close the database, when the server shuts down if (comp.isStopped()) { container.close(); } } thanks for your help, Thomas

