<?xml version="1.0"?>

<!DOCTYPE plugin [
  <!ENTITY sun-jvm-service SYSTEM "/pdk/plugins/sun-jvm-service.xml">
  <!ENTITY process-metrics SYSTEM "/pdk/plugins/process-metrics.xml">
  <!ENTITY cxf-metrics SYSTEM "/pdk/plugins/fuse-webservice-metrics.xml">
  <!ENTITY cxf-services SYSTEM "/pdk/plugins/fuse-webservice-services.xml">
]>

<plugin name="cxf" package="org.hyperic.hq.plugin.cxf">
  <classpath>
    <include name="pdk/lib/mx4j"/>
  </classpath>

  <filter name="template" value="${OBJECT_NAME}:${alias}"/>
  &cxf-metrics;
  <server name="CXF"
          version="2.x">
    <property name="PROC_HOME_PROPERTY"
              value="cxf.home"/>
    <!--<property name="VERSION_FILE"
              value="licenses/wsdl.txt"/>-->
    <property name="VERSION_FILE"
              value="lib/WHICH_JARS"/>

    <property name="DEFAULT_CONF"
              value="etc/web.xml"/>
    <property name="INVENTORY_ID"
              value="cxf-server"/>

    <config>
      <option name="jmx.url" description="JMX URL to MBeanServer" default="service:jmx:rmi:///jndi/rmi://localhost:9914/jmxrmi"/>
      <option name="jmx.username" description="JMX username" optional="true" default="cxf"/>
      <option name="jmx.password" description="JMX password" optional="true" default="cxf" type="secret"/>
      <option name="process.query"
              description="Process Query"
              default="State.Name.eq=java,Args.*.ct=cxf.home"/>
    </config>

    <plugin type="autoinventory"
            class="org.hyperic.hq.product.jmx.MxServerDetector"/>
    <plugin type="measurement"
            class="org.hyperic.hq.product.jmx.MxMeasurementPlugin"/>
    <plugin type="log_track"
            class="org.hyperic.hq.product.Log4JLogTrackPlugin"/>
    <plugin type="config_track"
            class="org.hyperic.hq.product.ConfigFileTrackPlugin"/>

    <metric name="Availability"
            template="sigar:Type=ProcState,Arg=%process.query%:State"
            indicator="true"/>

    &process-metrics;
    &cxf-services;

  </server>

  <server name="CXF"
          version=".x-fuse"
          include="2.x">

    <property name="VERSION_FILE"
              value="lib/cxf-manifest.jar"/>
    <!--<property name="VERSION_FILE"
              value="etc/notices.txt"/>-->

    <plugin type="autoinventory"
            class="org.hyperic.hq.product.jmx.MxServerDetector"/>
  </server>

</plugin>
