Package org.openrdf.repository

Examples of org.openrdf.repository.RepositoryConnection.rollback()


        } catch (IllegalArgumentException e) {
            try {
                //to avoid Exception logs in case store(..) throws an Exception
                //in the case allowCreate and canNotCreateIsError do not allow
                //the store operation
                con.rollback();
            } catch (RepositoryException ignore) {}
            throw e;
        } finally {
            if(con != null){
                try {
View Full Code Here


        } catch (IllegalArgumentException e) {
            try {
                //to avoid Exception logs in case store(..) throws an Exception
                //in the case allowCreate and canNotCreateIsError do not allow
                //the store operation
                con.rollback();
            } catch (RepositoryException ignore) {}
            throw e;
        } finally {
            if(con != null){
                try {
View Full Code Here

            con.begin();
            testRepoContent(con);
            con.commit();
        } finally {
            if (con.isActive()) {
                con.rollback();
            }
            con.close();
        }
        loader.shutdown();
    }
View Full Code Here

            con.begin();
            testRepoContent(con);
            con.commit();
        } finally {
            if (con.isActive()) {
                con.rollback();
            }
            con.close();
        }
        loader.shutdown();
    }
View Full Code Here

            con.begin();
            testRepoContent(con);
            con.commit();
        } finally {
            if (con.isActive()) {
                con.rollback();
            }
            con.close();
        }
        loader.shutdown();
    }
View Full Code Here

        RepositoryConnection connection1 = repository.getConnection();
        try {
            connection1.begin();
            connection1.add(subject,predicate,object);
            connection1.rollback();

        } finally {
            connection1.close();
        }
View Full Code Here

            con2.add(r1,r2,r3);

            Assert.assertTrue(con2.hasStatement(r1,r2,r3,true));

            con2.rollback();
            con1.commit();
        } catch (ConcurrentModificationException ex) {

        } finally {
            con1.close();
View Full Code Here

            log.info("listed {} triples in {} ms", stmts, end-start);


            con.commit();
        } catch(RepositoryException ex) {
            con.rollback();
        } finally {
            con.close();
        }

    }
View Full Code Here

                        } else if (sparqlQuery instanceof BooleanQuery) {
                            query((BooleanQuery) sparqlQuery, booleanWriter);
                        } else if (sparqlQuery instanceof GraphQuery) {
                            query((GraphQuery) sparqlQuery, graphWriter);
                        } else {
                            connection.rollback();
                            throw new InvalidArgumentException("SPARQL query type " + sparqlQuery.getClass() + " not supported!");
                        }

                        connection.commit();
                    } catch (Exception ex) {
View Full Code Here

                            throw new InvalidArgumentException("SPARQL query type " + sparqlQuery.getClass() + " not supported!");
                        }

                        connection.commit();
                    } catch (Exception ex) {
                        connection.rollback();
                        throw ex;
                    } finally {
                        connection.close();
                    }
                } catch(RepositoryException e) {
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.