public void setRollbackOnly(final Xid xid, final ConnectionPeerIdentity peerIdentity) throws XAException { assert peerIdentity.getId() == 0; // no operation }
public SimpleTransactionControl begin(final ConnectionPeerIdentity peerIdentity) throws SystemException { assert peerIdentity.getId() == 0; return new EJBSimpleTransactionControl(channel); } }
public int prepare(final Xid xid, final ConnectionPeerIdentity peerIdentity) throws XAException { assert peerIdentity.getId() == 0; return executeSimpleInvocation(new XidTransactionID(xid), Protocol.TXN_PREPARE_REQUEST, true, false, false); }
public void beforeCompletion(final Xid xid, final ConnectionPeerIdentity peerIdentity) throws XAException { assert peerIdentity.getId() == 0; executeSimpleInvocation(new XidTransactionID(xid), Protocol.TXN_BEFORE_COMPLETION_REQUEST, false, false, false); }
public void forget(final Xid xid, final ConnectionPeerIdentity peerIdentity) throws XAException { assert peerIdentity.getId() == 0; executeSimpleInvocation(new XidTransactionID(xid), Protocol.TXN_FORGET_REQUEST, false, false, false); }
public void commit(final Xid xid, final boolean onePhase, final ConnectionPeerIdentity peerIdentity) throws XAException { assert peerIdentity.getId() == 0; executeSimpleInvocation(new XidTransactionID(xid), Protocol.TXN_COMMIT_REQUEST, false, true, onePhase); }
public void rollback(final Xid xid, final ConnectionPeerIdentity peerIdentity) throws XAException { assert peerIdentity.getId() == 0; executeSimpleInvocation(new XidTransactionID(xid), Protocol.TXN_ROLLBACK_REQUEST, false, false, false); }
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(); }
void createSubcontext(final CompositeName compositeName, final ConnectionPeerIdentity peerIdentity) throws NamingException { final int authId = peerIdentity.getId(); final int version = this.version; if (version == 1 && authId != 0) {
void unbind(final Name name, final ConnectionPeerIdentity peerIdentity) throws NamingException { final int authId = peerIdentity.getId(); final int version = this.version; if (version == 1 && authId != 0) {
void destroySubcontext(final Name name, final ConnectionPeerIdentity peerIdentity) throws NamingException { final int authId = peerIdentity.getId(); final int version = this.version; if (version == 1 && authId != 0) {
void bind(final Name name, final Object obj, final ConnectionPeerIdentity peerIdentity, final boolean rebind) throws NamingException { final int authId = peerIdentity.getId(); final int version = this.version; if (version == 1 && authId != 0) {
CloseableNamingEnumeration<Binding> listBindings(final Name name, final RemoteContext remoteContext, final ConnectionPeerIdentity peerIdentity) throws NamingException { final int authId = peerIdentity.getId(); final int version = this.version; if (version == 1 && authId != 0) {
public Xid[] recover(final int flag, final String parentName, final ConnectionPeerIdentity peerIdentity) throws XAException { assert peerIdentity.getId() == 0; final InvocationTracker invocationTracker = channel.getInvocationTracker(); final PlainTransactionInvocation invocation = invocationTracker.addInvocation(PlainTransactionInvocation::new);
void rename(final Name oldName, final Name newName, final ConnectionPeerIdentity peerIdentity) throws NamingException { final int authId = peerIdentity.getId(); final int version = this.version; if (version == 1 && authId != 0) {
Object lookup(final RemoteContext context, final Name name, final ConnectionPeerIdentity peerIdentity, final boolean preserveLinks) throws NamingException { final int authId = peerIdentity.getId(); final int version = this.version; if (version == 1 && authId != 0) {
os.writeByte(Protocol.M_XA_BEFORE); Protocol.writeParam(Protocol.P_XID, os, xid); final int peerIdentityId = peerIdentity.getId(); if (peerIdentityId != 0) Protocol.writeParam(Protocol.P_SEC_CONTEXT, os, peerIdentityId, Protocol.UNSIGNED); } catch (IOException e) {
os.writeByte(Protocol.M_XA_FORGET); Protocol.writeParam(Protocol.P_XID, os, xid); final int peerIdentityId = peerIdentity.getId(); if (peerIdentityId != 0) Protocol.writeParam(Protocol.P_SEC_CONTEXT, os, peerIdentityId, Protocol.UNSIGNED); } catch (IOException e) {
os.writeByte(Protocol.M_XA_PREPARE); Protocol.writeParam(Protocol.P_XID, os, xid); final int peerIdentityId = peerIdentity.getId(); if (peerIdentityId != 0) Protocol.writeParam(Protocol.P_SEC_CONTEXT, os, peerIdentityId, Protocol.UNSIGNED); } catch (IOException e) {
os.writeByte(Protocol.M_XA_COMMIT); Protocol.writeParam(Protocol.P_XID, os, xid); final int peerIdentityId = peerIdentity.getId(); if (peerIdentityId != 0) Protocol.writeParam(Protocol.P_SEC_CONTEXT, os, peerIdentityId, Protocol.UNSIGNED); if (onePhase) Protocol.writeParam(Protocol.P_ONE_PHASE, os);