<xa-datasource jndi-name="java:/exampleDatabase" pool-name="exampleDatabase" enabled="true" use-java-context="true">And presto, the application_name appears in the pg_stat_activity view.
<xa-datasource-property name="ServerName">
example
</xa-datasource-property>
<xa-datasource-property name="PortNumber">
5432
</xa-datasource-property>
<xa-datasource-property name="DatabaseName">
exampledb
</xa-datasource-property>
<xa-datasource-property name="User">
example
</xa-datasource-property>
<xa-datasource-property name="Password">
example
</xa-datasource-property>
<xa-datasource-property name="ApplicationName">
WildFly
</xa-datasource-property>
... snip
</xa-datasource>
dinsdag 14 april 2015
Add ApplicationName to PostgreSQL xa-datasource connection in WildFly 8
It may be obvious, but I spent some time Googling until I finally looked at the sources of org.postgresql.xa.PGXADataSource. Then it occurred to me to simply specifiy it as a xa-datasource-property:
Abonneren op:
Reacties posten (Atom)
Geen opmerkingen:
Een reactie posten