Commit c3640d40 c3640d40ff2a14780bf86e7aa33bfb67ee237da2 by Christian Gerdes

Bugg i hantering av gamla connection string formatet i OraMon

1 parent c13d67b9
......@@ -53,7 +53,7 @@ public class OraMonRESTgetData extends HttpServlet {
if(shortConArray.length != 2) {
// Error, wrong format of string
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
response.getWriter().println("{\"error\":true,\"msg\":\"connectionString needs to be in format jdbc:oracle:thin:@//host:port/sid with optional :username:password at the end.\"}");
response.getWriter().println("{\"error\":true,\"msg\":\"connectionString needs to be in format jdbc:oracle:thin:@//host:port/servicename with optional :username:password at the end.\"}");
return;
}
String[] shortConArray2 = shortConArray[1].split(":");
......@@ -72,7 +72,7 @@ public class OraMonRESTgetData extends HttpServlet {
} else {
// Wrong format
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
response.getWriter().println("{\"error\":true,\"msg\":\"connectionString needs to be in format jdbc:oracle:thin:@//host:port/sid with optional :username:password at the end.\"}");
response.getWriter().println("{\"error\":true,\"msg\":\"connectionString needs to be in format jdbc:oracle:thin:@//host:port/servicename with optional :username:password at the end.\"}");
return;
}
} else {
......@@ -98,7 +98,7 @@ public class OraMonRESTgetData extends HttpServlet {
usrStr = conStrParamArray[2];
pwdStr = conStrParamArray[3];
} else {
conStr = "jdbc:oracle:thin:@//" + conStrParamArray[0] + ":" + conStrParamArray[1] + ":" + conStrParamArray[2];
conStr = "jdbc:oracle:thin:@" + conStrParamArray[0] + ":" + conStrParamArray[1] + ":" + conStrParamArray[2];
usrStr = conStrParamArray[3];
pwdStr = conStrParamArray[4];
}
......
......@@ -45,7 +45,7 @@ public class OraMonRESTgetMetrics extends HttpServlet {
if(shortConArray.length != 2) {
// Error, wrong format of string
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
response.getWriter().println("{\"error\":true,\"msg\":\"connectionString needs to be in format jdbc:oracle:thin:@//host:port/sid with optional :username:password at the end.\"}");
response.getWriter().println("{\"error\":true,\"msg\":\"connectionString needs to be in format jdbc:oracle:thin:@//host:port/servicename with optional :username:password at the end.\"}");
return;
}
String[] shortConArray2 = shortConArray[1].split(":");
......@@ -68,7 +68,7 @@ public class OraMonRESTgetMetrics extends HttpServlet {
} else {
// Wrong format
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
response.getWriter().println("{\"error\":true,\"msg\":\"connectionString needs to be in format jdbc:oracle:thin:@//host:port/sid with optional :username:password at the end.\"}");
response.getWriter().println("{\"error\":true,\"msg\":\"connectionString needs to be in format jdbc:oracle:thin:@//host:port/servicename with optional :username:password at the end.\"}");
return;
}
} else {
......@@ -91,7 +91,7 @@ public class OraMonRESTgetMetrics extends HttpServlet {
if(serviceName) {
conStr = "jdbc:oracle:thin:@//" + conStrParamArray[0] + ":" + conStrParamArray[1];
} else {
conStr = "jdbc:oracle:thin:@//" + conStrParamArray[0] + ":" + conStrParamArray[1] + ":" + conStrParamArray[2];
conStr = "jdbc:oracle:thin:@" + conStrParamArray[0] + ":" + conStrParamArray[1] + ":" + conStrParamArray[2];
}
monitor = Registry.find(conStr);
if(monitor == null) {
......
......@@ -34,7 +34,7 @@ class LongDelta {
update(value, timestamp, false);
}
public void update(Long value, Timestamp timestamp, boolean convert) {
public void update(long value, Timestamp timestamp, boolean convert) {
if(convert) value = value/1000;
if(urProt) {
if(this.curValue != null && this.curValue > value) {
......