DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13638>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13638

add Config Factory





------- Additional Comments From [EMAIL PROTECTED]  2002-10-16 10:44 -------
I attach a proposal : 

the class org.apache.struts.config.ConfigFactory

I will release a patch for configRuleSet class. Here a sample : 

(...)

    protected ConfigFactory configFactory = new ConfigFactory();

   /**
    * Default constructor, use default factory.
    */
    public ConfigRuleSet () {
    }

   /**
    * Use the user factory.
    * @param ConfigFactory configFactory
    */
    public ConfigRuleSet (ConfigFactory configFactory) {
        this.configFactory = configFactory;
    }

(...)

        digester.addObjectCreate
            ("struts-config/action-mappings/action/exception",
             configFactory.getExceptionConfigClassName(),
             "className");
(...)


I think there is more work with ActionMapping class, actually, 
ActionMappingClass can be setted in ApplicationConfig class...prehaps we should 
remove (deprecate) these set/get and use the config factory ?

Other problem, the ConfigFactory must be configured before parsing struts-
config.xml so we can add an attribute in controller element (like the request 
processor class). -> in a web.xml, in a properties files ... 
Or perhaps it is possible to use an attribute in struts-config element. 

<struts-config factory="MyFactory">
...
</struts-config>

And the first rule is :

        digester.addRule
            ("struts-config",
             new SetConfigFactoryClassRule(this));


-emmanuel

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to