Package org.openrdf.repository

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


                con.remove(resource, null, null);

                con.commit();
            } catch(RepositoryException ex) {
                con.rollback();
            } finally {
                con.close();
            }
        } catch (RepositoryException e) {
            log.error("could not remove cache entry for {}: {}", resource.stringValue(), e.getMessage());
View Full Code Here


                con.clear();

                con.commit();
            } catch(RepositoryException ex) {
                con.rollback();
            } finally {
                con.close();
            }
        } catch(RepositoryException ex) {
            log.error("could not clear cache: {}", ex.getMessage());
View Full Code Here

            ));


            con.commit();
        } catch(RepositoryException ex) {
            con.rollback();
        } finally {
            con.close();
        }
    }
View Full Code Here

        try {
            con.begin();
            applyPatch(con, patch, contexts);
            con.commit();
        } catch (final Throwable t) {
            con.rollback();
            throw t;
        } finally {
            con.close();
        }
    }
View Full Code Here

            RdfPatchUtil.applyPatch(con, invalidPatch);

            Assert.fail("applyPatch should throw an InvalidPatchDocumentException");
        } catch (final Throwable t) {
            con.rollback();
            throw t;
        } finally {
            con.close();
        }
    }
View Full Code Here

                    con.begin();
                    final boolean result = delegate.matches(con);
                    con.commit();
                    return result;
                } catch (final Throwable t) {
                    con.rollback();
                    throw t;
                } finally {
                    con.close();
                }
            } finally {
View Full Code Here

                con.begin();
                boolean matches = delegate.matches(con);
                con.commit();
                return matches;
            } catch (final Throwable t) {
                con.rollback();
                throw t;
            } finally {
                con.close();
            }
        } catch (RuntimeException r) {
View Full Code Here

                ModelCommons.add(triples, con.getStatements(resource,null,null,true));
                ce.setTriples(triples);

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

            return ce;
View Full Code Here

                con.remove(resource,null,null);
                con.add(entry.getTriples());

                con.commit();
            } catch(RepositoryException ex) {
                con.rollback();
            } finally {
                con.close();
            }
        } catch (IOException | RepositoryException e) {
            log.error("could not store cache entry for {}: {}", resource.stringValue(), e.getMessage());
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

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.