Bug 786161 - [jboss-as-5 plugin] Add datasource availability as a trait
Summary: [jboss-as-5 plugin] Add datasource availability as a trait
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 4.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: JON 3.1.0
Assignee: Larry O'Leary
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: jon310-sprint11, rhq44-sprint11 791364
TreeView+ depends on / blocked
 
Reported: 2012-01-31 15:57 UTC by Charles Crouch
Modified: 2018-11-27 21:39 UTC (History)
6 users (show)

Fixed In Version: 4.3
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 791364 (view as bug list)
Environment:
Last Closed: 2013-03-14 15:06:22 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 754861 0 high NEW [RFE] [AS4/AS5/AS6] Availability of Datasource should reflect actual state of connection provided by the Datasource 2022-03-31 04:28:01 UTC
Red Hat Issue Tracker PRODMGT-75 0 Major Closed Availability for Datasource resource of JBoss AS resource should reflect the result of testConnection 2013-08-16 13:16:08 UTC

Internal Links: 754861

Description Charles Crouch 2012-01-31 15:57:17 UTC
This BZ is aimed at implementing part of https://issues.jboss.org/browse/PRODMGT-75

The issue with making availability return the result of the testConnection method is that this would be a heavy weight call (at least in comparison to the usual mbean, profile service checks) that will also use up a database connection every 30seconds, when the availability check is made. It would also return false, showing false down, if the avail check ran when all connections in the pool were in use, and the testConnection method failed.

Instead we should investigate adding a trait, to the various JBAS related datasource resources types, that would be either true/false based on the result of testConnection. A description could be provided on the trait as to how the various scenarios mapped to true/false. This has the advantage over telling the user to create a scheduled operation to call the testConnection method that it could be enabled out of the box, requiring no user setup.

Comment 2 Ian Springer 2012-02-16 20:31:04 UTC
This is done for the as5 plugin:

http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=708c398

A new trait called "Connection Available?" has been added to all five of the datasource and connection factory ResourceTypes. The trait will have a value of "yes" or "no" depending on whether the call to testConnection() returned true or false. By default, the trait will be collected every 15 minutes.

I'll clone this BZ, so we have a separate issue for the equivalent enhancement to the as7 plugin.

Comment 4 bkramer 2012-05-14 15:27:24 UTC
Installed EAP 5.1 server and verified that "Connection Available" trait is available (values *yes* and *no*) with the *Last Changed* column that reflects when this trait was last changed from one value to another.


Note You need to log in before you can comment on or make changes to this bug.