[jboss-cvs] JBossAS SVN: r66870 - in branches/JBoss_4_0_5_GA_CP: server/src/main/org/jboss/jmx/connector/invoker/serializablepolicy and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Nov 8 12:11:23 EST 2007


Author: darran.lofthouse at jboss.com
Date: 2007-11-08 12:11:22 -0500 (Thu, 08 Nov 2007)
New Revision: 66870

Added:
   branches/JBoss_4_0_5_GA_CP/server/src/main/org/jboss/jmx/connector/invoker/SerializableInterceptor.java
   branches/JBoss_4_0_5_GA_CP/server/src/main/org/jboss/jmx/connector/invoker/SerializablePolicy.java
   branches/JBoss_4_0_5_GA_CP/server/src/main/org/jboss/jmx/connector/invoker/serializablepolicy/
   branches/JBoss_4_0_5_GA_CP/server/src/main/org/jboss/jmx/connector/invoker/serializablepolicy/StripModelMBeanInfoPolicy.java
   branches/JBoss_4_0_5_GA_CP/testsuite/src/main/org/jboss/test/jmx/test/ASPATCH317TestCase.java
   branches/JBoss_4_0_5_GA_CP/testsuite/src/resources/jmx/aspatch317/
   branches/JBoss_4_0_5_GA_CP/testsuite/src/resources/jmx/aspatch317/aspatch317-invoker-service.xml
Removed:
   branches/JBoss_4_0_5_GA_CP/server/src/main/org/jboss/jmx/connector/invoker/serializablepolicy/StripModelMBeanInfoPolicy.java
Modified:
   branches/JBoss_4_0_5_GA_CP/server/src/resources/jmx-invoker-adaptor/META-INF/jboss-service.xml
   branches/JBoss_4_0_5_GA_CP/testsuite/imports/sections/jmx.xml
Log:
[ASPATCH-317] Backport XMBean Interceptor for InvokerAdaptorService to deal with NonSerializableExceptions.

Copied: branches/JBoss_4_0_5_GA_CP/server/src/main/org/jboss/jmx/connector/invoker/SerializableInterceptor.java (from rev 59449, branches/Branch_4_2/server/src/main/org/jboss/jmx/connector/invoker/SerializableInterceptor.java)
===================================================================
--- branches/JBoss_4_0_5_GA_CP/server/src/main/org/jboss/jmx/connector/invoker/SerializableInterceptor.java	                        (rev 0)
+++ branches/JBoss_4_0_5_GA_CP/server/src/main/org/jboss/jmx/connector/invoker/SerializableInterceptor.java	2007-11-08 17:11:22 UTC (rev 66870)
@@ -0,0 +1,100 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jmx.connector.invoker;
+
+import org.jboss.invocation.MarshalledInvocation;
+import org.jboss.mx.interceptor.AbstractInterceptor;
+import org.jboss.mx.server.Invocation;
+
+/**
+ * An interceptor that validates the Serializability of responses,
+ * using plugable policies. 
+ * 
+ * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
+ * @author <a href="mailto:fabcipriano at yahoo.com.br">Fabiano C. de Oliveira</a>
+ * @version $Revision: 57209 $
+ */
+public class SerializableInterceptor extends AbstractInterceptor
+{   
+   /** The plugable policy to use */
+   private SerializablePolicy policy = new NoopPolicy();
+   
+   /**
+    * Configure a SerializablePolicy class
+    */
+   public void setPolicyClass(String policyClass) throws Exception
+   {
+      try
+      {
+         // try to load the policy Class
+         Class clazz = Thread.currentThread().getContextClassLoader().loadClass(policyClass);
+         policy = (SerializablePolicy)clazz.newInstance();
+      }
+      catch (Exception e) // ClassNotFoundException, IllegalAccessException, InstantiationException
+      {
+         // policy class not found. Make a second try using
+         // the 'org.jboss.jmx.connector.invoker.serializablepolicy.' package prefix
+         // for the "standard" reponse policies provided with jboss.
+         // If that fails, too, rethrow the original exception.
+         try
+         {
+            policyClass = "org.jboss.jmx.connector.invoker.serializablepolicy." + policyClass;
+            Class clazz = Thread.currentThread().getContextClassLoader().loadClass(policyClass);
+            policy = (SerializablePolicy)clazz.newInstance();
+         }
+         catch (Exception inner)
+         {
+            throw e;
+         }
+      }
+   }
+
+   public Object invoke(Invocation invocation) throws Throwable
+   {
+      // Invoke the next in the sequence
+      Object result = invocation.nextInterceptor().invoke(invocation);
+      
+      // If the invocation was an 'invoke(MarshalledInvocation)'
+      // filter the result using the plugable policy
+      if ("invoke".equals(invocation.getName()))
+      {
+         Object[] args = invocation.getArgs();
+         if ((args.length == 1) && (args[0] instanceof MarshalledInvocation))
+         {
+            MarshalledInvocation mi = (MarshalledInvocation) args[0];
+            result = policy.filter(mi, result);
+         }
+      }
+      return result;
+   }
+   
+   /**
+    * A noop serializable policy
+    */
+   public class NoopPolicy implements SerializablePolicy
+   {
+      public Object filter(MarshalledInvocation input, Object result) throws Throwable
+      {
+         return result;
+      }
+   }
+}
\ No newline at end of file

