Package javax.jcr

Examples of javax.jcr.Session.logout()


            this.log(LogService.LOG_ERROR,
                "createWorkspace: Cannot create requested workspace "
                    + workspace, t);
        } finally {
            if (tmpSession != null) {
                tmpSession.logout();
            }
        }

        // fall back to failure
        return false;
View Full Code Here


                    listener, getEventTypes(), path, true, null, null, false);
        } catch (RepositoryException e) {
            throw new ReplicationTriggerException("unable to register handler " + requestHandler, e);
        } finally {
            if (session != null) {
                session.logout();
            }
        }
    }

    public void unregister(@Nonnull ReplicationRequestHandler requestHandler) throws ReplicationTriggerException {
View Full Code Here

                session.getWorkspace().getObservationManager().removeEventListener(listener);
            } catch (RepositoryException e) {
                throw new ReplicationTriggerException("unable to unregister handler " + requestHandler, e);
            } finally {
                if (session != null) {
                    session.logout();
                }
            }
        }
    }
View Full Code Here

    public void testRootNode() throws Exception {
        final Session s = repo.loginAdministrative(null);
        try {
            assertNotNull("Expecting a non-null Session", s);
        } finally {
            s.logout();
        }
    }
}
View Full Code Here

        RepositoryUtil.startRepository();

        // get admin session
        final Session adminSession = RepositoryUtil.getRepository().loginAdministrative(null);
        assertNotNull(adminSession);
        adminSession.logout();

        // get anonymous session
        final Session anonSession = RepositoryUtil.getRepository().login();
        assertNotNull(anonSession);
        anonSession.logout();
View Full Code Here

        adminSession.logout();

        // get anonymous session
        final Session anonSession = RepositoryUtil.getRepository().login();
        assertNotNull(anonSession);
        anonSession.logout();

        // stop the repository
        RepositoryUtil.stopRepository();
    }
}
View Full Code Here

            } else {
                throw new Exception("could not get a Session to deliver package to the repository");
            }
        } finally {
            if (session != null) {
                session.logout();
            }
        }
    }

    public boolean importPackage(@Nonnull ResourceResolver resourceResolver, @Nonnull ReplicationPackage replicationPackage) throws ReplicationPackageImportException {
View Full Code Here

                }
            } catch (RepositoryException e) {
                throw new RuntimeException("Unable to get root node or to create new root node.", e);
            } finally {
                if ( session != null ) {
                    session.logout();
                }
            }
            this.initialized = true;
        }
    }
View Full Code Here

                result = bundleIds.toArray(new Long[bundleIds.size()]);
            } catch (RepositoryException e) {
                // we ignore this for now
            }
        } finally {
            session.logout();
        }
        return result;
    }

    /**
 
View Full Code Here

                return root;
            }
        } catch (RepositoryException re) {
            throw new BackingStoreException("Unable to load preferences.", re);
        } finally {
            session.logout();
        }
        return null;
    }

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