/** * Optionally handle a session creation invocation. Explicit session creation is always a blocking operation. The * default operation forwards to the next interceptor in the chain. * * @param context the session creation invocation context (not {@code null}) * @return the stateful EJB locator (must not be {@code null}) * @throws Exception if an invocation error occurred */ default SessionID handleSessionCreation(EJBSessionCreationInvocationContext context) throws Exception { return context.proceed(); }
public SessionID handleSessionCreation(final EJBSessionCreationInvocationContext context) throws Exception { try { return context.proceed(); } catch (NoSuchEJBException e) { // EJB is not present on target node! removeNode(context); throw e; } }
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 { if (context.getDestination() != null) { // already discovered! return context.proceed(); } List<Throwable> problems = executeDiscovery(context); if(WILDFLY_TESTSUITE_HACK && context.getDestination() == null) { Thread.sleep(2000); problems = executeDiscovery(context); } SessionID sessionID; try { sessionID = context.proceed(); } catch (NoSuchEJBException | RequestSendFailedException e) { processMissingTarget(context); throw withSuppressed(e, problems); } catch (Exception t) { throw withSuppressed(t, problems); } setupSessionAffinities(context); return sessionID; }
Throwable t; try { sessionID = context.proceed(); break; } catch (RequestSendFailedException r) {
@Override public SessionID handleSessionCreation(EJBSessionCreationInvocationContext context) throws Exception { AbstractTransaction transaction = context.getTransaction(); // While session requests currently only utilize the caller thread, // this will support any future use of a worker. Additionally hides // TX from other interceptors, providing consistency with standard // invocation handling. if (transaction == null) { transaction = transactionManager.getTransaction(); context.setTransaction(transaction); } setupStickinessIfRequired(context, true, transaction); Transaction old = transactionManager.suspend(); try { return context.proceed(); } finally { transactionManager.resume(old); } }
/** * Optionally handle a session creation invocation. Explicit session creation is always a blocking operation. The * default operation forwards to the next interceptor in the chain. * * @param context the session creation invocation context (not {@code null}) * @return the stateful EJB locator (must not be {@code null}) * @throws Exception if an invocation error occurred */ default SessionID handleSessionCreation(EJBSessionCreationInvocationContext context) throws Exception { return context.proceed(); }
/** * Optionally handle a session creation invocation. Explicit session creation is always a blocking operation. The * default operation forwards to the next interceptor in the chain. * * @param context the session creation invocation context (not {@code null}) * @return the stateful EJB locator (must not be {@code null}) * @throws Exception if an invocation error occurred */ default SessionID handleSessionCreation(EJBSessionCreationInvocationContext context) throws Exception { return context.proceed(); }
public SessionID handleSessionCreation(final EJBSessionCreationInvocationContext context) throws Exception { try { return context.proceed(); } catch (NoSuchEJBException e) { // EJB is not present on target node! removeNode(context); throw e; } }
public SessionID handleSessionCreation(final EJBSessionCreationInvocationContext context) throws Exception { try { return context.proceed(); } catch (NoSuchEJBException e) { // EJB is not present on target node! removeNode(context); throw e; } }
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(); } } }
public SessionID handleSessionCreation(final EJBSessionCreationInvocationContext context) throws Exception { if (context.getDestination() != null) { // already discovered! return context.proceed(); } List<Throwable> problems = executeDiscovery(context); if(WILDFLY_TESTSUITE_HACK && context.getDestination() == null) { Thread.sleep(2000); problems = executeDiscovery(context); } SessionID sessionID; try { sessionID = context.proceed(); } catch (NoSuchEJBException | RequestSendFailedException e) { processMissingTarget(context); throw withSuppressed(e, problems); } catch (Exception t) { throw withSuppressed(t, problems); } setupSessionAffinities(context); return sessionID; }
public SessionID handleSessionCreation(final EJBSessionCreationInvocationContext context) throws Exception { if (context.getDestination() != null) { // already discovered! return context.proceed(); } List<Throwable> problems = executeDiscovery(context); if(WILDFLY_TESTSUITE_HACK && context.getDestination() == null) { Thread.sleep(2000); problems = executeDiscovery(context); } SessionID sessionID; try { sessionID = context.proceed(); } catch (NoSuchEJBException | RequestSendFailedException e) { processMissingTarget(context); throw withSuppressed(e, problems); } catch (Exception t) { throw withSuppressed(t, problems); } setupSessionAffinities(context); return sessionID; }
Throwable t; try { sessionID = context.proceed(); break; } catch (RequestSendFailedException r) {
@Override public SessionID handleSessionCreation(EJBSessionCreationInvocationContext context) throws Exception { AbstractTransaction transaction = context.getTransaction(); // While session requests currently only utilize the caller thread, // this will support any future use of a worker. Additionally hides // TX from other interceptors, providing consistency with standard // invocation handling. if (transaction == null) { transaction = transactionManager.getTransaction(); context.setTransaction(transaction); } setupStickinessIfRequired(context, true, transaction); Transaction old = transactionManager.suspend(); try { return context.proceed(); } finally { transactionManager.resume(old); } }
@Override public SessionID handleSessionCreation(EJBSessionCreationInvocationContext context) throws Exception { AbstractTransaction transaction = context.getTransaction(); // While session requests currently only utilize the caller thread, // this will support any future use of a worker. Additionally hides // TX from other interceptors, providing consistency with standard // invocation handling. if (transaction == null) { transaction = transactionManager.getTransaction(); context.setTransaction(transaction); } setupStickinessIfRequired(context, true, transaction); Transaction old = transactionManager.suspend(); try { return context.proceed(); } finally { transactionManager.resume(old); } }