Kbase 17763: Apptivity: Configuring OpenLink For JDBC Access To Progress
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  8/21/2003 |
|
Status: Unverified
FIX:
The 3-tier setup is ideal for Apptivity because it includes the ODBC needed for the developer, and the JDBC that can be used for the deployment or testing purposes.
Step 1:
Download the OpenLink products for Windows and the server platform
you are going to use.
Step 2:
Use the installation instructions provided by OpenLink to setup your
Windows and server side.
The first thing to configure is the ODBC layer. If this is configured
well then you can test the connection immediately. It takes
then 2 more steps to configure the JDBC setup. This example is setup for a windows client and a Solaris server.
Step 3:
After installing the Openlink software on the server, there are some
things to do for the Pprogress configuration:
1) Startup the Progress database broker.
2) Run the setup.p file that comes with the OpenLink installation.
This utility will connect to the Progress database with parameters
you specify and then it generates 2 files. This is a TABLEVIEW.DAT
and a TABLEVIEW.PF file. These files are needed to configure the
ODBC datasource access to the database.
3) Suppose we are going to create an entry to a defined database
(Sports) and call the Datasource name Tbo. We need to configure
the oplrqb.ini file in such a way that the oplrqb
(OpenLink ReQuest Broker) will find the needed entries and connect
to our database. The oplrqb.ini file could look like this:
/******************************************************************/
[Request Broker]
BinaryDirectory = /usr/openlink/bin
CommandLine = ;+logfile /tmp/oplrqb.log +debug
Protocols = tcp
;MaxAgents = 0 ; if >0, max. # of processes spawned by broker
;MaxConnections = 0 ; if >0, max. # of connections from clients
[Protocol TCP]
PingWatchdog = No ; Send check-alive packets
PingInterval = 600 ; every <PingInterval> seconds
PortLow = 6000 ; Limits TCP port range - first used port
;PortHigh = 60000 ; last used port
;IPAddress = 127.0.0.1 ; Overrules found interface address
[Protocol SPX]
SAPBroadcast = Yes ; Broadcast SAP registration packets
SAPInterval = 100 ; every <SAPInterval> seconds
SAPServiceType = 0x321F ; with type <SAPServiceType>
SAPServiceName = OPENLINK ; and with name <SAPServiceName>
[Communications]
SendSize = 16000 ; Send buffer size
ReceiveSize = 4096 ; Receive buffer size
DataEncryption = No ; Crypting of outgoing packets
BrokerTimeout = 30 ; Timeout for utilities to contact the
broker
ReceiveTimeout = 120 ; Timeout for the broker contacting an agent
RetryTimeout = 2 ; Initial retry interval -- doubles on failure
; to a maximum of 30 seconds
[Security]
StartupBy = .* ; Users who can startup oplrqb
ShutdownBy = .* ; Users who can shutdown oplrqb
ShutdownFrom = localhost ; Hostnames that can shutdown
ValidUidRange = 0, 50000 ; Valid range for OpSysLogin
;TraceRulebook = /tmp/debug.book ; Write merged rulebook (debug)
;IncludeRulebook = proxy_sv.book
;IncludeRulebook = jdbc_sv.book
;IncludeRulebook = generic.book
[Environment JDBC]
UDBCINI = /etc/udbc.ini
[Environment TBO]
DLC = /usr1/v81A/dlc
PROCFG = /usr1/v81A/dlc/progress.cfg
PROMSGS = /usr1/v81A/dlc/promsgs
TABLEVIEW = /usr/openlink/bin/tableview.dat
;TABLEVIEW =
TABLEVIEW_QUALIFIER = Y
;DEADLOCK_TIMEOUT = 60 ; Seconds to wait for lock to
release
;INSERT_LOGICAL = Y
;UPDATE_LOGICAL = Y
;;
;; Translation rules for requested database types
;; NOTE
;;Since all the left hand sides are. regular expressions, you have to
;; specify ^....$ to get a complete match. In the example,
;; "Progress 6" means "....Progres 6..."
;;
[Domain Aliases]
Tbo = Tbo
;
; JDBC connections
;
jdbc = jdbc
judbc = judbc
jodbc = jodbc
.* = unknown
[Database Aliases]
demo = demo
[Opsys Aliases]
java = java
win32|msdos = msdos
.* = other
[User Aliases]
scott|system = insecure
^$ = blank
[Machine Aliases]
[Application Aliases]
MSACCESS|EXCEL|MSQRY32 = msoffice
;;
;; The mapping rules
;;
;; Format of these lines is:
;; domain:database:uid:opsys:machine:application:mode
;;
[Mapping Rules]
;*:*:blank:*:*:*:rw = reject You should specify a username and passwor
*:*:Admin:msdos:*:msoffice:* = reject Admin user account is not regist
Tbo:*:*:*:*:*:* = accept generic_tbo
jdbc:*:*:java:*:*:* = accept java_client
judbc:*:*:java:*:*:* = accept java_client
;; *:*:*:*:*:*:* = reject Unknown database agent requested
;;
;; GENERIC SETTINGS, THOSE SHOULD WORK IN MOST CASES
;;
/******************************************************************/
4) The process that is spawned by the OpenLink Broker should be
judbc_sv.exe -- modify the settings as follows:
/******************************************************************/
[jodbc_client]
Program = judbc_sv.exe
CommandLine = ;+debug
ReUse = Never
;Environment=
;ConnectOptions=
;Directory=c:\temp
;Database=
;Userid=
;Password=
;ReadOnly=Yes
[judbc_client]
Program = judbc_sv.exe
CommandLine = ;+debug
Environment = JDBC
ReUse = Never
;ConnectOptions=
;Directory=c:\temp
;Database=
;Userid=
;Password=
;ReadOnly=Yes
[jdbc_client]
Program = judbc_sv.exe
CommandLine = ;+debug
ReUse = Never
;Environment=
;ConnectOptions=
;Directory=c:\temp
;Database=
;Userid=
;Password=
;ReadOnly=Yes
[generic_tbo]
Description = Default settings for tbo
Program = pro81a_sv
Environment = TBO
ServerOptions = -T /tmp -d mdy -TB 31 -TM 31 -q -NL ; Don't use a
different -d argument
;Directory = /tmp
ReUse = Never
;CommandLine =
;ConnectOptions =
Database = -db /usr1/tse/tbo/v81/sports -trig
/usr1/tse/tbo/v81/sports.pl
;Userid =
;Password =
;ReadOnly = Yes
[java_client]
Description = Default settings for JDBC agent
Program = jdbc_sv
CommandLine =
Environment = JDBC
ReUse = always
;ConnectOptions =
;Directory = /tmp
;Database =
;Userid =
;Password =
;ReadOnly = Yes
/******************************************************************/
This file helps O.L. to determine how to connect to the requested
database.
When these steps are finished, you should be able to start the
request broker. It is best to start the broker in debug mode to
check if it is working properly. To start in debug mode execute the
following:
oplrqb -dv
Step 4:
On the client you need to install the OpenLink ODBC.
After that you need to go into the ODBC Administrator (32-bit) and
configure a new connection. You will only need ODBC within Developer.
The following fields need to be filled in:
Name: tbosolaris -> Name of the datasource.
Comment: whatever you feel like
In the provider part fill in the following:
Type: Tbo -> Defined in the oplrqb.ini file.
Protocol: TC.P/IP
Hostname: Solaris1 -> Name of your host.
All the other parameters can be left blank.
Step 5:
After configuring all this, it is time to test the configuration at
this moment. You can use MS-Query to check if the datasource is
configured in the right way.
If this is done, it is time to start on the JDBC configuration.
Step 6:
To make the link with JDBC, the OpenLink software is using an
UDBC.ini file. If you check the oplrqb.ini file, you will find the
following reference:
[Environment JDBC]
UDBCINI = /etc/udbc.ini
The /etc/udbc.ini file could look like this:
[UDBC]
;DebugFile = /tmp/udbc.out ; Write client debugging output
[Communications]
ReceiveTimeout = 120 ; max. time to complete a request
BrokerTimeout = 30 ; max. time to wait for oplrqb
RetryTimeout = 5 ; Retry time for oplrqb locating
SendSize = 4096 ; RPC send buffer size
ReceiveSize = 16000 ; RPC receive buffer size
ShowErrors = Y ; Pass RPC errors to applications
DataEncryption = N ; Encrypt outgoing data
[Tbo]
Description = My test
Host = solaris1
ServerType = Tbo
;ServerOptions = -T /tmp
Database = sports
FetchBufferSize = 60
ReadOnly = no
When this file is in place, there is nothing further to configure in
the ini files.
Step 7:
With the JDBC installation there will also be an opljdbc.jar file
delivered. This .jar file contains all the needed JDBC classes for
OpenLink. It is very important that this file is included in the
CLASSPATH of all Java programs that want to access the Database
through JDBC. Depending on how Apptivity is running, you need to
reference it in the CLASSPATH on the client and/or on the server.
This should complete the installation and configuration of the
OpenLink software to use with Apptivity.
TESTING -- To test the configuration with Apptivity you can create a new project and create a DataConnection. In the configuration screen you can enter the following:
Connection name: dcProgress
ODBC DataSource: tbosolaris
User Name:
Password:
Click on the Native JDBC driver.
Driver: openlink.jdbc.Driver
Database URL: jdbc:openlink://hostname:6000/DSN=Tbo
The hostname should be replaced by the name of the Host machine and
the 6000 is the portnumber defined in the oplrqb.ini file for when
the request broker is started.
This should configure a connection that uses ODBC at design time and
uses JDBC from the moment a Java program runs..