Solved

example java code using jndi to connect to Oracle

Posted on 2008-10-27
10
1,564 Views
Last Modified: 2013-11-23
Can someone send me a snippet of java code that uses a jndi to connect to an Oracle Database
0
Comment
Question by:user1146
  • 4
  • 3
10 Comments
 
LVL 20

Accepted Solution

by:
chaitu chaitu earned 168 total points
ID: 22812305
0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 22812347
0
 
LVL 59

Assisted Solution

by:Kevin Cross
Kevin Cross earned 166 total points
ID: 22812434
Hopefully you already have the OC4J library downloaded.

Here is the official information on this topic from Oracle:
http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-jndi-intro/doc/how-to-jndi-intro.html
0
 
LVL 59

Expert Comment

by:Kevin Cross
ID: 22812445
Take a look at the Oracle site and give it a try and then post back if you have any specific issues with getting this working.
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 59

Expert Comment

by:Kevin Cross
ID: 22812463
Sorry, chaituu.  That is what happens when I open a question window and don't get to post into it for a few minutes.  I miss someone else posting. :)  Didn't check those links, but would guess they look about the same.
0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 22812487
no problem mwvisa1.i am also checking your links.it will help me and also the author.here we come to share our knowledge.
0
 
LVL 20

Assisted Solution

by:Venabili
Venabili earned 166 total points
ID: 22814590
And I will just ask the very obvious question - why you cannot use JDBC and the Oracle Java driver? Not that the OC4J drivers are not good or that the JNDI way won't work but unless you really have a good reason not to, I would go with the JDBC way...

If you really need the JNDI thing - the guys above gave you wonderful answers.
0
 
LVL 59

Expert Comment

by:Kevin Cross
ID: 22815508
<sidebar at="Venabili">As usual, good point!  Glad to see you.</sidebar>
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now