<?xml version="1.0" encoding="UTF-8"?>

<server>

  <mbean code="org.jboss.test.jmx.invoker.InvokerTest"
	   name="jboss.test:service=InvokerTest">
  </mbean>

   <mbean code="org.jboss.test.jmx.invoker.InvokerTest"
	   name="jboss.test:service=InvokerTest,type=XMBean"
      xmbean-dd="">
      <xmbean>
         <class>org.jboss.test.jmx.invoker.InvokerTest</class>

         <!-- Attributes -->
         <attribute access="read-only" getMethod="getSomething">
            <name>Something</name>
            <type>java.lang.String</type>
         </attribute>
         <attribute access="read-write" getMethod="getCustom" setMethod="setCustom">
            <name>Custom</name>
            <type>org.jboss.test.jmx.invoker.CustomClass</type>
         </attribute>
         <attribute access="read-write"
            getMethod="getNonserializableClass" setMethod="setNonserializableClass">
            <name>NonserializableClass</name>
            <type>org.jboss.test.jmx.invoker.NonserializableClass</type>
         </attribute>
         <attribute access="read-write"
            getMethod="getXml" setMethod="setXml">
            <name>Xml</name>
            <type>org.w3c.dom.Element</type>
         </attribute>

         <!-- Operations -->
         <operation>
            <name>doSomething</name>
            <parameter>
               <name>custom</name>
               <type>org.jboss.test.jmx.invoker.CustomClass</type>
            </parameter>
            <return-type>org.jboss.test.jmx.invoker.CustomClass</return-type>
         </operation>
         <operation>
            <name>doSomething</name>
            <return-type>org.jboss.test.jmx.invoker.CustomClass</return-type>
         </operation>

      </xmbean>
      <attribute name="Xml"><child /></attribute>
   </mbean>

   <mbean code="org.jboss.test.jmx.invoker.InvokerTest"
	   name="jboss.test:service=InvokerTest,secured=true"
      xmbean-dd="">
      <xmbean>
         <descriptors>
            <interceptors>
               <interceptor code="org.jboss.test.jmx.interceptors.PrincipalInterceptor" />
               <interceptor code="org.jboss.mx.interceptor.PersistenceInterceptor2" />
               <interceptor code="org.jboss.mx.interceptor.ModelMBeanInterceptor" />
               <interceptor code="org.jboss.mx.interceptor.ObjectReferenceInterceptor" />
            </interceptors>
         </descriptors>

         <class>org.jboss.test.jmx.invoker.InvokerTest</class>

         <!-- Attributes -->
         <attribute access="read-only" getMethod="getSomething">
            <name>Something</name>
            <type>java.lang.String</type>
         </attribute>
         <attribute access="read-write" getMethod="getCustom" setMethod="setCustom">
            <name>Custom</name>
            <type>org.jboss.test.jmx.invoker.CustomClass</type>
         </attribute>

         <!-- Operations -->
         <operation>
            <name>doSomething</name>
            <parameter>
               <name>custom</name>
               <type>org.jboss.test.jmx.invoker.CustomClass</type>
            </parameter>
            <return-type>org.jboss.test.jmx.invoker.CustomClass</return-type>
         </operation>

      </xmbean>
   </mbean>
   
   <!-- Expose the jmx invoker service interface via HTTP -->
   <mbean code="org.jboss.invocation.http.server.HttpProxyFactory"
      name="jboss.jmx:type=adaptor,name=Invoker,protocol=http,service=proxyFactory">
      <attribute name="InvokerURL">http://${jboss.bind.address:localhost}:8080/invoker/JMXInvokerServlet</attribute>
      <!-- The target MBean is the InvokerAdaptorService configured below -->
      <depends optional-attribute-name="InvokerName">jboss.jmx:type=adaptor,name=Invoker</depends>
      <attribute name="ExportedInterface">org.jboss.jmx.adaptor.rmi.RMIAdaptorExt</attribute>
      <attribute name="JndiName">jmx/invoker/HttpAdaptor</attribute>
      <attribute name="ClientInterceptors">
          <interceptors>
             <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
             <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
             <interceptor>org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor</interceptor>
             <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
          </interceptors>
      </attribute>
   </mbean>
</server>
