HowToSpecifyOracleConnectionProgramProperty

How To Specify "PROGRAM" Oracle Connection Property

 

JBoss Version: JBoss 4.0.3 SP1, Oracle DB Version: 10g

 

To be able to distinguish the JDBC connections on the Oracle server side, which are created by different JBoss instances, Oracle's PROGRAM connection property might be set within the Oracle specific JDBC datasource config file by using the following tags:

 

<connection-property name="v$session.program">ADistinguishedNameForPROGRAMProperty</connection-property>

 

i.e.

 

...
<connection-url>AConnectionURL</connection-url>
<connection-property name="v$session.program">ADistinguishedNameForPROGRAMProperty</connection-property>
<driver-class>oracle.jdbc.OracleDriver</driver-class>
...

 

In case your DataSource is XA you need to add this property:

 

...
<xa-datasource-property name="connectionProperties">v$session.program=YourUniqueName</xa-datasource-property>
...

 

That way the DBAs can have proper granularity in:

  • AWRs
  • v$session view
  • Other tools which are checking/evaluating PROGRAM connection property