That actually starts up a webserver that serves the H2 console servlet. Alternatively, you can just use the servlet inside your existing app, without having to start a separate web server.
http://gist.github.com/166669 Also, if you're using H2, you might want to try their built-in connection pool. http://gist.github.com/166687 Tim On Wed, Aug 12, 2009 at 1:14 PM, jon <jonhoff...@gmail.com> wrote: > > Hi, > > For those using h2, you can make a call to the following function from > boot to start up a web console while you're running in development > mode: > > def startH2WebConsole = { > if (Props.mode == Props.RunModes.Development) { > import _root_.org.h2.server.web.WebServer > import _root_.org.h2.tools.Server > import _root_.org.h2.util.StartBrowser > val webServer = new WebServer() > val server = new Server(webServer, Array("-webPort", "0")) > server.start > DBVendor.newConnection(DefaultConnectionIdentifier).map > (c=>StartBrowser.openURL(webServer.addSession(c))) > } > } > > - Jon > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---