I have worked this out and can access the RMIAdaptor from a non-master node.  Here is 
the jboss-service.xml of the jmx-invoker-adaptor-server.sar which was copied from 
deploy to deploy-hasingleton:


  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <!-- $Id: jboss-service.xml,v 1.1.2.9 2004/03/15 08:19:03 ejort Exp $ -->
  | <server>
  | 
  |    <!-- The JRMP invoker proxy configuration for the InvokerAdaptorService -->
  |    <mbean code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
  |       
name="jboss.jmx:type=adaptor,name=SingletonInvoker,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">jboss.jmx:type=adaptor,name=SingletonInvoker</depends>
  |       <!-- Where to bind the RMIAdaptor proxy -->
  |       <attribute name="JndiName">jmx/invoker/SingletonRMIAdaptor</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>
  |    </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="jboss.jmx:type=adaptor,name=SingletonInvoker"
  |       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>
  |             <!-- Uncomment to require authenticated users
  |             <descriptors>
  |                <interceptors>
  |                   <interceptor 
code="org.jboss.jmx.connector.invoker.AuthenticationInterceptor"
  |                      securityDomain="java:/jaas/jmx-console"/>
  |                </interceptors>
  |             </descriptors>
  |             -->
  |          </operation>
  |       </xmbean>
  |       <attribute name="ExportedInterfaces">org.jboss.jmx.adaptor.rmi.RMIAdaptor,
  |          org.jboss.jmx.adaptor.rmi.RMIAdaptorExt
  |       </attribute>
  |    </mbean>
  | 
  |     <!-- HASingletonController to run the above MBean as a singleton -->
  |     <mbean code="org.jboss.ha.singleton.HASingletonController"
  |            name="jboss.hasingleton:service=RMIAdaptorSingletonController">
  |         <depends>jboss:service=DefaultPartition</depends>
  |         <depends>jboss.jmx:type=adaptor,name=SingletonInvoker</depends>
  |         <attribute 
name="TargetName">jboss.jmx:type=adaptor,name=Invoker</attribute>
  |         <attribute name="TargetStartMethod">start</attribute>
  |         <attribute name="TargetStopMethod">stop</attribute>
  |     </mbean>
  | 
  | </server>
  | 

Notice that the original NamingAlias entry was removed, and both the JndiName and name 
of the JRMPProxyFactory were modified.

Now the trouble is not that I can't find the RMIAdaptor, but once I do it complains of 
the wrong number of arguments when I use the RMIAdaptor.invoke() method, even though I 
am using the correct number of arguments as specified on p. 92 of the JBoss 3.2.3 
Admin/Dev Guide.  Here is the offending code:


  |                 // add this user's info to the singleton MBean
  |                 rmiAdaptor.invoke(new 
ObjectName("grover.mbean:service=AllUserInfo"),
  |                                   "addUserInfo",
  |                                   new Object[]{userInfo},
  |                                   new String[]{"com.hsp.grover.util.UserInfo"});
  | 

The error messages I get from JBoss:


  | 2004-10-21 16:33:53,110 ERROR [org.jboss.web.localhost.Engine] 
StandardWrapperValve[GetPreferencesServlet]: 
  | Servlet.service() for servlet GetPreferencesServlet threw exception
  | java.lang.IllegalArgumentException: wrong number of arguments
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:324)
  |         at 
org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:250)
  |         at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
  |         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:324)
  |         at 
org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
  |         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
  |         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  |         at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
  |         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
  |         at 
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:360)
  |         at sun.reflect.GeneratedMethodAccessor74.invoke(Unknown Source)
  |         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:324)
  |         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
  |         at sun.rmi.transport.Transport$1.run(Transport.java:148)
  |         at java.security.AccessController.doPrivileged(Native Method)
  |         at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
  |         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
  |         at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
  |         at java.lang.Thread.run(Thread.java:534)
  |         at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
  |         at 
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
  |         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
  |         at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
  |         at 
org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:135)
  |         at 
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:96)
  |         at 
org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor.invoke(InvokerAdaptorClientInterceptor.java:58)
  |         at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:53)
  |         at 
org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:55)
  |         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
  |         at $Proxy202.invoke(Unknown Source)
  |         at 
com.harborsideplus.grover.servlet.GetPreferencesServlet.doGet(GetPreferencesServlet.java:307)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  |         at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
  |         at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
  |         at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
  |         at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
  |         at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
  |         at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
  |         at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
  |         at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
  |         at 
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:72)
  |         at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
  |         at 
org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:275)
  |         at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
  |         at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
  |         at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
  |         at 
org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:78)
  |         at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
  |         at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
  |         at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
  |         at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
  |         at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
  |         at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
  |         at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
  |         at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  |         at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
  |         at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
  |         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
  |         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
  |         at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
  |         at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
  |         at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
  |         at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
  |         at java.lang.Thread.run(Thread.java:534)
  | 

It is quite strange because I have used the RMIAdaptor.invoke() method a few lines 
earlier in this doGet() with no errors using the same number and type of arguments.

Does anyone have any ideas as to why this is happening ?  


--James

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3852266#3852266

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3852266


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to