Question

4
Replies
1316
Views
Close popover
Danny Cheung (dannyc21)
Facebook
Product Management
Facebook
US
dannyc21 Member since 2016 11 posts
Facebook
Posted: June 8, 2017
Last activity: June 23, 2017
Closed

How to get Database "java.sql.Connection" in a java step from an existing Database instance

I needed to write a very custom java.sql.PreparedStatement in a java step and the only missing piece is the "java.sql.Connection" object. Is there any Pega Engine API that will get this java object assuming I have the Database name and/or JDBC URL. Also, I have tried the following it works but I do not want to hardcode the password.

//Works but I don't want to hardcode the password

java.sql.Connection con = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@dev.mycompany.com:8091:DEV", "username", "password");

//Note: getConnection("jdbc:url") signature does not work since password is require to get the instance

Data Integration Java and Activities
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.