Search in sources :

Example 1 with XATransactionContextImpl

use of com.hazelcast.transaction.impl.xa.XATransactionContextImpl in project hazelcast by hazelcast.

the class ClientEndpointImpl method destroy.

public void destroy() throws LoginException {
    clearAllListeners();
    LoginContext lc = loginContext;
    if (lc != null) {
        lc.logout();
    }
    for (TransactionContext context : transactionContextMap.values()) {
        if (context instanceof XATransactionContextImpl) {
            continue;
        }
        try {
            context.rollbackTransaction();
        } catch (HazelcastInstanceNotActiveException e) {
            getLogger().finest(e);
        } catch (Exception e) {
            getLogger().warning(e);
        }
    }
    authenticated = false;
}
Also used : HazelcastInstanceNotActiveException(com.hazelcast.core.HazelcastInstanceNotActiveException) LoginContext(javax.security.auth.login.LoginContext) TransactionContext(com.hazelcast.transaction.TransactionContext) XATransactionContextImpl(com.hazelcast.transaction.impl.xa.XATransactionContextImpl) LoginException(javax.security.auth.login.LoginException) HazelcastInstanceNotActiveException(com.hazelcast.core.HazelcastInstanceNotActiveException) TransactionException(com.hazelcast.transaction.TransactionException)

Aggregations

HazelcastInstanceNotActiveException (com.hazelcast.core.HazelcastInstanceNotActiveException)1 TransactionContext (com.hazelcast.transaction.TransactionContext)1 TransactionException (com.hazelcast.transaction.TransactionException)1 XATransactionContextImpl (com.hazelcast.transaction.impl.xa.XATransactionContextImpl)1 LoginContext (javax.security.auth.login.LoginContext)1 LoginException (javax.security.auth.login.LoginException)1