// (may throw NoSuchWorkspaceException and AccessDeniedException)
srcSession = session.switchWorkspace(srcWorkspace);
WorkspaceImpl srcWsp = (WorkspaceImpl) srcSession.getWorkspace();
// do cross-workspace copy
Operation op = Copy.create(srcPath, destPath, srcWsp.getName(), srcWsp, this);
getUpdatableItemStateManager().execute(op);
} finally {
if (srcSession != null) {
// we don't need the other session anymore, logout
srcSession.logout();