Copied: branches/JBoss_4_0_5_GA_CP/server/src/main/org/jboss/jmx/connector/invoker/SerializablePolicy.java (from rev 59449, branches/Branch_4_2/server/src/main/org/jboss/jmx/connector/invoker/SerializablePolicy.java)
===================================================================
--- branches/JBoss_4_0_5_GA_CP/server/src/main/org/jboss/jmx/connector/invoker/SerializablePolicy.java	                        (rev 0)
+++ branches/JBoss_4_0_5_GA_CP/server/src/main/org/jboss/jmx/connector/invoker/SerializablePolicy.java	2007-11-08 17:11:22 UTC (rev 66870)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jmx.connector.invoker;
+
+import org.jboss.invocation.MarshalledInvocation;
+
+/**
+ * A serializable policy that filters results to avoid Serialization problems.
+ * 
+ * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
+ * @author <a href="mailto:fabcipriano at yahoo.com.br">Fabiano C. de Oliveira</a>
+ * @version $Revision: 57209 $
+ */
+public interface SerializablePolicy
+{   
+   public Object filter(MarshalledInvocation input, Object result) throws Throwable;
+}

Copied: branches/JBoss_4_0_5_GA_CP/server/src/main/org/jboss/jmx/connector/invoker/serializablepolicy (from rev 59449, branches/Branch_4_2/server/src/main/org/jboss/jmx/connector/invoker/serializablepolicy)

Deleted: branches/JBoss_4_0_5_GA_CP/server/src/main/org/jboss/jmx/connector/invoker/serializablepolicy/StripModelMBeanInfoPolicy.java
===================================================================
--- branches/Branch_4_2/server/src/main/org/jboss/jmx/connector/invoker/serializablepolicy/StripModelMBeanInfoPolicy.java	2007-01-09 19:08:00 UTC (rev 59449)
+++ branches/JBoss_4_0_5_GA_CP/server/src/main/org/jboss/jmx/connector/invoker/serializablepolicy/StripModelMBeanInfoPolicy.java	2007-11-08 17:11:22 UTC (rev 66870)
@@ -1,73 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jmx.connector.invoker.serializablepolicy;
-
-import javax.management.MBeanAttributeInfo;
-import javax.management.MBeanInfo;
-import javax.management.modelmbean.ModelMBeanInfo;
-
-import org.jboss.invocation.MarshalledInvocation;
-import org.jboss.jmx.connector.invoker.SerializablePolicy;
-
-/**
- * A policy that converts ModelMBeanInfo to MBeanInfo.
- * 
- * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
- * @author <a href="mailto:fabcipriano at yahoo.com.br">Fabiano C. de Oliveira</a>
- * @version $Revision: 57209 $
- */
-public class StripModelMBeanInfoPolicy implements SerializablePolicy
-{   
-   public Object filter(MarshalledInvocation input, Object result) throws Throwable
-   {
-      if ("getMBeanInfo".equals(input.getMethod().getName()) && (result instanceof ModelMBeanInfo))
-      {
-         MBeanInfo info = (MBeanInfo)result;
-
-         result = new MBeanInfo(
-               info.getClassName(),
-               info.getDescription(),
-               deepCopy(info.getAttributes()), // Strip the Descriptors
-               info.getConstructors(),
-               info.getOperations(),
-               info.getNotifications());
-      }
-      return result;
-   }
-   
-   private MBeanAttributeInfo[] deepCopy(MBeanAttributeInfo[] attrs)
-   {
-      MBeanAttributeInfo[] copy = new MBeanAttributeInfo[attrs.length];
-      for (int i = 0; i < attrs.length; i++)
-      {
-         MBeanAttributeInfo attr = attrs[i];
-         copy[i] = new MBeanAttributeInfo(
-               attr.getName(),
-               attr.getType(),
-               attr.getDescription(),
-               attr.isReadable(),
-               attr.isWritable(),
-               attr.isIs());
-      }
-      return copy;
-   }
-}

