background image
<< Enabling the encrypted user ID | Using the NetworkServerControl API >>

Setting port numbers

<< Enabling the encrypted user ID | Using the NetworkServerControl API >>
Derby Server and Administration Guide
33
Differences in JDBC 3.0 methods
The following JDBC 3.0 methods are supported only with the Derby embedded driver.
Attempts to call these methods with the network client driver will result in a "not
implemented" error.
Connection.prepareStatement(String sql, String[] columnNames)
Connection.prepareStatement(String sql, int[] columnIndexes)
Statement.execute(String sql, String[] columNames)
Statement.execute(String sql, int[] columIndexes)
Statement.executeUpdate(String sql, String[] columnNames)
Statement.executeUpdate(String sql, int[] columnIndexes)
For more on the use of these methods, see the sections "java.sql.Connection interface:
supported JDBC 3.0 methods", "java.sql.Statement interface: supported JDBC 3.0
methods", and "Autogenerated keys" in the Derby Reference Manual.
Differences using the Connection.setReadOnly method
In the embedded mode, when the Connection.setReadOnly method has
true
as the
parameter, the connection is marked as a read-only connection. When using a Network
Server, the Connection.setReadOnly(true) method is ignored and the connection is not
marked as a read-only connection.
Setting port numbers
By default, Derby using the Network Server listens on TCP/IP port number 1527. If you
want to use a different port number, you can specify it on the command line when starting
the Network Server. For example:
java org.apache.derby.drda.NetworkServerControl start -p 1088
1. However, it is better to specify the port numbers by using any of the following
methods
· Change the startNetworkServer.bat or startNetworkServer.ksh scripts
· Use the
derby.drda.portNumber
property in
derby.properties
See
Starting the Network Server
for more information.
Managing the Derby Network Server
The Derby Network Server can be run in either of these configurations:
· As
a stand-alone server
, in which case it is an independent Java process
embedding the Derby database engine
· As
an embedded server
, in which case it is embedded within another Java
application, and both the Network Server framework and the Derby database
engine are loaded by the Java application
You can use Java Management Extensions (JMX) technology to monitor and
manage Derby and the Network Server. For information on how to do this,
visit the wiki page
http://wiki.apache.org/db-derby/DerbyJMX
and refer to the
API documentation for the packages
org.apache.derby.mbeans
and
org.apache.derby.mbeans.drda
. For information on JMX technology, see
http://download.oracle.com/javase/6/docs/technotes/guides/jmx/
.
You can manage the Network Server by using shell scripts, the command line, or the
Network Server API. The Network Server can also be managed remotely from a web
server by using a servlet interface. See
Managing the Derby Network Server remotely by