void addAddress(EJBClientChannel clientChannel) { synchronized (this) { addressesByConnection.put(clientChannel, (InetSocketAddress) clientChannel.getChannel().getConnection().getPeerAddress()); serviceURLCache = null; } }
EJBSimpleTransactionControl(final EJBClientChannel channel) { this.channel = channel; final UserTransactionID transactionID = channel.allocateUserTransactionID(); this.transactionID = transactionID; simpleIdResolver = connection -> { if (channel.getChannel().getConnection() != connection) { throw Log.log.invalidTransactionConnection(); } return transactionID.getId(); }; }
private Executor getRetryExecutor() { return retryExecutorWrapper.getExecutor(getChannel().getConnection().getEndpoint().getXnioWorker()); }
UserTransactionID allocateUserTransactionID() { final ThreadLocalRandom random = ThreadLocalRandom.current(); final String nodeName = getChannel().getConnection().getRemoteEndpointName(); final byte[] nameBytes; try {
final URI peerURI = channel.getChannel().getConnection().getPeerURI(); TempInfo tempInfo = new TempInfo(peerURI); tempInfo.modules = entry.getValue(); final URI peerURI = channel.getChannel().getConnection().getPeerURI(); map.computeIfAbsent(peerURI, TempInfo::new);
final String message = inputStream.readUTF(); final EJBModuleIdentifier moduleIdentifier = receiverInvocationContext.getClientInvocationContext().getLocator().getIdentifier().getModuleIdentifier(); final NodeInformation nodeInformation = discoveredNodeRegistry.getNodeInformation(getChannel().getConnection().getRemoteEndpointName()); nodeInformation.removeModule(EJBClientChannel.this, moduleIdentifier); receiverInvocationContext.requestFailed(new NoSuchEJBException(message + " @ " + getChannel().getConnection().getPeerURI()), getRetryExecutor()); } catch (IOException e) { receiverInvocationContext.requestFailed(new EJBException("Failed to read 'No such EJB' response", e), getRetryExecutor());
throw new NoSuchEJBException(message + " @ " + getChannel().getConnection().getPeerURI());
void addAddress(EJBClientChannel clientChannel) { synchronized (this) { addressesByConnection.put(clientChannel, (InetSocketAddress) clientChannel.getChannel().getConnection().getPeerAddress()); serviceURLCache = null; } }
void addAddress(EJBClientChannel clientChannel) { synchronized (this) { addressesByConnection.put(clientChannel, (InetSocketAddress) clientChannel.getChannel().getConnection().getPeerAddress()); serviceURLCache = null; } }
EJBSimpleTransactionControl(final EJBClientChannel channel) { this.channel = channel; final UserTransactionID transactionID = channel.allocateUserTransactionID(); this.transactionID = transactionID; simpleIdResolver = connection -> { if (channel.getChannel().getConnection() != connection) { throw Log.log.invalidTransactionConnection(); } return transactionID.getId(); }; }
EJBSimpleTransactionControl(final EJBClientChannel channel) { this.channel = channel; final UserTransactionID transactionID = channel.allocateUserTransactionID(); this.transactionID = transactionID; simpleIdResolver = connection -> { if (channel.getChannel().getConnection() != connection) { throw Log.log.invalidTransactionConnection(); } return transactionID.getId(); }; }
private Executor getRetryExecutor() { return retryExecutorWrapper.getExecutor(getChannel().getConnection().getEndpoint().getXnioWorker()); }
private Executor getRetryExecutor() { return retryExecutorWrapper.getExecutor(getChannel().getConnection().getEndpoint().getXnioWorker()); }
UserTransactionID allocateUserTransactionID() { final ThreadLocalRandom random = ThreadLocalRandom.current(); final String nodeName = getChannel().getConnection().getRemoteEndpointName(); final byte[] nameBytes; try {
UserTransactionID allocateUserTransactionID() { final ThreadLocalRandom random = ThreadLocalRandom.current(); final String nodeName = getChannel().getConnection().getRemoteEndpointName(); final byte[] nameBytes; try {
final URI peerURI = channel.getChannel().getConnection().getPeerURI(); TempInfo tempInfo = new TempInfo(peerURI); tempInfo.modules = entry.getValue(); final URI peerURI = channel.getChannel().getConnection().getPeerURI(); map.computeIfAbsent(peerURI, TempInfo::new);
final URI peerURI = channel.getChannel().getConnection().getPeerURI(); TempInfo tempInfo = new TempInfo(peerURI); tempInfo.modules = entry.getValue(); final URI peerURI = channel.getChannel().getConnection().getPeerURI(); map.computeIfAbsent(peerURI, TempInfo::new);
final String message = inputStream.readUTF(); final EJBModuleIdentifier moduleIdentifier = receiverInvocationContext.getClientInvocationContext().getLocator().getIdentifier().getModuleIdentifier(); final NodeInformation nodeInformation = discoveredNodeRegistry.getNodeInformation(getChannel().getConnection().getRemoteEndpointName()); nodeInformation.removeModule(EJBClientChannel.this, moduleIdentifier); receiverInvocationContext.requestFailed(new NoSuchEJBException(message + " @ " + getChannel().getConnection().getPeerURI()), getRetryExecutor()); } catch (IOException e) { receiverInvocationContext.requestFailed(new EJBException("Failed to read 'No such EJB' response", e), getRetryExecutor());
throw new NoSuchEJBException(message + " @ " + getChannel().getConnection().getPeerURI());
throw new NoSuchEJBException(message + " @ " + getChannel().getConnection().getPeerURI());