Currently there is no way to do this from the JDBC api. You could probably call
getUnderlyingConnection() on the connection retrieved from the DataSource, but you would have to cast it to the appropriate type. In this case, Oracle.
At that point, the underlying OracleConnection would have to provide a way to retrieve underlying properties.
The other way to do it would be via JMX and query the ConnectionFactory for the particular attribute you are interested in reading. Easiest way to do it would be to proxy the underlying RARDeployment MBean and execute the getManagedConnectionFactoryAttribute() operation.
Finally, you could always just read the *-ds.xml file using JAXP and look for the property you want.
Price, thanks for your answering,
I just found an easy way to do it,
String url = connection.getMetaData().getUrl();
Your initial post seemed like you wanted to do this prior to making a connection to the DB, as if you wanted to perform some logic prior to making a connection.
Is there any Jboss API through JMX , from which we can update the connection parameters already set in ds.xml and get conn object according to new set connection parameters.