struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wes Wannemacher <w...@wantii.com>
Subject Re: Struts 2 custom ClassLoader
Date Thu, 03 Sep 2009 13:39:58 GMT
I would suggest creating your own plugin... If the custom classes are
actions, validators, interceptors and type converters then just take a
look at the spring plugin for an example. You will want to write your
own implementation of the ObjectFactory, the ObjectFactory is in
charge of creating the struts2 app's actions, validators,
interceptors, type converters and beans.

As far as enhancing the functionality of struts.xml processing, I
would first suggest you see if you can retrofit your application to
work with one of the existing plugins like 'conventions'. I only say
this because enhancing the XmlConfigurationProvider is quite a bit
more daunting than extending the ObjectFactory. If you really can't
adopt an existing plugin for configuration, then create an
implementation of ConfigurationProvider and take a look at the
StrutsXmlConfigurationProvider and see if you can get the dispatcher
to honor your new ConfigurationProvider.

-Wes

On Thu, Sep 3, 2009 at 9:33 AM, Andriy Pererva<andronix1983@gmail.com> wrote:
> Hi, all!
> I'm working on a big java web project, which is based on Struts 2
> framework. Now we are going to do some refactoring and split the
> project up in some parts: core and other auxillary functionality
> modules. Core classes located under classpath, but all the auxillary
> functionality classes will be moved to database and loaded via our
> custom ClassLoader. Among these classes there are some Stuts actions
> and part of the struts.xml file with appropriate mapping.
> How can I make Struts 2 aware of my custom ClassLoader in order to
> load these auxillary action classes from DB. Currently Struts cannot
> find and instantinate any of them
> Any suggestions would be very appreciated!
>
> Thank you in advance for any useful answer.
>
> With best regards,
> Andriy.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message