You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Graham Towse <gt...@yahoo.com> on 2009/04/09 10:10:15 UTC
Running hypersonic db in server mode from tomcat
Hi All,
I have a query about running a hypersonic database (http://hsqldb.org/web/hsqlDocsFrame.html) with tomcat.
I
understand that in JBoss one can define a dataSource that kicks off a
hypersonic database in server mode (server mode enables tcp connections
outside the JVM), the instructions are here
http://webdev.apl.jhu.edu/~jcs/ejava-javaee/course-docs/exercises/ex0.html#Part_E
My question is, can you do the same thing in tomcat, i.e. kick off a hypersonic database in server mode from tomcat.
I am running tomcat as part of a maven (http://maven.apache.org/)
based integration test, and it is not possible to kick off the
hypersonic database during the pre integration test phase as the maven
exec plugin waits until the executed hsqldb.jar has exited, thus
pausing the test indefinately.
The reason why I need to run
hypersonic in server mode is that I am testing a grails application
running in tomcat, and I need to interact with the application's
database from the test code, which is executed in a seperate process
i.e. the database must be accessible over the network.
I am currently using mysql but would like to take advantage of hypersonic's speed/encapsulation.
Cheers,
Graham
Re: Running hypersonic db in server mode from tomcat
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Graham,
On 4/9/2009 4:10 AM, Graham Towse wrote:
> I
> understand that in JBoss one can define a dataSource that kicks off a
> hypersonic database in server mode (server mode enables tcp connections
> outside the JVM), the instructions are here
> http://webdev.apl.jhu.edu/~jcs/ejava-javaee/course-docs/exercises/ex0.html#Part_E
>
> My question is, can you do the same thing in tomcat, i.e. kick off a hypersonic database in server mode from tomcat.
Do you mean that you need to use it in a way other than in-process mode?
If you just need in-process, then all you need to do is configure a
DataSource using the standard setup
(http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html)
and hsqldb should start.
The documentation above for JBoss seems to indicate that JBoss knows how
to do dependency-checking for the server mode hsqldb. Tomcat doesn't do
anything like that.
If you want hsqldb to run in server mode in Tomcat, I think you'll want
to create a webapp that mimics the behavior of org.hsqldb.Server. Just
remember to put /all/ the hsqldb JAR files (including the JDBC driver
JAR) into Tomcat's common/lib or I don't think things will work.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAknoplIACgkQ9CaO5/Lv0PBAnQCfaIWgz2o4LyNLL56iJblKdt2j
ocQAoKNEhbKoR0uOYzzCbE2jPsfMfQAy
=bRXB
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org