public Object call() throws RepositoryException { service.dispose(unwrap(sessionInfo)); return null; } }, "dispose(SessionInfo)", new Object[]{unwrap(sessionInfo)});
public Object call() throws RepositoryException { service.dispose(subscription); return null; } }, "dispose(Subscription)", new Object[]{});
public Object call() throws RepositoryException { service.dispose(unwrap(sessionInfo)); return null; } }, "dispose(SessionInfo)", new Object[]{unwrap(sessionInfo)});
public Object call() throws RepositoryException { service.dispose(subscription); return null; } }, "dispose(Subscription)", new Object[]{});
public void dispose(Subscription subscription) throws RepositoryException { repositoryService.dispose(subscription); }
public void dispose(SessionInfo sessionInfo) throws RepositoryException { repositoryService.dispose(sessionInfo); }
/** * * @param listener The listener to be removed. * @throws RepositoryException If an error occurs. */ public void removeEventListener(InternalEventListener listener) throws RepositoryException { synchronized (listeners) { listeners.remove(listener); if (listeners.isEmpty()) { service.dispose(subscription); subscription = null; } else { service.updateEventFilters(subscription, getEventFilters(listeners)); } } }
/** * * @param listener The listener to be removed. * @throws RepositoryException If an error occurs. */ public void removeEventListener(InternalEventListener listener) throws RepositoryException { synchronized (listeners) { listeners.remove(listener); if (listeners.isEmpty()) { service.dispose(subscription); subscription = null; } else { service.updateEventFilters(subscription, getEventFilters(listeners)); } } }
@Override protected void tearDown() throws Exception { if (sessionInfo != null) { helper.getRepositoryService().dispose(sessionInfo); } super.tearDown(); } }
protected void tearDown() throws Exception { if (sessionInfo != null) { helper.getRepositoryService().dispose(sessionInfo); } super.tearDown(); }
@Override protected void tearDown() throws Exception { try { removeTestNode(testPath); } finally { rs.dispose(si); super.tearDown(); } }
/** * @see Repository#login(javax.jcr.Credentials, String) */ public Session login(Credentials credentials, String workspaceName) throws LoginException, NoSuchWorkspaceException, RepositoryException { SessionInfo info = config.getRepositoryService().obtain(credentials, workspaceName); try { if (info instanceof XASessionInfo) { return new XASessionImpl((XASessionInfo) info, this, config); } else { return new SessionImpl(info, this, config); } } catch (RepositoryException ex) { config.getRepositoryService().dispose(info); throw ex; } }
/** * @see Repository#login(javax.jcr.Credentials, String) */ public Session login(Credentials credentials, String workspaceName) throws LoginException, NoSuchWorkspaceException, RepositoryException { SessionInfo info = config.getRepositoryService().obtain(credentials, workspaceName); try { if (info instanceof XASessionInfo) { return new XASessionImpl((XASessionInfo) info, this, config); } else { return new SessionImpl(info, this, config); } } catch (RepositoryException ex) { config.getRepositoryService().dispose(info); throw ex; } }
/** * @see javax.jcr.Session#impersonate(Credentials) */ @Override public Session impersonate(Credentials credentials) throws LoginException, RepositoryException { checkIsAlive(); SessionInfo info = config.getRepositoryService().impersonate(sessionInfo, credentials); try { if (info instanceof XASessionInfo) { return new XASessionImpl((XASessionInfo) info, repository, config); } else { return new SessionImpl(info, repository, config); } } catch (RepositoryException ex) { config.getRepositoryService().dispose(info); throw ex; } }
public void testObtainWithNullWorkspaceName() throws RepositoryException, LoginException { SessionInfo sInfo = rs.obtain(new SimpleCredentials("admin", "admin".toCharArray()), null); try { assertEquals("default",sInfo.getWorkspaceName()); } finally { rs.dispose(sInfo); } } }
/** * @see javax.jcr.Session#impersonate(Credentials) */ @Override public Session impersonate(Credentials credentials) throws LoginException, RepositoryException { checkIsAlive(); SessionInfo info = config.getRepositoryService().impersonate(sessionInfo, credentials); try { if (info instanceof XASessionInfo) { return new XASessionImpl((XASessionInfo) info, repository, config); } else { return new SessionImpl(info, repository, config); } } catch (RepositoryException ex) { config.getRepositoryService().dispose(info); throw ex; } }
public void testNullWorkspaceName() throws RepositoryException { SessionInfo sInfo = service.obtain(helper.getAdminCredentials(), null); try { assertNotNull(sInfo.getWorkspaceName()); } finally { service.dispose(sInfo); } }
@Override protected void tearDown() throws Exception { try { Batch b = rs.createBatch(si, getNodeId("/")); b.remove(getNodeId(testPath)); rs.submit(b); } finally { rs.dispose(si); super.tearDown(); } }
@Override protected void tearDown() throws Exception { try { Batch b = rs.createBatch(si, getNodeId("/")); b.remove(getNodeId(testPath)); rs.submit(b); } finally { rs.dispose(si); super.tearDown(); } }
@Override protected void tearDown() throws Exception { try { Batch b = rs.createBatch(si, getNodeId("/")); b.remove(getNodeId(testPath)); rs.submit(b); } finally { rs.dispose(si); super.tearDown(); } }