Hi everyone,
I have a Maven project. One of modules is a war. I wonder if I could
use H2 in that way:
1. DB is being started when test are launched (for example by Spring)
2. this DB is shutdown after test were executed
3. DB starts again when application is started (after deploy and
running container).
If DB is ready I wish I could connect to it with web console (I should
start web server)
I tried to do like this:
in spring context:
<!-- H2 Database - tcp server -->
<bean id="h2tcp" class="org.h2.tools.Server"
factory-method="createTcpServer" init-method="start" destroy-
method="stop">
<constructor-arg value="-tcp,-tcpAllowOthers,true" />
</bean>
<bean id="h2web" class="org.h2.tools.Server"
factory-method="createWebServer" init-method="start" destroy-
method="stop">
<constructor-arg value="-browser" />
</bean>
and my connection URL is like this:
jdbc:h2:tcp://localhost/mem:koszyki_postpaid;DB_CLOSE_DELAY=-1
but it doesn't work for me - connection refused when trying to do
something on entity manager.
If i try
jdbc:h2:mem:koszyki_postpaid;DB_CLOSE_DELAY=-1 everything work fine. I
can connect to my database from the other process than my app is
working on. Unfortunately, when I try to build my app by maven and
tests are executed - Adress already bind excpetion is being thrown. I
thing something is wrong with closing DB.
Please help me ;)
Matthew
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---