This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Using JNDI to look up database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Using JNDI to look up database" Watch "Using JNDI to look up database" New topic
Author

Using JNDI to look up database

vikasids sharma
Ranch Hand

Joined: Aug 01, 2003
Posts: 157
please let me know the means to register and look up persistence storage or database using JNDI
thanks
Vikas


Thanks
Vikas Sharma
SCJP(1.4)
R. Shellbay
Greenhorn

Joined: Sep 19, 2003
Posts: 13
This is not quite my area, but I may help with a few comments.
There are mechanism's in different applicationservers for registering datasources as a jndi resource. This datasource can be used by you by doing a JNDI lookup of that exact datasouce.
There should be several tutorials out there to help you on your way
vikasids sharma
Ranch Hand

Joined: Aug 01, 2003
Posts: 157
thanks Shell bay
but as i know when i create datasource in my application server , i use to mention the name or location of data base here...
ca u tell me while using jndi where do location of database is mentioned?
Originally posted by R. Shellbay:
This is not quite my area, but I may help with a few comments.
There are mechanism's in different applicationservers for registering datasources as a jndi resource. This datasource can be used by you by doing a JNDI lookup of that exact datasouce.
There should be several tutorials out there to help you on your way
vikasids sharma
Ranch Hand

Joined: Aug 01, 2003
Posts: 157
oops i forget to tell that in those cases i use to have database in my domain
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8927

ca u tell me while using jndi where do location of database is mentioned?

Using JDBC URL string in a vendor specific way. check your app ans driver docs for more details.


Groovy
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Using JNDI to look up database
 
It's not a secret anymore!