try { out.write(Protocol.INVOCATION_REQUEST); out.writeShort(invocation.getIndex());
try { out.write(Protocol.INVOCATION_REQUEST); out.writeShort(invocation.getIndex());
try { out.write(Protocol.INVOCATION_REQUEST); out.writeShort(invocation.getIndex());
boolean cancelInvocation(final EJBReceiverInvocationContext receiverContext, boolean cancelIfRunning) { if (version < 3 && ! cancelIfRunning) { // keep legacy behavior return false; } final MethodInvocation invocation = receiverContext.getClientInvocationContext().getAttachment(INV_KEY); if (invocation == null) { // lost it somehow return false; } if (invocation.alloc()) try { final int index = invocation.getIndex(); try (MessageOutputStream out = invocationTracker.allocateMessage()) { out.write(Protocol.CANCEL_REQUEST); out.writeShort(index); if (version >= 3) { out.writeBoolean(cancelIfRunning); } } catch (IOException ignored) {} } finally { invocation.free(); } // now await the result return invocation.receiverInvocationContext.getClientInvocationContext().awaitCancellationResult(); }
boolean cancelInvocation(final EJBReceiverInvocationContext receiverContext, boolean cancelIfRunning) { if (version < 3 && ! cancelIfRunning) { // keep legacy behavior return false; } final MethodInvocation invocation = receiverContext.getClientInvocationContext().getAttachment(INV_KEY); if (invocation == null) { // lost it somehow return false; } if (invocation.alloc()) try { final int index = invocation.getIndex(); try (MessageOutputStream out = invocationTracker.allocateMessage()) { out.write(Protocol.CANCEL_REQUEST); out.writeShort(index); if (version >= 3) { out.writeBoolean(cancelIfRunning); } } catch (IOException ignored) {} } finally { invocation.free(); } // now await the result return invocation.receiverInvocationContext.getClientInvocationContext().awaitCancellationResult(); }
boolean cancelInvocation(final EJBReceiverInvocationContext receiverContext, boolean cancelIfRunning) { if (version < 3 && ! cancelIfRunning) { // keep legacy behavior return false; } final MethodInvocation invocation = receiverContext.getClientInvocationContext().getAttachment(INV_KEY); if (invocation == null) { // lost it somehow return false; } if (invocation.alloc()) try { final int index = invocation.getIndex(); try (MessageOutputStream out = invocationTracker.allocateMessage()) { out.write(Protocol.CANCEL_REQUEST); out.writeShort(index); if (version >= 3) { out.writeBoolean(cancelIfRunning); } } catch (IOException ignored) {} } finally { invocation.free(); } // now await the result return invocation.receiverInvocationContext.getClientInvocationContext().awaitCancellationResult(); }