Package org.openrdf.repository

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


                con.add(DummyProvider.class.getResourceAsStream(filename), resource, RDFFormat.TURTLE);

                con.commit();
            } catch(RepositoryException ex) {
                con.rollback();
            } catch (RDFParseException e) {
                throw new DataRetrievalException("could not parse resource data for file "+filename);
            } catch (IOException e) {
                throw new DataRetrievalException("could not load resource data for file "+filename);
            } finally {
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

                    Assert.assertTrue(ResourceUtils.hasType(subCon_2, subject, TypeFacade.TYPE));
                    Assert.assertTrue(f_2.isFacadeable(subject, TypeFacade.class));

                    subCon_2.commit();
                } finally {
                    if (subCon_2.isActive()) subCon_2.rollback();
                    subCon_2.close();
                }
            }
        } catch (ConcurrentModificationException ex) {
            // do nothing, H2 locking
View Full Code Here

            cX.commit();
            Assert.assertTrue(cO.hasStatement(subject, RDF.TYPE, type, false));

            cO.commit();
        } finally {
            if (cX.isActive()) cX.rollback();
            if (cO.isActive()) cO.rollback();
            cX.close();
            cO.close();
        }
    }
View Full Code Here

                final Facading f2 = FacadingFactory.createFacading(fc2);
                Assert.assertNull(f2.createFacade(subject, FooFacade.class).getString());

                fc2.commit();
            } finally {
                if (fc2.isActive()) fc2.rollback();
                fc2.close();
            }

            fc.commit();
View Full Code Here

                final Facading f3 = FacadingFactory.createFacading(fc3);
                Assert.assertEquals(v, f3.createFacade(subject, FooFacade.class).getString());

                fc3.commit();
            } finally {
                if (fc3.isActive()) fc3.rollback();
                fc3.close();
            }
        } finally {
            if (fc.isActive()) fc.rollback();
            fc.close();
View Full Code Here

                    final TypeFacade tf_1 = f_1.createFacade(subject, TypeFacade.class);
                    Assert.assertNull(tf_1.getTitle());
                    Assert.assertTrue(f_1.isFacadeable(subject, TypeFacade.class));
                    Assert.assertTrue(ResourceUtils.hasType(subCon_1, subject, TypeFacade.TYPE));

                    subCon_1.rollback();
                } finally {
                    if (subCon_1.isActive()) subCon_1.rollback();
                    subCon_1.close();
                }
            }
View Full Code Here

                    Assert.assertTrue(f_1.isFacadeable(subject, TypeFacade.class));
                    Assert.assertTrue(ResourceUtils.hasType(subCon_1, subject, TypeFacade.TYPE));

                    subCon_1.rollback();
                } finally {
                    if (subCon_1.isActive()) subCon_1.rollback();
                    subCon_1.close();
                }
            }

            mainCon.commit();
View Full Code Here

            cX.commit();
            Assert.assertTrue(cO.hasStatement(subject, RDF.TYPE, type, false));

            cO.commit();
        } finally {
            if (cX.isActive()) cX.rollback();
            if (cO.isActive()) cO.rollback();
            cX.close();
            cO.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.