Skip to content

Commit 03895f1

Browse files
authored
Update JDBCDBTokenSample.java (#321)
1 parent 4e50178 commit 03895f1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

java/jdbc/ConnectionSamples/JDBCDBTokenSample.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,14 @@ public class JDBCDBTokenSample {
3737
final static String DB_URL="jdbc:oracle:thin:@dbname_high?TNS_ADMIN=/Users/user/wallet/Wallet_dbname&oracle.jdbc.tokenAuthentication=OCI_TOKEN";
3838
// If mutual TLS(mTLS) is disabled then, ADB connection does not require wallets.
3939
// Copy the connection string from "DB Connection" tab from "Connection Strings" section choosing "TLS" in the dropdown
40-
//final static String DB_URL="jdbc:oracle:thin:@(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.us-phoenix-1.oraclecloud.com))(connect_data=(service_name=gebqqeredfsozhjbqbs_dbname_medium.adb.oraclecloud.com)))?oracle.jdbc.tokenAuthentication=OCI_TOKEN";
40+
4141
// Another way to enable token authentication in the long form connection string.
42-
final static String DB_URL="jdbc:oracle:thin:@(description="
43-
+ "(retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.us-phoenix-1.oraclecloud.com))"
42+
/*
43+
final static String DB_URL="jdbc:oracle:thin:@(description="
44+
+ "(retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.us-phoenix-1.oraclecloud.com))"
4445
+ "(security=(token_auth=OCI_TOKEN))"
4546
+ "(connect_data=(service_name=gebqqeredfsozhjbqbs_dbname_medium.adb.oraclecloud.com)))";
46-
47+
*/
4748

4849
public static void main(String args[]) throws SQLException {
4950

0 commit comments

Comments
 (0)