-
1. Re: how to get the value of a property in oracle-ds.xml from
weston.price Jul 24, 2006 2:55 PM (in response to hms)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. -
2. Re: how to get the value of a property in oracle-ds.xml from
hms Jul 24, 2006 6:06 PM (in response to hms)Hi,
Price, thanks for your answering,
I just found an easy way to do it,
String url = connection.getMetaData().getUrl();
hms -
3. Re: how to get the value of a property in oracle-ds.xml from
weston.price Jul 24, 2006 6:42 PM (in response to hms)Correct.
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. -
4. Re: how to get the value of a property in oracle-ds.xml from
sankul123 Jun 25, 2008 5:43 PM (in response to hms)Hi Price,
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.
Regards,
Sandeep