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()