[richfaces-issues] [JBoss JIRA] Commented: (RF-11110) Push and CDI Events integration

Brian Leathem (JIRA) jira-events at lists.jboss.org
Tue Sep 27 15:15:27 EDT 2011


    [ https://issues.jboss.org/browse/RF-11110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630866#comment-12630866 ] 

Brian Leathem commented on RF-11110:
------------------------------------

Addressing the scanning of the RichFaces jars:
We indeed do not want to scan the entire jar.  Since we know the @Observes class ahead of time, we can use a CDI extension to register the bean.

Here are some docs regarding writing CDI extensions:
http://docs.jboss.org/cdi/spec/1.0/html_single/#spi

Basically it involves:
# an entry in an extension registry file (within the richfaces jar):
{quote}META-INF/services/javax.enterprise.inject.spi.Extension{quote}
# Creating the extension class that implements the interface:
{code}javax.enterprise.inject.spi.Extension;{code}
# Observing the _AfterBeanDiscovery_ lifecycle event, and programatically registering the Observer method.

Here are some links to help out in creating this observer:
* The CDI lifecycle event we will want to observe:
** http://docs.jboss.org/cdi/api/1.0/javax/enterprise/inject/spi/AfterBeanDiscovery.html
* The interface for adding an observer
** http://docs.jboss.org/cdi/api/1.0/javax/enterprise/inject/spi/ObserverMethod.html
* Some useful Solder classes
** https://github.com/seam/solder/blob/develop/impl/src/main/java/org/jboss/solder/bean/ForwardingObserverMethod.java
** https://github.com/seam/solder/blob/develop/impl/src/main/java/org/jboss/solder/bean/generic/GenericObserverMethod.java
** https://github.com/seam/solder/blob/develop/impl/src/main/java/org/jboss/solder/bean/defaultbean/DefaultObserverMethod.java

> Push and CDI Events integration
> -------------------------------
>
>                 Key: RF-11110
>                 URL: https://issues.jboss.org/browse/RF-11110
>             Project: RichFaces
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: component-push/poll
>            Reporter: Brian Leathem
>            Assignee: Lukáš Fryč
>            Priority: Critical
>             Fix For: 4.1.0.Milestone3
>
>   Original Estimate: 6 hours
>  Remaining Estimate: 6 hours
>
> I would really like to see ajax push work with CDI events directly, without any requirement for JMS.  
> Ideally we would leverage the work done in the Errai project.

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

       



More information about the richfaces-issues mailing list