Search in sources :

Example 1 with ClientTransactionManagerService

use of com.hazelcast.client.spi.ClientTransactionManagerService in project hazelcast by hazelcast.

the class XAResourceProxy method getGroupName.

private String getGroupName() {
    ClientContext context = getContext();
    ClientTransactionManagerService transactionManager = context.getTransactionManager();
    return transactionManager.getGroupName();
}
Also used : ClientContext(com.hazelcast.client.spi.ClientContext) ClientTransactionManagerService(com.hazelcast.client.spi.ClientTransactionManagerService)

Example 2 with ClientTransactionManagerService

use of com.hazelcast.client.spi.ClientTransactionManagerService in project hazelcast by hazelcast.

the class XAResourceProxy method createTransactionContext.

private TransactionContext createTransactionContext(Xid xid) {
    ClientContext clientContext = getContext();
    ClientTransactionManagerService transactionManager = clientContext.getTransactionManager();
    TransactionContext context = transactionManager.newXATransactionContext(xid, timeoutInSeconds.get());
    getTransaction(context).begin();
    return context;
}
Also used : TransactionContext(com.hazelcast.transaction.TransactionContext) ClientContext(com.hazelcast.client.spi.ClientContext) ClientTransactionManagerService(com.hazelcast.client.spi.ClientTransactionManagerService)

Aggregations

ClientContext (com.hazelcast.client.spi.ClientContext)2 ClientTransactionManagerService (com.hazelcast.client.spi.ClientTransactionManagerService)2 TransactionContext (com.hazelcast.transaction.TransactionContext)1