db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mball...@oreillyauto.com
Subject Re: Derby 10.1.3.1 Embedded+Network
Date Tue, 17 Oct 2006 20:28:04 GMT
This is precisely what I am doing in my configuration.  Your example looks
virtually identical to my config.  Except:  I did modify the
ServerLifecycleListenerWithNetworkServer.java file to include setting java
properties for host and derby system properties, which seems to work just
fine.  Prior to setting these properties, I could only connect on localhost
and tomcat was not starting in my Derby system directory.  After setting
the system directory the tomcat instance of Derby was able to locate my
derby.properties, which also includes my security and user configuation.
All this works great, except that when I connect from outside of tomcat, I
always get a read-only connection.  Certainly, I could have a problem with
my security settings or something similiar, but the feedback I get in the
log files is insufficient for me to tell what the problem may be.  I will
peruse your config in more detail to see if there is some little thing I am
missing, but it appears to be the same as what I have.


                                                                           
             "Barry Books"                                                 
             <trsvax@gmail.com                                             
             >                                                          To 
                                       "Derby Discussion"                  
             10/17/2006 09:40          <derby-user@db.apache.org>          
             AM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         Re: Derby 10.1.3.1 Embedded+Network 
                  "Derby                                                   
                Discussion"                                                
             <derby-user@db.ap                                             
                 ache.org>                                                 
                                                                           
                                                                           




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>

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean (C237AF83A5.4F6DA).




Mime
View raw message