Bug 737175 - as7 plugin: discovery of JBoss AS JVM child Resource fails
as7 plugin: discovery of JBoss AS JVM child Resource fails
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
4.1
Unspecified Unspecified
high Severity high (vote)
: ---
: ---
Assigned To: Libor Zoubek
Mike Foley
:
Depends On:
Blocks: as7-plugin
  Show dependency treegraph
 
Reported: 2011-09-09 15:21 EDT by Ian Springer
Modified: 2015-11-01 19:42 EST (History)
3 users (show)

See Also:
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: ---


Attachments (Terms of Use)

  None (edit)
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"
              sourcePlugin="JMX"
              sourceType="JMX Server"
              discovery="org.rhq.plugins.jmx.EmbeddedJMXServerDiscoveryComponent"
              class="org.rhq.plugins.jmx.JMXServerComponent"
              singleton="true">
        <runs-inside>
            <parent-resource-type name="JBossAS-Managed"  plugin="jboss-as-7"/>
            <parent-resource-type name="JBossAS7-Standalone"  plugin="jboss-as-7"/>
        </runs-inside>
      </server>


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$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:285)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
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(EmbeddedJMXServerDiscoveryComponent.java:56)
	at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:281)
	... 5 more


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

Additionally, org.jboss.as.standalone and org.jboss.as.host-controller 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

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