You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by ma...@accenture.com on 2007/05/22 15:41:48 UTC

SHALE-409 fix

Please fix the bug SHALE-409.

 

Regards

Mario Buonopane

 



This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

Re: SHALE-409 fix

Posted by Wendy Smoak <ws...@gmail.com>.
On 5/22/07, mario.buonopane@accenture.com <ma...@accenture.com> wrote:

> Antonio, I have tested the patch suggested by Matt Hughes at
> http://issues.apache.org/struts/browse/SHALE-409.

Great!  First, please come join us on the development list.  We
generally keep the user list for discussion about using released
versions.  You can find subscription info here, or you can post
through the Nabble forum interface:
http://shale.apache.org/mail-lists.html

What we need is a "svn diff" of your changes against the latest Shale
code.  That's the quickest way for the developers to review and apply
changes contributed by the community.

Assuming you have the Shale 1.0.x branch checked out and have made
changes to it locally, execute "svn diff > SHALE-409.patch" and attach
the patch file to the issue.

Thanks,
-- 
Wendy

RE: SHALE-409 fix

Posted by ma...@accenture.com.
Antonio, I have tested the patch suggested by Matt Hughes at
http://issues.apache.org/struts/browse/SHALE-409.

 

And does work.

 

I have modified the private method afterRenderResponse of
ViewPhaseListener class:

 

    private void afterRenderResponse(PhaseEvent event) {

 

        // Initialize local values we will need

        Map map =
event.getFacesContext().getExternalContext().getRequestMap();

        // Remove our list of initialized views explicitly

        map.remove(FacesConstants.VIEWS_INITIALIZED);

      

        List list = new ArrayList();

        Iterator entries = map.entrySet().iterator();

 

 

        // First select all the ViewController and AbstractRequestBean
instances

        while (entries.hasNext()) {

            Map.Entry entry = (Map.Entry) entries.next();

            if ((entry.getValue() instanceof ViewController)

             || (entry.getValue() instanceof AbstractRequestBean)) {

                list.add(entry.getKey());

            }

        }

 

        // Second select all remaining instances, which will include
annotated

        // managed beans if Shale Tiger is present

        /* COMMENTED BY BUONOPANE

        entries = map.entrySet().iterator();

        while (entries.hasNext()) {

            Map.Entry entry = (Map.Entry) entries.next();

            if (!list.contains(entry.getKey())) {

                list.add(entry.getKey());

            }

        }*/

 

        // Iterate through the keys in the specified order, removing the

        // corresponding request scope attribute instances

        Iterator keys = list.iterator();

        while (keys.hasNext()) {

            String key = (String) keys.next();

            try {

                  log.info("******** removing "+key);

                map.remove(key); 

            } catch (Exception e) {

                handleException(event.getFacesContext(), e);

            }

        }

 

    }

I have just commented the line the second loop identified by the string
COMMENTED BY BUONOPANE. 

 

 

As you can see I also have logged the key of the objects removed and
following are the keys deleted by the original version:

******** removing __acegi_session_integration_filter_applied

******** removing dialog

******** removing org$apache$shale$view$VIEW_POSTBACK

******** removing org.apache.myfaces.myFacesJavascript

******** removing com.ibm.websphere.servlet.uri_non_decoded

******** removing __acegi_filterSecurityInterceptor_filterApplied

******** removing 

******** removing generic

******** removing t

******** removing org.apache.myfaces.calendar.JAVASCRIPT_ENCODED

******** removing bundle

******** removing org.apache.shale.view.PHASE_ID

******** removing com.sun.faces.FORM_CLIENT_ID_ATTR

******** removing class
org.apache.myfaces.shared_tomahawk.renderkit.html.util.JavascriptUtils.O
LD_VIEW_ID

******** removing ricerche$ricercaPolizzePage

******** removing org.apache.struts.taglib.tiles.CompContext

******** removing
org.apache.myfaces.application.jsp.JspStateManagerImpl.RESTORED_SERIALIZ
ED_VIEW

******** removing org.apache.myfaces.config.beansUnderConstruction

******** removing javax.faces.webapp.UIComponentTag.UNIQUE_ID_COUNTER

******** removing org.apache.myfaces.AddResourceFactory.CACHE_MAP_KEY

******** removing
org.apache.myfaces.component.html.util.ExtensionFilter.doFilterCalled

******** removing org.apache.myfaces.inputTextHelp.JAVASCRIPT_ENCODED

******** removing jsf_sequence

******** removing com.ibm.servlet.engine.webapp.dispatch_type

 

The problem is that I don't understand the second loop commented so I
can just comment it.

What do you think?

 

Mario

 

 

 

 

 

-----Original Message-----
From: Antonio Petrelli [mailto:antonio.petrelli@gmail.com] 
Sent: 22 maggio 2007 15.59
To: user@shale.apache.org
Subject: Re: SHALE-409 fix

 

2007/5/22, mario.buonopane@accenture.com
<ma...@accenture.com>:

> 

> Antonio, can i?

> Looking to http://issues.apache.org/struts/browse/SHALE-409 seems to
be

> present the solution. What can I do to write the patch?

 

 

 

With "write" I meant "modify your local version, export a diff file and
post

the newly created patch".

If you post this patch, not only the community will be happy, but most

probably the issue will be fixed in a shorter time than the ones without

patches.

In conclusion, modify your local version and see if it works. In
affirmative

case, create a diff file (through the use of "svn diff") and post it to
the

issue page itself.

 

Antonio



This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

Re: SHALE-409 fix

Posted by Antonio Petrelli <an...@gmail.com>.
2007/5/22, mario.buonopane@accenture.com <ma...@accenture.com>:
>
> Antonio, can i?
> Looking to http://issues.apache.org/struts/browse/SHALE-409 seems to be
> present the solution. What can I do to write the patch?



With "write" I meant "modify your local version, export a diff file and post
the newly created patch".
If you post this patch, not only the community will be happy, but most
probably the issue will be fixed in a shorter time than the ones without
patches.
In conclusion, modify your local version and see if it works. In affirmative
case, create a diff file (through the use of "svn diff") and post it to the
issue page itself.

Antonio

RE: SHALE-409 fix

Posted by ma...@accenture.com.
Antonio, can i?
Looking to http://issues.apache.org/struts/browse/SHALE-409 seems to be
present the solution. What can I do to write the patch?


-----Original Message-----
From: Antonio Petrelli [mailto:antonio.petrelli@gmail.com] 
Sent: 22 maggio 2007 15.48
To: user@shale.apache.org
Subject: Re: SHALE-409 fix

2007/5/22, mario.buonopane@accenture.com
<ma...@accenture.com>:
> Please fix the bug SHALE-409.

If you want it fixed, why don't you write a patch?

Antonio


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

Re: SHALE-409 fix

Posted by Antonio Petrelli <an...@gmail.com>.
2007/5/22, mario.buonopane@accenture.com <ma...@accenture.com>:
> Please fix the bug SHALE-409.

If you want it fixed, why don't you write a patch?

Antonio

Re: SHALE-409 fix

Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
The question would be - as the second run is really useless - how to
identify annotated tiger beans.
If they can be identified (dont know if this is possible and how to do
it yet), than the code in run two can be fixed to do what the comment
does want to do, remove them, instead of removing the rest completely.

Torsten


Am Dienstag, den 22.05.2007, 15:41 +0200 schrieb
mario.buonopane@accenture.com:
> Please fix the bug SHALE-409.
> 
>  
> 
> Regards
> 
> Mario Buonopane
> 
>  
> 
> 
> 
> This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.