Package org.openrdf.sail

Examples of org.openrdf.sail.SailConnection.rollback()


                cid.close();
            }

            con.commit();
        } catch (final Throwable t) {
            con.rollback();
            throw t;
        } finally {
            con.close();
        }
    }
View Full Code Here


            con.clear();
            assertFalse(hasStatement(con, null, null, null));

            con.commit();
        } catch (final Throwable t) {
            con.rollback();
            throw t;
        } finally {
            con.close();
        }
        final SailConnection con2 = sail.getConnection();
View Full Code Here

            assertFalse(hasStatement(con2, null, null, null, c1));
            assertTrue(hasStatement(con2, null, null, null, c2));

            con2.commit();
        } catch (final Throwable t) {
            con2.rollback();
            throw t;
        } finally {
            con2.close();
        }
    }
View Full Code Here

            assertFalse(hasStatement(con, u1, p1, l1));
            assertTrue(hasStatement(con, u3, p3, l3));

            con.commit();
        } catch (final Throwable t) {
            con.rollback();
            throw t;
        } finally {
            con.close();
        }
        final SailConnection con2 = sail.getConnection();
View Full Code Here

            assertTrue(hasStatement(con2, u2, p2, l2, c2));
            assertTrue(hasStatement(con2, u3, p3, l3, c1));

            con2.commit();
        } catch (final Throwable t) {
            con2.rollback();
            throw t;
        } finally {
            con2.close();
        }
    }
View Full Code Here

            con.addStatement(u3, p3, l3, c1);
            con.addStatement(u4, p4, l4, c2);
           
            con.commit();
        } catch (final Throwable t) {
            con.rollback();
            throw t;
        } finally {
            con.close();
        }
    }
View Full Code Here

        } catch(SailException | SQLException | ReasoningException ex) {
            log.error("REASONING ERROR: could not process rule, database state will be inconsistent! Message: {}",ex.getMessage());
            log.debug("Exception details:",ex);

            connection.rollback();
            sail.rollback();
            throw ex;
        } finally {
            connection.close();
            sail.close();
        }
View Full Code Here

            int used = inf.compute(steps);

            results = inf.currentHashtagResults(limit);

        } finally {
            sc.rollback();
            sc.close();
        }
        /*
        System.out.println("" + used + " of " + steps + " cycles used.  Results:");
        for (Resource r : results) {
View Full Code Here

            return TWEETS_WITH_ALTERNATIVE_TOPICS_QUERY
                    .replace(ALTERNATIVE_TOPICS_PLACEHOLDER, sb.toString())
                    .replace(MIN_TIMESTAMP_PLACEHOLDER, after);
        } finally {
            sc.rollback();
            sc.close();
        }
    }

    // TODO: bad timestamps could cause SPARQL evaluation errors. It may be better to catch them at a higher level.
View Full Code Here

                        }
                    } finally {
                        results.close();
                    }
                } finally {
                    sc.rollback();
                    sc.close();
                }
            } finally {
                c.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.