<br><font size=2 face="sans-serif">Hi, </font>
<br>
<br><font size=2 face="sans-serif">with JMX i can retrieve the properties
of a managed (database) connection:</font>
<br>
<br><font size=2 face="Courier New">&nbsp; &nbsp; </font><font size=2 color=#820040 face="Courier New"><b>private</b></font><font size=2 face="Courier New">
Element getManagedConnectionFactoryProperties(</font><font size=2 color=#820040 face="Courier New"><b>final</b></font><font size=2 face="Courier New">
MBeanServerConnection server, </font><font size=2 color=#820040 face="Courier New"><b>final</b></font><font size=2 face="Courier New">
String jndiName)</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=#820040 face="Courier New"><b>throws</b></font><font size=2 face="Courier New">
Exception</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; {</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; String
objectNameParam = </font><font size=2 color=#4200ff face="Courier New">&quot;jboss.jca:service=ManagedConnectionFactory,name=&quot;</font><font size=2 face="Courier New">
+ jndiName;</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; ObjectName
oJdbc = </font><font size=2 color=#820040 face="Courier New"><b>new</b></font><font size=2 face="Courier New">
ObjectName(objectNameParam);</font>
<br>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=#820040 face="Courier New"><b>return</b></font><font size=2 face="Courier New">
(Element) server.getAttribute(oJdbc, </font><font size=2 color=#4200ff face="Courier New">&quot;ManagedConnectionFactoryProperties&quot;</font><font size=2 face="Courier New">);</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; }</font>
<br>
<br><font size=2 face="sans-serif">The &quot;element&quot; looks like:</font>
<br>
<br><font size=2 face="Courier New">&nbsp;</font><font size=2 color=#4040c2 face="Courier New">*</font><font size=2 face="Courier New">
</font><font size=2 color=#8f8f8f face="Courier New">&lt;properties&gt;</font>
<br><font size=2 face="Courier New">&nbsp;</font><font size=2 color=#4040c2 face="Courier New">*</font><font size=2 face="Courier New">
&nbsp; &nbsp;</font><font size=2 color=#4040c2 face="Courier New">&lt;config-property
name='ConnectionURL' type='java.lang.String'&gt;jdbc:db2://10.9.33.186:50001/cams181u&lt;/config-property&gt;</font>
<br><font size=2 face="Courier New">&nbsp;</font><font size=2 color=#4040c2 face="Courier New">*</font><font size=2 face="Courier New">
&nbsp; &nbsp;</font><font size=2 color=#4040c2 face="Courier New">&lt;config-property
name='DriverClass' type='java.lang.String'&gt;com.ibm.db2.jcc.DB2Driver&lt;/config-property&gt;</font>
<br><font size=2 face="Courier New">&nbsp;</font><font size=2 color=#4040c2 face="Courier New">*</font><font size=2 face="Courier New">
&nbsp; &nbsp;</font><font size=2 color=#4040c2 face="Courier New">&lt;config-property
name='UserName' type='java.lang.String'&gt;camsuser&lt;/config-property&gt;</font>
<br><font size=2 face="Courier New">&nbsp;</font><font size=2 color=#4040c2 face="Courier New">*</font><font size=2 face="Courier New">
&nbsp; &nbsp;</font><font size=2 color=#4040c2 face="Courier New">&lt;config-property
name='Password' type='java.lang.String'&gt;camsuser&lt;/config-property&gt;</font>
<br><font size=2 face="Courier New">&nbsp;</font><font size=2 color=#4040c2 face="Courier New">*</font><font size=2 face="Courier New">
&nbsp; &nbsp;</font><font size=2 color=#4040c2 face="Courier New">&lt;config-property
name='CheckValidConnectionSQL' type='java.lang.String'&gt;select</font><font size=2 face="Courier New">
</font><font size=2 color=#4040c2 face="Courier New">1</font><font size=2 face="Courier New">
</font><font size=2 color=#4040c2 face="Courier New">from</font><font size=2 face="Courier New">
</font><font size=2 color=#4040c2 face="Courier New">SYSIBM.SYSDUMMY1&lt;/config-property&gt;</font>
<br><font size=2 face="Courier New">&nbsp;</font><font size=2 color=#4040c2 face="Courier New">*</font><font size=2 face="Courier New">
&nbsp; &nbsp;</font><font size=2 color=#4040c2 face="Courier New">&lt;config-property
name='TrackStatements' type='java.lang.String'&gt;false&lt;/config-property&gt;</font>
<br><font size=2 face="Courier New">&nbsp;</font><font size=2 color=#4040c2 face="Courier New">*</font><font size=2 face="Courier New">
&nbsp; &nbsp;</font><font size=2 color=#4040c2 face="Courier New">&lt;config-property
name='ValidateOnMatch' type='boolean'&gt;true&lt;/config-property&gt;</font>
<br><font size=2 face="Courier New">&nbsp;</font><font size=2 color=#4040c2 face="Courier New">*</font><font size=2 face="Courier New">
&nbsp; &nbsp;</font><font size=2 color=#4040c2 face="Courier New">&lt;config-property
name='ConnectionProperties' type='java.lang.String'&gt;</font>
<br><font size=2 face="Courier New">&nbsp;</font><font size=2 color=#4040c2 face="Courier New">*</font><font size=2 face="Courier New">
&nbsp; &nbsp; &nbsp;</font><font size=2 color=#4040c2 face="Courier New">progressiveStreaming=2</font>
<br><font size=2 face="Courier New">&nbsp;</font><font size=2 color=#4040c2 face="Courier New">*</font><font size=2 face="Courier New">
&nbsp; &nbsp; &nbsp;</font><font size=2 color=#4040c2 face="Courier New">currentSchema=CAMSSCHEMA</font>
<br><font size=2 face="Courier New">&nbsp;</font><font size=2 color=#4040c2 face="Courier New">*</font><font size=2 face="Courier New">
&nbsp; &nbsp; &nbsp;</font><font size=2 color=#4040c2 face="Courier New">currentFunctionPath=&amp;quot;SYSIBM&amp;quot;,&amp;quot;SYSFUN&amp;quot;,&amp;quot;SYSPROC&amp;quot;,&amp;quot;SYSIBMADM&amp;quot;,&amp;quot;CAMSSCHEMA&amp;quot;</font>
<br><font size=2 face="Courier New">&nbsp;</font><font size=2 color=#4040c2 face="Courier New">*</font><font size=2 face="Courier New">
&nbsp; &nbsp; &nbsp;</font><font size=2 color=#4040c2 face="Courier New">progressiveStreaming=2</font>
<br><font size=2 face="Courier New">&nbsp;</font><font size=2 color=#4040c2 face="Courier New">*</font><font size=2 face="Courier New">
&nbsp; &nbsp;</font><font size=2 color=#4040c2 face="Courier New">&lt;/config-property&gt;</font>
<br><font size=2 face="Courier New">&nbsp;</font><font size=2 color=#4040c2 face="Courier New">*</font><font size=2 face="Courier New">
</font><font size=2 color=#8f8f8f face="Courier New">&lt;/properties&gt;</font>
<br>
<br><font size=2 face="sans-serif"><b>Is there a common class availabe
I could pass this Element, and access the config-property values with get...()
methods?</b></font>
<br><font size=2 face="sans-serif"><b>Or do I need to write my own DOM
parsing, using XPath for example?</b></font>
<br>
<br><font size=2 face="sans-serif"><b>Thanx, Torsten</b></font>