private void processMissingTarget(final AbstractInvocationContext context) { final URI destination = context.getDestination(); if (destination == null || context.getTargetAffinity() == Affinity.LOCAL) { // nothing we can/should do. return; } // Oops, we got some wrong information! addBlackListedDestination(context, destination); // clear the weak affinity so that cluster invocations can be re-targeted. context.setWeakAffinity(Affinity.NONE); context.setTargetAffinity(null); context.setDestination(null); context.requestRetry(); }
context.setDestination(uri); Logs.INVOCATION.tracef("Performed cluster discovery (target affinity = %s, destination = %s)", context.getTargetAffinity(), context.getDestination()); context.setTargetAffinity(new NodeAffinity(selectedNode)); Logs.INVOCATION.tracef("Performed cluster discovery (target affinity = %s, destination = %s)", context.getTargetAffinity(), context.getDestination());
private void removeNode(final AbstractInvocationContext context) { final Affinity targetAffinity = context.getTargetAffinity(); if (targetAffinity instanceof NodeAffinity) { final RemoteEJBReceiver ejbReceiver = context.getClientContext().getAttachment(RemoteTransportProvider.ATTACHMENT_KEY); if (ejbReceiver != null) { final EJBClientChannel ejbClientChannel = context.getAttachment(RemoteEJBReceiver.EJBCC_KEY); if (ejbClientChannel != null) { final NodeInformation nodeInformation = ejbReceiver.getDiscoveredNodeRegistry().getNodeInformation(((NodeAffinity) targetAffinity).getNodeName()); if (nodeInformation != null) { nodeInformation.removeModule(ejbClientChannel, context.getLocator().getIdentifier().getModuleIdentifier()); } } } } } }
private void processMissingTarget(final AbstractInvocationContext context) { final URI destination = context.getDestination(); if (destination == null || context.getTargetAffinity() == Affinity.LOCAL) { // some later interceptor cleared it out on us return; } // Oops, we got some wrong information! addBlackListedDestination(context, destination); final EJBLocator<?> locator = context.getLocator(); if (! (locator.getAffinity() instanceof ClusterAffinity)) { // it *was* "none" affinity, but it has been relocated; locate it back again context.setLocator(locator.withNewAffinity(Affinity.NONE)); } // clear the weak affinity so that cluster invocations can be re-targeted. context.setWeakAffinity(Affinity.NONE); context.setTargetAffinity(null); context.setDestination(null); context.requestRetry(); } }
Logs.INVOCATION.tracef("Performed first-match discovery(target affinity = %s, destination = %s)", context.getTargetAffinity(), context.getDestination()); return queue.getProblems();
private void processMissingTarget(final AbstractInvocationContext context) { final URI destination = context.getDestination(); if (destination == null || context.getTargetAffinity() == Affinity.LOCAL) { // nothing we can/should do. return; } // Oops, we got some wrong information! addBlackListedDestination(context, destination); // clear the weak affinity so that cluster invocations can be re-targeted. context.setWeakAffinity(Affinity.NONE); context.setTargetAffinity(null); context.setDestination(null); context.requestRetry(); }
private void processMissingTarget(final AbstractInvocationContext context) { final URI destination = context.getDestination(); if (destination == null || context.getTargetAffinity() == Affinity.LOCAL) { // nothing we can/should do. return; } // Oops, we got some wrong information! addBlackListedDestination(context, destination); // clear the weak affinity so that cluster invocations can be re-targeted. context.setWeakAffinity(Affinity.NONE); context.setTargetAffinity(null); context.setDestination(null); context.requestRetry(); }
context.setDestination(uri); Logs.INVOCATION.tracef("Performed cluster discovery (target affinity = %s, destination = %s)", context.getTargetAffinity(), context.getDestination()); context.setTargetAffinity(new NodeAffinity(selectedNode)); Logs.INVOCATION.tracef("Performed cluster discovery (target affinity = %s, destination = %s)", context.getTargetAffinity(), context.getDestination());
context.setDestination(uri); Logs.INVOCATION.tracef("Performed cluster discovery (target affinity = %s, destination = %s)", context.getTargetAffinity(), context.getDestination()); context.setTargetAffinity(new NodeAffinity(selectedNode)); Logs.INVOCATION.tracef("Performed cluster discovery (target affinity = %s, destination = %s)", context.getTargetAffinity(), context.getDestination());
private void removeNode(final AbstractInvocationContext context) { final Affinity targetAffinity = context.getTargetAffinity(); if (targetAffinity instanceof NodeAffinity) { final RemoteEJBReceiver ejbReceiver = context.getClientContext().getAttachment(RemoteTransportProvider.ATTACHMENT_KEY); if (ejbReceiver != null) { final EJBClientChannel ejbClientChannel = context.getAttachment(RemoteEJBReceiver.EJBCC_KEY); if (ejbClientChannel != null) { final NodeInformation nodeInformation = ejbReceiver.getDiscoveredNodeRegistry().getNodeInformation(((NodeAffinity) targetAffinity).getNodeName()); if (nodeInformation != null) { nodeInformation.removeModule(ejbClientChannel, context.getLocator().getIdentifier().getModuleIdentifier()); } } } } } }
private void removeNode(final AbstractInvocationContext context) { final Affinity targetAffinity = context.getTargetAffinity(); if (targetAffinity instanceof NodeAffinity) { final RemoteEJBReceiver ejbReceiver = context.getClientContext().getAttachment(RemoteTransportProvider.ATTACHMENT_KEY); if (ejbReceiver != null) { final EJBClientChannel ejbClientChannel = context.getAttachment(RemoteEJBReceiver.EJBCC_KEY); if (ejbClientChannel != null) { final NodeInformation nodeInformation = ejbReceiver.getDiscoveredNodeRegistry().getNodeInformation(((NodeAffinity) targetAffinity).getNodeName()); if (nodeInformation != null) { nodeInformation.removeModule(ejbClientChannel, context.getLocator().getIdentifier().getModuleIdentifier()); } } } } } }
private void processMissingTarget(final AbstractInvocationContext context) { final URI destination = context.getDestination(); if (destination == null || context.getTargetAffinity() == Affinity.LOCAL) { // some later interceptor cleared it out on us return; } // Oops, we got some wrong information! addBlackListedDestination(context, destination); final EJBLocator<?> locator = context.getLocator(); if (! (locator.getAffinity() instanceof ClusterAffinity)) { // it *was* "none" affinity, but it has been relocated; locate it back again context.setLocator(locator.withNewAffinity(Affinity.NONE)); } // clear the weak affinity so that cluster invocations can be re-targeted. context.setWeakAffinity(Affinity.NONE); context.setTargetAffinity(null); context.setDestination(null); context.requestRetry(); } }
private void processMissingTarget(final AbstractInvocationContext context) { final URI destination = context.getDestination(); if (destination == null || context.getTargetAffinity() == Affinity.LOCAL) { // some later interceptor cleared it out on us return; } // Oops, we got some wrong information! addBlackListedDestination(context, destination); final EJBLocator<?> locator = context.getLocator(); if (! (locator.getAffinity() instanceof ClusterAffinity)) { // it *was* "none" affinity, but it has been relocated; locate it back again context.setLocator(locator.withNewAffinity(Affinity.NONE)); } // clear the weak affinity so that cluster invocations can be re-targeted. context.setWeakAffinity(Affinity.NONE); context.setTargetAffinity(null); context.setDestination(null); context.requestRetry(); } }
Logs.INVOCATION.tracef("Performed first-match discovery(target affinity = %s, destination = %s)", context.getTargetAffinity(), context.getDestination()); return queue.getProblems();
Logs.INVOCATION.tracef("Performed first-match discovery(target affinity = %s, destination = %s)", context.getTargetAffinity(), context.getDestination()); return queue.getProblems();