public void writeInt(final int v) throws IOException { delegate.writeInt(v); }
/** {@inheritDoc} */ public void writeFloat(final float v) throws IOException { writeInt(Float.floatToIntBits(v)); }
public static void writeId(final MessageOutputStream stream, final int version, final int id) throws IOException { if (version == 1) { stream.writeInt(id); } else { stream.writeShort(id); } }
if (version == 1) { mos.writeByte(Protocol.P_LIST); mos.writeInt(resultList.size()); try (Marshaller marshaller = createMarshaller(mos, configuration)) { for (NameClassPair nameClassPair : resultList) { mos.writeInt(resultList.size()); for (NameClassPair nameClassPair : resultList) { mos.writeUTF(nameClassPair.getName());
mos.writeByte(Protocol.P_LIST); mos.writeInt(resultList.size()); try (Marshaller marshaller = createMarshaller(mos, configuration)) { for (Binding binding : resultList) {
public <T> StatefulEJBLocator<T> openSession(final StatelessEJBLocator<T> statelessLocator, final ConnectionPeerIdentity identity, EJBSessionCreationInvocationContext clientInvocationContext) throws Exception { SessionOpenInvocation<T> invocation = invocationTracker.addInvocation(id -> new SessionOpenInvocation<>(id, statelessLocator, clientInvocationContext)); try (MessageOutputStream out = invocationTracker.allocateMessage()) { out.write(Protocol.OPEN_SESSION_REQUEST); out.writeShort(invocation.getIndex()); writeRawIdentifier(statelessLocator, out); if (version >= 3) { out.writeInt(identity.getId()); invocation.setOutflowHandle(writeTransaction(clientInvocationContext.getTransaction(), out)); } } catch (IOException e) { CreateException createException = new CreateException(e.getMessage()); createException.initCause(e); throw createException; } // await the response return invocation.getResult(); }
messageOutputStream.writeInt(authId); messageOutputStream.writeUTF(compositeName.toString());
messageOutputStream.writeInt(authId); messageOutputStream.writeUTF(NamingUtils.toCompositeName(name).toString());
messageOutputStream.writeInt(authId); messageOutputStream.writeUTF(NamingUtils.toCompositeName(name).toString());
messageOutputStream.writeInt(authId); messageOutputStream.writeUTF(compositeName.toString());
messageOutputStream.writeInt(authId); messageOutputStream.writeUTF(NamingUtils.toCompositeName(name).toString()); try (Marshaller marshaller = createMarshaller(messageOutputStream, configuration)) {
messageOutputStream.writeInt(authId); messageOutputStream.writeUTF(compositeName.toString());
os.writeShort(invocation.getIndex()); os.writeUTF(parentName); os.writeInt(flag); } catch (IOException e) { throw new XAException(XAException.XAER_RMERR);
messageOutputStream.writeInt(authId); messageOutputStream.writeUTF(NamingUtils.toCompositeName(oldName).toString()); messageOutputStream.writeUTF(NamingUtils.toCompositeName(newName).toString());
messageOutputStream.writeInt(authId); messageOutputStream.writeUTF(NamingUtils.toCompositeName(name).toString());
public void writeInt(final int v) throws IOException { delegate.writeInt(v); }
/** {@inheritDoc} */ public void writeFloat(final float v) throws IOException { writeInt(Float.floatToIntBits(v)); }
public static void writeId(final MessageOutputStream stream, final int version, final int id) throws IOException { if (version == 1) { stream.writeInt(id); } else { stream.writeShort(id); } }
public static void writeId(final MessageOutputStream stream, final int version, final int id) throws IOException { if (version == 1) { stream.writeInt(id); } else { stream.writeShort(id); } }
public <T> StatefulEJBLocator<T> openSession(final StatelessEJBLocator<T> statelessLocator, final ConnectionPeerIdentity identity, EJBSessionCreationInvocationContext clientInvocationContext) throws Exception { SessionOpenInvocation<T> invocation = invocationTracker.addInvocation(id -> new SessionOpenInvocation<>(id, statelessLocator, clientInvocationContext)); try (MessageOutputStream out = invocationTracker.allocateMessage()) { out.write(Protocol.OPEN_SESSION_REQUEST); out.writeShort(invocation.getIndex()); writeRawIdentifier(statelessLocator, out); if (version >= 3) { out.writeInt(identity.getId()); invocation.setOutflowHandle(writeTransaction(clientInvocationContext.getTransaction(), out)); } } catch (IOException e) { CreateException createException = new CreateException(e.getMessage()); createException.initCause(e); throw createException; } // await the response return invocation.getResult(); }