Forum Stats

  • 3,838,691 Users
  • 2,262,394 Discussions
  • 7,900,734 Comments

Discussions

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

JeroenDirks
JeroenDirks Member Posts: 9
edited Dec 3, 2012 11:25AM in JDeveloper and ADF
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.
Tagged:

Answers

This discussion has been closed.