InterClient Data Source Properties for InterBase

From InterBase

Go Up to Programming with JDBC


Standard properties

Data Source standard properties
Name Type Description Default
Value

databaseName

String

The name of the database to connect to

null

serverName

String

The InterBase server name

localhost

user

String

The InterBase user who is connecting

null

password

String

The InterBase user password

null

networkProtocol

String

The InterBase network protocol; this can only be jdbc:interbase: for InterClient.

jdbc:interbase

port Number

int

The InterBase port number

3050

roleName

String

The InterBase role

null

dataSourceName

String

The logical name for the underlying XADataSource or Connection Pool; used only when pooling connections for InterBase (XA is not supported).

null

description

String

A description of this data source

null

Extended Properties

Data Source Extended properties
Name Type Description Default
Value

charSet

String

Specifies the character encoding for the connection; used for sending all SQL and character input data to the database and for all output data and InterBase messages retrieved from the database.

The encoding specified by charSet must match one of the supported IANA character-encoding names detailed in the CharacterEncodings class.

If charSet is set to NONE, InterClient uses the default system encoding obtained by the System.getProperty(“file.encoding”) method if that default encoding is supported by InterBase. If the default system encoding is not supported by InterBase, it is recommended that you use the charSet property to set the InterClient charSet to one of the InterBase-supported encodings.

InterClient messages do not utilize charSet, but derive from the resource bundle in use, which is based on the locale-specific encoding of the client.

No default value

sqlDialect

int

The client SQL dialect. If the value is set to 0, then the dialect of the database is used for the client dialect.

0

create

Boolean

If set, the database is created if it does not exist.

false

serverManagerHost

String

Ignored.

null

sweepOnConnect

boolean

If set, forces garbage collection of outdated record versions immediately upon connection

See the InterBase Operations Guidefor more details. Sweep does not require exclusive access, but there is some data and transaction state information that can be updated only where there are no active transactions on the database.

false

suggestedCachePages

int

The suggested number of cache page buffers to use for this connection

This is a transient property of the connection and is overridden by the database-wide default set by ServerManager.setDatabaseCachePages(database, pages). It takes precedence over the server-wide default set by DATABASE_CACHE_PAGES in the InterBase ibconfig startup file or by ServerManager.startInterBase(defaultCachePages, defaultPageSize).

In InterBase, if a scache already exists due to another attachment to the database, then the cache size can be increased but not decreased. So, although this is a transient property, once the cache size is increased, it stays that way as long as there are active connections. Once all connections to the database are closed, then subsequent connections use the database-wide or server-wide defaults.

Note: Using this connection property can jeopardize the performance of the server because an arbitrary user can connect and reserve 200MB for foo.ib while corporate.ib is forced to accept less.

InterBase code sets an absolute limitation on MAX_PAGE_BUFFERS of 65,535 pages. So the cache memory size for a database cannot go beyond a maximum of MAX_PAGE_BUFFERS*PageSize bytes, which is 512MB for an 8K page size. 8K is the maximum database page size currently allowed. If this property is zero or unspecified and there is no server-wide or database-wide default set, the default pages used is 2048 cache pages.

Also see DatabaseMetaData.getPersistentDatabaseCachePages() and DatabaseMetaData.getActualCachePagesInUse().

0

logWriterFile

String

The logWriterFile points a complete location of a filename that will be opened by the driver and be used a a InterBase log file.This property differs from the standard logWriter property as the logWriter takes in takes a defined printWriter while the logWriterFile takes a complete filename.

No default value

systemEncryptionPassword

String

Specifies the system encryption password used to connect to an encrypted database. Refer to the “Encrypting Your Data” chapter in the Operations Guide for details on Encryption

No default value

ssl

Boolean

This must be set for any of the other OTW parameters to be accepted and for the connection to be secure.

No default value

serverPublicFile

String

Location of the certificate file. The client will not be expected to create this file. This file will be created by the database administrator of the server you are connecting to. If you are the person generating this file, please ensure that the public certificate file has been created binding the certificate to the DNS of the server. This DNS must match the <secure host name> used by the client.

<user home directory>/ibserverCAfile.pem

If client verification by the server is enabled on the server, these parameters are needed:

clientPrivateFile

String

Location and name of the client certification file. This certificate will be presented to the server during the SSL connection phase. The certificate file must be in the PEM format and must contain both the client certificate and the private key.

No default value

clientPassPhrase

String

Private key pass phrase

No default value

Note:
For more information on how to generate the certificate and private key files, refer to the Network Configuration chapter in the Operations Guide.

InterClient Connection Pooling

InterClient now works with Container Managed Persistence (CMP) 2.0, which is supplied with the server. This enables JDBC DataSource 2.x connectivity to InterBase databases. The following jndi-definition.xml file shows how it can be used through an application server:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jndi-definitions PUBLIC "-//Borland Corporation//DTD JndiDefinitions//EN" "http://www.borland.com/devsupport/appserver/dtds/jndi-definitions.dtd">
<jndi-definitions>
<visitransact-datasource>
<jndi-name>serial://datasources/DataSource</jndi-name>
<driver-datasource-jndiname>serial://datasources/driverDataSource</driver-datasource-jndiname>
<property>
<prop-name>connectionType</prop-name>
<prop-type>Enumerated</prop-type>
<prop-value>Direct</prop-value>
</property>
<property>
<prop-name>dialect</prop-name>
<prop-type>Enumerated</prop-type>
<prop-value>interbase</prop-value>
</property>
</visitransact-datasource>
<driver-datasource>
<jndi-name>serial://datasources/driverDataSource</jndi-name>
<datasource-class-name>interbase.interclient.JdbcConnectionFactory</datasource-class-name>
<property>
<prop-name>user</prop-name>
<prop-type>String</prop-type>
<prop-value>SYSDBA</prop-value>
</property>
<property>
<prop-name>password</prop-name>
<prop-type>String</prop-type>
<prop-value>masterkey</prop-value>
</property>
<property>
<prop-name>serverName</prop-name>
<prop-type>String</prop-type>
<prop-value>agni</prop-value>
</property>
<property>
<prop-name>databaseName</prop-name>
<prop-type>String</prop-type>
<prop-value>c:/admin.ib</prop-value>
</property>
  <property>
<prop-name>sqlDialect</prop-name>
<prop-type>int</prop-type>
<prop-value>3</prop-value>
</property>
<property>
<prop-name>create</prop-name>
<prop-type>boolean</prop-type>
<prop-value>true</prop-value>
</property>

</driver-datasource>
</jndi-definitions>

Advance To: