[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.webtools.jsf] Re: Loop through the Mbeans in Session Scope

On 3/4/2008 10:22 AM, Reto Huber wrote:
>> "Yury Kats" <ykats@xxxxxxxxxx> wrote in message 
>> news:fqjnqk$vlf$1@xxxxxxxxxxxxxxxxxxxx
>> On 3/4/2008 9:12 AM, Reto Huber wrote:
>>> Hi
>>>
>>> I would like to loop through all registred MBeans (in session scope) in 
>>> the
>>> current session. Is there an easy way to do this? I don't have the name 
>>> of
>>> each Mbean to call them.
>> At design time or runtime?
> 
> at runtime 

While this a wrong forum for a runtime JSF question (better ask in Sun's or MyFaces,
depending on what implementation you use), the short answer is that there is no
public API to get a list of managed beans. JSF implementaion parses all available faces-config
files at startup, so you may take a look at how exactly that is done and where the information
is stored in the implementation you are using. Then either access the list if implementaion allows
it or parse config files yourself.

Why?