jsr345-experts@ejb-spec.java.net

[jsr345-experts] Re: Should we deprecate _at_EJB

From: Pete Muir <pmuir_at_bleepbleep.org.uk>
Date: Tue, 5 Jul 2011 15:54:12 +0100

Yes, we would need to define a way to do remote injection, CDI style. Perhaps this should be in the EJB spec?

In other words we would

* deprecate @EJB
* add a syntax for @Inject style remote injection

On 5 Jul 2011, at 15:51, Reza Rahman wrote:

> Pete,
>
> I agree this is worth doing, but I think this has to be a pretty low priority item given that few people do remoting today (vis-a-vis REST, etc).
>
> I'm not exactly sure whether this belongs in the CDI spec or EJB spec. I think in order to retain consistency, it might be better to keep this is the EJB spec since @Remote is defined here (unless CDI remote injection can truly be location transparent). As we fix this, it might also be a good idea to finally define a standard way of locating the remote bean (or at least a way to define the remote server). Maybe something like:
>
> @Inject @Remote(server="someserver.somedomain.com") RemoteBean bean;
>
> Cheers,
> Reza
>
>
> On 7/4/2011 7:51 AM, Pete Muir wrote:
>> The big advantage of this is that it means users as less confused about when to use @EJB and when to use @Inject.
>>
>> The (dis)advantage is that a user cannot use EJB standalone (not sure this is really an issue).
>>
>> I think we should do this.
>>
>> One thing we need to address though, is remote injection - CDI does not support this (we could investigate this for CDI 1.1 of course).
>>
>> On 4 Jul 2011, at 12:31, Adam Bien wrote:
>>
>>> Should we deprecate @EJB in favor of @Inject? I would like to file this issue :-)
>>>
>>> thanks,
>>>
>>> --adam
>>
>>
>> -----
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 10.0.1388 / Virus Database: 1516/3738 - Release Date: 07/01/11
>>
>>
>>
>