public int read() throws IOException { return delegate.read(); }
public void handleMessage(Channel channel, MessageInputStream message) { try (MessageInputStream mis = message) { byte[] namingHeader = new byte[6]; mis.read(namingHeader); if (! Arrays.equals(namingHeader, ProtocolUtils.NAMING_BYTES)) { throw Messages.log.invalidHeader();
throw Log.log.unknownResponseXa(XAException.XAER_RMERR); int id = is.read(); if (id == Protocol.P_XA_ERROR) { int len = StreamUtils.readPackedSignedInt32(is); final XAException xa = Log.log.peerXaException(error); xa.initCause(RemoteExceptionCause.readFromStream(is)); if ((id = is.read()) != -1) { XAException ex = Log.log.unrecognizedParameter(XAException.XAER_RMFAIL, id); ex.addSuppressed(xa); final SecurityException sx = Log.log.peerSecurityException(); sx.initCause(RemoteExceptionCause.readFromStream(is)); if ((id = is.read()) != -1) { XAException ex = Log.log.unrecognizedParameter(XAException.XAER_RMFAIL, id); ex.addSuppressed(sx);
throw Log.log.unknownResponseXa(XAException.XAER_RMERR); int id = is.read(); if (id == Protocol.P_XA_ERROR) { int len = StreamUtils.readPackedSignedInt32(is); final XAException xa = Log.log.peerXaException(error); xa.initCause(RemoteExceptionCause.readFromStream(is)); if ((id = is.read()) != -1) { XAException ex = Log.log.unrecognizedParameter(XAException.XAER_RMFAIL, id); ex.addSuppressed(xa); final SecurityException sx = Log.log.peerSecurityException(); sx.initCause(RemoteExceptionCause.readFromStream(is)); if ((id = is.read()) != -1) { XAException ex = Log.log.unrecognizedParameter(XAException.XAER_RMFAIL, id); ex.addSuppressed(sx);
public int read(final byte[] b) throws IOException { return delegate.read(b); }
throw Log.log.unknownResponseXa(XAException.XAER_RMERR); int id = is.read(); if (id == Protocol.P_XA_ERROR) { int len = StreamUtils.readPackedSignedInt32(is); final XAException xa = Log.log.peerXaException(error); xa.initCause(RemoteExceptionCause.readFromStream(is)); if ((id = is.read()) != -1) { XAException ex = Log.log.unrecognizedParameter(XAException.XAER_RMFAIL, id); ex.addSuppressed(xa); final SecurityException sx = Log.log.peerSecurityException(); sx.initCause(RemoteExceptionCause.readFromStream(is)); if ((id = is.read()) != -1) { XAException ex = Log.log.unrecognizedParameter(XAException.XAER_RMFAIL, id); ex.addSuppressed(sx);
public int read(final byte[] b, final int off, final int len) throws IOException { return delegate.read(b, off, len); }
throw Log.log.unknownResponseXa(XAException.XAER_RMERR); int id = is.read(); if (id == Protocol.P_XA_ERROR) { int len = StreamUtils.readPackedSignedInt32(is); final XAException xa = Log.log.peerXaException(error); xa.initCause(RemoteExceptionCause.readFromStream(is)); if ((id = is.read()) != -1) { XAException ex = Log.log.unrecognizedParameter(XAException.XAER_RMFAIL, id); ex.addSuppressed(xa); final SecurityException sx = Log.log.peerSecurityException(); sx.initCause(RemoteExceptionCause.readFromStream(is)); if ((id = is.read()) != -1) { XAException ex = Log.log.unrecognizedParameter(XAException.XAER_RMFAIL, id); ex.addSuppressed(sx);
void handleCapabilityMessage(final MessageInputStream message, final int invId) throws IOException { while (message.read() != -1) { // ignore parameters readIntParam(message, StreamUtils.readPackedUnsignedInt32(message)); } // acknowledge no capabilities try (final MessageOutputStream outputStream = messageTracker.openMessageUninterruptibly()) { outputStream.writeShort(invId); outputStream.writeByte(M_RESP_CAPABILITY); } return; }
throw Log.log.unknownResponseXa(XAException.XAER_RMERR); int id = is.read(); if (id == Protocol.P_XA_ERROR) { int len = StreamUtils.readPackedSignedInt32(is); final XAException xa = Log.log.peerXaException(error); xa.initCause(RemoteExceptionCause.readFromStream(is)); if ((id = is.read()) != -1) { XAException ex = Log.log.unrecognizedParameter(XAException.XAER_RMFAIL, id); ex.addSuppressed(xa); final SecurityException sx = Log.log.peerSecurityException(); sx.initCause(RemoteExceptionCause.readFromStream(is)); if ((id = is.read()) != -1) { XAException ex = Log.log.unrecognizedParameter(XAException.XAER_RMFAIL, id); ex.addSuppressed(sx);
final int version = min(3, StreamUtils.readInt8(message)); while (message.read() != -1) { message.skip(Long.MAX_VALUE);
throw Log.log.unknownResponseXa(XAException.XAER_RMERR); int id = is.read(); if (id == Protocol.P_XA_ERROR) { int len = StreamUtils.readPackedSignedInt32(is); final XAException xa = Log.log.peerXaException(error); xa.initCause(RemoteExceptionCause.readFromStream(is)); if ((id = is.read()) != -1) { XAException ex = Log.log.unrecognizedParameter(XAException.XAER_RMFAIL, id); ex.addSuppressed(Log.log.peerXaException(error)); final SecurityException sx = Log.log.peerSecurityException(); sx.initCause(RemoteExceptionCause.readFromStream(is)); if ((id = is.read()) != -1) { XAException ex = Log.log.unrecognizedParameter(XAException.XAER_RMFAIL, id); ex.addSuppressed(Log.log.peerSecurityException());
static XAException readAppException(final EJBClientChannel channel, final BlockingInvocation.Response response) throws XAException { Exception e; try (final Unmarshaller unmarshaller = channel.createUnmarshaller()) { try (MessageInputStream inputStream = response.getInputStream()) { unmarshaller.start(Marshalling.createByteInput(inputStream)); e = unmarshaller.readObject(Exception.class); unmarshaller.finish(); // The version is probably < 3 else we would not be here // drain off attachments so the server doesn't complain while (inputStream.read() != -1) { inputStream.skip(Long.MAX_VALUE); } } } catch (IOException | ClassNotFoundException e1) { throw new XAException(XAException.XAER_RMERR); } if (e == null) { throw new XAException(XAException.XAER_RMFAIL); } try { throw e; } catch (RuntimeException | XAException e1) { throw e1; } catch (Exception e1) { final XAException xae = new XAException(XAException.XAER_RMERR); xae.initCause(e1); return xae; } }
static SystemException readAppException(final EJBClientChannel channel, final BlockingInvocation.Response response) throws SystemException { Exception e; try (final Unmarshaller unmarshaller = channel.createUnmarshaller()) { try (MessageInputStream inputStream = response.getInputStream()) { unmarshaller.start(Marshalling.createByteInput(inputStream)); e = unmarshaller.readObject(Exception.class); unmarshaller.finish(); // The version is probably < 3 else we would not be here // drain off attachments so the server doesn't complain while (inputStream.read() != -1) { inputStream.skip(Long.MAX_VALUE); } } } catch (IOException | ClassNotFoundException e1) { throw new SystemException(); } if (e == null) { throw new SystemException(); } try { throw e; } catch (RuntimeException | SystemException e1) { throw e1; } catch (Exception e1) { final SystemException e2 = new SystemException(); e2.initCause(e1); return e2; } }
int secContext = 0; boolean hasSecContext = false; while ((param = message.read()) != - 1) { len = StreamUtils.readPackedUnsignedInt32(message); switch (param) {
int secContext = 0; boolean hasSecContext = false; while ((param = message.read()) != - 1) { len = StreamUtils.readPackedUnsignedInt32(message); switch (param) {
boolean hasContext = false; boolean hasSecContext = false; while ((param = message.read()) != -1) { len = StreamUtils.readPackedUnsignedInt32(message); switch (param) {
int secContext = 0; boolean hasSecContext = false; while ((param = message.read()) != - 1) { len = StreamUtils.readPackedUnsignedInt32(message); switch (param) {
int secContext = 0; boolean hasSecContext = false; while ((param = message.read()) != - 1) { len = StreamUtils.readPackedUnsignedInt32(message); switch (param) {
int secContext = 0; boolean hasSecContext = false; while ((param = message.read()) != - 1) { len = StreamUtils.readPackedUnsignedInt32(message); switch (param) {