Package org.openrdf.sail

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


            }

            inserter.endRDF();
            sc.commit();
        } finally {
            sc.rollback();
            sc.close();
        }
    }
}
View Full Code Here


        try {
            sc.begin();
            count = countStatements(sc.getStatements(tagging, RDF.TYPE, null, includeInferred));
            assertEquals(1, count);
        } finally {
            sc.rollback();
            sc.close();
        }
    }

    public void testCountStatements() throws Exception {
View Full Code Here

        sc = sail.getConnection();
        try {
            sc.begin();
            assertEquals(27, countStatements(sc, ctxA));
        } finally {
            sc.rollback();
            sc.close();
        }
    }

    private static long countStatements(final CloseableIteration<? extends Statement, SailException> iter)
View Full Code Here

                } finally {
                    persistenceLock.unlock();
                }
            } catch(SailException ex) {
                connection.rollback();
                sail.rollback();
                throw ex;
            } catch(SQLException ex) {
                sail.rollback();
                connection.rollback();
                throw ex;
View Full Code Here

            } catch(SailException ex) {
                connection.rollback();
                sail.rollback();
                throw ex;
            } catch(SQLException ex) {
                sail.rollback();
                connection.rollback();
                throw ex;
            } finally {
                connection.close();
                sail.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.