Package org.neo4j.graphdb

Examples of org.neo4j.graphdb.Transaction.failure()


            } else {
                properties.setProperty(key, permission.name());
            }
            transaction.success();
        } catch (Exception e) {
            transaction.failure();
        } finally {
            transaction.finish();
        }
    }
View Full Code Here


      transaction.success();
     
    } catch (Exception e) {
      System.out.println("ERROR ABORTING");
      System.out.println(e.getMessage());
      transaction.failure();
     
    } finally {
      transaction.finish();
      System.out.println("Finished indexing.");
    }
View Full Code Here

     
      ContextHelper.indexUserNode(userNode, email, servletContext);
     
      tx.success();
    } catch (Exception e){
      tx.failure();
      IOHelper.log(e.getMessage());
    } finally {
      tx.finish();
    }
  }
View Full Code Here

      userNode = graphDB.createNode();
      save();
     
      tx.success();
    } catch (Exception e){
      tx.failure();
      IOHelper.log(e.getMessage());
    } finally {
      tx.finish();
    }
  }
View Full Code Here

    Transaction tx = graphDB.beginTx();
    try{
      userNode.setProperty(DBNodeProperties.USER_DELETED, true);
      tx.success();
    } catch (Exception e){
      tx.failure();
      IOHelper.log(e.getMessage());
    } finally {
      tx.finish();
    }
  }
View Full Code Here

      tx.success();
      tx.close();
      System.out.println("Finished writing " + records + " point records to database");
    } catch (Exception e) {
      System.err.println("Error initializing database: " + e);
      tx.failure();
    }
  }

  class TimeRecord {
    int chunk;
View Full Code Here

        try {
            spatialLayer.add(node);
            tx.success();
            return singleton(node);
        } catch (Exception e) {
            tx.failure();
            e.printStackTrace();
            throw new RuntimeException("Error adding nodes to layer "+layer,e);
        } finally {
            tx.close();
        }
View Full Code Here

                spatialLayer.add(node);
            }
            tx.success();
            return nodes;
        } catch (Exception e) {
            tx.failure();
            e.printStackTrace();
            throw new RuntimeException("Error adding nodes to layer "+layer,e);
        } finally {
            tx.close();
        }
View Full Code Here

            Index<Node> index = indexMan.forNodes("layer1", config);
            System.out.println("testInvalidConfig: invalid index requested, did not throw exception.");
            tx.success();    // Won't happen currently
        } catch (IllegalArgumentException e) {
            // Bail out
            tx.failure();
            System.out.println("testInvalidConfig: invalid index creation failed, good, let the tx rollback");
        }
        tx.close();
        System.out.println("testInvalidConfig: tx done.");
        // Assert index isn't referenced in the manager
View Full Code Here

            flushDirty();
            tx.success();
            return result;
        } catch(Throwable t) {
      tx.failure();
      if (t instanceof Error) throw (Error)t;
      if (t instanceof RuntimeException) throw (RuntimeException)t;
      throw new org.springframework.data.neo4j.core.UncategorizedGraphStoreException("Error persisting entity "+getEntity(),t);
        } finally {
            tx.close();
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.