[wildfly-dev] status attribute for datasources

Jesper Pedersen jesper.pedersen at redhat.com
Mon Oct 20 10:02:18 EDT 2014


On 10/16/2014 11:46 PM, Claudio Miranda wrote:
> Hi, what do you think of adding a "status" attribute for datasources ?
> It should have the same meaning of "status" for deployment.
>
> The deployment have the status attribute, that says if the application
> was properly deployed and is running.
>
> /deployment=jboss-kitchensink.war:read-attribute(name=status)
> {
>      "outcome" => "success",
>      "result" => "FAILED"
> }
>
> However there is no way in CLI mode to ask if a datasource (RA also)
> is working, user must check for exceptions in the log.
>
> The proposal is to add an attribute status to a datasource and RA, it
> will be true if test-connection-in-pool returns true, otherwise false.
> Every moment the datasource configuration changes, a test-connection
> is performed.
>
> I came to this suggestion, as was working for a customer that has 16
> datasources (they are migrating from weblogic) and there were some
> connections errors, but the user was unable to see at once which
> connections failed, they needed to grep log. It would be very useful
> to have this attribute.
>

:test-connection-in-pool may require credentials, so it will only be 
'automatic' in some cases.

You could do your own 'extension' on top of the :test-connection-in-pool 
though.

HTH.

Best regards,
  Jesper



More information about the wildfly-dev mailing list