RE: configuration is frozen
Craig, thanks for the clarification. It helps. * We'd have to synchronize around all accesses to the HashMap instances inside the configuration beans that are accessed on every request, causing a performance hit. I assume this means Struts 1.1 has significant performance improvement comparing to 1.0 and it's good to upgrade. Lucas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: configuration is frozen
You can try something like: ActionForward basis = mapping.findForward(success); ActionForward success = new ActionForward(); success.setPath(basis.getPath()); // also copy other relevant properties from basis success.setRedirect(true); return success; hth, Hubert --- Lucas Halim [EMAIL PROTECTED] wrote: Hi, I was upgrading Struts 1.0 to 1.1 and encounter a Configuration is Frozen illegal state exception and I found out that the redirection code causes this exception. ActionForward success = mapping.findForward(success); success.setRedirect(true); I aware that we can set an attribute of redirect=true in the forward tag in config file (struts-config.xml) but what happen if we need to dynamically en/disable the redirection? Thanks in advance. Lucas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: configuration is frozen
Thanks Hubert. Anybody knows why is it frozen at the first place? Is that just another mod in Struts 1.1? Lucas -Original Message- From: Hubert Rabago [mailto:[EMAIL PROTECTED] Sent: Thursday, January 08, 2004 11:05 AM To: Struts Users Mailing List Subject: Re: configuration is frozen You can try something like: ActionForward basis = mapping.findForward(success); ActionForward success = new ActionForward(); success.setPath(basis.getPath()); // also copy other relevant properties from basis success.setRedirect(true); return success; hth, Hubert --- Lucas Halim [EMAIL PROTECTED] wrote: Hi, I was upgrading Struts 1.0 to 1.1 and encounter a Configuration is Frozen illegal state exception and I found out that the redirection code causes this exception. ActionForward success = mapping.findForward(success); success.setRedirect(true); I aware that we can set an attribute of redirect=true in the forward tag in config file (struts-config.xml) but what happen if we need to dynamically en/disable the redirection? Thanks in advance. Lucas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: configuration is frozen
There was a thread just recently discussing that. You may be better off creating another instance anyway, because AFAIK mapping.findForward() returns the same instance for the same forward name, so even if you were able to modify that in an action call, you'd be modifying the forward being used in all requests, and you probably don't want that. --- Lucas Halim [EMAIL PROTECTED] wrote: Thanks Hubert. Anybody knows why is it frozen at the first place? Is that just another mod in Struts 1.1? Lucas -Original Message- From: Hubert Rabago [mailto:[EMAIL PROTECTED] Sent: Thursday, January 08, 2004 11:05 AM To: Struts Users Mailing List Subject: Re: configuration is frozen You can try something like: ActionForward basis = mapping.findForward(success); ActionForward success = new ActionForward(); success.setPath(basis.getPath()); // also copy other relevant properties from basis success.setRedirect(true); return success; hth, Hubert --- Lucas Halim [EMAIL PROTECTED] wrote: Hi, I was upgrading Struts 1.0 to 1.1 and encounter a Configuration is Frozen illegal state exception and I found out that the redirection code causes this exception. ActionForward success = mapping.findForward(success); success.setRedirect(true); I aware that we can set an attribute of redirect=true in the forward tag in config file (struts-config.xml) but what happen if we need to dynamically en/disable the redirection? Thanks in advance. Lucas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: configuration is frozen
That makes sense. -Original Message- From: Hubert Rabago [mailto:[EMAIL PROTECTED] Sent: Thursday, January 08, 2004 11:49 AM To: Struts Users Mailing List Subject: RE: configuration is frozen There was a thread just recently discussing that. You may be better off creating another instance anyway, because AFAIK mapping.findForward() returns the same instance for the same forward name, so even if you were able to modify that in an action call, you'd be modifying the forward being used in all requests, and you probably don't want that. --- Lucas Halim [EMAIL PROTECTED] wrote: Thanks Hubert. Anybody knows why is it frozen at the first place? Is that just another mod in Struts 1.1? Lucas -Original Message- From: Hubert Rabago [mailto:[EMAIL PROTECTED] Sent: Thursday, January 08, 2004 11:05 AM To: Struts Users Mailing List Subject: Re: configuration is frozen You can try something like: ActionForward basis = mapping.findForward(success); ActionForward success = new ActionForward(); success.setPath(basis.getPath()); // also copy other relevant properties from basis success.setRedirect(true); return success; hth, Hubert --- Lucas Halim [EMAIL PROTECTED] wrote: Hi, I was upgrading Struts 1.0 to 1.1 and encounter a Configuration is Frozen illegal state exception and I found out that the redirection code causes this exception. ActionForward success = mapping.findForward(success); success.setRedirect(true); I aware that we can set an attribute of redirect=true in the forward tag in config file (struts-config.xml) but what happen if we need to dynamically en/disable the redirection? Thanks in advance. Lucas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: configuration is frozen
Quoting Lucas Halim [EMAIL PROTECTED]: Thanks Hubert. Anybody knows why is it frozen at the first place? Is that just another mod in Struts 1.1? Without freezing the configuration, two bad things would happen: * We'd have to synchronize around all accesses to the HashMap instances inside the configuration beans that are accessed on every request, causing a performance hit. * It would be way too easy for applications to accidentally modify the configured information, and thereby introduce very mysterious and hard to find bugs. Lucas Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configuration is frozen -what does it mean?
On 13 May 2002 [EMAIL PROTECTED] wrote: Date: 13 May 2002 10:59:21 - From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Configuration is frozen -what does it mean? Hi! I often get an error messaget that says that the configuration is frozen. (See the error message below). I don't understand why I get this error and restarting the server does not help. I really need some help with this problem, thanks. The configuration is frozen error occurs when you are attempting to modify one of the data structures loaded from struts-config.xml at startup time. Judging from your stack trace, it looks like you're trying to modify the redirect property on an existing ActionForward instance. This is undesireable, because it would affect *all* future uses of that particular forward. The workaround is to make a copy of the ActionForward you looked up, and modify it's properties any way you'd like -- something like: ActionForward oldForward = mapping.findForward(foo); ActionForward newForward = new ActionForward(); newForward.setName(oldForward.getName()); newForward.setPath(oldForward.getPath()); newForward.setRedirect(true); // Ulrika Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]