use of org.apache.ignite.internal.processors.platform.client.ClientIntResponse in project ignite by apache.
the class ClientTxStartRequest method process.
/**
* {@inheritDoc}
*/
@Override
public ClientResponse process(ClientConnectionContext ctx) {
GridNearTxLocal tx;
ctx.kernalContext().gateway().readLock();
try {
tx = ctx.kernalContext().cache().context().tm().newTx(false, false, null, concurrency, isolation, timeout, true, null, 0, lb, false);
} finally {
ctx.kernalContext().gateway().readUnlock();
}
try {
tx.suspend();
int txId = ctx.nextTxId();
ctx.addTxContext(new ClientTxContext(txId, tx));
return new ClientIntResponse(requestId(), txId);
} catch (Exception e) {
try {
tx.close();
} catch (Exception e1) {
e.addSuppressed(e1);
}
throw (e instanceof IgniteClientException) ? (IgniteClientException) e : new IgniteClientException(ClientStatus.FAILED, e.getMessage(), e);
}
}
Aggregations