I've done a search in the code and indeed there are several usage of
System.exit but all are normal.
These calls are used only in test apps or in client apps (command line)
and not in the application server code.
Also the System.exit() call from the preprocessor is used only in the
command line version of the preprocessor.
If you look in the this call is inside a main() method which exists only
to be able to run the preprocessing by hand from command line.
You can see the same preprocessing code which is done from the ear
deployer in
NuxeoDeployer.init(DeploymentInfo di)
try {
String url = di.localUrl.toString();
url = url.replace(" ", "%20");
File directory = new File(new URI(url));
processor = new DeploymentPreprocessor(directory);
// initialize
processor.init();
// and predeploy
processor.predeploy();
// let the EAR deployer doing its job
super.init(di);
...
} catch (URISyntaxException e) {
throw new DeploymentException("Failed to get deployment
directory for " + di.shortName, e);
} catch (Exception e) {
throw new DeploymentException("Deployment preprocessing
failed for " + di.shortName, e);
}
So no System.exit() is used when running preprocessing in jboss
So there is no real problem regarding these calls.
For the deleOnExit methods I agree these should be avoided and we will
remove them in near future.
Bogdan
Bogdan Stefanescu wrote:
Anyway this code will be removed from nuxeo ear deployer since the
preprocessing step will be done
as part of the build process (this code is already integrated as a
maven plugin)
So we will no more have hot preprocessing in future since it is not
compatible with other JEE AS servers.
Bogdan
Alain Escaffre wrote:
This method is called on the lowest layer of Nuxeo platform : if this
one is not deployed correctly, the application mustn't start. So it
makes sens to stop the process on error. We could argue that it is a
problem for other running app, but usually in production, you isolate
the applications in different jvm, so that they don't bother with
each other.
Best regard,
Alain
Le 17 juil. 07 à 09:21, Filipchik Alexander a écrit :
When we had investigated your code we found that your developers
uses System.exit(1) in several cases.
We found 11 usages of it. For example:
org.nuxeo.runtime.jboss.deployment.preprocessor.DeploymentPreprocessor
//line 412
try {
// initialize
processor.init();
// and predeploy
processor.predeploy();
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
And also you use deleteOnExit() when creating temp files. It can
cause different faults.
System.exit – kills JBoss Server when executed
_______________________________________________
ECM mailing list
[email protected] <mailto:[email protected]>
http://lists.nuxeo.com/mailman/listinfo/ecm
------------------------------------------------------------------------
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm