6 Replies Latest reply on Sep 17, 2008 12:18 AM by bdinnerv

    How to stop optimization of remote call?

    taba_youichi

      I'm trying to call SLSB by round-robin. But JBossAS optimizes remote call to local call, so I cannot call the SLSB from same JBossAS instance.

      The optimization is mentioned below:
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=14030

      But I found this topic:
      http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3808428

      How do I configure jndi.properties to stop optimization of remote call?

        • 1. Re: How to stop optimization of remote call?
          starksm64

          Replace the org.jboss.invocation.InvokerInterceptor in the invoker

           <invoker-proxy-binding>
           <name>clustered-stateless-rmi-invoker</name>
           <invoker-mbean>jboss:service=invoker,type=jrmpha</invoker-mbean>
           <proxy-factory>org.jboss.proxy.ejb.ProxyFactoryHA</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>org.jboss.proxy.ejb.SingleRetryInterceptor</interceptor>
           <interceptor call-by-value="false">com.acme.NoOptimizationInvokerInterceptor</interceptor>
           </home>
           <bean>
           <interceptor>org.jboss.proxy.ejb.StatelessSessionInterceptor</interceptor>
           <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
           <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
           <interceptor>org.jboss.proxy.ejb.SingleRetryInterceptor</interceptor>
           <interceptor call-by-value="false">com.acme.NoOptimizationInvokerInterceptor</interceptor>
           </bean>
           </client-interceptors>
           </proxy-factory-config>
           </invoker-proxy-binding>
          
          



          • 2. Re: How to stop optimization of remote call?
            taba_youichi

            Thanks!

            The InvokerInterceptor is:
            http://docs.jboss.org/jbossas/javadoc/4.0.2/org/jboss/invocation/InvokerInterceptor.java.html
            The optimization is shown in hasLocalTarget(), isn't it?

            But where is the org.acme.NoOptimizationInvokerInterceptor?
            I cannot find it. Should I write it?

            • 3. Re: How to stop optimization of remote call?
              starksm64

              You write it.

              • 4. Re: How to stop optimization of remote call?
                slaboure

                Frankly, I am worried whenever somebody mentions that it is something they want to do (i.e. remove the optimization). Really ask yourself: is this REALLY what I am trying to do? Is this this architecture you want? Is this really necessary? There is already some level of load-balancing taking place in-front of your node, right?

                • 5. Why I need non-optimized call
                  taba_youichi

                  I need a distributed job scheduler for my cluster.
                  The scheduler should be cluster-singleton. Otherwise every cluster-node polls database intensively.
                  The scheduler should run on cluster with failover. Otherwise scheduler becomes single-point-of-failure.
                  Two JBossAS instances on one node? This configuration is fragile because JBossAS instance sometimes dies silently (without any core file... JVM bug?). If scheduler instance dies and worker instance lives, no failover. Another partition for scheduler? That's may be an answer, but I prefer performance loss than complicated configuration. Complicated configuration is hard to maintain.

                  • 6. Re: How to stop optimization of remote call?
                    bdinnerv

                     

                    "sacha.labourey@jboss.com" wrote:
                    Frankly, I am worried whenever somebody mentions that it is something they want to do (i.e. remove the optimization). Really ask yourself: is this REALLY what I am trying to do? Is this this architecture you want? Is this really necessary? There is already some level of load-balancing taking place in-front of your node, right?


                    This makes the assumption that the client is outside the node and does not cater for scenarios where clients are inside the node. Not all clients to applications are http clients and you need to understand that there are a multitude of examples whereby the client is inside the container and there is no other load balancing mechanism available.

                    Cheers,

                    Ben