This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes

Bug 737175

Summary: as7 plugin: discovery of JBoss AS JVM child Resource fails
Product: [Other] RHQ Project Reporter: Ian Springer <ian.springer>
Component: PluginsAssignee: Libor Zoubek <lzoubek>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: high    
Version: 4.1CC: ccrouch, hrupp, theute
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-04 03:49:10 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 707223    

Description Ian Springer 2011-09-09 15:21:20 EDT
The as7 defines a JBoss AS JVM Resource type, similar to the ones defined by the as4 and as5 plugins:

      <server name="JBoss AS JVM"
              description="JVM of the JBossAS"
              sourceType="JMX Server"
            <parent-resource-type name="JBossAS-Managed"  plugin="jboss-as-7"/>
            <parent-resource-type name="JBossAS7-Standalone"  plugin="jboss-as-7"/>

but discovery of this Resource fails with the following error in the Agent log:

2011-09-09 14:56:04,100 WARN  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Failure during discovery for [JBoss AS JVM] Resources - failed after 1 ms.
java.lang.Exception: Discovery component invocation failed.
	at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$
	at java.util.concurrent.FutureTask$Sync.innerRun(
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
	at java.util.concurrent.ThreadPoolExecutor$
Caused by: java.lang.ClassCastException: org.rhq.modules.plugins.jbossas7.StandaloneASComponent cannot be cast to org.rhq.plugins.jmx.JMXComponent
	at org.rhq.plugins.jmx.EmbeddedJMXServerDiscoveryComponent.discoverResources(
	at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$
	... 5 more

It looks like we'll need to make BaseServerComponent implement JMXComponent in order to make this work.

Additionally, and should be added to the process filters in JMXDiscoveryComponent to prevent the AS7 JVMs from also being discovered as standalone JMX Server Resources.
Comment 1 Heiko W. Rupp 2012-01-13 06:41:52 EST
This dependency on JMX has been ripped out.
Comment 2 Ian Springer 2012-01-13 10:14:16 EST
How will we be able to have a JVM child resource then? I think it's valuable to users to expose all the JVM MBeans (gc, threading, etc.) as we do for AS4/5/6. Let's discuss this some more.
Comment 3 Heiko W. Rupp 2012-03-02 10:27:18 EST
AS7 exposes them via the management API, which the plugin queries.
Comment 5 Heiko W. Rupp 2013-09-04 03:49:10 EDT
Bulk closing of some old issues