EJBLocator(final Class<T> viewType, final String appName, final String moduleName, final String beanName, final String distinctName, final Affinity affinity) { this(viewType, new EJBIdentifier(appName, moduleName, beanName, distinctName), affinity); }
private void writeObject(ObjectOutputStream oos) throws IOException { final ObjectOutputStream.PutField fields = oos.putFields(); final EJBIdentifier identifier = this.identifier; fields.put("identifier", identifier); fields.put("viewType", viewType); fields.put("affinity", affinity); // now compat fields fields.put("appName", identifier.getAppName()); fields.put("moduleName", identifier.getModuleName()); fields.put("beanName", identifier.getBeanName()); fields.put("distinctName", identifier.getDistinctName()); oos.writeFields(); }
/** * Determine if this EJB identifier is equal to the given object. * * @param other the object to test * @return {@code true} if the object is equal to this one, {@code false} otherwise */ public boolean equals(final Object other) { return other instanceof EJBIdentifier && equals((EJBIdentifier) other); }
static Application toApplication(EJBIdentifier id) { return new Application(id.getAppName(), id.getModuleName(), id.getDistinctName()); }
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()); } } } } } }
/** * Get the application name. * * @return the application name */ public String getAppName() { return identifier.getAppName(); }
/** * Get the module name. * * @return the module name */ public String getModuleName() { return identifier.getModuleName(); }
/** * Get the EJB bean name. * * @return the EJB bean name */ public String getBeanName() { return identifier.getBeanName(); }
/** * Get the module distinct name. * * @return the module distinct name */ public String getDistinctName() { return identifier.getDistinctName(); }
/** * Determine if this EJB identifier is equal to the given object. * * @param other the object to test * @return {@code true} if the object is equal to this one, {@code false} otherwise */ public boolean equals(final EJBIdentifier other) { return other != null && ( other == this || other.hashCode() == hashCode() && moduleIdentifier.equals(other.moduleIdentifier) && Objects.equals(beanName, other.beanName) ); }
static Application toApplication(EJBIdentifier id) { return new Application(id.getAppName(), id.getModuleName(), id.getDistinctName()); }
final EJBModuleIdentifier moduleIdentifier = receiverInvocationContext.getClientInvocationContext().getLocator().getIdentifier().getModuleIdentifier(); final NodeInformation nodeInformation = discoveredNodeRegistry.getNodeInformation(getChannel().getConnection().getRemoteEndpointName()); nodeInformation.removeModule(EJBClientChannel.this, moduleIdentifier);
/** * Get the application name. * * @return the application name */ public String getAppName() { return identifier.getAppName(); }
/** * Get the module name. * * @return the module name */ public String getModuleName() { return identifier.getModuleName(); }
/** * Get the EJB bean name. * * @return the EJB bean name */ public String getBeanName() { return identifier.getBeanName(); }
/** * Get the module distinct name. * * @return the module distinct name */ public String getDistinctName() { return identifier.getDistinctName(); }
/** * Determine if this EJB identifier is equal to the given object. * * @param other the object to test * @return {@code true} if the object is equal to this one, {@code false} otherwise */ public boolean equals(final EJBIdentifier other) { return other != null && ( other == this || other.hashCode() == hashCode() && moduleIdentifier.equals(other.moduleIdentifier) && Objects.equals(beanName, other.beanName) ); }
final String appName = ejbIdentifier.getAppName(); final String moduleName = ejbIdentifier.getModuleName(); final String beanName = ejbIdentifier.getBeanName(); final String distinctName = ejbIdentifier.getDistinctName();
public StatefulRemoteViewInstanceFactory(final String applicationName, final String moduleName, final String distinctName, final String beanName) { this(new EJBIdentifier(applicationName == null ? "" : applicationName, moduleName, beanName, distinctName)); }
static Application toApplication(EJBIdentifier id) { return new Application(id.getAppName(), id.getModuleName(), id.getDistinctName()); }