Dear Conan,
It's obviously up to you when to start your thread. Why not start it from
the updated() method?
Regards
Neil
> Dear all,
>
> I am intending to code a OSGi service that implemements Managed Service.
> The coded OSGi service consists of one Java thread. A Java thread will be
> passed with configuration data reserved for the OSGi service from
> Configuration Admin. I would like to know if there is a way to postpose
> the running of the thread until updated() method is called and
> accomplished. Pseudo-code is illustrated as following:
>
> Class MyService implements BundleActivator, ManagedService, Runnable{
> Public void start(BundleContext bc){
>
>
> }
> Public void run(){
> //Fetch configuration data via updated() method and process it
> }
> Public void updated(Dictionary dic){
> }
> }
>
> The problem is that if the run() method is invoked before updated() method
> than the service will work with incorrect data. Would anyone can help me
> to solve out the problem?
>
> Kind regards,
> Conan.
> --
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> http://www2.osgi.org/mailman/listinfo/osgi-dev
>
_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev