Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323744 - Classpath dependency enablement should directly control dynamic manifest updating
Summary: Classpath dependency enablement should directly control dynamic manifest upda...
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.2   Edit
Assignee: Jason Peterson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-26 14:56 EDT by Jason Peterson CLA
Modified: 2010-08-31 21:59 EDT (History)
2 users (show)

See Also:
jasonpet: pmc_approved? (david_williams)
jasonpet: pmc_approved? (raghunathan.srinivasan)
jasonpet: pmc_approved? (naci.dai)
deboer: pmc_approved+
jasonpet: pmc_approved? (neil.hauge)
jasonpet: pmc_approved? (kaloyan)
cbridgha: review+


Attachments
patch (13.01 KB, patch)
2010-08-30 16:53 EDT, Jason Peterson CLA
no flags Details | Diff
JUnit_patch (6.43 KB, patch)
2010-08-30 16:55 EDT, Jason Peterson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Peterson CLA 2010-08-26 14:56:10 EDT
Classpath dependency enablement has always meant to control whether dynamic manifest updates would occur at export and runtime.  When set to false these dynamic updates will not occur because no resources requiring a dynamic manifest update would be returned.  The enablement was directly controlling the list of resources, which indirectly determined whether the manifest should be updated at runtime.  This was easy to do pre-EE5 since all classpath dependency entries outside of web project entries required the manifest to be updated.  However, in EE5 and above, entries that map to the EAR's lib folder do not require the manifest to be dynamically updated.  The code was recently updated in bug 323176 to make light of the EE5 and above case.  However, this is really too hard to solve since we have no way to determine whether the module is mapping to a legacy EAR or not in the current context.  

The right way to solve this is to have the dependency enablement directly control the updating of the manifest (resources list will always contain all classpath dependencies).  When on, the default, it will always update the manifest for any entries that map to the parent container.  When false, it will never dynamically update the manifest.
Comment 1 Jason Peterson CLA 2010-08-30 16:53:50 EDT
Created attachment 177787 [details]
patch
Comment 2 Jason Peterson CLA 2010-08-30 16:55:28 EDT
Created attachment 177788 [details]
JUnit_patch
Comment 3 Chuck Bridgham CLA 2010-08-31 10:41:04 EDT
approve
Comment 4 Jason Peterson CLA 2010-08-31 11:13:51 EDT
    * Explain why you believe this is a stop-ship defect. Or, if it is a
"hotbug" (requested by an adopter) please document it as such. 

The dynamic updating of the manifest breaks single-root for some servers, which hurts performance.  Need to give adopters the option to change the default behavior for doing dynamic manifest updates.  By default, the dynamic update is done.  However, an adopter may want to set this to false so the dynamic update is not done at runtime.  The update could then be done at development time.   

    * Is there a work-around? If so, why do you believe the work-around is
insufficient? 

No workaround exists  

    * How has the fix been tested? Is there a test case attached to the
bugzilla record? Has a JUnit Test been added? 

JUnit testcase is attached.  I have updated some existing classpath dependency tests to honor the ClasspathEnablement flag.

    * Give a brief technical overview. Who has reviewed this fix? 

The dependency enablement will directly control the updating of the manifest.  When true, the default, it will always update the manifest for any entries that map to the parent container.  When false, it will never dynamically update the manifest.

Chuck has reviewed this fix.

    * What is the risk associated with this fix? 

minimal - fix only pertains to scenario where ClasspathEnablement is set to false.  This can only be done via API in WTP.
Comment 5 Jason Sholl CLA 2010-08-31 13:44:34 EDT
code checked into head for wtp 3.2.2 and 3.3