Copied: branches/JBoss_4_0_5_GA_CP/server/src/main/org/jboss/jmx/connector/invoker/serializablepolicy/StripModelMBeanInfoPolicy.java (from rev 59449, branches/Branch_4_2/server/src/main/org/jboss/jmx/connector/invoker/serializablepolicy/StripModelMBeanInfoPolicy.java)
===================================================================
--- branches/JBoss_4_0_5_GA_CP/server/src/main/org/jboss/jmx/connector/invoker/serializablepolicy/StripModelMBeanInfoPolicy.java	                        (rev 0)
+++ branches/JBoss_4_0_5_GA_CP/server/src/main/org/jboss/jmx/connector/invoker/serializablepolicy/StripModelMBeanInfoPolicy.java	2007-11-08 17:11:22 UTC (rev 66870)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jmx.connector.invoker.serializablepolicy;
+
+import javax.management.MBeanAttributeInfo;
+import javax.management.MBeanInfo;
+import javax.management.modelmbean.ModelMBeanInfo;
+
+import org.jboss.invocation.MarshalledInvocation;
+import org.jboss.jmx.connector.invoker.SerializablePolicy;
+
+/**
+ * A policy that converts ModelMBeanInfo to MBeanInfo.
+ * 
+ * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
+ * @author <a href="mailto:fabcipriano at yahoo.com.br">Fabiano C. de Oliveira</a>
+ * @version $Revision: 57209 $
+ */
+public class StripModelMBeanInfoPolicy implements SerializablePolicy
+{   
+   public Object filter(MarshalledInvocation input, Object result) throws Throwable
+   {
+      if ("getMBeanInfo".equals(input.getMethod().getName()) && (result instanceof ModelMBeanInfo))
+      {
+         MBeanInfo info = (MBeanInfo)result;
+
+         result = new MBeanInfo(
+               info.getClassName(),
+               info.getDescription(),
+               deepCopy(info.getAttributes()), // Strip the Descriptors
+               info.getConstructors(),
+               info.getOperations(),
+               info.getNotifications());
+      }
+      return result;
+   }
+   
+   private MBeanAttributeInfo[] deepCopy(MBeanAttributeInfo[] attrs)
+   {
+      MBeanAttributeInfo[] copy = new MBeanAttributeInfo[attrs.length];
+      for (int i = 0; i < attrs.length; i++)
+      {
+         MBeanAttributeInfo attr = attrs[i];
+         copy[i] = new MBeanAttributeInfo(
+               attr.getName(),
+               attr.getType(),
+               attr.getDescription(),
+               attr.isReadable(),
+               attr.isWritable(),
+               attr.isIs());
+      }
+      return copy;
+   }
+}

Modified: branches/JBoss_4_0_5_GA_CP/server/src/resources/jmx-invoker-adaptor/META-INF/jboss-service.xml
===================================================================
--- branches/JBoss_4_0_5_GA_CP/server/src/resources/jmx-invoker-adaptor/META-INF/jboss-service.xml	2007-11-08 16:54:18 UTC (rev 66869)
+++ branches/JBoss_4_0_5_GA_CP/server/src/resources/jmx-invoker-adaptor/META-INF/jboss-service.xml	2007-11-08 17:11:22 UTC (rev 66870)
@@ -109,16 +109,24 @@
                <type>org.jboss.invocation.Invocation</type>
             </parameter>
             <return-type>java.lang.Object</return-type>
-            <!-- Uncomment to require authenticated users
             <descriptors>
                <interceptors>
+                  <!-- Uncomment to require authenticated users
                   <interceptor code="org.jboss.jmx.connector.invoker.AuthenticationInterceptor"
                      securityDomain="java:/jaas/jmx-console"/>
