Hi, Atos is proud to announce the first release of Tapestry-cdi, part of the got5[1] project.
This library is based on work of Romain Manni Bucau[2] and inspired from other contributions (Magnus Kvalheim[3] and FlowLogix projects[4]). We have updated the dependencies of this library to use Tapestry 5.3.7 Tapestry-CDI module allows injecting all kind of JSR 299 managed beans (POJO, EJB, web service, ...) as they are managed by the CDI-container This library also supports: - CDI beans injection @Inject CDI beans into pages, components and tapestry services. Both @Inject annotations are handled (@javax.inject.Inject and @org.apache.tapestry5.ioc.annotations.Inject) - Injection by constructor @Inject CDI beans into tapestry services constructors. Beans can then be injected by field or by constructor. - Qualifiers To disambiguate when injecting same type but different implementations, the module provides support for qualifier which is part of CDI specification. You can use qualifiers into pages, components and services. Just use @javax.inject.Named annotation - Helpers Add method helpers to ease the cdi bean instantiation (uncommon but useful if you want to declare some CDI beans in your AppModule to let tapestry manage them) - IOC isolation The module assures to have no conflict with the tapestry's IOC (Inversion of Control). Indeed, as there are beans managed by the java EE container and others beans managed by the framework, work has been made to prevent one to take control over the beans it is not supposed to manage. Code is available at https://github.com/got5/tapestry-cdi If you want to see it in action, you just need to: - Download the sources and "mvn install" the project - Add the module as a maven dependency for your project - In your project, @Inject your CDI beans into pages, components or services, and that’s pretty much it. *@Inject* *private MyCdiBean bean;* * * *@Inject* *@MyQualifier* *private MyQualifiedBean qualifiedBean;* For other use cases, you can already take a look at the unit tests. A demo project is coming soon. Stay tuned... The contributors of this release are : - Romain Manni Bucau - Nourredine Khadri - Pierre Marot - François Facon Feedbacks are welcome ! Best Regards [1] https://github.com/got5 [2] https://github.com/rmannibucau/cdi-tapestry-contribution [3] https://github.com/magnuskvalheim/tapestry-cdi [4] http://code.google.com/p/flowlogix <https://github.com/magnuskvalheim/tapestry-cdi>