Package javax.jcr

Examples of javax.jcr.Session.logout()


                this.repositoryOutputProvider.handleChangeEvent(fileName);
            } catch (final RepositoryException re) {
                throw (IOException)new IOException("Cannot write file " + fileName + ", reason: " + re.toString()).initCause(re);
            } finally {
                if ( session != null ) {
                    session.logout();
                }
            }
        }
    }
View Full Code Here


            }
        } catch (final RepositoryException re) {
            logger.debug("Error while trying to get node at " + path, re);
        } finally {
            if ( session != null ) {
                session.logout();
            }
        }

        return res;
    }
View Full Code Here

            }
        } catch (final RepositoryException re) {
            logger.debug("Error while trying to get node at " + path, re);
        } finally {
            if ( session != null ) {
                session.logout();
            }
        }
        if ( !this.dirty ) {
            synchronized ( this.usedResources ) {
                this.usedResources.add(path);
View Full Code Here

        Session session = repository.loginAdministrative(null);
        try {
            new org.apache.jackrabbit.core.TestContentLoader().loadTestContent(session);
        } finally {
            session.logout();
        }
    }

}
View Full Code Here

                } catch (Throwable t) {
                    // TODO: log !!
                    workspace = "default"; // fall back name
                } finally {
                    if (tmp != null) {
                        tmp.logout();
                    }
                }
            }

            locatorFactory = new SlingLocatorFactory(workspace);
View Full Code Here

                    // cause a 403/FORBIDDEN response
                    throw new RepositoryException("Cannot get session for " + user, re);

                } finally {
                    if (adminSession != null) {
                        adminSession.logout();
                    }
                }
            }
        };
    }
View Full Code Here

                    assertTrue("Expecting JCR events after adding " + path, c.get() > 0);
                }
            };

        } finally {
            s.logout();
            cnd.close();
            if(counter != null) {
                counter.close();
            }
        }
View Full Code Here

                    assertTrue("Expecting JCR events after modifying " + path, c.get() > 0);
                }
            };

        } finally {
            s.logout();
            cnd.close();
            counter.close();
        }

    }
View Full Code Here

            session.save();

            Thread.sleep(3500);

        } finally {
            session.logout();
        }
    }

    public abstract SlingRepository getRepository();
}
View Full Code Here

        try {
            admin = this.createAdministrativeSession(workspace);
            return admin.impersonate(new SimpleCredentials(serviceUserName, new char[0]));
        } finally {
            if (admin != null) {
                admin.logout();
            }
        }
    }

    // login implementations (may be overwritten)
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.