Bug 737175 - as7 plugin: discovery of JBoss AS JVM child Resource fails
Summary: as7 plugin: discovery of JBoss AS JVM child Resource fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 4.1
Hardware: Unspecified
OS: Unspecified
high
high vote
Target Milestone: ---
: ---
Assignee: Libor Zoubek
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: as7-plugin
TreeView+ depends on / blocked
 
Reported: 2011-09-09 19:21 UTC by Ian Springer
Modified: 2015-11-02 00:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-04 07:49:10 UTC


Attachments (Terms of Use)

Description Ian Springer 2011-09-09 19:21:20 UTC
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 11:41:52 UTC
This dependency on JMX has been ripped out.

Comment 2 Ian Springer 2012-01-13 15:14:16 UTC
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 15:27:18 UTC
AS7 exposes them via the management API, which the plugin queries.

Comment 5 Heiko W. Rupp 2013-09-04 07:49:10 UTC
Bulk closing of some old issues


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