[ 
http://www.stripesframework.org/jira/browse/STS-167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ben Gunter closed STS-167.
--------------------------


> Generic Injection Factories
> ---------------------------
>
>                 Key: STS-167
>                 URL: http://www.stripesframework.org/jira/browse/STS-167
>             Project: Stripes
>          Issue Type: New Feature
>          Components: ActionBean Dispatching
>            Reporter: Sebastian Beigel
>            Assignee: Ben Gunter
>             Fix For: Release 1.6
>
>         Attachments: injection-factory.war
>
>
> As dicussed in the devel-mailing list, I proposed to add a generic injection 
> factory functionality to Stripes. The idea is to annotate domain objects in 
> the ActionBeans with an @Inject annotation. These objects are injected if a 
> matching id (primary key) parameter is found in the servlet request.
> An InjectionInterceptor and one or more InjectionFactories have to be 
> configured (in the web.xml). The InjectionInterceptor intercepts the request 
> processing lifecycle and looks for domain objects to inject into the resolved 
> ActionBean. Therfore it extracts the id (primary key) parameter from the 
> servlet request, inspects the types of the domain objects (or Collections of 
> them) and injects them into the ActionBean. The actual retrieval of the 
> domain objects or collections is delegated to the configured 
> InjectionFactories (which are identified by factory names).
> I have attached an example WAR inlcuding the source files with JavaDoc 
> comments to make things clearer :) 
> It is important to note that I patched RuntimeConfiguration to (optionally) 
> initialize interceptors after instantiation (see STS-165, 
> http://mc4j.org/jira/browse/STS-165 ). A patched version is included in the 
> WAR and overrides the original class in the jar (Stripes 1.3b1).

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to