|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jboss.proxy.Interceptor
org.jboss.proxy.ejb.RetryInterceptor
An interceptor that will retry failed invocations by restoring the InvocationContext invoker. This is triggered by a ServiceUnavailableException which causes the interceptor to fall into a while loop that retries the lookup of the transport invoker using the jndi name obtained from the invocation context under the key InvocationKey.JNDI_NAME, with the additional extension of "-RemoteInvoker" if the invocation type is InvocationType.REMOTE and "-HomeInvoker" if the invocation type is InvocationType.HOME. The JNDI environment used for the lookup must be set via the setRetryEnv. Typically this is an HA-JNDI configuration with one or more bootstrap urls.
| Field Summary |
| Fields inherited from class org.jboss.proxy.Interceptor |
nextInterceptor |
| Constructor Summary | |
RetryInterceptor()
No-argument constructor for externalization. |
|
| Method Summary | |
boolean |
getRetry()
|
Object |
invoke(Invocation invocation)
InvocationHandler implementation. |
void |
readExternal(ObjectInput in)
Reads the next interceptor. |
void |
setRetry(boolean flag)
|
static void |
setRetryEnv(Properties env)
Set the HA-JNDI InitialContext env used to lookup the invoker proxy |
void |
writeExternal(ObjectOutput out)
Writes the next interceptor. |
| Methods inherited from class org.jboss.proxy.Interceptor |
getNext, setNext |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RetryInterceptor()
| Method Detail |
public static void setRetryEnv(Properties env)
env - the InitialContext env used to lookup the invoker proxypublic void setRetry(boolean flag)
public boolean getRetry()
public Object invoke(Invocation invocation)
throws Throwable
invoke in class InterceptorThrowable - Any exception or error thrown while processing.
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizablewriteExternal in class InterceptorIOException
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class InterceptorIOException
ClassNotFoundException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||