4 Replies Latest reply on Mar 14, 2005 10:45 AM by jsrobo

    custom RMI SocketFactory

    eldir

      With JBoss 3.0 it was possible to use a custome RMICoscketFactory
      by using the <container-invoker-conf> element in jboss.xml.

      I would like to use a compressed socket connection, but I am unable to find out how this works wit JBoss 3.2.

      Anny suggestions?

      Yhanks in advance.

        • 1. Re: custom RMI SocketFactory
          bghcm

          We need to use a custom socket factory in 3.2.3 for compression, also. Any comments appreciated!

          • 2. Re: custom RMI SocketFactory
            semi

            Take a look at the file jboss-service.xml
            You can specify your own SocketFactory
            in the "RMI/JRMP invoker" section of the
            file.

            <mbean code="org.jboss.invocation.jrmp.server.JRMPInvoker"
             name="jboss:service=invoker,type=jrmp">
             <!--
             <attribute name="RMIObjectPort">4444</attribute>
             <attribute name="RMIClientSocketFactory">custom</attribute>
             <attribute name="RMIServerSocketFactory">custom</attribute>
             <attribute name="RMIServerSocketAddr">custom</attribute>
             <attribute name="SecurityDomain">ssl-domain-name</attribute>
             -->
            
             <depends>jboss:service=TransactionManager</depends>
             </mbean>
            


            • 3. Re: custom RMI SocketFactory
              eldir

              Thanks!
              .
              That is what I was looking for

              • 4. Re: custom RMI SocketFactory
                jsrobo

                I am a relative newbie running 3.2.6, trying to implement something similar to the CompressionSocketFactory example shown in the JRMP test suite (custom socket factory for RMI calls).

                I am have written a simple RMI socket factory that creates sockets that have a timeout value, instead of using the default timeout of 0 (infinite timeout). I have run this directly in my java bean by using RMISocketFactory.setSocketFactory(new MyClientSocketFactory()). It seems to work just fine.

                But I am unable to hook this class through the JBOSS configuration files shown in the CompressionFactory example. It looks very simple in the example, but I can't make it work. Depending on how I tweak the configuration files, I either get an "invoker is null" error message, or get no error messages but my custom factory never seems to get invoked when making an RMI call.

                There has to be some missing piece of the puzzle. Any clues would be appreciated.

                Thanks very much for your time.