1.10.1 Two-Tier Deployments of Oracle Graph with Autonomous Database
In two-tier deployments, the client graph application connects directly to the Autonomous Database.
- Install Oracle Graph Client, as explained in Installing the Java Client.
- Establish a JDBC connection, as described in the Oracle Autonomous Warehouse
documentation.
You must download the wallet and unzip it to a secure location. You can then reference it when establishing the connection as shown in Example 1-1.
- Start the Java Shell as shown in the
code:
/bin/opg-jshell --no_connect
- Connect to your database as shown in Example 1-1.
Note:
If you need to use the Graph Visualization Application, you must additionally install the Oracle Graph Server.- See Installing Oracle Graph Server for more details.
- See Deploying the Graph Visualization Application for more details on deploying the Graph Visualization Application in Tomcat or Oracle WebLogic Server.
Example 1-1 Creating a Database Connection in a Two-Tier Graph Deployment with Autonomous Database
opg4j> var jdbcUrl = "jdbc:oracle:thin:@<tns_alias>?TNS_ADMIN=<wallet_location>" // jdbc url to the DB
opg4j> var user = "<user>"
opg4j> var pass = "<password>"
opg4j> var conn = DriverManager.getConnection(jdbcUrl, user, pass) // connecting to the DB
conn ==> oracle.jdbc.driver.T4CConnection@57e6cb01
In the preceding example:
- <tns_alias>: TNS alias used in
tnsnames.ora
file - <wallet_location>: Path to the directory where the wallet is stored
- <user>: Name of the database user
- <password>: Password for the user
Parent topic: Using Oracle Graph with the Autonomous Database