« Return to Thread: Shouldn't a realm be disposed when unselecting it

RE: Re: Shouldn't a realm be disposed when unselecting it

by Brian E Fox :: Rate this Message:

Reply to Author | View in Thread

These kinds of issues will be better handled once we integrate the plugin manager in 1.4. Until then, the plugins are handled like normal components, without most of the lifecycle functionality you would want, like disable, unload, reload, upgrade etc.

-----Original Message-----
From: anders.g.hammar@... [mailto:anders.g.hammar@...] On Behalf Of Anders Hammar
Sent: Tuesday, March 31, 2009 8:58 AM
To: nexus-dev@...
Subject: Re: [nexus-dev] Re: Shouldn't a realm be disposed when unselecting it

Ok, makes sense. Is there a way of telling of my realm is
selected/activated in Nexus? I would like this information to make
isPrimary() of my user locator to return true if the realm is selected
and false if not.

Thanks,
/Anders

2009/3/31 Tamás Cservenák <tamas@...>:

> Hi,
> Plexus' Disposable interface will be called on Plexus Container Dispose
> (when components are disposed). Not during "normal" app lifetime....
> From a Realm component viewpoint, it is selected when initialize() _is_
> called, since then a Plexus lookup is made for it, and Plexus will call all
> the lifecycle methods properly, as your component implements them
> (initializable, Startable, etc).
> If no lookup is made against your Realm, it will be not brought up as a
> Plexus component at all.
> Now, there is a situation like bringing up Nexus with your Realm _enabled_,
> than disabling it via UI.... Your Realm is currently completely unaware it
> is being "turned off".
> ~t~
>
> On Tue, Mar 31, 2009 at 2:45 PM, Anders Hammar <anders@...> wrote:
>>
>> Btw, I'm using Nexus 1.3.1.
>>
>> /Anders
>>
>> On Tue, Mar 31, 2009 at 14:42, Anders Hammar <anders@...> wrote:
>> > Hi,
>> >
>> > I have a realm that implements Initializable and Disposable. When then
>> > realm isn't selected at startup (in the Nexus conf), its initialize()
>> > method isn't called. When selecting it (in runtime), it is called. So,
>> > when de-selecting it I expected its dispose() method to be called (in
>> > runtime), but it isn't.
>> > Is this a bug or intended behavior? If intended behavior, how can I
>> > tell if a realm is currently selected or not?
>> >
>> > /Anders
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: nexus-dev-unsubscribe@...
>> For additional commands, e-mail: nexus-dev-help@...
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...


---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...

 « Return to Thread: Shouldn't a realm be disposed when unselecting it