Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319924 - Need to use ReferencedComponent instead of DependentObject in order to set archive name
Summary: Need to use ReferencedComponent instead of DependentObject in order to set ar...
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.1   Edit
Assignee: Hari Shankar CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-14 17:20 EDT by Hari Shankar CLA
Modified: 2010-07-20 11:22 EDT (History)
3 users (show)

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


Attachments
patch (3.10 KB, patch)
2010-07-14 17:22 EDT, Hari Shankar CLA
ccc: iplog+
Details | Diff
updated patch (2.30 KB, patch)
2010-07-15 13:27 EDT, Hari Shankar CLA
no flags Details | Diff
updated patch (1.37 KB, patch)
2010-07-15 13:32 EDT, Hari Shankar CLA
ccc: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hari Shankar CLA 2010-07-14 17:20:15 EDT
Build Identifier: 321

In EARVirtualComponent.customizeCreatedReference, we currently do the following

if( dependentObject instanceof ICommonModule )
reference.setArchiveName(((ICommonModule) dependentObject).getUri());

This needs to be:

if( referenceComponent instanceof ReferencedComponent )
reference.setArchiveName(((ReferencedComponent)referenceComponent).getArchiveName());

The reason for doing this is that the dependentobject is not updated when the component file changes, however the archivename is set to the correct value of the uri.

Reproducible: Always
Comment 1 Hari Shankar CLA 2010-07-14 17:22:08 EDT
Created attachment 174353 [details]
patch

This patch gets the archive name from the referencedcomponent instead of the dependent object, so that we get the most updated value of the uri/archivename.
Comment 2 Chuck Bridgham CLA 2010-07-14 17:27:39 EDT
approved
Comment 3 Hari Shankar CLA 2010-07-14 17:31:07 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. 
This issue causes stale values to be surfaced in the UI in the deployment assembly page.

    * Is there a work-around? If so, why do you believe the work-around is insufficient? 
Close and open the project.

    * How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? 
This fix has been tested by checking the deployment assembly page to ensure that the updated archive name shows up. Also performed project creation/deletion scenarios to ensure nothing was broken.

    * Give a brief technical overview. Who has reviewed this fix? 
This fix has been reviewed by Chuck Bridgham.
    * What is the risk associated with this fix? 
No known risks.
Comment 4 Carl Anderson CLA 2010-07-15 11:45:00 EDT
Committed to HEAD for WTP 3.2.1 and WTP 3.3
Comment 5 Hari Shankar CLA 2010-07-15 13:27:53 EDT
Created attachment 174423 [details]
updated patch

Attaching an updated patch for the EARVirtualComponent class, that handles the case where the archive name is null. In this case, it gets the default archivename and sets it on the references.

This patch does not obsolete the previous patch, and should be applied over the previous patch.
Comment 6 Hari Shankar CLA 2010-07-15 13:28:13 EDT
Reopening the bug to take it through the approval process.
Comment 7 Hari Shankar CLA 2010-07-15 13:32:24 EDT
Created attachment 174425 [details]
updated patch

updating the patch.
Comment 8 Carl Anderson CLA 2010-07-15 14:38:18 EDT
Committed to HEAD for WTP 3.2.1 and WTP 3.3