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

Arpad Kiss

I think you wanted DESC, not DEPT.
DESC tablename;

Pictures are worth many words, show us

image.png

user527460

Hi, @thatjeffsmith-oracle ,
Here is the picture from SQL Developer version 21.4.3.x,
Picklist is not showing with table alias 'a' as shown here.

image.png

That query to get the column list might take a half-second, be patient
Windows 10/21.4.3
image.png

user527460

hi @thatjeffsmith-oracle ,
No luck, i waited for a min but pick list not showing. I tried to change theme to dark as showing in your image, still no pick list pops up.

ask for it multiple times, if the query takes too long, we give up

Robert Kilmer

Try Ctrl-Space.

670554

Ctrl-Space is not working in Version 22.2.1.234

it brings up a different menu.

thatJeffSmith-Oracle

23.1.1 is latest and this is your example in 23.1.1

1 - 9
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
459 views