/*
- * Copyright (C) 2007-2012 Mathieu Baudier
+ * Copyright (C) 2007-2012 Argeo GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import org.argeo.ArgeoException;
import org.argeo.eclipse.ui.ErrorFeedback;
+import org.argeo.eclipse.ui.utils.CommandUtils;
import org.argeo.jcr.ArgeoJcrConstants;
import org.argeo.jcr.ArgeoNames;
import org.argeo.jcr.ArgeoTypes;
RemoteRepositoryLoginDialog dlg = new RemoteRepositoryLoginDialog(
Display.getDefault().getActiveShell());
if (dlg.open() == Dialog.OK) {
+ CommandUtils.callCommand(Refresh.ID);
}
return null;
}
setMessage("Login to remote repository", IMessageProvider.NONE);
name = createLT(composite, "Name", "remoteRepository");
uri = createLT(composite, "URI",
- "http://localhost:7070/org.argeo.jcr.webapp/remoting/node");
+ "http://localhost:7070/data/jcr/node");
username = createLT(composite, "User", "");
password = createLP(composite, "Password");
@Override
protected void okPressed() {
+ Session nodeSession = null;
try {
- Session nodeSession = nodeRepository.login();
+ nodeSession = nodeRepository.login();
Node home = UserJcrUtils.getUserHome(nodeSession);
Node remote = home.hasNode(ARGEO_REMOTE) ? home
super.okPressed();
} catch (Exception e) {
ErrorFeedback.show("Cannot add remote repository", e);
+ } finally {
+ JcrUtils.logoutQuietly(nodeSession);
}
}