Package org.neo4j.graphdb

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


            getOrCreateRelationship(sourceNode, targetNode, Named.relation(type));

            tx.success();
        } catch(Exception e) {
            tx.failure();
            throw new RuntimeException(
                "Could not add relation of type " + type + " between " + source + " and " + target, e);
        } finally {
          tx.finish();
        }
View Full Code Here


                }
            }

            tx.success();
        } catch(Exception e) {
            tx.failure();
            throw new RuntimeException(
                "Could not add relation of type " + type + " between " + source + " and " + target, e);
        } finally {
          tx.finish();
        }
View Full Code Here

                    targets.add(target);
                }
            }
            tx.success();
        } catch(Exception e) {
            tx.failure();
            throw new RuntimeException(
                "Could not clean up relation of type " + type + " from " + source, e);
        } finally {
          tx.finish();
        }
View Full Code Here

    try {
      stack.next(method, object);
      if(! validator.hasErrors()) {
        tx.success();
      } else {
        tx.failure();
      }
    } finally {
      tx.finish();
    }
  }
View Full Code Here

            try {
                rawGraphDB.getReferenceNode().delete();
                tx.success();
            } catch (Exception e) {
                tx.failure();
            } finally {
                tx.finish();
            }

            GlobalGraphOperations graphOperations = GlobalGraphOperations.at(rawGraphDB);
View Full Code Here

            // Hallelujah
            tx.success();

        } catch (SAXException e) {
            System.err.println(e);
            tx.failure();
        } catch (IOException e) {
            System.err.println(e);
            tx.failure();
        } finally {
            tx.finish();
View Full Code Here

        } catch (SAXException e) {
            System.err.println(e);
            tx.failure();
        } catch (IOException e) {
            System.err.println(e);
            tx.failure();
        } finally {
            tx.finish();
        }
    }
View Full Code Here

      }
      // Mark the transaction as succeed
      tx.success();
    } catch (Exception e) {
      // Mark the transaction as failed
      tx.failure();
      throw e;
    } finally {
      // Mark the transactin as ended
      tx.finish();
    }
View Full Code Here

      }
      // Mark the transaction as succeed
      tx.success();
    } catch (Exception e) {
      // Mark the transaction as failed
      tx.failure();
      throw e;
    } finally {
      // Mark the transactin as ended
      tx.finish();
    }
View Full Code Here

            try {
                Node endNode = db.getNodeById(end);
                startNode.createRelationshipTo(endNode, withName(relationshipType));
                tx.success();
            } catch (final Exception e) {
                tx.failure();
            } finally {
                tx.close();
                relList.add(end);
                relationshipCache.put(start, relList);
            }
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.