<tt><font size=2>><br>
> Therefore, I am wondering why this behavior is a problem?
AFAIK<br>
> all the CDI implementations pass this test and therefore
there may (at<br>
> least in theory) be applications relying on this behavior.<br>
></font></tt>
<br>
<br><font size=2 face="sans-serif">I agree that we should not directly
change the behaviour as we will break customers relying on this behaviour.</font>
<br>
<br><font size=2 face="sans-serif">Many thanks,<br>
Emily<br>
===========================<br>
Emily Jiang<br>
WebSphere Application Server Liberty Profile development </font>
<br><font size=2 face="sans-serif"> <br>
MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN<br>
Phone: +44 (0)1962 816278 Internal: 246278<br>
<br>
Email: emijiang@uk.ibm.com <br>
Lotus Notes: Emily Jiang/UK/IBM@IBMGB<br>
</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From:
</font><font size=1 face="sans-serif">Jozef Hartinger <jharting@redhat.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">To:
</font><font size=1 face="sans-serif">Antoine Sabot-Durand
<antoine@sabot-durand.net>, cdi-dev <cdi-dev@lists.jboss.org>,
</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date:
</font><font size=1 face="sans-serif">20/07/2015 16:07</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject:
</font><font size=1 face="sans-serif">Re: [cdi-dev]
Inconsistency in the spec regarding remote EJBs</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by:
</font><font size=1 face="sans-serif">cdi-dev-bounces@lists.jboss.org</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2><br>
<br>
On 20.7.2015 16:24, Antoine Sabot-Durand wrote:<br>
><br>
><br>
> Le lun. 20 juil. 2015 à 15:31, Jozef Hartinger <jharting@redhat.com<br>
> <</font></tt><a href=mailto:jharting@redhat.com><tt><font size=2>mailto:jharting@redhat.com</font></tt></a><tt><font size=2>>>
a écrit :<br>
><br>
> As Martin explained, it is not the case that "remote
EJBs are not CDI<br>
> beans".<br>
><br>
><br>
> It's not written in black and white but in section 3.7 resources<br>
> (</font></tt><a href="http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#resources"><tt><font size=2>http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#resources</font></tt></a><tt><font size=2>)
, remote<br>
> EJB are defined as resources and may can't be directly injected.<br>
> So if remote EJB are beans EntityManager or Web Services are as well.<br>
<br>
Section 3.7 talks about injecting *references* to resources. In case of
<br>
remote EJBs and web services this would be clients (stubs) for accessing
<br>
those components. This section does not say anything about the component
<br>
definitions themselves.<br>
<br>
><br>
> Therefore, I am wondering why this behavior is a problem?
AFAIK<br>
> all the CDI implementations pass this test and therefore
there may (at<br>
> least in theory) be applications relying on this behavior.<br>
><br>
><br>
> As said in my first mail, EJB spec sates (section 3.2.1)<br>
><br>
> "The arguments and results of the methods of the remote business<br>
> interface are passed by value."<br>
><br>
> I may be wrong but the observer in in the remote EJB is called with<br>
> arguments passed by reference. So we are violating EJB specification.<br>
><br>
> So IMO we should do something about this. Because the original concern<br>
> of Bill was about beans injected in remote method observer parameters<br>
> and how they were copied.<br>
<br>
I see. This is quite weird then.<br>
<br>
><br>
> Any thought?<br>
><br>
> Antoine<br>
><br>
><br>
> Jozef<br>
><br>
> On 16.7.2015 15:25, Antoine Sabot-Durand wrote:<br>
> > Hi guys,<br>
> ><br>
> ><br>
> > Bill Shanon, just pointed me to this test
in TCK:<br>
> ><br>
> ><br>
> </font></tt><a href="https://github.com/cdi-spec/cdi-tck/blob/1.2/impl/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/ResolveEnterpriseEventObserverTest.java"><tt><font size=2>https://github.com/cdi-spec/cdi-tck/blob/1.2/impl/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/ResolveEnterpriseEventObserverTest.java</font></tt></a><tt><font size=2><br>
> ><br>
> > It tests the following assertion:<br>
> ><br>
> > "If the bean is a session bean, the
observer method must be either a<br>
> > business method of the EJB or a static method
of the bean class.”<br>
> ><br>
> > The EJB containing the observers for the
test is:<br>
> ><br>
> ><br>
> </font></tt><a href="https://github.com/cdi-spec/cdi-tck/blob/1.2/impl/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/Spitz.java"><tt><font size=2>https://github.com/cdi-spec/cdi-tck/blob/1.2/impl/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/Spitz.java</font></tt></a><tt><font size=2><br>
> ><br>
> > The EJB contains one business method coming
from a local<br>
> interface, one<br>
> > from a remote and one static method. the
3 are observers methods<br>
> ><br>
> > The test expects that the remote business
observer method should<br>
> be called.<br>
> ><br>
> > Here we have an inconsistency IMO. By doing
this we are violating<br>
> rules<br>
> > the CDI spec regarding the fact that remote
EJBs are not CDI<br>
> beans. And<br>
> > we are calling this remote business method
passing the event<br>
> payload by<br>
> > reference and not by value which violates
EJB specification regarding<br>
> > remote EJB.<br>
> ><br>
> > I suggest that we change the assertion to:<br>
> ><br>
> > If the bean is a session bean, the observer
method must be either a<br>
> > local business method of the EJB or a static
method of the bean<br>
> class.<br>
> ><br>
> > and the TCK accordingly. Any thought ?<br>
> ><br>
> > Antoine<br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > cdi-dev mailing list<br>
> > cdi-dev@lists.jboss.org <</font></tt><a href="mailto:cdi-dev@lists.jboss.org"><tt><font size=2>mailto:cdi-dev@lists.jboss.org</font></tt></a><tt><font size=2>><br>
> > </font></tt><a href="https://lists.jboss.org/mailman/listinfo/cdi-dev"><tt><font size=2>https://lists.jboss.org/mailman/listinfo/cdi-dev</font></tt></a><tt><font size=2><br>
> ><br>
> > Note that for all code provided on this list,
the provider<br>
> licenses the code under the Apache License, Version
2<br>
> (</font></tt><a href="http://www.apache.org/licenses/LICENSE-2.0.html"><tt><font size=2>http://www.apache.org/licenses/LICENSE-2.0.html</font></tt></a><tt><font size=2>).
For all other<br>
> ideas provided on this list, the provider waives all
patent and<br>
> other intellectual property rights inherent in such
information.<br>
> ><br>
><br>
_______________________________________________<br>
cdi-dev mailing list<br>
cdi-dev@lists.jboss.org<br>
</font></tt><a href="https://lists.jboss.org/mailman/listinfo/cdi-dev"><tt><font size=2>https://lists.jboss.org/mailman/listinfo/cdi-dev</font></tt></a><tt><font size=2><br>
<br>
Note that for all code provided on this list, the provider licenses the
code under the Apache License, Version 2 (</font></tt><a href="http://www.apache.org/licenses/LICENSE-2.0.html"><tt><font size=2>http://www.apache.org/licenses/LICENSE-2.0.html</font></tt></a><tt><font size=2>).
For all other ideas provided on this list, the provider waives all patent
and other intellectual property rights inherent in such information.</font></tt>
<br><font size=2 face="sans-serif"><br>
Unless stated otherwise above:<br>
IBM United Kingdom Limited - Registered in England and Wales with number
741598. <br>
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU<br>
</font>