Hi Martin,
On 29 Apr 2010, at 03:09, Martin Marinschek wrote:
>> You seem to imply that in CDI, all bean names are known at deployment
>> time, and have the life time of an application.
>
> No - CDI defines several scopes. However, there is an application wide
> scope as well. We could maybe restrict ourselves to such beans.
Right, but it's a Bean which has a name, not a bean instances. All instances of a particular Bean will have the same name.
>
>> Can
>> beans (including those with namespaces) be created and destroyed in
>> between EL expressions?
>
> yes. But generally, the bean definition doesn't change. So if a bean
> is defined, you will certainly get a new bean-instance from the
> bean-container, even if the old bean-instance is killed. If we include
> session, request and conversation-scoped beans, you would effectively
> need to be parsing against the configuration - I don't see an API for
> this in the bean-containers, however.
How do you mean Martin? Is this assuming the bean definition name can change during the application lifecycle.
>
>> The reason I ask is that if we cannot determine
>> the existence of a bean until execution time, we probably cannot do
>> namespace resolution at parse time.
>
> See above - if you could parse against the configuration, that would
> of course be nicer.
Maybe we can support both (impl detail?) and have a switch to choose which one to use, depending on the design of the bean container?
Pete