Solved

example java code using jndi to connect to Oracle

Posted on 2008-10-27
10
1,569 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 60

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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 60

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
 
LVL 60

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 60

Expert Comment

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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
runtime exception 2 67
null output 3 59
Java Restore security prompts not working 10 271
Java ArrayList and if statement 2 55
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

710 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