You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Stuart Barker <st...@practiv.com> on 2006/03/06 18:48:50 UTC

Starting Derby in "My Documents" from Tomcat

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;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. 


RE: Starting Derby in "My Documents" from Tomcat

Posted by Stuart Barker <st...@practiv.com>.
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=true;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=true;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. 




Re: Starting Derby in "My Documents" from Tomcat

Posted by Stanley Bradbury <St...@gmail.com>.
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>