Thank you, Felix.


On 6/28/07, Felix Meschberger <[EMAIL PROTECTED]> wrote:

Hi Rajini,

Thanks for providing the test case.

It turns out, that you discovered a subtle issue with the Felix
EventDispatcher !

Let me explain quickly: If you start the framework, ane EventDispatcher
instance is created and a dispatcher thread is started. When the framework
is stopped, the EventDispatcher thread is stopped and internal flags of
the
EventDispatcher are set. Both, the thread and the flags are static
variables. If you now create a new Felix instance (without changing the
class loaders) the EventDispatcher static variables are not reset and
hence
the second (and any further) Felix instance started will not dispatch any
asynchronous events at all.

I will report an issue for this.

Regards
Felix

On 6/28/07, Rajini Sivaram <[EMAIL PROTECTED]> wrote:
>
> Felix,
>
> A test program is attached. If run without any changes, no events are
> received by the framework listener.
>
> If you comment out the first start and shutdown in the main method, one
> event is received. If felix.shutdown() is not called inside
> shutdownFelixRuntime, the event is received even with the new Felix
> instance.
>
> Thank you...
>
> Regards,
>
> Rajini
>
>
> On 6/28/07, Felix Meschberger <[EMAIL PROTECTED]> wrote:
> >
> > Hi Rajini,
> >
> > Then it is strange, that it is not called ...
> >
> > Do you have some sample code you might share for a quick code review ?
> >
> > Regards
> > Felix
> >
> > On 6/27/07, Rajini Sivaram <[EMAIL PROTECTED]> wrote:
> > >
> > > Felix,
> > >
> > > I create a new instance of Felix each time. Once shutdown is called,
> > the
> > > instance of Felix and the system bundle context are not used again .
A
> > > framework listener is created for the system bundle context every
time
> > the
> > > runtime is restarted, but it doesn't get invoked at all after the
> > first
> > > shutdown.
> > >
> > >
> > > Thank you...
> > >
> > > Regards,
> > >
> > > Rajini
> > >
> > > On 6/27/07, Felix Meschberger <[EMAIL PROTECTED] > wrote:
> > > >
> > > > Hi Rajini,
> > > >
> > > > How do you restart the framework ? Do you create the Felix
instance
> > anew
> > > > for
> > > > each framework start or do start-stop the same instance multiple
> > times ?
> > > >
> > > > For better replicability and also in view of the changes that
> > Richard is
> > > > currently implementing, I suggest you do not reuse the Felix
> > instances
> > > but
> > > > instead recreate a new instance for each start-stop cycle.
> > > >
> > > > Anyway, I assume, that you have to register the framework listener
> > each
> > > > time
> > > > you start Felix.
> > > >
> > > > Hope this helps
> > > >
> > > > Regards
> > > > Felix
> > > >
> > > > On 6/27/07, Rajini Sivaram <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Hello,
> > > > >
> > > > > I have a set of JUnit tests which startup a Felix runtime in the
> > setUp
> > > > > method and shut the runtime down using Felix.shutdown(). The
tests
> > run
> > > > > fine
> > > > > when run one-by-one (single Felix runtime startup and shutdown
in
> > a
> > > VM),
> > > > > but
> > > > > when run together (as a sequence of Felix runtime startup and
> > shutdown
> > > > > from
> > > > > one VM), the framework listener is not called after the first
> > > shutdown.
> > > > > Apart from the framework listener, other operations dont run
into
> > any
> > > > > problems with the restarting of the runtime, so I presume
> > restarting
> > > the
> > > > > embedded runtime is not a problem.
> > > > >
> > > > > Is this something which will get fixed with the changes to the
> > > embedded
> > > > > APIs?
> > > > >
> > > > >
> > > > > Thank you...
> > > > >
> > > > > Regards,
> > > > >
> > > > > Rajini
> > > > >
> > > >
> > >
> >
>
>
>




--
Thank you...

Regards,

Rajini

Reply via email to