Author: keith
Date: Tue Apr 22 01:28:00 2008
New Revision: 15927
Log:
Removing some unused variables
Modified:
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java
Modified:
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java
==============================================================================
---
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java
(original)
+++
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java
Tue Apr 22 01:28:00 2008
@@ -89,8 +89,6 @@
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
@@ -167,7 +165,6 @@
* @throws DeploymentException if there is a problem
*/
public void deploy(DeploymentFileData deploymentFileData) throws
DeploymentException {
- StringWriter errorWriter = new StringWriter();
// We need to track weather the service was deployed succesfully or
not in order to update
// the registry accordingly
@@ -192,11 +189,8 @@
MashupUtils.notifyMonitor("Deployment Success", name +
" deployed successfully", 3);
} catch (DeploymentException deploymentException) {
- log.error(Messages.getMessage(DeploymentErrorMsgs.INVALID_SERVICE,
name,
- deploymentException.getMessage()),
deploymentException);
- PrintWriter error_ptintWriter = new PrintWriter(errorWriter);
- deploymentException.printStackTrace(error_ptintWriter);
- serviceStatus = "Error:\n" + errorWriter.toString();
+ log.error("The service" + name + " is not valid.",
deploymentException);
+ serviceStatus = "Error:\n" + deploymentException.getMessage();
// Send a notification to the system monitor indication that the
service was not
// deployed succesfully
@@ -207,16 +201,9 @@
// Even though catching Throwable is not recomended, we do not want
// the server to fail on errors like NoClassDefFoundError
if (log.isInfoEnabled()) {
- StringWriter sw = new StringWriter();
- PrintWriter pw = new PrintWriter(sw);
- t.printStackTrace(pw);
-
log.info(Messages.getMessage(DeploymentErrorMsgs.INVALID_SERVICE,
- deploymentFileData.getName(),
- sw.getBuffer().toString()));
- }
- PrintWriter error_ptintWriter = new PrintWriter(errorWriter);
- t.printStackTrace(error_ptintWriter);
- serviceStatus = "Error:\n" + errorWriter.toString();
+ log.error("The service" + name + " is not valid.", t);
+ }
+ serviceStatus = "Error:\n" + t.getMessage();
// Send a notification to the system monitor indication that the
service was not
// deployed succesfully
MashupUtils.notifyMonitor("Error", deploymentFileData.getName() +
@@ -1276,13 +1263,10 @@
MashupUtils.setInitialSetupComplete(true);
}
} catch (UserStoreException e) {
- e.printStackTrace();
throw new MashupFault(e);
} catch (RegistryException e) {
- e.printStackTrace();
throw new MashupFault(e);
} catch (AxisFault axisFault) {
- axisFault.printStackTrace();
throw new MashupFault(axisFault);
}
}
@@ -1296,5 +1280,4 @@
q.setPath(path);
registry.put(path, q);
}
-
}
\ No newline at end of file
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev