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 SessionID handleSessionCreation(final EJBSessionCreationInvocationContext context) throws Exception { final NamingProvider namingProvider = context.getAttachment(Keys.NAMING_PROVIDER_ATTACHMENT_KEY); if (namingProvider == null || context.getDestination() != null || context.getLocator().getAffinity() != Affinity.NONE) { return context.proceed(); } else { if (setDestination(context, namingProvider)) try { return context.proceed(); } catch (NoSuchEJBException | RequestSendFailedException e) { processMissingTarget(context); throw e; } else { throw Logs.INVOCATION.noMoreDestinations(); } } }
public void handleInvocation(final EJBClientInvocationContext context) throws Exception { final NamingProvider namingProvider = context.getProxyAttachment(Keys.NAMING_PROVIDER_ATTACHMENT_KEY); if (namingProvider != null) { // make sure the naming provider is available to invocations context.putAttachment(Keys.NAMING_PROVIDER_ATTACHMENT_KEY, namingProvider); } if (namingProvider == null || context.getDestination() != null || context.getLocator().getAffinity() != Affinity.NONE) { context.putAttachment(SKIP_MISSING_TARGET, Boolean.TRUE); context.sendRequest(); } else { if (setDestination(context, namingProvider)) try { context.sendRequest(); } catch (NoSuchEJBException | RequestSendFailedException e) { processMissingTarget(context); throw e; } else { throw Logs.INVOCATION.noMoreDestinations(); } } }
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 SessionID handleSessionCreation(final EJBSessionCreationInvocationContext context) throws Exception { final NamingProvider namingProvider = context.getAttachment(Keys.NAMING_PROVIDER_ATTACHMENT_KEY); if (namingProvider == null || context.getDestination() != null || context.getLocator().getAffinity() != Affinity.NONE) { return context.proceed(); } else { if (setDestination(context, namingProvider)) try { return context.proceed(); } catch (NoSuchEJBException | RequestSendFailedException e) { processMissingTarget(context); throw e; } else { throw Logs.INVOCATION.noMoreDestinations(); } } }
public SessionID handleSessionCreation(final EJBSessionCreationInvocationContext context) throws Exception { final NamingProvider namingProvider = context.getAttachment(Keys.NAMING_PROVIDER_ATTACHMENT_KEY); if (namingProvider == null || context.getDestination() != null || context.getLocator().getAffinity() != Affinity.NONE) { return context.proceed(); } else { if (setDestination(context, namingProvider)) try { return context.proceed(); } catch (NoSuchEJBException | RequestSendFailedException e) { processMissingTarget(context); throw e; } else { throw Logs.INVOCATION.noMoreDestinations(); } } }
public void handleInvocation(final EJBClientInvocationContext context) throws Exception { final NamingProvider namingProvider = context.getProxyAttachment(Keys.NAMING_PROVIDER_ATTACHMENT_KEY); if (namingProvider != null) { // make sure the naming provider is available to invocations context.putAttachment(Keys.NAMING_PROVIDER_ATTACHMENT_KEY, namingProvider); } if (namingProvider == null || context.getDestination() != null || context.getLocator().getAffinity() != Affinity.NONE) { context.putAttachment(SKIP_MISSING_TARGET, Boolean.TRUE); context.sendRequest(); } else { if (setDestination(context, namingProvider)) try { context.sendRequest(); } catch (NoSuchEJBException | RequestSendFailedException e) { processMissingTarget(context); throw e; } else { throw Logs.INVOCATION.noMoreDestinations(); } } }
public void handleInvocation(final EJBClientInvocationContext context) throws Exception { final NamingProvider namingProvider = context.getProxyAttachment(Keys.NAMING_PROVIDER_ATTACHMENT_KEY); if (namingProvider != null) { // make sure the naming provider is available to invocations context.putAttachment(Keys.NAMING_PROVIDER_ATTACHMENT_KEY, namingProvider); } if (namingProvider == null || context.getDestination() != null || context.getLocator().getAffinity() != Affinity.NONE) { context.putAttachment(SKIP_MISSING_TARGET, Boolean.TRUE); context.sendRequest(); } else { if (setDestination(context, namingProvider)) try { context.sendRequest(); } catch (NoSuchEJBException | RequestSendFailedException e) { processMissingTarget(context); throw e; } else { throw Logs.INVOCATION.noMoreDestinations(); } } }