Re: [osgi-dev] equinox env started notification
There are framework events which indicate the framework has started: https://osgi.org/specification/osgi.core/7.0.0/framework.lifecycle.html#d0e8798 But the larger question is "When have all the bundles completed their initialization and are ready for work?". This is a harder question to answer as many things can be happening asynchronously and reactively (since services are reactive and react to other services). There has been lots of discussion on this but no general answer. In the OSGi expert groups, this is still an active discussion thread. --BJ HargraveSenior Technical Staff Member, IBM // office: +1 386 848 1781OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788hargr...@us.ibm.com - Original message -From: Nhut Thai Le via osgi-dev Sent by: osgi-dev-boun...@mail.osgi.orgTo: OSGi Developer Mail List Cc:Subject: [osgi-dev] equinox env started notificationDate: Mon, Nov 19, 2018 3:16 PM Hello, We are using equinox as an osgi container to host our application which comprise a large number of osgi bundles. Our concern at this point is that when we start equinox, we don't know when all the bundles have been loaded and the startup has finished. Does anyone have a suggestion? Thank you in advance Thai ___OSGi Developer Mail Listosgi-dev@mail.osgi.orghttps://mail.osgi.org/mailman/listinfo/osgi-dev ___ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev
[osgi-dev] equinox env started notification
Hello, We are using equinox as an osgi container to host our application which comprise a large number of osgi bundles. Our concern at this point is that when we start equinox, we don't know when all the bundles have been loaded and the startup has finished. Does anyone have a suggestion? Thank you in advance Thai ___ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev
Re: [osgi-dev] osgi and timer task
The OSGi framework know about things registered via the OSGi framework API such as services and framework listeners. The OSGi framework does not know about everything in the JVM such as threads, open files, open sockets, etc. So it cannot manage them for a bundle. So your bundle need to manage the resources it uses such that if a resource needs to be closed or otherwise disposed of when the bundle stops, then your bundle needs to explicitly close or otherwise dispose of the resource. --BJ HargraveSenior Technical Staff Member, IBM // office: +1 386 848 1781OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788hargr...@us.ibm.com - Original message -From: "Ali Parmaksız via osgi-dev" Sent by: osgi-dev-boun...@mail.osgi.orgTo: osgi-dev@mail.osgi.orgCc:Subject: [osgi-dev] osgi and timer taskDate: Mon, Nov 19, 2018 12:10 PM Hi all, I have an osgi bundle. And this bundle starts a timer. If i stop the bundle, timer stops too? -- Ali ParmaksızTEL:5052555693 ___OSGi Developer Mail Listosgi-dev@mail.osgi.orghttps://mail.osgi.org/mailman/listinfo/osgi-dev ___ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev
Re: [osgi-dev] osgi and timer task
If you are asking “I observe this behaviour, is it correct?” then this sounds like a well written bundle with good behaviour. Threads started by a bundle when it starts should be stopped when it stops. Similarly sockets opened, or other resources claimed, should be closed/released. If you are asking “Will OSGi automatically ensure that this behaviour occurs?” then no. As always you the programmer are responsible for cleaning up after yourself. Best Regards, Tim Sent from my iPhone > On 19 Nov 2018, at 17:05, Ali Parmaksız via osgi-dev > wrote: > > Hi all, > > I have an osgi bundle. And this bundle starts a timer. If i stop the bundle, > timer stops too? > > -- > Ali Parmaksız > > TEL:5052555693 > ___ > OSGi Developer Mail List > osgi-dev@mail.osgi.org > https://mail.osgi.org/mailman/listinfo/osgi-dev ___ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev
[osgi-dev] osgi and timer task
Hi all, I have an osgi bundle. And this bundle starts a timer. If i stop the bundle, timer stops too? -- Ali Parmaksız TEL:5052555693 ___ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev