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 void handleInvocation(final EJBClientInvocationContext context) throws Exception { ConcurrentMap<Application, URI> applications = context.getAttachment(APPLICATIONS); if (applications != null) { URI destination = context.getDestination(); Application registered = updateOrFollowApplication(context, applications, true); try { context.sendRequest(); } catch (NoSuchEJBException | RequestSendFailedException e) { if (registered != null) { // Clear sticky association only if this path registered it applications.remove(registered, destination); } context.removeAttachment(APPLICATIONS); context.removeAttachment(PREFERRED_DESTINATIONS); context.removeAttachment(APPLICATION); throw e; } } else { context.sendRequest(); } }
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); } } }
public void handleInvocation(final EJBClientInvocationContext context) throws Exception { ConcurrentMap<Application, URI> applications = context.getAttachment(APPLICATIONS); if (applications != null) { URI destination = context.getDestination(); Application registered = updateOrFollowApplication(context, applications, true); try { context.sendRequest(); } catch (NoSuchEJBException | RequestSendFailedException e) { if (registered != null) { // Clear sticky association only if this path registered it applications.remove(registered, destination); } context.removeAttachment(APPLICATIONS); context.removeAttachment(PREFERRED_DESTINATIONS); context.removeAttachment(APPLICATION); throw e; } } else { context.sendRequest(); } }
public void handleInvocation(final EJBClientInvocationContext context) throws Exception { ConcurrentMap<Application, URI> applications = context.getAttachment(APPLICATIONS); if (applications != null) { URI destination = context.getDestination(); Application registered = updateOrFollowApplication(context, applications, true); try { context.sendRequest(); } catch (NoSuchEJBException | RequestSendFailedException e) { if (registered != null) { // Clear sticky association only if this path registered it applications.remove(registered, destination); } context.removeAttachment(APPLICATIONS); context.removeAttachment(PREFERRED_DESTINATIONS); context.removeAttachment(APPLICATION); throw e; } } else { context.sendRequest(); } }
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); } }