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!

Creating jdbc datasource and get database connection

sujnanMar 25 2009 — edited Mar 26 2009
Hi All,

How can I create jdbc datasource in Jdeveloper Version 11.1.1.0.1? In the previous version of Jdeveloper when I create new database connection using Database navigator it was creating xxxx-data-sources.xml in application directory. I have used following code to get the database connection.

Connection connection = null;
Context ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup(dataSource);
connection = ds.getConnection();

But this method is not working in this version of jdeveloper. It is not creating xxxx-data-sources.xm in application directory. Please give me a suggestion to create jdbc datasource and to get database connection in this version.
The previous version of JDeveloper using OC4J but this version uses Weblogic.

Thanks,
Sujnan

Edited by: sujnan on Mar 25, 2009 11:09 PM
This post has been answered by dvohra21 on Mar 25 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 23 2009
Added on Mar 25 2009
2 comments
762 views