org.h2.server.web
Class DbStarter

java.lang.Object
  extended by org.h2.server.web.DbStarter

public class DbStarter
extends java.lang.Object

This class can be used to start the H2 TCP server (or other H2 servers, for example the PG server) inside a web application container such as Tomcat or Jetty. It can also open a database connection.


Constructor Summary
DbStarter()
           
 
Method Summary
 void contextDestroyed(ServletContextEvent servletContextEvent)
           
 void contextInitialized(ServletContextEvent servletContextEvent)
           
 java.sql.Connection getConnection()
          Get the connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbStarter

public DbStarter()
Method Detail

contextInitialized

public void contextInitialized(ServletContextEvent servletContextEvent)

getConnection

public java.sql.Connection getConnection()
Get the connection.

Returns:
the connection

contextDestroyed

public void contextDestroyed(ServletContextEvent servletContextEvent)