el-next@uel.java.net

Re: Namespaced bases

From: Martin Marinschek <mmarinschek_at_apache.org>
Date: Thu, 29 Apr 2010 04:09:54 +0200

> 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.

> 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.

> 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.

> Also, would it be useful to be able to "import" namespace so that names
> can be used without the namespaces?

sounds interesting to me.

best regards,

Martin
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: el-next-unsubscribe_at_uel.dev.java.net
>> For additional commands, e-mail: el-next-help_at_uel.dev.java.net
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: el-next-unsubscribe_at_uel.dev.java.net
> For additional commands, e-mail: el-next-help_at_uel.dev.java.net
>
>


-- 
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces