apache > db
Apache DB Project
 
Font size:      

Setting Network Server Properties

Setting Network Server Properties

You can specify Network Server properties on the command line, in the .bat or .ksh file (loading the properties by executing 'java -D'), or in the derby.properties file. Properties in the command line or .bat or .ksh file take precedence over properties in the derby.properties file. Arguments given to commands on the command line take precedence over properties values.

The following properties can be specified:

derby.drda.startNetworkServer

Use the derby.drda.startNetworkServer property to simplify embedding the Network Server in your application. When you set derby.drda.startNetworkServer, the Network Server will automatically start when you start Derby. Only one Network Server can be started in a JVM.

Syntax

<derby.drda.startNetworkServer=[true
false]>

Default

false

Example

derby.drda.startNetworkServer=true

Static or Dynamic

Static. You must shut down the Network Server and restart Derby for this change to take effect.

derby.drda.portNumber

Indicates the port number to use.

Syntax

<derby.drda.portNumber=portnumber>;

Default

If no port number is specified, 1527 is the default.

Example

derby.drda.portNumber=1110

Static or Dynamic

Static. You must restart the Network Server for changes to take effect.

derby.drda.host

Indicates that Network Server listen on a specific network interface. This allows multiple instances of Network Server to run on a single machine each using its own unique host:port combination. The host needs to be set to enable remote connections. By default, the Network Server will only listen on the loopback address. If the property is set to 0.0.0.0, Network Server will listen on all interfaces. Ensure that you are running under the security manager and that you have user authorization enabled before enabling remote connections with this property.

Syntax

<derby.drda.host=hostname>;

Default

If no host is specified, the Network Server listens on the loopback address of the current machine (localhost).

Example

derby.drda.host=myhost

Static or Dynamic

Static. You must restart the Network Server for changes to take effect.

derby.drda.traceDirectory

Indicates the location for tracing files.

Syntax

<derby.drda.traceDirectory=tracefiledirectory>;

Default

If the derby.system.home property has been set, it is the default. Otherwise, the default is the current directory.

Example

derby.drda.traceDirectory=c:/Derby/trace

Static or Dynamic

Dynamic. System values can be changed using commands or the servlet interface after the Network Server has been started.

derby.drda.traceAll

Turns tracing on for all sessions.

Syntax

<derby.drda.traceAll=[true|false]>;

Default

False.

Example

derby.drda.traceAll=true

Static or Dynamic

Dynamic. System values can be changed using commands or the servlet interface after the Network Server has been started.

derby.drda.logConnections

Indicates whether to log connections and disconnections.

Syntax

<derby.drda.logConnections=[true|false]>t;

Default

False.

Example

derby.drda.logConnections=true

Static or Dynamic

Dynamic. System values can be changed using commands or the servlet interface after the Network Server has been started.

derby.drda.minThreads

Use the derby.drda.minThreads property to set a minimum number of connection threads that Network Server will allocate. By default, connection threads are allocated as needed.

Syntax

<derby.drda.minThreads=numthreads>;

Default

1

Example

derby.drda.minThreads=10

Static or Dynamic

Static.

derby.drda.maxThreads

Use the derby.drda.maxThreads property to set a maximum number of connection threads that Network Server will allocate. If all of the connection threads are currently being used and the Network Server has already allocated the maximum amount of threads, then threads will be shared using the derby.drda.timeslice property to determine when sessions will be swapped.

Syntax

<derby.drda.maxThreads=numthreads>;

Default

1

Example

derby.drda.maxThreads=50

Static or Dynamic

Static.

derby.drda.timeslice

Use the derby.drda.timeslice to set the number of milliseconds each connection will use before yielding to another connection. This property is only relevant if the derby.drda.maxThreads property is set.

Syntax

<derby.drda.timeslice=milliseconds>;

Default

1

Example

derby.drda.timeslice=2000

Static or Dynamic

Static.


Previous Page
Next Page
Table of Contents
Index