[ 
https://issues.apache.org/jira/browse/MYFACES-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475348
 ] 

Paul McMahan commented on MYFACES-1246:
---------------------------------------

Apache Geronimo has recently started introducing annotation support, including 
resource injection.  It is enabled by scanning an application's classloader 
during deployment for annotations, adding the resources to JNDI, and then 
allowing the various JEE containers to perform the injections by looking up the 
resource in JNDI when the object is brought into service.  In the case of JSF, 
the servlet container (tomcat or jetty) is responsible for finding annotations 
when it activates a servlet, filter, or listener and doing the resource 
injection or handling @PostConstruct, @PreDestroy, etc.

Since MyFaces 1.2 is now integrated with geronimo/server/trunk it should not be 
too difficult to start running some tests with annotations.  Also, as Bernd has 
pointed out Geronimo provides an annotation spec jar and in fact already adds 
it to the classpath for the servlet containers where MyFaces is enabled.  
Furthermore, Geronimo/XBean has some utility classes that can be used to 
process and discover annotations that could prove useful to MyFaces.

I think Mathias' idea about using an InjectionProvider makes a lot sense since 
currently Tomcat 6 (and maybe Jetty) only scans for and processes annotations 
in servlets, filters, and listeners.   I can help with this item for MyFaces in 
Geronimo.

> JSR-252 Issue #119: implementations running in a JSR-250 container have their 
> managed bean methods annotated with @PostConstruct be called after the object 
> is instantiated, and after injection is performed, but before the bean is 
> placed into scope.
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1246
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1246
>             Project: MyFaces Core
>          Issue Type: New Feature
>          Components: JSR-252
>            Reporter: Stan Silvert
>         Assigned To: Dennis Byrne
>
> Specified that implementations running in a JSR-250 compliant container have 
> their managed bean methods annotated with @PostConstruct be called after the 
> object is instantiated, and after injection is performed, but before the bean 
> is placed into scope.
> Specified that methods annotated with @PreDestroy be called when the scope 
> for the bean is ending.
> See 
> https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=252

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to