Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmisinco2014-02-03 22:08:55 +0000
committerGerrit Code Review @ Eclipse.org2014-02-04 15:06:13 +0000
commitc95b20d76ba0cdcdb8a6fe61a228329803c2a555 (patch)
treed8e64779d222c221a1ece3e311c540348bf0bb22 /plugins
parent9c7503785bac2be0223a47aad655858d555ee800 (diff)
downloadorg.eclipse.osee-c95b20d76ba0cdcdb8a6fe61a228329803c2a555.tar.gz
org.eclipse.osee-c95b20d76ba0cdcdb8a6fe61a228329803c2a555.tar.xz
org.eclipse.osee-c95b20d76ba0cdcdb8a6fe61a228329803c2a555.zip
bug[ats_ATS17267]: Unable to connect exception occurring
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/ClientSessionManager.java2
-rw-r--r--plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/ApplicationServer.java21
-rw-r--r--plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/InternalClientSessionManager.java7
-rw-r--r--plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/OseeApplicationServer.java13
-rw-r--r--plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/OseeServer.java14
5 files changed, 1 insertions, 56 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/ClientSessionManager.java b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/ClientSessionManager.java
index 6adc653d71..3eebf6e632 100644
--- a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/ClientSessionManager.java
+++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/ClientSessionManager.java
@@ -12,7 +12,6 @@ package org.eclipse.osee.framework.core.client;
import java.util.List;
import org.eclipse.osee.framework.core.client.internal.InternalClientSessionManager;
-import org.eclipse.osee.framework.core.client.internal.OseeApplicationServer;
import org.eclipse.osee.framework.core.data.IUserToken;
import org.eclipse.osee.framework.core.data.OseeSessionGrant;
import org.eclipse.osee.framework.core.exception.OseeAuthenticationRequiredException;
@@ -111,7 +110,6 @@ public class ClientSessionManager {
public static void releaseSession() throws OseeCoreException {
InternalClientSessionManager.getInstance().releaseSession();
- OseeApplicationServer.reset();
}
public static String getDatabaseInfo() throws OseeAuthenticationRequiredException {
diff --git a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/ApplicationServer.java b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/ApplicationServer.java
index af8b55f581..e0177d1ada 100644
--- a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/ApplicationServer.java
+++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/ApplicationServer.java
@@ -10,16 +10,9 @@
*******************************************************************************/
package org.eclipse.osee.framework.core.client.internal;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Arrays;
-import java.util.logging.Level;
import org.eclipse.osee.framework.core.data.OseeServerInfo;
-import org.eclipse.osee.framework.core.util.HttpProcessor;
public class ApplicationServer extends OseeServer {
- private static final DateFormat format = new SimpleDateFormat("MM/dd/yyyy hh:mm a");
-
private OseeServerInfo serverInfo;
private String serverAddress;
@@ -47,18 +40,4 @@ public class ApplicationServer extends OseeServer {
return serverAddress;
}
- public void checkAlive() {
- if (isServerInfoValid()) {
- boolean alive = HttpProcessor.isAlive(serverInfo.getUri());
- setAlive(alive);
- if (alive) {
- set(Level.INFO, null, "%s %s Running Since: %s", getServerAddress(),
- Arrays.deepToString(serverInfo.getVersion()), format.format(serverInfo.getDateStarted()));
- } else {
- set(Level.SEVERE, null, "Unable to Connect to [%s]", getServerAddress());
- }
- } else {
- setAlive(false);
- }
- }
}
diff --git a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/InternalClientSessionManager.java b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/InternalClientSessionManager.java
index 775d88b175..dd918dd229 100644
--- a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/InternalClientSessionManager.java
+++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/InternalClientSessionManager.java
@@ -107,11 +107,7 @@ public class InternalClientSessionManager {
clientInfo.getPort(), clientInfo.getVersion(), "N/A");
}
- public synchronized OseeClientSession authenticate(ICredentialProvider credentialProvider) throws OseeCoreException {
- if (!OseeApplicationServer.isApplicationServerAlive()) {
- OseeLog.reportStatus(new BaseStatus(STATUS_ID, Level.SEVERE, "Application Server not Available"));
- return null;
- }
+ public synchronized void authenticate(ICredentialProvider credentialProvider) throws OseeCoreException {
if (!isSessionValid()) {
try {
OseeCredential credential = credentialProvider.getCredential();
@@ -128,7 +124,6 @@ public class InternalClientSessionManager {
OseeLog.reportStatus(new BaseStatus(STATUS_ID, Level.INFO, "%s BuildType:[%s]", oseeSession,
oseeSessionGrant.getClientBuildDesignation()));
}
- return oseeSession;
}
public void ensureSessionCreated() {
diff --git a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/OseeApplicationServer.java b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/OseeApplicationServer.java
index 893e2cf142..d0cc17474f 100644
--- a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/OseeApplicationServer.java
+++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/OseeApplicationServer.java
@@ -34,12 +34,6 @@ public class OseeApplicationServer {
// private constructor
}
- public static void reset() {
- applicationServer.resetStatus();
-
- applicationServer.setServerInfo(null);
- }
-
public static String getOseeApplicationServer() throws OseeCoreException {
checkAndUpdateStatus();
String serverAddress = applicationServer.getServerAddress();
@@ -47,14 +41,8 @@ public class OseeApplicationServer {
return serverAddress;
}
- public static boolean isApplicationServerAlive() {
- checkAndUpdateStatus();
- return applicationServer.isAlive();
- }
-
private synchronized static void checkAndUpdateStatus() {
if (!applicationServer.isServerInfoValid()) {
- applicationServer.resetStatus();
OseeServerInfo serverInfo = null;
String appServerUri = OseeClientProperties.getOseeApplicationServer();
if (Strings.isValid(appServerUri)) {
@@ -69,7 +57,6 @@ public class OseeApplicationServer {
}
applicationServer.setServerInfo(serverInfo);
}
- applicationServer.checkAlive();
applicationServer.report();
}
diff --git a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/OseeServer.java b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/OseeServer.java
index f99e76f1d0..bab951a93a 100644
--- a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/OseeServer.java
+++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/OseeServer.java
@@ -17,7 +17,6 @@ import org.eclipse.osee.framework.logging.OseeLog;
public abstract class OseeServer {
- private boolean isAlive;
private final String name;
private IHealthStatus status;
@@ -37,19 +36,6 @@ public abstract class OseeServer {
return name;
}
- public void setAlive(boolean isServerAlive) {
- this.isAlive = isServerAlive;
- }
-
- public void resetStatus() {
- isAlive = false;
- status = null;
- }
-
- public boolean isAlive() {
- return isAlive;
- }
-
public void report() {
if (status == null) {
status = new BaseStatus(name, Level.INFO, null, (Throwable) null);

Back to the top