Bug 901061 (JBPAPP6-1432) - Need similar "DeleteWorkDirOnContextDestroy" configuration in EAP 6 Web Subsystem
Summary: Need similar "DeleteWorkDirOnContextDestroy" configuration in EAP 6 Web Subsy...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: JBPAPP6-1432
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER6
: EAP 6.1.0
Assignee: Jean-frederic Clere
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBP...
Whiteboard:
Depends On:
Blocks: 959100
TreeView+ depends on / blocked
 
Reported: 2012-10-15 15:46 UTC by dchia
Modified: 2014-05-27 01:28 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
JBoss Enterprise Application Platform 6 did not recompile source JSPs on redeployment unless they were newer than the associated java or class files. Earlier versions of JBoss Enterprise Application Platform 6 did not contain the code to remove the java and class files on undeployment. This meant that if a user attempted to restore sources from an older version of a webapp, the `.java` and `.class` files were not removed which prevented the JSPs from being recompiled. The corresponding code has now been added to JBoss Enterprise Application Platform 6 and can be activated through the system property `org.jboss.as.web.deployment.DELETE_WORK_DIR_ONCONTEXTDESTROY`. The default for this property is `false`. JBoss Enterprise Application Platform 6 users can now use this property to remove `.java` and `.class` files to ensure that JSP sources are recompiled.
Clone Of:
Environment:
Last Closed: 2013-07-23 18:38:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
possible patch. (1.13 KB, text/plain)
2013-02-11 15:32 UTC, Jean-frederic Clere
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBPAPP6-1432 0 Major Closed Need similar "DeleteWorkDirOnContextDestroy" configuration in EAP 6 Web Subsystem 2018-10-03 11:06:22 UTC

Description dchia 2012-10-15 15:46:52 UTC
Help Desk Ticket Reference: https://na7.salesforce.com/500A000000A7O38
project_key: JBPAPP6

Similar functionality in EAP 5.x [1] needs to be added to EAP 6

[1] https://issues.jboss.org/browse/JBPAPP-3776

Comment 2 Anne-Louise Tangring 2012-11-13 20:57:59 UTC
Docs QE Status: Removed: NEW 


Comment 4 Jean-frederic Clere 2013-02-11 15:28:11 UTC
I have a patch to use a system property to switch the delete.
org.jboss.as.web.deployment.DELETE_WORK_DIR_ONCONTEXTDESTROY

Comment 5 Jean-frederic Clere 2013-02-11 15:32:44 UTC
Created attachment 696145 [details]
possible patch.

Comment 6 Dimitris Andreadis 2013-04-17 20:51:19 UTC
This needs to be scheduled for EAP 6.2

Comment 7 Jason T. Greene 2013-04-19 16:36:51 UTC
We have a patch, we just need a pm ack

Comment 8 Jason T. Greene 2013-04-24 01:32:55 UTC
Still need that PM ack

Comment 9 Jean-frederic Clere 2013-04-24 11:47:38 UTC
PM ack ?

Comment 10 Rostislav Svoboda 2013-04-25 08:57:17 UTC
We need blocker flag set to + to process prepared PR - https://github.com/jbossas/jboss-eap/pull/109

Comment 11 John Doyle 2013-04-29 13:50:00 UTC
Are you the correct owner for this?

Comment 12 Rostislav Svoboda 2013-04-29 13:57:50 UTC
@John I'm not owner of this, just wanted to push PR in EAP, PR was merged 4 days ago by Jason - https://github.com/jbossas/jboss-eap/pull/109

Comment 13 Radim Hatlapatka 2013-05-02 14:22:21 UTC
I have verified that if I set property org.jboss.as.web.deployment.DELETE_WORK_DIR_ONCONTEXTDESTROY=true when starting EAP 6.1.0.ER6 it works as expected (verified by changing timestamp of jsp file and seeing if it recompiles with and without the option on redeployment)

