Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

What is the recommended way to get a java.sql.Connection to the DB for ADF

JeroenDirksNov 30 2012 — edited Dec 3 2012
How do I create a standalone database connection based on the datasource setup in ADF?

I have seen code like this in a method of AppModuleImpl.java but that seems a bit of a hack.

Connection conn = this.getDBTransaction().createStatement(0).getConnection();

What I need is a java.sql.Connection to the database used in the application module so I can call PL/SQL code and or work with AQ queues.

I would prefer a separate connection from the one used by the ADF model so it can have its own transaction control etc.

But I would like to get the connection created authenticated based on regular datasource setup.

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 31 2012
Added on Nov 30 2012
2 comments
460 views