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 Vic Ricker <vi...@ricker.us> on 2006/04/25 17:09:40 UTC

NetworkServerControl.start() and derby.properties

I hope this isn't too stupid of a question but I have searched and not
found anything helpful.
I am trying to embed the derby engine in an application and start the
network server with:

private NetworkServerControl serverControl;
...
serverControl = new NetworkServerControl();
serverControl.start(new PrintWriter(System.out));

It doesn't appear that the derby.properties file is being read.  For
example, I set derby.drda.port=7777 but it still binds 1527 when the app
runs.  I tried System.setProperty("derby.drda.port", "7777"); but that
doesn't appear to work either.  I realize that I can pass in the host
and port number to the constructor but I'd rather be able to use the
derby.properties file so that other properties can be configured.

What am I doing wrong?



-- 
Vic Ricker
http://www.ricker.us/


Re: NetworkServerControl.start() and derby.properties

Posted by Vic Ricker <vi...@ricker.us>.
Thank you!

Deepa Remesh wrote:
> On 4/25/06, Vic Ricker <vi...@ricker.us> wrote:
>
>   
> The name of property for port number is "derby.drda.portNumber". If
> this is'nt just a typo in the mail, it could be the reason why the
> property is not getting used. You may refer to Derby Server and Admin
> guide for more details on use of properties:
> http://db.apache.org/derby/docs/10.1/adminguide/derbyadmin.pdf
>
> Other thing you may want to check is if derby.properties file is in
> the right location. If you have set derby.system.home property, then
> the derby.properties file must be in directory specified by this
> property. If it is not set, Derby uses derby.properties file in the
> current user directory.
>
> Hope this helps.
>
> Thanks,
> Deepa
>   

-- 
Vic Ricker
http://www.ricker.us/


Re: NetworkServerControl.start() and derby.properties

Posted by Deepa Remesh <dr...@gmail.com>.
On 4/25/06, Vic Ricker <vi...@ricker.us> wrote:

>
> It doesn't appear that the derby.properties file is being read.  For
> example, I set derby.drda.port=7777 but it still binds 1527 when the app
> runs.  I tried System.setProperty("derby.drda.port", "7777"); but that
> doesn't appear to work either.  I realize that I can pass in the host
> and port number to the constructor but I'd rather be able to use the
> derby.properties file so that other properties can be configured.
>
> What am I doing wrong?
>

The name of property for port number is "derby.drda.portNumber". If
this is'nt just a typo in the mail, it could be the reason why the
property is not getting used. You may refer to Derby Server and Admin
guide for more details on use of properties:
http://db.apache.org/derby/docs/10.1/adminguide/derbyadmin.pdf

Other thing you may want to check is if derby.properties file is in
the right location. If you have set derby.system.home property, then
the derby.properties file must be in directory specified by this
property. If it is not set, Derby uses derby.properties file in the
current user directory.

Hope this helps.

Thanks,
Deepa