+                  -->  
+				                
+                  <!-- 
+                       Uncomment to enable Interceptor that deals with 
+                       non-serializable results.					  
+                  <interceptor code="org.jboss.jmx.connector.invoker.SerializableInterceptor"
+                     policyClass="StripModelMBeanInfoPolicy"/>
+				  -->
                </interceptors>
-            </descriptors>
-            -->
+            </descriptors>            
          </operation>
       </xmbean>
+      
       <attribute name="ExportedInterfaces">org.jboss.jmx.adaptor.rmi.RMIAdaptor,
          org.jboss.jmx.adaptor.rmi.RMIAdaptorExt
       </attribute>

Modified: branches/JBoss_4_0_5_GA_CP/testsuite/imports/sections/jmx.xml
===================================================================
--- branches/JBoss_4_0_5_GA_CP/testsuite/imports/sections/jmx.xml	2007-11-08 16:54:18 UTC (rev 66869)
+++ branches/JBoss_4_0_5_GA_CP/testsuite/imports/sections/jmx.xml	2007-11-08 17:11:22 UTC (rev 66870)
@@ -773,5 +773,10 @@
             <include name="org/jboss/test/jmx/mbean/Temp**"/>
          </fileset>
       </jar>
+	   
+	  <!-- ASPATCH-317 -->
+      <copy todir="${build.lib}"
+            file="${build.resources}/jmx/aspatch317/aspatch317-invoker-service.xml">
+      </copy>	   
    </target>
 </project>

Added: branches/JBoss_4_0_5_GA_CP/testsuite/src/main/org/jboss/test/jmx/test/ASPATCH317TestCase.java
===================================================================
--- branches/JBoss_4_0_5_GA_CP/testsuite/src/main/org/jboss/test/jmx/test/ASPATCH317TestCase.java	                        (rev 0)
+++ branches/JBoss_4_0_5_GA_CP/testsuite/src/main/org/jboss/test/jmx/test/ASPATCH317TestCase.java	2007-11-08 17:11:22 UTC (rev 66870)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.jmx.test;
+
+import javax.management.MBeanInfo;
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+
+/** 
+ * Test the 'SerializableInterceptor' for remote JMX
+ * invocations.
+ *
+ * @author darran.lofthouse at jboss.com
+ */
+public class ASPATCH317TestCase extends JBossTestCase
+{
+
+   public ASPATCH317TestCase(String name)
+   {
+      super(name);
+   }
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(ASPATCH317TestCase.class, "aspatch317-invoker-service.xml");
+   }
+
+   public void testCallRMIAdaptor() throws Exception
+   {
+      MBeanServerConnection server;
+      server = (MBeanServerConnection) new InitialContext().lookup("jmx/rmi/RMIAdaptor");
+      ObjectName on = new ObjectName("jboss.deployment:type=DeploymentScanner,flavor=URL");
+
+      try
+      {
+         MBeanInfo info = server.getMBeanInfo(on);
+         fail("Expected exception not thrown");
+      }
+      catch (Exception ignored)
+      {
+         // We do expect an exception to be thrown as for
+         // backwards compatibility the interceptor should
+         // not be enabled by default.
+      }
+
+   }
+
+   public void testCallASPATCHRMIAdaptor() throws Exception
+   {
+      MBeanServerConnection server;
+      server = (MBeanServerConnection) new InitialContext().lookup("ASPATCH-317/invoker/RMIAdaptor");
+      ObjectName on = new ObjectName("jboss.deployment:type=DeploymentScanner,flavor=URL");
+      MBeanInfo info = server.getMBeanInfo(on);
+
+      assertNotNull(info);
+   }
+
+}