According to jboss-as-web_1_4.xsd schema I haven't found a way to configure this as part of web subsystem (I would expect this to be configurable under jsp-configuration element)

Is there any better way to configure it than using -Dorg.jboss.as.web.deployment.DELETE_WORK_DIR_ONCONTEXTDESTROY=true when starting EAP6.1?


BTW: The option should also be described in documentation for EAP 6.1 but it is not.

Comment 14 Jean-frederic Clere 2013-05-02 14:45:52 UTC
It can be only configured via the system property.

Comment 15 Radim Hatlapatka 2013-05-02 15:00:16 UTC
I think it should be also possible to configure it via standalone/domain config file

Comment 16 Jean-frederic Clere 2013-05-02 15:15:13 UTC
It is like any system properties:
/system-property=org.jboss.as.web.deployment.DELETE_WORK_DIR_ONCONTEXTDESTROY:add(value=true)

Comment 18 Radim Hatlapatka 2013-05-03 07:14:38 UTC
I have created separate RFE bugzilla for the change in configuration: https://bugzilla.redhat.com/show_bug.cgi?id=959100

Functionality verified, waiting for update in documentation.

Comment 20 Scott Mumford 2013-05-08 01:14:36 UTC
Added draft Release Notes text to the bottom of the Doc Text field. 
Not sure I fully understood the implications of the function, so technical verification is requested.

Comment 21 Jean-frederic Clere 2013-05-08 07:36:06 UTC
"Previous versions of JBoss Enterprise Application Platform 6 did not recompile source JSPs in from uncompressed archives on redeployment. This was because the code that allowed JBoss Enterprise Application Platform 5 versions to do this was missing. The DELETE_WORK_DIR_ONCONTEXTDESTROY key/value configuration option has now been added to JBoss Enterprise Application Platform 6 and users can now specify that the work directory be destroyed, ensuring that JSPs are recompiled."

That is more tricky :D

In the source JSP are only recompiled if they are older than the java or class files.
So when restoring sources from an old version of the webapp the JSP are older than the compiled files so they aren't recompiled, in other words the customers can't restore an old version of their exploded webapps.
In EAP5 a flag DeleteWorkDirOnContextDestroy allows to remote the java and class when undeploying a webapp.

The flag DeleteWorkDirOnContextDestroy of EAP5 has been added back to EAP6 through a system-property named "org.jboss.as.web.deployment.DELETE_WORK_DIR_ONCONTEXTDESTROY" is the default value is false...

Comment 22 Jean-frederic Clere 2013-05-08 07:45:27 UTC
Note https://bugzilla.redhat.com/show_bug.cgi?id=960372

Comment 23 Scott Mumford 2013-05-10 02:10:20 UTC
Thanks for the feedback Jean-fredric

One thing though:
When you said "remote the java and class", did you mean 'remove the java and class'? Because I can make sense of that in the context of what you were explaining.

However, if you did intend to say "remote the java and class", then I'm going to need to ask for clarification as to what you mean by that.

Comment 24 Jean-frederic Clere 2013-05-13 06:59:19 UTC
oops "allows to remove" sorry for the typo.

Comment 25 Scott Mumford 2013-05-15 03:05:25 UTC
Thanks for the clarification Jean-frederic.

I've rewritten the release note draft with (what I hope is) a better understanding of the change and it's background.

Is this version more accurate?

Comment 26 Jean-frederic Clere 2013-05-15 06:23:00 UTC
"unless they are older"

it should be: "unless they are newer"


"The DeleteWorkDirOnContextDestroy code" ... "through the system property"

it should be:
"The corresponding code" ... and can be activated "through the system property".

Comment 27 Scott Mumford 2013-05-16 02:56:48 UTC
Thanks for the quick response Jean-frederic

I've made those changes in the text. If there's no further feedback, I'll arrange to have this bug marked for inclusion in the Release Notes document.


Note You need to log in before you can comment on or make changes to this bug.