Package javax.jcr

Examples of javax.jcr.Session.logout()


            }
            return list.toArray(new PreferencesImpl[list.size()]);
        } catch (RepositoryException re) {
            throw new BackingStoreException("Unable to load preferences.", re);
        } finally {
            session.logout();
        }
    }

    /**
     * @see org.apache.felix.prefs.BackingStore#remove(java.lang.Long)
View Full Code Here


                parent.save();
            }
        } catch (RepositoryException re) {
            throw new BackingStoreException("Unable to remove preferences.", re);
        } finally {
            session.logout();
        }
    }

    /**
     * @see org.apache.felix.prefs.BackingStore#store(org.apache.felix.prefs.PreferencesImpl)
View Full Code Here

        try {
            this.store(prefs, session);
        } catch (RepositoryException re) {
            throw new BackingStoreException("Unable to store preferences.", re);
        } finally {
            session.logout();
        }
    }

    protected void store(PreferencesImpl prefs, Session session)
    throws BackingStoreException, RepositoryException {
View Full Code Here

            if (session == null) {
                throw new TransportAuthenticationException("failed to authenticate" + path);
            }
            if (!session.hasPermission(path, privilege)) {
                session.logout();
                throw new TransportAuthenticationException("failed to access path " + path + " with privilege " + privilege);
            }

            log.info("authenticated path {} with privilege {}", path, privilege);
            return session;
View Full Code Here

            log.info("authenticated path {} with privilege {}", path, privilege);
            return session;
        } catch (RepositoryException re) {
            if (session != null) {
                session.logout();
            }
            throw new TransportAuthenticationException(re);
        }
    }
View Full Code Here

    @Test
    public void testVarSlingExists() throws Exception {
        final Session session = slingRepository.loginAdministrative(null);
        session.getRootNode().getNode("var/sling");
        session.logout();
    }

}
View Full Code Here

                renderJobs(req, pw, s, jobConsole);
            } catch(RepositoryException re) {
                throw new ServletException("RepositoryExceptio in renderContent()", re);
            } finally {
                if(s != null) {
                    s.logout();
                }
            }
        }
       
        private void processCommands(HttpServletRequest req, PrintWriter pw, Session s, JobConsole console) {
View Full Code Here

            }

        } finally {
            session.removeItem("/content");
            session.save();
            session.logout();
        }
    }

    @Test
    public void removeProperty() throws Exception {
View Full Code Here

            assertThat(content.getPrimaryNodeType().getName(), equalTo("sling:Folder"));

        } finally {
            session.removeItem("/content");
            session.save();
            session.logout();

            IOUtils.closeQuietly(cndInput);
        }
    }
View Full Code Here

            assertThat(content.getPrimaryNodeType().getName(), equalTo("nt:folder"));

        } finally {
            session.removeItem("/content");
            session.save();
            session.logout();

            IOUtils.closeQuietly(cndInput);
        }
    }
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.