Introduction
Oracle Wallet®
The Oracle Wallet® configuration is explained with the Oracle documentation:
Using Oracle Wallet® for JOC Cockpit
Anchor |
---|
| prerequisites |
---|
| prerequisites |
---|
|
Prerequisites
Oracle Wallet
®No Oracle Client installation is required at run-time for use of a wallet with JOC Cockpit. However, users need an Oracle Client to set up and to configure the wallet.
Oracle JDBC Driver
- Check the Oracle JDBC Driver version that ships with the JS7 release, see JS7 - Database, chapter: Individual JDBC Driver Versions. A newer JDBC Driver might be available for download from Oracle.
- Oracle JDBC Drivers that ship for release 18c of the DBMS are reported to work. Previous JDBC Driver releases, for example 12c, are reported not to work with Oracle Wallet® when used by JS7. If in doubt use the JDBC Driver version that matches the version of the DBMS.
- To apply a version of the JDBC Driver that is different from the version that ships with JS7, see JS7 - Database, chapter: Individual JDBC Driver Versions.
Oracle PKI Libraries
- The following Oracle Java libraries are required that have to match the version of the Oracle DBMS and Oracle JDBC Driver.
- The .jar files are available from an Oracle Client installation and are offered by Oracle for download:
ORACLE_HOME/jlib/oraclepki.jar
ORACLE_HOME/jlib/osdt_cert.jar
ORACLE_HOME/jlib/osdt_core.jar
- Store the libraries to the
JETTY_HOME/lib/user_lib
directory of the JOC Cockpit installation directory respectively. When running JOC Cockpit for Docker® consider to store the JDBC Driver and libraries in the JETTY_BASE/resources/joc/lib
directory.
Anchor |
---|
| configuration |
---|
| configuration |
---|
|
Configuration
JOC Cockpit is configured to connect to an Oracle database by use of Hibernate. In addition the locations of Oracle configuration files and of the wallet have to be specified.
Anchor |
---|
| hibernate_cfg_xml |
---|
| hibernate_cfg_xml |
---|
|
Hibernate hibernate.cfg.xml Configuration File
- Location:
JETTY_BASE/resources/joc/hibernate.cfg.xml
, see JS7 - Database.
Oracle tnsnames.ora Configuration File
The following example is not authoritative but is intended to explain a few basic settings:
Code Block |
---|
language | text |
---|
title | Example of a tnsnames.ora configuration file |
---|
linenumbers | true |
---|
collapse | true |
---|
|
# tnsnames.ora Network Configuration File: /home/js7/product/18.0.0/dbhomeXE/NETWORK/ADMIN/tnsnames.ora
# Generated by Oracle configuration tools.
JS7 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.11.0.99)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = JS7)
)
)
LISTENER_JS7 =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.11.0.99)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
) |
Explanation:
- Line 4: The name
JS7
of the first entry in this file corresponds to the key for which credentials have been stored to the wallet. - Line 5-9: The settings indicate the Listener's host and port and the database Service Name or Service ID.
Anchor |
---|
| wallet_location |
---|
| wallet_location |
---|
|
Wallet Location for Java
- Configure the location of the wallet by use of a Java define like this:
-Doracle.net.wallet_location=/home/js7/wallet
. This setting should point to the directory where the wallet files are located. This setting can be specified with one of the following options:- specify the Java define with the
jettyOptions
setting of the joc_install_xml
installer response file like this:
<entry key="jettyOptions" value="-Doracle.net.wallet_location=/home/js7/wallet"/>
- alternatively, for Unix use one of the following options:
- specify the
JAVA_OPTIONS
environment variable before running the JOC Cockpit jetty.sh
start script. - create/modify and make executable the
/home/js7/.jocrc
file, assuming that js7
is the JOC Cockpit run-time account. This file should export the JAVA_OPTIONS
environment variable like this:
export JAVA_OPTIONS="-Doracle.net.wallet_location=/home/js7/wallet"
- add the
JAVA_OPTIONS
environment variable to the systemd
service file, see JS7 - systemd Service Files for automated Startup / Shutdown with Unix Systems
- Find further details from JS7 - How To - Apply Java Options.