Questo contenuto non è disponibile nella lingua selezionata.
4.5. Examples: Embedded and Injected Plug-in Dependencies
4.5.1. Simple Dependency: JBoss AS and JMX Plug-ins Copia collegamentoCollegamento copiato negli appunti!
Example 4.16. JMX Plug-in Descriptor
<plugin name="JMX">
<server name="JMX Server" discovery="JMXDiscoveryComponent" class="JMXServerComponent">
...
</server>
</plugin>
useClasses argument is set to true), but the JBoss AS plug-in descriptor does not actually define or use any source types related to or referencing the JMX plug-in.
Example 4.17. JBoss AS Plug-in Descriptor
<plugin name="JBossAS">
<depends plugin="JMX" useClasses="true"/>
<server name="JBossAS Server" discovery="JBossASDiscoveryComponent" class="JBossASServerComponent">
...
</server>
</plugin>
4.5.2. Embedded Dependency: JVM MBeanServer and JBoss AS Copia collegamentoCollegamento copiato negli appunti!
Example 4.18. JMX Plug-in Descriptor
<plugin name="JMX">
<server name="JMX Server" discovery="JMXDiscoveryComponent" class="JMXServerComponent">
<service name="VM Memory System"
discovery="MBeanResourceDiscoveryComponent"
class="MBeanResourceComponent"
description="The memory system of the Java virtual machine">
...
</service>
...
</server>
</plugin>
sourcePlugin and sourceType attributes. The reason for this is to run a second JMX discovery scan, this one using the org.rhq.plugins.jmx.EmbeddedJMXServerDiscoveryComponent class to run a special discovery scan looking for a JVM embedded in a JBoss AS instance. The sourcePlugin and sourceType attributes, then, copy the resource type and give it a unique name so that any embedded JVMs are treated as different resource types than standalone JVMs.
Example 4.19. JBoss AS Plug-in Descriptor
<plugin name="JBossAS">
<depends plugin="JMX" useClasses="true"/>
<server name="JBossAS Server" discovery="JBossASDiscoveryComponent" class="JBossASServerComponent">
<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">
...
</server>
...
</server>
</plugin>
4.5.3. Injected Dependency: Hibernate with JVM and JBoss AS Copia collegamentoCollegamento copiato negli appunti!
Figure 4.4. Hibernate, JMX, and JBoss AS Dependencies
Example 4.20. JMX Plug-in Descriptor
<plugin name="JMX">
<server name="JMX Server" discovery="JMXDiscoveryComponent" class="JMXServerComponent">
...
</server>
</plugin>
Example 4.21. JBoss AS Plug-in Descriptor
<plugin name="JBoss AS">
<depends plugin="JMX" useClasses="true"/>
<server name="JBossAS Server" discovery="JBossASDiscoveryComponent" class="JBossASServerComponent">
...
</server>
</plugin>
Example 4.22. Hibernate Plug-in Descriptor
<depends plugin="JMX" useClasses="true"/>
<service name="Hibernate Statistics"
discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent" class="StatisticsComponent">
<runs-inside>
<parent-resource-type name="JMX Server" plugin="JMX"/>
<parent-resource-type name="JBossAS Server" plugin="JBossAS"/>
</runs-inside>
...
</service>
</plugin>