File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes BEA/Weblogic and the fly likes JNDI lookUp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "JNDI lookUp" Watch "JNDI lookUp" New topic

JNDI lookUp

anvi kon
Ranch Hand

Joined: Jan 08, 2010
Posts: 133

I am getting the data source like below.

I want to know the name of the datasource(for example here EmpDODS)

Do we have any method to get the datasource name like getDataSourceName() which returns a name.?


Ed Ward
Ranch Hand

Joined: Jan 30, 2006
Posts: 147
I don't believe the Sun Java API has anything like that. Seems to me that would be a vendor implemented feature (and optional at that) as javax.sql.DataSource is an interface which must be implemented.
Have a look at the API for whatever vendor driver you are using.
Looks like for Oracle this might be: oracle.jdbc.pool.OracleDataSource.getDataSourceName()

I agree. Here's the link:
subject: JNDI lookUp
It's not a secret anymore!