This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DataSource and JNDI

 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can I use the Datasource (ConnectionPoolDataSource) without JNDI?
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might find the following link helpful for you...
http://sales.esicom.com/sales/oracle/java.816/a81354/samapp9.htm
 
Sainudheen Mydeen
Ranch Hand
Posts: 218
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know the answer to Pradeep's question. But if that is possible, can't we use the same approach in every place where we use JNDI?
-Sainudheen
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JNDI provides you the location transparency.
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pradeep Bhat:
JNDI provides you the location transparency.

Like it is on your own machine? Just curious...
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ko Ko Naing:
You might find the following link helpful for you...
http://sales.esicom.com/sales/oracle/java.816/a81354/samapp9.htm

In the document Ko Ko posted a link to, there's this code sample:
What struck me in the eye was that this code doesn't specify where the database server is or which database to connect to. Is there some kind of default-to-localhost mechanism in Oracle's JDBC DataSource implementation?
PS. They do have another sample where the server name, port number and database name are explicitly set:
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What struck me in the eye was that this code doesn't specify where the database server is or which database to connect to. Is there some kind of default-to-localhost mechanism in Oracle's JDBC DataSource implementation?


I dont think so.
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lasse Koskela, I think they accidently dropped out in the code... The server name, the database, the protocol and the port number are indispensible, if I am not wrong...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic