Solved

example java code using jndi to connect to Oracle

Posted on 2008-10-27
10
1,567 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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
micro services vs rest web services 16 106
table example 4 29
spring jars download 1 27
Is Applet the way to go for my drag and drop system? 8 14
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
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 will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

809 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