On 09.11.2011, at 10:42, Carlo de Wolf wrote:
> On 11/09/2011 07:08 AM, Adam Bien wrote:
>> I would propose the following rules:
>>
>> 1. If name and class is specified at the same time, the name wins
>
> Name as the primary qualifier, but if the bean doesn't expose said class then it should still be a deployment error.
+1 works for me
>
> Ah crock, now I see the problem. I kind-off assumed it worked similar to @EJB.
>
> Carlo
>> 2. If a class is specified, and multiple deployments of the same EJB exist, you will get an error like "Ambiguous Dependency Error"
>> 3. For both cases: the ordering of classes or names specifies the order of startup-dependencies
>>
>> My main use case is pragmatic: auto-completion in the IDE :-)
>>
>> On 09.11.2011, at 03:05, Marina Vatkina wrote:
>>
>>> (moving discussion to the appropriate alias)
>>>
>>> David,
>>>
>>> @DependsOn defines the order in addition to the dependency. Annotation on the @EJB doesn't allow that. Also, you might want to depend on a bean and do not need to inject it...
>>>
>>> Adam,
>>>
>>> How would you define the rules about the classes vs. the names? Can both be specified at the same time? If yes, will the combination of classes and names be used? How would they be ordered in that case?
>>>
>>> thanks,
>>> -marina
>>>