sorry for late answer

On Mar 21, 2013, at 7:35 PM, Ken Finnigan <kfinniga@redhat.com> wrote:

I'm in the process of implementing the CDI support for GenericPortlet and would everyone's thoughts on how the changes in gatein-pc should be integrated into gatein-portal.

The changes in gatein-pc are purely around lifecycle modifications and enhancements, and don't entail anything CDI specific within them.


yes hopefully the next portlet spec will standardize it something.

However, gatein-portal/component/pc is modified to add the listener to perform CDI injection within ExoPortletApplicationDeployer, and the code for the listener brings with it the need for CDI on the classpath of the module.

My current thinking is to create a gatein-portal/component/cdi module that contains the listener code, with dependencies on CDI, etc.  Then in ExoPortletApplicationDeployer I try to instantiate the listener based on the class name, and do nothing if that fails.

will this use rely standard CDI SPI or CDI Servlet integration ? do you have details about that ?


I see the benefit of this being that we don't then have to ensure that each package option we provide also bundles a CDI implementation, as neither Tomcat or Jetty support CDI OOTB. So ExoPortletApplicationDeployer can simply not add the listener for CDI when the class is not present, and whether its present is determined by packaging.

Will that work with the Weld / Tomcat integration (like described here http://www.lucubratory.eu/getting-weld-cdi-into-tomcat-7/) ?


Does that sound ok?


yes, overall your work is interesting and my main concern is that it can work in non native CDI environment that provide an integration with Weld (like explained before). 

Also, the CDI scope implementations I think are best suited to be in a new repo under gatein on github, which contains the scopes and the CDI extension to activate them.  And once again the packaging will be updated to include it for only environments that contain a CDI implementation, such as AS.

Thanks
Ken

========================
Senior Software Engineer / JBoss Enterprise Middleware Red Hat, Inc.

_______________________________________________
gatein-dev mailing list
gatein-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/gatein-dev