el-next@uel.java.net

Re: Namespaced bases

From: Martin Marinschek <mmarinschek_at_apache.org>
Date: Fri, 30 Apr 2010 06:23:11 +0200

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

Which still doesn't mean you can create a bean anytime you want - I
don't think it will be valid to create a certain bean when you create
the EL expression (when you first execute it, this will be valid, but
when you create it certainly not). So it really depends on when the
parsing happens.

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

No, it can't - I just thought that you will need to create the bean to
find out if it exists - with the existing APIs. Maybe we should talk
some more on what the desired API would be to fulfill this.

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

Yeah, well - given the fact that most bean containers have a
release-cycle of 1-2 years, it will certainly not be easy to get new
API support in fast.

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


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