2 Replies Latest reply on Jul 19, 2012 3:49 AM by redcar

    How to use always the same port for ejb-call

    redcar

      Hallo,

       

      is it possible, that the calls of a client to a sfsb or slsb uses allways only one port?

      How do I have to configure this for JBoss 5.1.0 GA?

       

      The client connects to the server sfsb an calls every 4 minutes a business method.

      For this I want to use allways the same port inside the worker thread.

       

      Thank you,

      Werner

        • 1. Re: How to use always the same port for ejb-call
          ron_sigal

          Hi Werner,

           

          Sorry for the delay.

           

          Once a worker thread is created, it will be reused.  In particular, once it completes an invocation, it will sit in a read() waiting for the next invocation.  If you do no more than one invocation at a time, the same worker thread should handle all of them.

           

          If you do more than one invocation at a time, you could limit the number of worker threads to one.  That way, if an invocation comes in while the single worker thread is  busy, the server will wait until the worker thread finishes processing its invocation and then use it for the new invocation.  You can limit the number of worker threads in the configuration file $JBOSS_HOME/server/$CONFIG/deploy/ejb3-connectors-jboss-beans.xml by changing the line

           

          <parameter>socket://${jboss.bind.address}:${port}</parameter>

           

          to

           

          <parameter>socket://${jboss.bind.address}:${port}/?maxPoolSize=1</parameter>

           

          -Ron

          1 of 1 people found this helpful
          • 2. Re: How to use always the same port for ejb-call
            redcar

            Thank you Ron,

             

            blocking of invocations is not so good. So a maxPoolSize of 1 is not a very good idea perhaps.

            I will try some different settings in combination with a bigger port range.

             

            Best regards,

            Werner