/** * Get the invocation result from this request. The result is not actually acquired unless all interceptors * call this method. Should only be called from {@link EJBClientInterceptor#handleInvocationResult(EJBClientInvocationContext)}. * * @return the invocation result * @throws Exception if the invocation did not succeed */ public Object getResult() throws Exception { return getResult(false); }
public Object handleInvocationResult(final EJBClientInvocationContext context) throws Exception { return context.getResult(); }
void retryOperation() { try { getResult(true); } catch (Throwable t) { final boolean retry; synchronized (lock) { retry = state == State.SENDING; } if (retry) sendRequestInitial(); } }
public Object handleInvocationResult(final EJBClientInvocationContext context) throws Exception { try { return context.getResult(); } catch (NoSuchEJBException e) { // EJB is not present on target node! removeNode(context); throw e; } }
public Object handleInvocationResult(final EJBClientInvocationContext context) throws Exception { try { return context.getResult(); } catch (NoSuchEJBException | RequestSendFailedException e) { if (context.getAttachment(SKIP_MISSING_TARGET) != Boolean.TRUE) { processMissingTarget(context); } throw e; } finally { context.removeAttachment(SKIP_MISSING_TARGET); } }
public Object handleInvocationResult(final EJBClientInvocationContext context) throws Exception { ConcurrentMap<Application, URI> applications = context.getAttachment(APPLICATIONS); Application application = context.getAttachment(APPLICATION); URI destination = context.getDestination(); try { return context.getResult(); } catch (RequestSendFailedException | NoSuchEJBException e) { if (application != null) { applications.remove(application, destination); } throw e; } finally { context.removeAttachment(APPLICATIONS); context.removeAttachment(PREFERRED_DESTINATIONS); context.removeAttachment(APPLICATION); } } }
public Object handleInvocationResult(final EJBClientInvocationContext context) throws Exception { final Object result; try { result = context.getResult(); } catch (NoSuchEJBException | RequestSendFailedException e) { processMissingTarget(context); throw e; } final EJBLocator<?> locator = context.getLocator(); if (locator.isStateful() && locator.getAffinity() instanceof ClusterAffinity && context.getWeakAffinity() == Affinity.NONE) { // set the weak affinity to the location of the session (in case it failed over) final Affinity targetAffinity = context.getTargetAffinity(); if (targetAffinity != null) { context.setWeakAffinity(targetAffinity); } else { final URI destination = context.getDestination(); if (destination != null) { context.setWeakAffinity(URIAffinity.forUri(destination)); } // if destination is null, then an interceptor set the location } } return result; }
transition(State.CONSUMING); try { getResult(true); } catch (Throwable t) { if (state == State.SENDING) {
/** * Get the invocation result from this request. The result is not actually acquired unless all interceptors * call this method. Should only be called from {@link EJBClientInterceptor#handleInvocationResult(EJBClientInvocationContext)}. * * @return the invocation result * @throws Exception if the invocation did not succeed */ public Object getResult() throws Exception { return getResult(false); }
/** * Get the invocation result from this request. The result is not actually acquired unless all interceptors * call this method. Should only be called from {@link EJBClientInterceptor#handleInvocationResult(EJBClientInvocationContext)}. * * @return the invocation result * @throws Exception if the invocation did not succeed */ public Object getResult() throws Exception { return getResult(false); }
public Object handleInvocationResult(final EJBClientInvocationContext context) throws Exception { return context.getResult(); }
public Object handleInvocationResult(final EJBClientInvocationContext context) throws Exception { return context.getResult(); }
public Object handleInvocationResult(final EJBClientInvocationContext context) throws Exception { try { return context.getResult(); } catch (NoSuchEJBException e) { // EJB is not present on target node! removeNode(context); throw e; } }
void retryOperation() { try { getResult(true); } catch (Throwable t) { final boolean retry; synchronized (lock) { retry = state == State.SENDING; } if (retry) sendRequestInitial(); } }
public Object handleInvocationResult(final EJBClientInvocationContext context) throws Exception { try { return context.getResult(); } catch (NoSuchEJBException e) { // EJB is not present on target node! removeNode(context); throw e; } }
void retryOperation() { try { getResult(true); } catch (Throwable t) { final boolean retry; synchronized (lock) { retry = state == State.SENDING; } if (retry) sendRequestInitial(); } }
public Object handleInvocationResult(final EJBClientInvocationContext context) throws Exception { try { return context.getResult(); } catch (NoSuchEJBException | RequestSendFailedException e) { if (context.getAttachment(SKIP_MISSING_TARGET) != Boolean.TRUE) { processMissingTarget(context); } throw e; } finally { context.removeAttachment(SKIP_MISSING_TARGET); } }
public Object handleInvocationResult(final EJBClientInvocationContext context) throws Exception { try { return context.getResult(); } catch (NoSuchEJBException | RequestSendFailedException e) { if (context.getAttachment(SKIP_MISSING_TARGET) != Boolean.TRUE) { processMissingTarget(context); } throw e; } finally { context.removeAttachment(SKIP_MISSING_TARGET); } }
public Object handleInvocationResult(final EJBClientInvocationContext context) throws Exception { ConcurrentMap<Application, URI> applications = context.getAttachment(APPLICATIONS); Application application = context.getAttachment(APPLICATION); URI destination = context.getDestination(); try { return context.getResult(); } catch (RequestSendFailedException | NoSuchEJBException e) { if (application != null) { applications.remove(application, destination); } throw e; } finally { context.removeAttachment(APPLICATIONS); context.removeAttachment(PREFERRED_DESTINATIONS); context.removeAttachment(APPLICATION); } } }
public Object handleInvocationResult(final EJBClientInvocationContext context) throws Exception { ConcurrentMap<Application, URI> applications = context.getAttachment(APPLICATIONS); Application application = context.getAttachment(APPLICATION); URI destination = context.getDestination(); try { return context.getResult(); } catch (RequestSendFailedException | NoSuchEJBException e) { if (application != null) { applications.remove(application, destination); } throw e; } finally { context.removeAttachment(APPLICATIONS); context.removeAttachment(PREFERRED_DESTINATIONS); context.removeAttachment(APPLICATION); } } }