• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1581
  • Last Modified:

example java code using jndi to connect to Oracle

Can someone send me a snippet of java code that uses a jndi to connect to an Oracle Database
0
user1146
Asked:
user1146
  • 4
  • 3
3 Solutions
 
chaitu chaituCommented:
0
 
Kevin CrossChief Technology OfficerCommented:
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Kevin CrossChief Technology OfficerCommented:
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
 
Kevin CrossChief Technology OfficerCommented:
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
 
chaitu chaituCommented:
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
 
VenabiliCommented:
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
 
Kevin CrossChief Technology OfficerCommented:
<sidebar at="Venabili">As usual, good point!  Glad to see you.</sidebar>
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now