Show Table of Contents
22.4.4. クラスター再起動の処理
HA スマートクライアントアーキテクチャーについては 「クライアント側インターセプターアーキテクチャー」 で説明しました。 デフォルトの HA スマートプロキシクライアントはクラスター内に 1 つのノードがある限りフェイルルオーバーを行うことができます。 クラスターが完全にシャットダウンされた場合、プロキシは孤立しクラスター内の使用可能なノード群の情報を失うことになります。 この状態からプロキシを復帰させる方法はありません。 プロキシはノードが再起動されたら JNDI/HA-JNDI から新しい対象をルックアップする必要があります。
このような再起動の障害からの透過的に回復できるよう、RetryInterceptor をプロキシクライアント側のインターセプタースタックに追加することができます。 EJB に対してこれを有効にするには、 RetryInterceptor を含む invoker-proxy-binding を設定します。 jboss.xml 設定の例は次の通りです。
<jboss> <session> <ejb-name>nextgen_RetryInterceptorStatelessSession</ejb-name> <invoker-bindings> <invoker> <invoker-proxy-binding-name>clustered-retry-stateless-rmi-invoker</invoker-proxy-binding-name> <jndi-name>nextgen_RetryInterceptorStatelessSession</jndi-name> </invoker> </invoker-bindings> <clustered>true</clustered> </session> <invoker-proxy-binding> <name>clustered-retry-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.RetryInterceptor</interceptor> <interceptor>org.jboss.invocation.InvokerInterceptor</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.RetryInterceptor</interceptor> <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor> </bean> </client-interceptors> </proxy-factory-config> </invoker-proxy-binding> </jboss>