1 Reply Latest reply on May 9, 2011 4:35 AM by mlo

    [JBoss] Rmi Transport ?

    mlo

      Hello everybody.


      We recently moved our application from JBoss 4 to JBoss 6.1.

       

      Our application uses EJB2.

       

      Our application is a "multi-site" application, e.g we have 2 Jboss servers running on two different physical computers, let's call them ComputerA and ComputerB.

       

      ComputerA makes remote invocations on ComputerB, and ComputerB makes remote invocations on ComputerA. Everything's fine.

       

      Here is a  snippet from jboss.xml :

       

       

          <!-- Specific JBoss invoker for  session beans. -->
      
       <invoker-proxy-bindings>
          <invoker-proxy-binding>
              <name>ecsm-slsb-invoker</name>
              <invoker-mbean>
                  jboss:service=invoker,type=rmi
              </invoker-mbean>
              <proxy-factory>org.jboss.proxy.ejb.ProxyFactory</proxy-factory>
              <proxy-factory-config>
                  <client-interceptors>
                      <home>
                          <interceptor>org.jboss.proxy.ejb.HomeInterceptor</interceptor>
                          <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
                          <interceptor>
                              org.jboss.proxy.TransactionInterceptor
                          </interceptor>
                          <interceptor>
                              fr.access.InvokerInterceptor
                          </interceptor>
                      </home>
                      <bean>
                          <interceptor>
                              org.jboss.proxy.ejb.StatelessSessionInterceptor
                          </interceptor>
                          <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
                          <interceptor>
                              org.jboss.proxy.TransactionInterceptor
                          </interceptor>
                          <interceptor>
                              fr.access.InvokerInterceptor
                          </interceptor>
                      </bean>
                  </client-interceptors>
              </proxy-factory-config>
          </invoker-proxy-binding>
      </invoker-proxy-bindings>
      
      

       

      As you can see, we use RMI Transport.

       

      When our application were running on JBoss 4, we use to use JRMP invoker.

       

      Our problem :

       

      - When ComputerA is rebooted, ComputerB cannot makes remote invocation on ComputerA (exception NoSuchObjectInTable) : this is a normal situation.

       

      But, now we must ensure that communication between ComputerA & ComputerB, even if one of the two computer is restarted, keep working !

       

      So we have several solutions :

       

      - Switch to another transport instead of RMI

      - Put an interceptor (like InvokeRemoteInterceptor) in order to reset the stubs when one of the computers is being restarted

       

      What should we do?

       

      Any advices will be greatly apprciated !!!

       

      Thanks in advance !

        • 1. Re: [JBoss] Rmi Transport ?
          mlo

          Hmm i posted wrong configuration :

           

          here is the real snippet from jboss.xml

           

           

           <invoker-proxy-bindings>
              <invoker-proxy-binding>
                  <name>ecsm-slsb-invoker</name>
                  <invoker-mbean>
                      jboss:service=invoker,type=unified
                  </invoker-mbean>
                  <proxy-factory>org.jboss.proxy.ejb.ProxyFactory</proxy-factory>
                  <proxy-factory-config>
                      <client-interceptors>
                          <home>
                              <interceptor>org.jboss.proxy.ejb.HomeInterceptor</interceptor>
                              <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
                              <interceptor>
                                  org.jboss.proxy.TransactionInterceptor
                              </interceptor>
                              <interceptor>
                                  fr.ds.util.access.InvokerInterceptor
                              </interceptor>
                          </home>
                          <bean>
                              <interceptor>
                                  org.jboss.proxy.ejb.StatelessSessionInterceptor
                              </interceptor>
                              <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
                              <interceptor>
                                  org.jboss.proxy.TransactionInterceptor
                              </interceptor>
                              <interceptor>
                                  fr.ds.util.access.InvokerInterceptor
                              </interceptor>
                          </bean>
                      </client-interceptors>
                  </proxy-factory-config>
              </invoker-proxy-binding>
          </invoker-proxy-bindings>
          
          

           

          And in remoting-jboss-beans.xml :

           

           

           

             <!-- Remoting server configuration -->
             <bean name="UnifiedInvokerConfiguration" class="org.jboss.remoting.ServerConfiguration">
                <constructor>
                   <!-- transport: Others include sslsocket, bisocket, sslbisocket, http, https, rmi, sslrmi, servlet, sslservlet. -->
                   <parameter>rmi</parameter>
                </constructor>