Package org.apache.marmotta.ldcache.api

Examples of org.apache.marmotta.ldcache.api.LDCachingConnection.rollback()


                    con.addCacheEntry(entry.getResource(),entry);
                }

                con.commit();
            } catch(RepositoryException ex) {
                con.rollback();
            } finally {
                con.close();
            }
        } catch(RepositoryException ex) {
            ex.printStackTrace(); // TODO: handle error
View Full Code Here


                if(!forceRefresh && entry != null && entry.getExpiryDate().after(new Date())) {
                    log.debug("not refreshing resource {}, as the cached entry is not yet expired",resource);
                    return;
                }
            } catch(RepositoryException ex) {
                cacheConnection.rollback();
            } finally {
                cacheConnection.close();
            }

            // 4.
View Full Code Here

                        cacheConnection1.removeCacheEntry(resource);
                        cacheConnection1.addCacheEntry(resource, newEntry);
                        cacheConnection1.commit();
                    } catch (RepositoryException e) {
                        log.error("repository error while refreshing the remote resource {} from the Linked Data Cloud", resource, e);
                        cacheConnection1.rollback();
                    } finally {
                        cacheConnection1.close();
                    }
                }
View Full Code Here

                    log.error("refreshing the remote resource {} from the Linked Data Cloud failed ({})",resource,e.getMessage());
                    //log.info("exception was:",e);
                    return;
                } catch (RepositoryException ex) {
                    log.error("repository error while refreshing the remote resource {} from the Linked Data Cloud", resource, ex);
                    cacheConnection2.rollback();
                } finally {
                    cacheConnection2.close();
                }
            } finally {
                this.lock.readLock().unlock();
View Full Code Here

                                con.removeCacheEntry(next.getResource());
                                con.addCacheEntry(next.getResource(), next);

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

            Assert.assertFalse(backend.isCached(subject1.stringValue()));
            Assert.assertTrue(backend.isCached(subject2.stringValue()));
            Assert.assertEquals(1,asList(backend.listCacheEntries()).size());
            Assert.assertEquals(1,asList(backend.listExpiredEntries()).size());
        } catch(RepositoryException ex) {
            con.rollback();
        } finally {
            con.close();
        }
    }
View Full Code Here

            Assert.assertFalse(backend.isCached(subject1.stringValue()));
            Assert.assertTrue(backend.isCached(subject2.stringValue()));
            Assert.assertEquals(1,asList(backend.listCacheEntries()).size());
            Assert.assertEquals(1,asList(backend.listExpiredEntries()).size());
        } catch(RepositoryException ex) {
            con.rollback();
        } finally {
            con.close();
        }
    }
View Full Code Here

            con.commit();

            Assert.assertEquals(1,asList(backend.listCacheEntries()).size());
            Assert.assertEquals(1,asList(backend.listExpiredEntries()).size());
        } catch(RepositoryException ex) {
            con.rollback();
        } finally {
            con.close();
        }
    }
View Full Code Here

                    con.addCacheEntry(entry.getResource(),entry);
                }

                con.commit();
            } catch(RepositoryException ex) {
                con.rollback();
            } finally {
                con.close();
            }
        } catch(RepositoryException ex) {
            ex.printStackTrace(); // TODO: handle error
View Full Code Here

                if(!forceRefresh && entry != null && entry.getExpiryDate().after(new Date())) {
                    log.debug("not refreshing resource {}, as the cached entry is not yet expired",resource);
                    return;
                }
            } catch(RepositoryException ex) {
                cacheConnection.rollback();
            } finally {
                cacheConnection.close();
            }

            // 4.
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.