Java EE 6: Cambio a CDI-Mejores recursos
Tengo una pequeña pero completa aplicación Java EE 6 a mano.
El tradicional anotaciones se utilizan: @Resource
, @EJB
, @Singleton
, @PostConstruct
, @PreDestroy
, @PersistenceContext
, @ManagedBean
, @ManagedProperty
, @RequestScope
, @ApplicationScope
,...
Me gustaría evaluar si tiene sentido introducir CDI y estandarizar una estrategia común para la inyección de dependencias, la gestión del ciclo de vida del frijol, etc.
Pregunta: ¿Alguien sabe de buenos artículos, ejemplos o manuales que transforman java tradicional EE 6 anotaciones en CDI?
6 answers
¿Alguien sabe de buenos artículos, ejemplos o manuales que transforman las anotaciones tradicionales de Java EE 6 en anotaciones CDI?
No estrictamente sobre una "transformación", pero muy buenos recursos IMO:
-
La Inyección de Dependencia en Java EE 6 serie - Por Reza Rahman
El CDI RefCard en DZone
-
A Hitchhikers Guide to Java EE 6 application setup series - Por Nicklas Karlsson
Pregunta relacionada
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-05-23 12:16:55
En mi opinión, "cambiar" a CDI no es gran cosa. Simplemente agregue una implementación CDI (como Weld) a sus bibliotecas y comience a agregar frijoles/Anotaciones CDI a su aplicación. No tienes que cambiar tu base de código existente. Sugeriría leer la referencia de soldadura .
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2010-08-04 09:19:41
Si planea usar la implementación de CDI de JBoss (Weld), puede estar interesado en este artículo CDI con JBoss Weld.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-02-17 13:03:24
Véase openwebbeans.apache.org
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-08-22 10:20:08
Siguiendo la línea sugerida recomiendo leer:
El Tutorial de Java EE 6-Contextos e Inyección de Dependencias
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-08-31 05:56:47
En el mismo espíritu, me gusta el siguiente artículo:
Spring to Java EE-Una experiencia de Migración
No se trata de "Old-skool Java EE"-to-"CDI-based Java EE", sino más bien de Spring-to-Java EE 6.
Fuera de tema, pero una lectura interesante de todos modos.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-12-10 19:32:34