Property changes on: branches/JBoss_4_0_5_GA_CP/testsuite/src/main/org/jboss/test/jmx/test/ASPATCH317TestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/JBoss_4_0_5_GA_CP/testsuite/src/resources/jmx/aspatch317/aspatch317-invoker-service.xml
===================================================================
--- branches/JBoss_4_0_5_GA_CP/testsuite/src/resources/jmx/aspatch317/aspatch317-invoker-service.xml	                        (rev 0)
+++ branches/JBoss_4_0_5_GA_CP/testsuite/src/resources/jmx/aspatch317/aspatch317-invoker-service.xml	2007-11-08 17:11:22 UTC (rev 66870)
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id:$ -->
+<server>
+
+   <!-- The JRMP invoker proxy configuration for the InvokerAdaptorService -->
+   <mbean code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
+      name="ASPATCH-317.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory">
+      <!-- Use the standard JRMPInvoker from conf/jboss-service.xxml -->
+      <depends optional-attribute-name="InvokerName">jboss:service=invoker,type=jrmp</depends>
+      <!-- The target MBean is the InvokerAdaptorService configured below -->
+      <depends optional-attribute-name="TargetName">ASPATCH-317.jmx:type=adaptor,name=Invoker</depends>
+      <!-- Where to bind the RMIAdaptor proxy -->
+      <attribute name="JndiName">ASPATCH-317/invoker/RMIAdaptor</attribute>
+      <!-- The RMI compabitle MBeanServer interface -->
+      <attribute name="ExportedInterfaces">org.jboss.jmx.adaptor.rmi.RMIAdaptor,
+         org.jboss.jmx.adaptor.rmi.RMIAdaptorExt
+      </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>
+      <depends>jboss:service=Naming</depends>
+   </mbean>
+
+   <!-- This is the service that handles the RMIAdaptor invocations by routing
+   them to the MBeanServer the service is deployed under.  -->
+   <mbean code="org.jboss.jmx.connector.invoker.InvokerAdaptorService"
+          name="ASPATCH-317.jmx:type=adaptor,name=Invoker"
+      xmbean-dd="">
+      <xmbean>
+         <description>The JMX Detached Invoker Service</description>
+         <class>org.jboss.jmx.connector.invoker.InvokerAdaptorService</class>
+
+         <!-- Attributes -->
+         <attribute access="read-only" getMethod="getName">
+            <description>The class name of the MBean</description>
+            <name>Name</name>
+            <type>java.lang.String</type>
+         </attribute>
+         <attribute access="read-only" getMethod="getState">
+            <description>The status of the MBean</description>
+            <name>State</name>
+            <type>int</type>
+         </attribute>
+         <attribute access="read-only" getMethod="getStateString">
+         <description>The status of the MBean in text form</description>
+            <name>StateString</name>
+            <type>java.lang.String</type>
+         </attribute>
+         <attribute access="read-write" getMethod="getExportedInterfaces" setMethod="setExportedInterfaces">
+            <description>The interfaces the invoker proxy supports</description>
+            <name>ExportedInterfaces</name>
+            <type>[Ljava.lang.Class;</type>
+         </attribute>
+         <attribute access="read-only" getMethod="getMethodMap">
+            <description>Map(Long hash, Method) of the proxy interface methods</description>
+            <name>MethodMap</name>
+            <type>java.util.Map</type>
+         </attribute>
+         <!-- Operations -->
+         <operation>
+            <description>The start lifecycle operation</description>
+            <name>start</name>
+         </operation>
+         <operation>
+            <description>The stop lifecycle operation</description>
+            <name>stop</name>
+         </operation>
+         <operation>
+            <description>The detyped lifecycle operation (for internal use only)</description>
+            <name>jbossInternalLifecycle</name>
+            <parameter>
+               <description>The lifecycle operation</description>
+               <name>method</name>
+               <type>java.lang.String</type>
+            </parameter>
+            <return-type>void</return-type>
+         </operation>
+
+         <operation>
+            <description>The detached invoker entry point</description>
+            <name>invoke</name>
+            <parameter>
+               <description>The method invocation context</description>
+               <name>invocation</name>
+               <type>org.jboss.invocation.Invocation</type>
+            </parameter>
+            <return-type>java.lang.Object</return-type>
+            <descriptors>
+               <interceptors>
+                  <!-- Uncomment to require authenticated users
+                  <interceptor code="org.jboss.jmx.connector.invoker.AuthenticationInterceptor"
+                     securityDomain="java:/jaas/jmx-console"/>
+                  -->               
+                  <!-- Interceptor that deals with non-serializable results -->
+                  <interceptor code="org.jboss.jmx.connector.invoker.SerializableInterceptor"
+                     policyClass="StripModelMBeanInfoPolicy"/>
+               </interceptors>
+            </descriptors>            
+         </operation>
+      </xmbean>
+      
+      <attribute name="ExportedInterfaces">org.jboss.jmx.adaptor.rmi.RMIAdaptor,
+         org.jboss.jmx.adaptor.rmi.RMIAdaptorExt
+      </attribute>
+   </mbean>
+
+</server>


Property changes on: branches/JBoss_4_0_5_GA_CP/testsuite/src/resources/jmx/aspatch317/aspatch317-invoker-service.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jboss-cvs-commits mailing list