archives containing a beans.xml with bean-discovery-mode=all
by Emily Jiang
>From CDI spec,
An archive which:
• contains a beans.xml file with the bean-discovery-mode of none, or,
• contains an extension and no beans.xml file
is not a bean archive.
I think it is no need to create a bda for such bean archives, which implies
JavaEE component classes cannot support injection in these archives. These
archives are ignored basically. Right?
The spec does say an extension can exist in a non-bean archive but it does
not say anything about JavaEE component classes.
--
Thanks
Emily
=================
Emily Jiang
ejiang(a)apache.org
9 years, 3 months
fire process injection target event for non-cdi Interceptors
by Emily Jiang
According to the CDI 1.2 spec, the container must fire Processing Injection
Target event for all Java EE component classes. The Java EE component
classes are listed in the table EE-5.1, shown below.
[image: Inline image 1]
Weld provides an api WeldManager.fireProcessInjectionTarget, which can be
used to fire events for all other JavaEE component classes except the
interceptors . For EJB style interceptors, we have to use
WeldInjectionTargetFactory.createInterceptorInjectionTarget() (creating a
non-proxy instance) but it does not fire events. Are there any other API to
fire processing injection targets for EJB-style interceptors? Am I missing
something?
--
Thanks
Emily
=================
Emily Jiang
ejiang(a)apache.org
9 years, 3 months
NPE on AbstractResourceInjection
by Emily Jiang
I am trying to use Weld to inject ManagedBean instance but got the
following NPE.
[javatest.batch] Caused by: java.lang.NullPointerException
[javatest.batch] at
org.jboss.weld.injection.AbstractResourceInjection.getResourceReference(AbstractResourceInjection.java:44)
[javatest.batch] at
org.jboss.weld.injection.AbstractResourceInjection.injectResourceReference(AbstractResourceInjection.java:53)
[javatest.batch] at
org.jboss.weld.util.Beans.injectEEFields(Beans.java:348)
[javatest.batch] at
org.jboss.weld.injection.producer.ResourceInjector$1.proceed(ResourceInjector.java:69)
--
Is there anything wrong? For some reason, it does not call back to the
ResourceReferenceFactory service to get hold of an instance of an factory.
Thanks
Emily
=================
Emily Jiang
ejiang(a)apache.org
9 years, 3 months