JBoss has an HA version of the pooled invoker that is not in the cluser-service.xml or in the formal documentation.
To use it add
<mbean code="org.jboss.invocation.pooled.server.PooledInvokerHA" name="jboss:service=invoker,type=pooledha"> <attribute name="NumAcceptThreads">1</attribute> <attribute name="MaxPoolSize">300</attribute> <attribute name="ClientMaxPoolSize">300</attribute> <attribute name="SocketTimeout">60000</attribute> <attribute name="ServerBindAddress">${jboss.bind.address}</attribute> <attribute name="ServerBindPort">4446</attribute> <attribute name="ClientConnectAddress">${jboss.bind.address}</attribute> <attribute name="ClientConnectPort">0</attribute> <attribute name="EnableTcpNoDelay">false</attribute> <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends> </mbean>
to server/all/deploy/cluster-service.xml
Then edit your server/all/conf/standardjboss.xml and essentially replace all jboss:service=invoker,type=jrmpha strings with jboss:service=invoker,type=pooledha or create and override your own proxy bindings up to or on a per-bean basis in the jboss.xml.
Generally speaking, most folks think NumAcceptThreads should be one (this is the number of threads blocked on ServerSocket.accept()). MaxPoolSize+tcp backlog is a hard limit so set it to a reasonble number for your expected traffic.
Comments