0 Replies Latest reply on Jan 29, 2004 6:37 PM by steves

    JMX RMI over HTTP

    steves Newbie

      I am trying to convert the chapter 2 ex1xmbean3 example from the JBoss documentation to be RMI over HTTP. I have done 2 things:

      1. Change the mbean tag in jboss-service3.xml to the following:

      <!-- Use the standard JRMPInvoker from conf/jboss-service.xml -->
      jboss:service=invoker,type=http
      http://
      :8080/invoker/JMXInvokerServlet
      true
      secure-xmbean/ClientInterface
      org.jboss.chap2.xmbean.ClientInterface


      ...


      2. In the client code (TextXMBean3.java), I updated the properties for the InitialContext to:

      props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.HttpNamingContextFactory");
      props.put(Context.PROVIDER_URL, "http://sstucki.viacore.net:8080/invoker/JNDIFactory");
      InitialContext ic = new InitialContext(props);


      I get the following error when executing the client:

      run-examplexmbean3:
      [copy] Copying 1 file to D:\jboss-3.2.3\server\default\deploy
      [java] after setPrincipal()
      [java] RuntimeErrorException: Error in MBean operation 'invoke(org.jboss.in
      vocation.Invocation)'
      [java] Cause: java.lang.StackOverflowError
      [java] at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(Refle
      ctedMBeanDispatcher.java:307)
      [java] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.ja
      va:546)
      [java] at org.jboss.invocation.http.server.HttpInvoker.invoke(HttpInvok
      er.java:163)
      [java] at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:25)
      [java] at java.lang.reflect.Method.invoke(Method.java:324)

      What else should I have to do? Are there any examples of RMI over HTTP and HTTPS in a book? I ultimately want this to work over HTTPS.

      Thanks, Steve