It can be done, but I suspect everyone on the list will tell you not to do it, and for very good reasons.

However, I'm one of those "here's your rope sir, try not to hang yourself with it" kind of guys, so here's how...

The ModuleConfigImpl has a member "configured". This is what determines if the configuration is "frozen" or not. You will need to set it to false. However, there is no unfreeze() method because you are not meant to be able to unfreeze it.

To do so anyway, create a class something like this:

package org.apache.struts.config.impl;
public class MCUtils {
  public static void unfreeze(ModuleConfig mc) {
    mc.configured = false;
  }
}

Call unfreeze, passing an instance of your ModuleConfig object, and you'll be able to do all the Very Bad Things(tm) you want with it. You may open the gates of Hell by doing this, but it's your apocalypse.

As I indicated though... I wouldn't be surprised if you get 25 other replies, most of which say "don't do it!!" and many of which say "you can't do it". The former are correct, the later are not. :)

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

Diego Manilla Suárez wrote:
Hi! I'm trying to add an ActionMapping definition dinamically (using ModuleConfig.addActionConfig method), but I get an IllegalStateException (configuration is frozen). Is there a way to do what I want?

Thanks in advance.

---------------------------------------------------------------------
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]



Reply via email to