try (final Unmarshaller unmarshaller = createUnmarshaller()) { unmarshaller.start(response); result = unmarshaller.readObject();
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; } }
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; } }
final Xid[] xids = new Xid[count]; final Unmarshaller unmarshaller = channel.createUnmarshaller(); unmarshaller.start(Marshalling.createByteInput(inputStream)); for (int i = 0; i < count; i ++) {
try (final Unmarshaller unmarshaller = createUnmarshaller()) { unmarshaller.start(response); e = unmarshaller.readObject(Exception.class);
try (final Unmarshaller unmarshaller = createUnmarshaller()) { unmarshaller.start(response); affinity = unmarshaller.readObject(Affinity.class); try (final Unmarshaller unmarshaller = createUnmarshaller()) { unmarshaller.start(response); e = unmarshaller.readObject(Exception.class);
try (final Unmarshaller unmarshaller = createUnmarshaller()) { unmarshaller.start(response); result = unmarshaller.readObject();
try (final Unmarshaller unmarshaller = createUnmarshaller()) { unmarshaller.start(response); result = unmarshaller.readObject();
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 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; } }
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; } }
final Xid[] xids = new Xid[count]; final Unmarshaller unmarshaller = channel.createUnmarshaller(); unmarshaller.start(Marshalling.createByteInput(inputStream)); for (int i = 0; i < count; i ++) {
final Xid[] xids = new Xid[count]; final Unmarshaller unmarshaller = channel.createUnmarshaller(); unmarshaller.start(Marshalling.createByteInput(inputStream)); for (int i = 0; i < count; i ++) {
try (final Unmarshaller unmarshaller = createUnmarshaller()) { unmarshaller.start(response); e = unmarshaller.readObject(Exception.class);
try (final Unmarshaller unmarshaller = createUnmarshaller()) { unmarshaller.start(response); e = unmarshaller.readObject(Exception.class);
try (final Unmarshaller unmarshaller = createUnmarshaller()) { unmarshaller.start(response); affinity = unmarshaller.readObject(Affinity.class); try (final Unmarshaller unmarshaller = createUnmarshaller()) { unmarshaller.start(response); e = unmarshaller.readObject(Exception.class);
try (final Unmarshaller unmarshaller = createUnmarshaller()) { unmarshaller.start(response); affinity = unmarshaller.readObject(Affinity.class); try (final Unmarshaller unmarshaller = createUnmarshaller()) { unmarshaller.start(response); e = unmarshaller.readObject(Exception.class);