public abstract class AbstractRemoteSlsbInvokerInterceptor extends AbstractSlsbInvokerInterceptor
そのようなインターセプターは、アドバイスチェーンの最後のインターセプターでなければなりません。この場合、ターゲットオブジェクトはありません。
CONTAINER_PREFIX
logger
コンストラクターと説明 |
---|
AbstractRemoteSlsbInvokerInterceptor() |
修飾子と型 | メソッドと説明 |
---|---|
protected abstract ObjectSE | doInvoke(MethodInvocation invocation) 現在の EJB ホームで指定された呼び出しを実行します。 |
protected MethodSE | getCreateMethod(ObjectSE home) EJB コンポーネントとして直接機能する EJB3 スタイルのホームオブジェクトを確認します。 |
ObjectSE | invokeInContext(MethodInvocation invocation) EJB ホームオブジェクトをフェッチし、 doInvoke に委譲します。 |
protected boolean | isConnectFailure(RemoteExceptionSE ex) 指定された RMI 例外が接続障害を示しているかどうかを判別します。 |
protected boolean | isHomeRefreshable() キャッシュされた EJB ホームオブジェクトがオンデマンドリフレッシュの対象になる可能性があるかどうかを返します。 |
protected ObjectSE | newSessionBeanInstance() ステートレスセッション Bean の新しいインスタンスを返します。 |
protected ObjectSE | refreshAndRetry(MethodInvocation invocation) EJB ホームオブジェクトをリフレッシュし、指定された呼び出しを再試行します。 |
protected void | removeSessionBeanInstance(EJBObjectEE ejb) 指定された EJB インスタンスを削除します。 |
void | setRefreshHomeOnConnectFailure(boolean refreshHomeOnConnectFailure) 接続失敗時に EJB ホームをリフレッシュするかどうかを設定します。 |
afterPropertiesSet, create, getHome, invoke, refreshHome, setCacheHome, setExposeAccessContext, setLookupHomeOnStartup
getExpectedType, getJndiName, lookup, setExpectedType, setJndiName
convertJndiName, isResourceRef, lookup, lookup, setResourceRef
getJndiEnvironment, getJndiTemplate, setJndiEnvironment, setJndiTemplate
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public void setRefreshHomeOnConnectFailure(boolean refreshHomeOnConnectFailure)
オンにすると、EJB サーバーのホットリスタートが可能になります。キャッシュされた EJB ホームがリモート接続の失敗を示す RMI 例外をスローすると、新しいホームがフェッチされ、呼び出しが再試行されます。
protected boolean isHomeRefreshable()
AbstractSlsbInvokerInterceptor
AbstractSlsbInvokerInterceptor
の isHomeRefreshable
protected MethodSE getCreateMethod(ObjectSE home) throws EjbAccessException
AbstractSlsbInvokerInterceptor
の getCreateMethod
home
- EJB ホームオブジェクト EjbAccessException
- メソッドを取得できなかった場合 @Nullable public ObjectSE invokeInContext(MethodInvocation invocation) throws ThrowableSE
doInvoke
に委譲します。 接続障害時にリフレッシュするように構成されている場合、対応する RMI 例外で refreshAndRetry(org.aopalliance.intercept.MethodInvocation)
を呼び出します。
AbstractSlsbInvokerInterceptor
の invokeInContext
invocation
- AOP メソッドの呼び出し ThrowableSE
- 呼び出しが失敗した場合 AbstractSlsbInvokerInterceptor.getHome()
, doInvoke(org.aopalliance.intercept.MethodInvocation)
, refreshAndRetry(org.aopalliance.intercept.MethodInvocation)
protected boolean isConnectFailure(RemoteExceptionSE ex)
デフォルトの実装は RmiClientInterceptorUtils に委譲します。
ex
- 確認する RMI 例外 RmiClientInterceptorUtils.isConnectFailure(java.rmi.RemoteException)
@Nullable protected ObjectSE refreshAndRetry(MethodInvocation invocation) throws ThrowableSE
invocation
- AOP メソッドの呼び出し ThrowableSE
- 呼び出しが失敗した場合 AbstractSlsbInvokerInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)
@Nullable protected abstract ObjectSE doInvoke(MethodInvocation invocation) throws ThrowableSE
invocation
- AOP メソッドの呼び出し ThrowableSE
- 呼び出しが失敗した場合 AbstractSlsbInvokerInterceptor.getHome()
, newSessionBeanInstance()
protected ObjectSE newSessionBeanInstance() throws NamingExceptionSE, InvocationTargetExceptionSE
オーバーライドしてアルゴリズムを変更できます。
NamingExceptionSE
- JNDI によってスローされた場合 InvocationTargetExceptionSE
- create メソッドによってスローされた場合 AbstractSlsbInvokerInterceptor.create()
protected void removeSessionBeanInstance(@Nullable EJBObjectEE ejb)
ejb
- 削除する EJB インスタンス EJBObject.remove()
EE