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.?
posted 5 years ago
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()