<div dir="ltr">+1 on revisiting this on the CDI spec. I think adding an additional method on the BeanManager api would be good. Effectively, it is to promote this very method on WeldManager to BeanManager. Shall I raise a CDI jira for this? <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 23, 2015 at 7:25 AM, Jozef Hartinger <span dir="ltr"><<a href="mailto:jharting@redhat.com" target="_blank">jharting@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
Doing this using purely CDI APIs can be a bit tricky. One option
that will most likely work is to combine
BeanManager.resolveObserverMethods() method with a custom
implementation of ProcessInjectionTarget interface. That way you can
resolve the matching observer methods and then call their notify()
method to deliver the event. Exception handling needs to be
implemented to match the spec.<br>
<br>
We should update the spec to define a more direct route and for the
JPA spec to mention this requirement.<span class="HOEnZb"><font color="#888888"><br>
<br>
Jozef</font></span><div><div class="h5"><br>
<br>
<div>On 06/22/2015 02:25 PM, Emily Jiang
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>Jozef,<br>
</div>
Just re-iterate my concern:<br>
The implementation is in eclipse link. I guess they don't
want to depend on a specific CDI implementation. Therefore,
what you suggested may not be accepted by the eclipse link
project.<br>
<br>
</div>
Thanks<br>
</div>
Emily<br>
<div>
<div><br>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Jun 21, 2015 at 10:59 PM, Emily
Jiang <span dir="ltr"><<a href="mailto:emijiang6@googlemail.com" target="_blank">emijiang6@googlemail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">thanks Jozef!<br>
</div>
<div>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Jun 21, 2015 at 10:58
PM, Emily Jiang <span dir="ltr"><<a href="mailto:emijiang6@googlemail.com" target="_blank">emijiang6@googlemail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>
<div>
<div>Jozef, <br>
</div>
The implementation is in eclipse link. I
guess they don't want to depend on a
specific CDI implementation. <br>
</div>
Thanks<span><font color="#888888"><br>
</font></span></div>
<span><font color="#888888">Emily<br>
</font></span></div>
<div>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Jun 21,
2015 at 8:42 PM, Jozef Hartinger <span dir="ltr"><<a href="mailto:jharting@redhat.com" target="_blank">jharting@redhat.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
Hi Emily,<br>
<br>
the implementation should call the
following method <a href="http://docs.jboss.org/weld/javadoc/2.2/weld-spi/org/jboss/weld/manager/api/WeldManager.html#fireProcessInjectionTarget-javax.enterprise.inject.spi.AnnotatedType-javax.enterprise.inject.spi.InjectionTarget" target="_blank">http://docs.jboss.org/weld/javadoc/2.2/weld-spi/org/jboss/weld/manager/api/WeldManager.html#fireProcessInjectionTarget-javax.enterprise.inject.spi.AnnotatedType-javax.enterprise.inject.spi.InjectionTarget</a>-
on Weld BeanManager and use the
returned value as the InjectionTarget.<br>
<br>
HTH,<br>
<br>
Jozef
<div>
<div><br>
<br>
<div>On 06/19/2015 12:28 PM, Emily
Jiang wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div>
<div dir="ltr">
<div>
<div>
<div><br clear="all">
</div>
In CDI 1.2 spec<br>
11.5.7.
ProcessInjectionPoint
event<br>
The container must fire an
event for every injection
point of every Java EE
component class<br>
supporting injection that
may be instantiated by the
container at runtime,
including every managed
bean declared using
@ManagedBean, EJB session
or message-driven bean,
bean, interceptor or
decorator.<br>
<br>
</div>
The JavaEE component classes
are mentioned in JavaEE
platform EE.5-1, which
includes servlets, servlet
filters, entity listeners
etc.<br>
<br>
</div>
My concern is about entity
listeners in JPA. Eclipse link
has done all the injection for
entity listeners. It does not
fire the event, @See
createEntityListenerAndInjectDependancies(...)<br>
<br>
JPA spec section 3.5.1 does
not mention this event
requirement. How can the
eclipse cdi implementation
satisfy the CDI spec?<br>
<br>
[1] <a href="http://git.eclipse.org/c/eclipselink/eclipselink.runtime.git/tree/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/cdi/EntityListenerInjectionManagerImpl.java?h=2.6_WAS" target="_blank">http://git.eclipse.org/c/eclipselink/eclipselink.runtime.git/tree/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/cdi/EntityListenerInjectionManagerImpl.java?h=2.6_WAS</a>]<br>
<div>
<div>
<div>-- <br>
<div>Thanks<br>
Emily<br>
=================<br>
Emily Jiang<br>
<a href="mailto:ejiang@apache.org" target="_blank">ejiang@apache.org</a><br>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
weld-dev mailing list
<a href="mailto:weld-dev@lists.jboss.org" target="_blank">weld-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a></pre>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div>Thanks<br>
Emily<br>
=================<br>
Emily Jiang<br>
<a href="mailto:ejiang@apache.org" target="_blank">ejiang@apache.org</a><br>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div>Thanks<br>
Emily<br>
=================<br>
Emily Jiang<br>
<a href="mailto:ejiang@apache.org" target="_blank">ejiang@apache.org</a><br>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div>Thanks<br>
Emily<br>
=================<br>
Emily Jiang<br>
<a href="mailto:ejiang@apache.org" target="_blank">ejiang@apache.org</a><br>
</div>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Thanks<br>Emily<br>=================<br>Emily Jiang<br><a href="mailto:ejiang@apache.org" target="_blank">ejiang@apache.org</a><br></div>
</div>