[wildfly-dev] status attribute for datasources

Claudio Miranda claudio at claudius.com.br
Mon Oct 20 11:45:32 EDT 2014


On Mon, Oct 20, 2014 at 12:02 PM, Jesper Pedersen
<jesper.pedersen at redhat.com> wrote:
> :test-connection-in-pool may require credentials, so it will only be
> 'automatic' in some cases.

Hi Jesper, the purpose is to add a "status" runtime attribute to the
datasource, see my initial post.
Instead of call test-connection-in-pool for every datasource change,
better to rely on current behavior, when application requests a new
connection, the status attribute is populated accordingly to the new
connection call, what do you think ?

This is to improve user experience with wildfly/eap customers, to
quickly see in the web console which datasources failed to open
connections.

------------

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.



-- 
  Claudio Miranda

claudio at claudius.com.br
http://www.claudius.com.br


More information about the wildfly-dev mailing list