db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanley Bradbury <Stan.Bradb...@gmail.com>
Subject Re: Starting Derby in "My Documents" from Tomcat
Date Mon, 06 Mar 2006 18:38:33 GMT
Stuart Barker wrote:

> Hi All,
>
> I have a Derby instance starting up from within my Tomcat application, 
> as the server.xml excerpt shows below. However, I’d like the DB to 
> startup in the ‘My Document’ folder for the user. Is there anyway in 
> the server config I can get it to do this?
>
> […]
>
> <!-- Global JNDI resources -->
>
> <GlobalNamingResources>
>
> <Resource name="jdbc/ipos" auth="Container" type="javax.sql.DataSource"/>
>
> <ResourceParams name="jdbc/ipos">
>
> <parameter>
>
> <name>maxWait</name>
>
> <value>5000</value>
>
> </parameter>
>
> <parameter>
>
> <name>maxActive</name>
>
> <value>4</value>
>
> </parameter>
>
> <parameter>
>
> <name>driverClassName</name>
>
> <value>org.apache.derby.jdbc.ClientDriver</value>
>
> </parameter>
>
> <parameter>
>
> <name>url</name> 
> <value>jdbc:derby://localhost:1527/iposdb;create=true;dataEncryption=true;bootPassword=Dh295nk!;user=ipos;password=ipos123</value>
>
> </parameter>
>
> <parameter>
>
> <name>maxIdle</name>
>
> <value>2</value>
>
> </parameter>
>
> </ResourceParams>
>
> […]
>
> *Thanks*
>
> * *
>
> *Stuart Barker*
>
>
>
> ____________________________________________________________________________
>
> This e-mail (and any attachments) may contain privileged and/or 
> confidential
> information. If you are not the intended recipient please do not 
> disclose,
> copy, distribute, disseminate or take any action in reliance on it.
>
> If you have received this message in error please inform us and delete 
> it.
> Should you wish to communicate with us by e-mail we cannot guarantee 
> the security
> of any data outside our own computer systems.
>
> For the protection of our systems and staff, incoming and outgoing
> emails are automatically scanned for viruses and content.
>
Hi Stuart -

I notice you are using Network Server:
<value>org.apache.derby.jdbc.ClientDriver</value>
The location of the database will be relative to the Working Directory 
of Network server. Be sure that Network Server is always started from 
the same directory (one way is to set derby.system.home) then specify 
the relative path on the URL - if Network Server is started in the users 
MY DOCUMENTS folder then the URL you specify can be used:
<value>jdbc:derby://localhost:1527/iposdb;create=true;dataEncryption=true;bootPassword=Dh295nk!;user=ipos;password=ipos123</value>






Mime
View raw message