bump the version
[dmaap/messagerouter/msgrtr.git] / src / main / java / com / att / dmf / mr / service / impl / MMServiceImpl.java
index da8cb16..387d8b1 100644 (file)
@@ -114,7 +114,7 @@ public class MMServiceImpl implements MMService {
                        throws ConfigDbException, TopicExistsException, AccessDeniedException, UnavailableException,
                        CambriaApiException, IOException {
 
-               // final long startTime = System.currentTimeMillis();
+               
                final HttpServletRequest req = ctx.getRequest();
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
 
@@ -138,13 +138,13 @@ public class MMServiceImpl implements MMService {
                        limit = Integer.parseInt(req.getParameter("limit"));
                }
                limit = 1;
-               // int timeoutMs = 60000;
+               
                int timeoutMs = CambriaConstants.kNoTimeout;
                String strtimeoutMS = AJSCPropertiesMap.getProperty(CambriaConstants.msgRtr_prop, "timeout");
                if (strtimeoutMS != null)
                        timeoutMs = Integer.parseInt(strtimeoutMS);
                // int timeoutMs = ctx.getConfigReader().getSettings().getInt("timeout",
-               // CambriaConstants.kNoTimeout);
+               
                if (req.getParameter("timeout") != null) {
                        timeoutMs = Integer.parseInt(req.getParameter("timeout"));
                }
@@ -404,7 +404,7 @@ public class MMServiceImpl implements MMService {
 
                        int status = HttpStatus.SC_NOT_FOUND;
                        String errorMsg = null;
-                       if (excp instanceof CambriaApiException) {
+                       if (excp.getClass().toString().contains("CambriaApiException")) {
                                status = ((CambriaApiException) excp).getStatus();
                                JSONTokener jsonTokener = new JSONTokener(((CambriaApiException) excp).getBody());
                                JSONObject errObject = new JSONObject(jsonTokener);
@@ -496,7 +496,7 @@ public class MMServiceImpl implements MMService {
 
                                                int status = HttpStatus.SC_NOT_FOUND;
                                                String errorMsg = null;
-                                               if (excp instanceof CambriaApiException) {
+                                               if (excp.getClass().toString().contains("CambriaApiException")) {
                                                        status = ((CambriaApiException) excp).getStatus();
                                                        JSONTokener jsonTokener = new JSONTokener(((CambriaApiException) excp).getBody());
                                                        JSONObject errObject = new JSONObject(jsonTokener);
@@ -541,7 +541,7 @@ public class MMServiceImpl implements MMService {
                                } catch (Exception excp) {
                                        int status = HttpStatus.SC_NOT_FOUND;
                                        String errorMsg = null;
-                                       if (excp instanceof CambriaApiException) {
+                                       if (excp.getClass().toString().contains("CambriaApiException")) {
                                                status = ((CambriaApiException) excp).getStatus();
                                                JSONTokener jsonTokener = new JSONTokener(((CambriaApiException) excp).getBody());
                                                JSONObject errObject = new JSONObject(jsonTokener);
@@ -581,7 +581,7 @@ public class MMServiceImpl implements MMService {
                } catch (Exception excp) {
                        int status = HttpStatus.SC_NOT_FOUND;
                        String errorMsg = null;
-                       if (excp instanceof CambriaApiException) {
+                       if (excp.getClass().toString().contains("CambriaApiException")) {
                                status = ((CambriaApiException) excp).getStatus();
                                JSONTokener jsonTokener = new JSONTokener(((CambriaApiException) excp).getBody());
                                JSONObject errObject = new JSONObject(jsonTokener);