kszbcss / rhq-websphere-plugin

Plugin for RHQ which adds support for WebSphere Application Server
GNU General Public License v2.0
2 stars 1 forks source link

Add feature to reset the DB2 monitor state #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The DB2 monitor keeps DB2SimpleDataSource instances until a configuration 
change in the server is detected. However, DB2SimpleDataSource objects are 
stateful; in particular they contain the client reroute server list.

Certain configuration issues on the DB2 server side (such as a missing 
alternate server name) may cause the client reroute list to become incorrect. 
After a failover, the data source then becomes unusable. This implies that 
every connection test will fail and the resource will be flagged as unavailable 
in RHQ.

In principle, this is desirable because the configuration issue that causes the 
problem for RHQ will also cause a problem for the corresponding data sources in 
WebSphere. By not resetting the DB2SimpleDataSource automatically, we ensure 
that the availability state in RHQ matches the state of the data sources in 
WebSphere.

On the WebSphere side, the issue will be solved by restarting the impacted 
application servers. However, this will not change the status in RHQ and the 
DB2 Monitor resources will continue to be flagged as unavailable.

The obvious solution is to restart the RHQ agent as well, but this may not be 
desirable.

Another solution would be to detect the application server restart and to reset 
the DB2SimpleDataSource. However, this is not possible because 
DB2SimpleDataSource instances are pooled, i.e. a single DB2SimpleDataSource 
will be used in the monitoring of multiple application servers (this is to 
reduce the number of connections to DB2).

The most effective solution is therefore to add a feature that allows to reset 
the state of all DB2 monitors on an agent, so that it is no longer required to 
restart the agent.

Original issue reported on code.google.com by andreas.veithen@gmail.com on 22 Nov 2013 at 1:43