Package com.hazelcast.core

Examples of com.hazelcast.core.Transaction.rollback()


                    } catch (Exception e) {
                        LOG.error("Hzlq Exception caught: " + e, e);
                        // Rollback
                        if (transaction != null) {
                            log.trace("Rollback transaction: {}", transaction);
                            transaction.rollback();
                        }
                    }
                }
                // It's OK, I commit
                if (exchange.getException() == null && transaction != null && transaction.getStatus() == Transaction.TXN_STATUS_ACTIVE) {
View Full Code Here


                continue;
            } catch (Throwable e) {
                // Rollback
                if (transaction != null) {
                    log.trace("Rollback transaction: {}", transaction);
                    transaction.rollback();
                }
                getExceptionHandler().handleException("Error processing exchange", exchange, e);
            }
        }
    }
View Full Code Here

        try {
            endpointMap.put(endpointURI, endpoint);
            endpointOwners.put(localMemberAddr, endpointURI);
            txn.commit();
        } catch (Throwable e) {
            txn.rollback();
            throw new ServiceRuntimeException(e);
        }
        localEndpoints.put(endpointURI, endpoint);
        logger.info("Add endpoint - " + endpoint);
    }
View Full Code Here

        try {
            endpointMap.put(endpointURI, endpoint);
            endpointOwners.put(localMemberAddr, endpointURI);
            txn.commit();
        } catch (Throwable e) {
            txn.rollback();
            throw new ServiceRuntimeException(e);
        }
        localEndpoints.put(endpointURI, endpoint);
        logger.info("Add endpoint - " + endpoint);
    }
View Full Code Here

                        });

                        if (exchange.getException() != null) {
                            // Rollback
                            if (transaction != null) {
                                transaction.rollback();
                            }
                            getExceptionHandler().handleException("Error processing exchange", exchange, exchange.getException());
                        }

                    } catch (Exception e) {
View Full Code Here

                    } catch (Exception e) {
                        LOG.error("Hzlq Exception caught: " + e, e);
                        // Rollback
                        if (transaction != null) {
                            log.trace("Rollback transaction: {}", transaction);
                            transaction.rollback();
                        }
                    }
                }
                // It's OK, I commit
                if (exchange.getException() == null && transaction != null && transaction.getStatus() == Transaction.TXN_STATUS_ACTIVE) {
View Full Code Here

                continue;
            } catch (Throwable e) {
                // Rollback
                if (transaction != null) {
                    log.trace("Rollback transaction: {}", transaction);
                    transaction.rollback();
                }
                getExceptionHandler().handleException("Error processing exchange", exchange, e);
            }
        }
    }
View Full Code Here

    IMap<String, String> imap = instance.getMap(AUTH_MAP_NAME);
    assertNull(imap.get("key"));
    imap.put("key", "value");
    transaction.commit();
    // Check that when trying to rollback after having commited will throw an IllegalStageException
    transaction.rollback();   
  }

  @Test
  public void testHazelcastJavaClient() throws UnknownHostException {
    // Connect a client to the cluster
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.