Home

Getting Started

Utilities

Indexing

Omnidex

Development

Tutorials

Quick Links

 

Utilities

ODXNET

Configuration

 

ODXNET

Directives

Unix

Windows

Pooled Processes

Preconnected Processes

Configuration File

Preconnected Processes

Preconnected processes are multiple, pre-defined connections to a specific Omnidex environment, that are established when the ODXNET listener is first started. These connections run on the server, waiting for client requests, similar to pooled processes except that they are connected to a specific environment. This is particularly useful in multi-user and web environments where many connections to the same environment are required.

As connections are used, more connections are automatically created behind the scenes, so a free connection is always ready. When a connection is freed by the client, it is returned to the "pool" where it will wait for a new client, or closed if the pool size is unnecessarily large.

All of these connections use connect options defined in the ODXNET configuration file, which overrides any settings specified in the client's datasource.

Each time a client request comes through the listener for a datasource that is configured with preconnected processes, one of the pre-established connections will be used. The number of connections can grow dynamically as demand increases, up to a limit that is defined in the configuration file.

Any connect options passed from the client will be ignored when connecting to a preconnected process.

 

Configuration

Configuring preconnected processes is done in the ODXNET configuration file.

Each application type, from the Applications section in the ODXNET configuration file, has an "[apptype Environments]" section, (where apptype is ODXODBC, ODXJDBC or OMNIACCESS), that allows you to define preconnected processes. In this section, you can name an environment that will be automatically connected to when the ODXNET listener is started.

[ODXODBC Environments]

; Fill this section with a list of various environments that you wish to track
;SAMPLE=My sample database

In this example, SAMPLE is the environment name, although it is commented out. This environment name must match the data source name defined in the client data source. When ODXNET receives a client request, it attempts to match up the data source name with a preconnected process environment name. If a match is found, the client receives one of the preconnected processes. If no match is found, a new connection is created using a pooled process.

The text "My sample database" is a description for informational purposes only. It is not used by ODXNET in any way. ODXODBC means that preconnected processes will be started for use by ODBC applications. JDBC and OmniAccess applications cannot use the ODBC preconnected processes, as they require different libraries that are preloaded with the pooled processes.

Each application type can contain multiple environment names. The environment name is a label that links to two sections, one that defines the preconnected processes pool size, growth rate, etc..., and one that defines the connection information like environment file spec, user name and password.

 

Each environment name defined in the Environments section will have its own sub-section, where the preconnected process behavior is defined. This is where you tell ODXNET how many connections to establish at start up, the maximum number of connections to have open at any one time, growth rate and more.

[ODXODBC SAMPLE]

StartupInfo=$SECTION
; Specifies environment to preconnect to

UsePooleProcesses=1
; Flag to determine if Pooled Processes are used
; 0 Don't start or use pooled processes for this application
; 1 Start and use pooled processes for this application

InitialProcessCount=10
; Number of processes to startup

ProcessLimit=60
; Maximum number of pooled processes allowed for this application

GrowthThreshold%=80
; Trigger to indicate more processes should be started
; Happens when this percentage of the processes that have started
; are owned by clients

Growth%=20
;Amount of processes to grow by when GrowthThreshold% is reached.
;Number of processes added is Growth Percent of number of processes already
; started up to the ProcessLimit

ReUseProcesses=1
; Flag to determine if application processes are reused
; 0 Don't reuse processes, instead start a new process
; 1 Reuse processes

 

Each environment name defined in the Environments section will also have a start up info sub-section. This section contains the environment file spec, connect options, user name and password if applicable, and an optional SQL statement.

[ODXODBC SAMPLE StartupInfo]

; This section contains information used by ODXODBC when starting on the server

EnvName=C:\omnidex\oa\oracle\orders.env
; specifies env file to preconnect to. Leaving blank will skip preconnection
; Ignored when *not* a pooled process, i.e. when its a new process

;Options=

;Username=
; username to pass to oaconnect
; Ignored when *not* a pooled process, i.e. when its a new process

;Password=
; password to give oaconnect
; Ignored when *not* a pooled process, i.e. when its a new process

;SQL="select * from customers where customer_no=1 with opt=none"
; sql statement must be enclosed in quotes.

 

 

 

Top