Hi, I created a simple WAR for tomcat the enables h2 as a tcp server,
i guess the same would work with glassfish .. here's the substance of
the web.xml


        <context-param>
        <description>Enable org.h2.driver server at port 9092, but only for
localhost</description>
                <param-name>db.tcpServer</param-name>
                <param-value>-tcp</param-value>
        </context-param>

        <listener>
                <listener-class>org.h2.server.web.DbStarter</listener-class>
        </listener>

Apart from this, you only need to make the h2....jar available to the
WAR file.

Regards
Artejera

On Feb 14, 9:08 pm, Mark Jackson <[email protected]> wrote:
> Howdy Folks,
>
> New guy here stumblin' and bumblin' through trying to create an H2 web
> app that will run on glassfish and provide a user interface built on
> JavaServer Faces.  I'm kinda new to the whole enterprise enviroment
> and I'm using this exercise as a learning experience.  I have a couple
> of questions if you all have the time to help educate a newbie.
>
> 1) The documentation says that I should use DbStart as a reference for
> how to set up a listener to kick off the database.  DbStart uses the
> Server class to start servers, but can't I just create a connection
> for any local data and call the TcpServer class directly?
>
> 2) The main method of the Server class would open a console window
> would it not?  I'm trying to avoid that if possible.
>
> Also, on another note; is the information on registering H2 in the
> glassfish app server still valid?  I'm having trouble locating the
> oracle toplink essentials stuff.  I'm guessing that this doesn't
> matter for embedding H2 in a .war file, but like I said, I'm trying to
> learn a little about the java enterprise platform.
>
> Thanks,
> Mark

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to