here is the desciptor now:
<?xml version="1.0" encoding="UTF-8" ?>
<plugin name="Initiate Hub"
displayName="Initiate Hub JMX Interface"
description="Extends the JMX Plugin to support the Initiate Mbeans"
version="1.13"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:xmlns:rhq-plugin"
xmlns:c="urn:xmlns:rhq-configuration">
<depends plugin="JMX" useClasses="true"/>
<server name="Initiate JMX server"
supportsManualAdd="true"
createDeletePolicy="both">
<runs-inside>
<parent-resource-type name="JMX Server"
plugin="JMX"/>
</runs-inside>
<!-- Initiate services (One service per mbean) -->
<service name="Initiate Interaction MBean"
discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
class="org.rhq.plugins.jmx.MBeanResourceComponent"
description="Initiate interaction metrics">
<plugin-configuration>
<!--
<c:simple-property name="objectName" readOnly="true"
default="com.initiatesystems:service=MPINETEMPI_UAT,category=Listeners,id=16070,type=Interactions,ixn=MEMSEARCH"/>
-->
<c:simple-property name="objectName" readOnly="true"
default="com.initiatesystems:service=%engine%,category=Listeners,id=%port%,type=Interactions,ixn=%interaction%"/>
<c:simple-property name="nameTemplate"
default="{engine}:{port} {interaction}"/>
<c:simple-property name="descriptionTemplate"
default="Initiate Hub {engine} on port {port} Interaction {interaction}"/>
<c:simple-property name="engine" type="string"
description="Engine instance name"/>
<c:simple-property name="port" type="integer"
description="Listener port number"/>
<c:simple-property name="interaction" type="string"
description="Interaction type"/>
</plugin-configuration>
<metric displayName="Audit level for the specific interaction"
etc...
Al Amyot | Consultant
Sierra Systems
(eHealth): 204-926-4257 (T): 204-942-2575 (F): 204-942-2047
444 St. Mary Avenue, Suite 1050
Winnipeg, MB R3C 3T1
Management Consulting | System Integration | Managed Services
website:
www.SierraSystems.com
-----Original Message-----
From: rhq-users-bounces(a)lists.fedorahosted.org
[mailto:rhq-users-bounces@lists.fedorahosted.org] On Behalf Of John Mazzitelli
Sent: Thursday, November 18, 2010 4:07 PM
To: rhq-users(a)lists.fedorahosted.org
Subject: Re: Custom JMX plugin problems
Yeah, but in the custom jmx demo case, that <service> is the top level resource.
In your case, your top level resource (<server name="Initiate JMX
server">) doesn't have the <runs-inside> in it. But your child service
does - which doesn't make sense because the child <service> by definition runs
inside the parent <server> where its declared. We should probably spit out a warning
of some sort if we detect this - I don't think it makes sense to put a
<runs-inside> inside of anything other than a top-level resource.
In fact, our documents allude to this - read here:
http://rhq-project.org/display/RHQ/AMPS-Plugin+Extensions#AMPS-PluginExte...
where it says
"Injection: A root level <server> or <service> can have a
<runs-inside> element. "
Also notice the "For the future" yellow box where it asks if we would want to
allow for a non-root-level type to accept runs-inside.
So while not explicitly saying so, they infer that you can't have runs-inside in
anything other than a root-level (aka top-level) type.
On 11/18/2010 04:57 PM, Al Amyot wrote:
Here's the same section from the Plugin Demo - Writing Custom
JMX
Plugin:
<service name="First Custom Service"
description="Our first MBean custom service whose 'id' is
static"
discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
class="org.rhq.plugins.jmx.MBeanResourceComponent">
<runs-inside>
<parent-resource-type name="JMX Server"
plugin="JMX"/>
<parent-resource-type name="JBossAS Server"
plugin="JBossAS"/>
</runs-inside>
I just followed the above example.
I did find one error but fixing it had no effect:
<c:simple-property name="descriptionTemplate" default="Initiate Hub
{engine} on port {port} Interaction [interaction}"/> should be:
<c:simple-property name="descriptionTemplate" default="Initiate Hub
{engine} on port {port} Interaction {interaction}"/> Notice the
erroneous "["
Al Amyot | Consultant
Sierra Systems
(eHealth): 204-926-4257 (T): 204-942-2575 (F): 204-942-2047
444 St. Mary Avenue, Suite 1050
Winnipeg, MB R3C 3T1
Management Consulting | System Integration | Managed Services
website:
www.SierraSystems.com
-----Original Message-----
From: rhq-users-bounces(a)lists.fedorahosted.org
[mailto:rhq-users-bounces@lists.fedorahosted.org] On Behalf Of John
Mazzitelli
Sent: Thursday, November 18, 2010 3:51 PM
To: rhq-users(a)lists.fedorahosted.org
Subject: Re: Custom JMX plugin problems
The runs inside:
> <runs-inside>
> <parent-resource-type name="JMX Server" plugin="JMX"/>
> </runs-inside>
looks to be out of place no? Shouldn't that be inside the<server>
element, not inside the child<service> element?
Unsure if that's the cause of your problem, but that's the thing that
jumped out at me when I looked.
_______________________________________________
rhq-users mailing list
rhq-users(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/rhq-users
This email and/or any documents in this transmission is intended for
the
addressee(s) only and may contain legally privileged or confidential information. Any
unauthorized use, disclosure, distribution, copying or dissemination is strictly
prohibited. If you receive this transmission in error, please notify the sender
immediately and return the original.
Ce courriel et tout document dans cette transmission est destiné à la personne ou aux
personnes à qui il est adressé. Il peut contenir des informations privilégiées ou
confidentielles. Toute utilisation, divulgation, distribution, copie, ou diffusion non
autorisée est strictement défendue. Si vous n'êtes pas le destinataire de ce message,
veuillez en informer l'expéditeur immédiatement et lui remettre l'original.
_______________________________________________
rhq-users mailing list
rhq-users(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/rhq-users
_______________________________________________
rhq-users mailing list
rhq-users(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/rhq-users
This email and/or any documents in this transmission is intended for the
addressee(s) only and may contain legally privileged or confidential information. Any
unauthorized use, disclosure, distribution, copying or dissemination is strictly
prohibited. If you receive this transmission in error, please notify the sender
immediately and return the original.
Ce courriel et tout document dans cette transmission est destiné à la personne ou aux
personnes à qui il est adressé. Il peut contenir des informations privilégiées ou
confidentielles. Toute utilisation, divulgation, distribution, copie, ou diffusion non
autorisée est strictement défendue. Si vous n'êtes pas le destinataire de ce message,
veuillez en informer l'expéditeur immédiatement et lui remettre l'original.