db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rhys Campbell" <rhys.campb...@da-systems.co.uk>
Subject RE: Starting Derby in "My Documents" from Tomcat
Date Tue, 07 Mar 2006 09:11:55 GMT
Stuart,

NT has the %username% variable that you may be able to use in your batch
file.

http://www.computing.net/programming/wwwboard/forum/12736.html 

Rhys

-----Original Message-----
From: Stuart Barker [mailto:stuart.barker@practiv.com] 
Sent: 06 March 2006 18:46
To: 'Derby Discussion'
Subject: RE: Starting Derby in "My Documents" from Tomcat


Figured it out folks...

I'm passing 

-Dderby.system.home="%APPDATA%\Derby" 

through to catalina.bat on startup. Whilst it's not 'My Documents' it's
the
next best thing!

Stuart

-----Original Message-----
From: Stanley Bradbury [mailto:Stan.Bradbury@gmail.com] 
Sent: 06 March 2006 18:39
To: Derby Discussion
Subject: Re: Starting Derby in "My Documents" from Tomcat

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=tru
e;bo
otPassword=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=tru
e;bo
otPassword=Dh295nk!;user=ipos;password=ipos123</value> 







________________________________________________________________________
____

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. 






Mime
View raw message