Embedding the Apache Derby database in a Web Application
Posted by bakksjo on September 20, 2005 at 4:06 AM EDT
I found this article on integrating Derby with Tomcat. It shows three integration scenarios:
- The prototype integration
- Derby is used only by a single web application, but each HTTP request actually causes an attempt to load the Derby system (in embedded mode) into memory. A new connection is created for each request. There is no proper shutdown of neither single databases nor the Derby system.
- The casual integration
- Derby is available to multiple web applications. Uses Tomcat-specific (non-standard) lifecycle events to load the Derby system (in embedded mode) on startup of the container, and shutting down the system on exit of the container. A separate connection is created for each request.
- The enterprise integration
- As with the casual integration, Tomcat-specific lifecycle events are used to load and shut down the Derby system, but here in Network Server mode. Also, a DataSource is set up and used for getting client connections.
Related Topics >>
Blog Links >>
- Login or register to post comments
- Printer-friendly version
- bakksjo's blog
- 1198 reads





