public SessionID handleSessionCreation(final EJBSessionCreationInvocationContext context) throws Exception { ConcurrentMap<Application, URI> applications = context.getAttachment(APPLICATIONS); if (applications != null) { URI destination = context.getDestination(); Application registered = updateOrFollowApplication(context, applications, false); try { return context.proceed(); } catch (NoSuchEJBException | RequestSendFailedException e) { if (registered != null) { // Clear sticky association only if this path registered it applications.remove(registered, destination); } throw e; } finally { context.removeAttachment(APPLICATIONS); context.removeAttachment(PREFERRED_DESTINATIONS); } } return context.proceed(); }
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 { ConcurrentMap<Application, URI> applications = context.getAttachment(APPLICATIONS); if (applications != null) { URI destination = context.getDestination(); Application registered = updateOrFollowApplication(context, applications, false); try { return context.proceed(); } catch (NoSuchEJBException | RequestSendFailedException e) { if (registered != null) { // Clear sticky association only if this path registered it applications.remove(registered, destination); } throw e; } finally { context.removeAttachment(APPLICATIONS); context.removeAttachment(PREFERRED_DESTINATIONS); } } return context.proceed(); }
public SessionID handleSessionCreation(final EJBSessionCreationInvocationContext context) throws Exception { ConcurrentMap<Application, URI> applications = context.getAttachment(APPLICATIONS); if (applications != null) { URI destination = context.getDestination(); Application registered = updateOrFollowApplication(context, applications, false); try { return context.proceed(); } catch (NoSuchEJBException | RequestSendFailedException e) { if (registered != null) { // Clear sticky association only if this path registered it applications.remove(registered, destination); } throw e; } finally { context.removeAttachment(APPLICATIONS); context.removeAttachment(PREFERRED_DESTINATIONS); } } return context.proceed(); }
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(); } } }