[
https://issues.apache.org/jira/browse/AXIS2-3552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576270#action_12576270
]
Aurelien Pernoud commented on AXIS2-3552:
-----------------------------------------
Michele and Krystian (and axis2 dev),
I accidently met this bug, and so far here's my point.
It will affect all kind of application server, as it is clearly coded in axis2
(release 1.3) to do so... I personnally checked tomcat and websphere.
For devs, here are the files concerned :
As pointed by Michele, on AxisServlet destroy method, the
org.apache.axis2.context.ConfigurationContext.cleanupTemp() method deletes
every files and dirs (recursively) from a parameter
Constants.Configuration.ARTIFACTS_TEMP_DIR.
This parameter is hardly coded to javax.servlet.context.tempdir (tempdir for
servlets, which in case of tomcat is indeed the work/{appname}, so yes Michele
the mail you sent to tomcat about session.ser is related...)
It is set in org.apache.axis2.deployment.WarBasedAxisConfigurator constructor
(it is in 1.3 release and still in current cvs) :
Parameter param = new Parameter();
param.setName(Constants.Configuration.ARTIFACTS_TEMP_DIR);
param.setValue(config.getServletContext().getAttribute("javax.servlet.context.tempdir"));
try {
axisConfig.addParameter(param);
} catch (AxisFault axisFault) {
log.error(axisFault.getMessage(), axisFault);
}
I "think" the solution may be to add an "_axis2" temp dir to the default temp
dir of servlet on the above lines, so that axis2 work dir deletion on destroy
doesn't affect tomcat (sessions.ser for example) or even another webapp that
includes axis2 (case of mine, hopefully I never write anything in temp dir)...
Of course I don't know exactly all the impacts of such a change, but it only
seems to be a working dir...
I personnaly vote for this bug as it also deletes *.class files generated by
tomcat/websphere/whatever, and makes them recompile every JSP each time you
restart your application server !
> Axis2 on Jetty & Tomcat bug: work dir is deleted on jetty shut down
> -------------------------------------------------------------------
>
> Key: AXIS2-3552
> URL: https://issues.apache.org/jira/browse/AXIS2-3552
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Affects Versions: 1.4, 1.3, nightly
> Environment: HP-UX and Windows XP SP2, JAVA 1.5
> Reporter: Krystian Szczesny
> Priority: Critical
> Fix For: 1.4
>
>
> When shutting down Jetty version 6.1.2+ with Axis2 1.3+ warfile deployed,
> work dir gets almost entirely deleted. The only thing that remains is
> WEB-INF/lib directory [empty on HP-UX, full of libs on WinXP].
> With Axis2 1.2- this problem does not occur. When deploying Axis2 1.2- on
> Jetty version 6.1.2+ everything works just fine. When shutting down jetty
> work dir remains as it was.
> It is very easy to recreate this error: download jetty from
> http://dist.codehaus.org/jetty/jetty-6.1.7/, unpack it, create 'work'
> directory in jetty directory structure, put default axis2.war file in webapps
> dir and run jetty. Everything should go just fine and Axis2 should work. Shut
> down jetty and check the work dir. There will be nothing there accept
> WEB-INF/lib. Jetty will not redeploy the application, what IMO means that it
> wasn't in fact jetty deleting the directories.
> I have also created an issue in Jetty's Jira:
> http://jira.codehaus.org/browse/JETTY-514
> Jetty ticket has been closed, as Jan Bartel proven this bug occurs on Tomcat
> as well!!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]