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