2 Replies Latest reply on Nov 5, 2008 11:48 PM by Ron Sigal

    remoting-jboss-beans.xml

    Ron Sigal Master

      I'm working on moving the Remoting related stuff in AS from deploy/remoting-service.xml to deploy/remoting-jboss-beans.xml, and I have a few questions. A skeletal version of remoting-jboss-beans.xml is appended below.

      1. Currently, an instance of org.jboss.remoting.network.NetworkRegistry is created, but I don't think we need it.

      a. NetworkRegistry is used by an instance of a subclass of org.jboss.remoting.detection.AbstractDetector to store information about known instances of org.jboss.remoting.transport.Connector. But the JNDIDetector in remoting-service.xml is commented out by default.

      b. It looks like the only part of the Application Server that uses the Remoting detection service is Tom's jmx-remoting package, which, I believe, is used only in the presence of jdk 1.4, which should never apply to AS 5.

      I checked with Tom, and his memory was a little fuzzy but he thought I was right. Does anyone remember how jboss-service.xml happened to have a NetworkRegistry and no JNDIDetector?

      2. If I understand correctly, setting "registerDirectly" to "false" in org.jboss.aop.microcontainer.aspects.jmx.JMX would be more semantically consistent with MBeans in older versions of AS. Do we have a policy about that for beans derived from existing MBeans?

      3. As MBeans are transformed into POJOs, should the names in binding.xml be updated to refer to the POJO names? Does it matter?

      4. I've named the "jboss.remoting:service=Connector,transport=socket" Connector "UnifiedInvokerConnector", which isn't strictly appropriate, now that it has the JSR88 handler as well. Any suggestions for a better name?

      Thanks.

      ===============================================================================

      <deployment xmlns="urn:jboss:bean-deployer:2.0">
      
       <bean name="UnifiedInvoker" class="org.jboss.invocation.unified.server.UnifiedInvoker">
       <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=invoker,type=unified",exposedInterface=org.jboss.invocation.unified.server.UnifiedInvokerMBean.class,registerDirectly=true)</annotation>
       <property name="connector"><inject bean="UnifiedInvokerConnector"/></property>
       <depends>TransactionManager</depends>
       </bean>
      
       <bean name="UnifiedInvokerConnector" class="org.jboss.remoting.transport.Connector">
       <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.remoting:service=Connector,transport=socket",exposedInterface=org.jboss.remoting.transport.ConnectorMBean.class,registerDirectly=true)</annotation>
       <property name="serverConfiguration"><inject bean="UnifiedInvokerConfiguration"/></property>
       </bean>
      
       <!-- Remoting Server Configuration -->
       <bean name="UnifiedInvokerConfiguration" class="org.jboss.remoting.ServerConfiguration">
       <constructor>
       <parameter>socket</parameter>
       </constructor>
      
       <!-- parameters published to the client -->
       <property name="invokerLocatorParameters">
       <map keyClass="java.lang.String" valueClass="java.lang.String">
       <entry><key>serverBindAddress</key> <value>${jboss.bind.address}</value></entry>
       <entry>
       <key>serverBindPort</key>
       <value>
       <value-factory bean="ServiceBindingManager" method="getStringBinding">
       <parameter>jboss.remoting:service=Connector,transport=socket</parameter>
       <parameter>${port}</parameter>
       </value-factory>
       </value>
       </entry>
       <entry><key>dataType</key> <value>invocation</value></entry>
       <entry><key>marshaller</key> <value>org.jboss.invocation.unified.marshall.InvocationMarshaller</value></entry>
       <entry><key>unmarshaller</key> <value>org.jboss.invocation.unified.marshall.InvocationUnMarshaller</value></entry>
       </map>
       </property>
      
       <!-- parameters known only to the server -->
       <property name="serverParameters">
       <map keyClass="java.lang.String" valueClass="java.lang.String">
       <!-- ... -->
       </map>
       </property>
      
       <property name="invocationHandlers">
       <map keyClass="java.lang.String" valueClass="java.lang.String">
       <!-- The JSR88 deployment service StreamingTarget handler -->
       <entry><key>JSR88</key> <value>org.jboss.deployment.remoting.DeployHandler</value></entry>
       </map>
       </property>
       </bean>
      
      </deployment>
      


        • 1. Re: remoting-jboss-beans.xml
          Scott Stark Master

           

          "ron.sigal@jboss.com" wrote:

          1. Currently, an instance of org.jboss.remoting.network.NetworkRegistry is created, but I don't think we need it.

          a. NetworkRegistry is used by an instance of a subclass of org.jboss.remoting.detection.AbstractDetector to store information about known instances of org.jboss.remoting.transport.Connector. But the JNDIDetector in remoting-service.xml is commented out by default.

          b. It looks like the only part of the Application Server that uses the Remoting detection service is Tom's jmx-remoting package, which, I believe, is used only in the presence of jdk 1.4, which should never apply to AS 5.

          I checked with Tom, and his memory was a little fuzzy but he thought I was right. Does anyone remember how jboss-service.xml happened to have a NetworkRegistry and no JNDIDetector?

          This has been there since AS5 was using jdk1.4, so I'm sure its just for the jmx remoting integration work.

          "ron.sigal@jboss.com" wrote:

          2. If I understand correctly, setting "registerDirectly" to "false" in org.jboss.aop.microcontainer.aspects.jmx.JMX would be more semantically consistent with MBeans in older versions of AS. Do we have a policy about that for beans derived from existing MBeans?

          Looking at the JMXIntroduction, its not a question of different semantics, its a question of whether not the underlying bean is a JMX compatible bean. If it is, it can be registered directly, otherwise its wrapped in a StandardMBean with the JMX annotation specified interface. POJOs with *MBean interfaces can be registered directly, simple POJOs that don't match the default jmx interface conventions cannot.

          "ron.sigal@jboss.com" wrote:

          3. As MBeans are transformed into POJOs, should the names in binding.xml be updated to refer to the POJO names? Does it matter?

          Generally I would say yes, but if there are dependencies on the mbean name it should be exposed either using the JMX annotation, or using a alias element in the bean deployment.

          "ron.sigal@jboss.com" wrote:

          4. I've named the "jboss.remoting:service=Connector,transport=socket" Connector "UnifiedInvokerConnector", which isn't strictly appropriate, now that it has the JSR88 handler as well. Any suggestions for a better name?

          That name sounds fine, its still the connector for the old detached invoker.

          • 2. Re: remoting-jboss-beans.xml
            Ron Sigal Master

            Thanks, Scott, that's really helpful.