db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barry Books" <trs...@gmail.com>
Subject Re: Derby 10.1.3.1 Embedded+Network
Date Tue, 17 Oct 2006 14:40:55 GMT
I run Embedded+Network with tomcat and this setup works for me. I
don't use the network server much but it's nice to be able to login
via ij and poke around.

Here are the java files needed
http://www.trsvax.com/code/ServerLifecycleListener.java
http://www.trsvax.com/code/ServerLifecycleListenerWithNetworkServer.java

Here is the line for server.xml
<Listener className="org.apache.derby.tomcat.ServerLifecycleListenerWithNetworkServer"
debug="0" />

jdbc connection
<ResourceParams name="jdbc/XXX">
  <parameter> <name>maxWait</name> <value>5000</value> </parameter>
  <parameter> <name>maxActive</name> <value>4</value> </parameter>

  <!--
  <parameter> <name>url</name>
<value>jdbc:derby:net://localhost/XXX</value></parameter>
  <parameter> <name>driverClassName</name>
<value>com.ibm.db2.jcc.DB2Driver</value> </parameter>
   -->

  <parameter> <name>url</name>
<value>jdbc:derby:/usr/local/derby/databases/XXX</value></parameter>
  <parameter> <name>driverClassName</name>
<value>org.apache.derby.jdbc.EmbeddedDriver</value> </parameter>

<parameter> <name>username</name> <value>XXX</value> </parameter>
<parameter> <name>password</name> <value>xxxx</value> </parameter>

  <parameter> <name>maxIdle</name> <value>2</value> </parameter>
  <parameter> <name>validationQuery</name> <value>select count(*)
from
sysibm.sysdummy1</value> </parameter>
</ResourceParams>

Mime
View raw message