private static URI getApplicationAssociation(ConcurrentMap<Application, URI> applications, AbstractInvocationContext context) { return applications.get(toApplication(context.getLocator().getIdentifier())); }
private Application updateOrFollowApplication(AbstractInvocationContext context, ConcurrentMap<Application, URI> applications, boolean register) { URI destination = context.getDestination(); if (destination != null) { EJBIdentifier identifier = context.getLocator().getIdentifier(); Application application = toApplication(identifier); URI existing = applications.putIfAbsent(application, destination); if (existing != null) { // Someone else set a mapping, use it instead context.setDestination(existing); } else { if (register) { context.putAttachment(APPLICATION, application); } return application; } } else { Logs.TXN.trace("Failed assertion: a destination was supposed ot be present but wasn't"); } return null; }
Logs.INVOCATION.debugf("Calling invoke(module = %s, strong affinity = %s, weak affinity = %s): ", locatorRef.get().getIdentifier(), locatorRef.get().getAffinity(), weakAffinity);
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()); } } } } } }
if (identifier != locator.getIdentifier()) { throw Logs.REMOTING.mismatchedMethodLocation();
marshaller.writeObject(locator.getIdentifier());
final EJBModuleIdentifier moduleIdentifier = receiverInvocationContext.getClientInvocationContext().getLocator().getIdentifier().getModuleIdentifier(); final NodeInformation nodeInformation = discoveredNodeRegistry.getNodeInformation(getChannel().getConnection().getRemoteEndpointName()); nodeInformation.removeModule(EJBClientChannel.this, moduleIdentifier);
filterSpec = getFilterSpec(locator.getIdentifier().getModuleIdentifier()); return doAnyDiscovery(context, filterSpec, locator);
private static URI getApplicationAssociation(ConcurrentMap<Application, URI> applications, AbstractInvocationContext context) { return applications.get(toApplication(context.getLocator().getIdentifier())); }
private static URI getApplicationAssociation(ConcurrentMap<Application, URI> applications, AbstractInvocationContext context) { return applications.get(toApplication(context.getLocator().getIdentifier())); }
private Application updateOrFollowApplication(AbstractInvocationContext context, ConcurrentMap<Application, URI> applications, boolean register) { URI destination = context.getDestination(); if (destination != null) { EJBIdentifier identifier = context.getLocator().getIdentifier(); Application application = toApplication(identifier); URI existing = applications.putIfAbsent(application, destination); if (existing != null) { // Someone else set a mapping, use it instead context.setDestination(existing); } else { if (register) { context.putAttachment(APPLICATION, application); } return application; } } else { Logs.TXN.trace("Failed assertion: a destination was supposed ot be present but wasn't"); } return null; }
private Application updateOrFollowApplication(AbstractInvocationContext context, ConcurrentMap<Application, URI> applications, boolean register) { URI destination = context.getDestination(); if (destination != null) { EJBIdentifier identifier = context.getLocator().getIdentifier(); Application application = toApplication(identifier); URI existing = applications.putIfAbsent(application, destination); if (existing != null) { // Someone else set a mapping, use it instead context.setDestination(existing); } else { if (register) { context.putAttachment(APPLICATION, application); } return application; } } else { Logs.TXN.trace("Failed assertion: a destination was supposed ot be present but wasn't"); } return null; }
Logs.INVOCATION.debugf("Calling invoke(module = %s, strong affinity = %s, weak affinity = %s): ", locatorRef.get().getIdentifier(), locatorRef.get().getAffinity(), weakAffinity);
Logs.INVOCATION.debugf("Calling invoke(module = %s, strong affinity = %s, weak affinity = %s): ", locatorRef.get().getIdentifier(), locatorRef.get().getAffinity(), weakAffinity);
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()); } } } } } }
marshaller.writeObject(locator.getIdentifier());
final EJBModuleIdentifier moduleIdentifier = receiverInvocationContext.getClientInvocationContext().getLocator().getIdentifier().getModuleIdentifier(); final NodeInformation nodeInformation = discoveredNodeRegistry.getNodeInformation(getChannel().getConnection().getRemoteEndpointName()); nodeInformation.removeModule(EJBClientChannel.this, moduleIdentifier);
filterSpec = getFilterSpec(locator.getIdentifier().getModuleIdentifier()); return doAnyDiscovery(context, filterSpec, locator);
filterSpec = getFilterSpec(locator.getIdentifier().getModuleIdentifier()); return doAnyDiscovery(context, filterSpec, locator);