6

I'm trying to embed Felix in Embedded Tomcat. Everything works fine. However when shutting down the Felix framework (have deployed SCR, cm, event admin, and metatype services) it will give me a framework shutdown event. But the threads is still alive in the ResolveImpl executor.

So I've got a bunch of "FelixResolver-" threads still dangling. I cannot force the shutdown of the threads since they belong to the executor.

Shutdown sequence:

framework.stop();
final FrameworkEvent fe = framework.waitForStop(wait);

and I get

fe.getType() == FrameworkEvent.STOPPED.

Felix Framework is 'org.apache.felix.framework-5.6.1.jar'

I'm using the following felix bundles:

  • org.apache.felix.configadmin-1.8.14.jar
  • org.apache.felix.eventadmin-1.4.8.jar
  • org.apache.felix.log-1.0.1.jar
  • org.apache.felix.metatype-1.1.2.jar
  • org.apache.felix.scr.compat-1.0.4.jar
  • org.apache.felix.scr-2.0.8.jar

I manually install and start the bundles. I'm not stopping the bundles, instead I stop the framework bundle using the above.

Install order (start order is the same after installing):

  • org.apache.felix.configadmin [version 1.8.14]
  • org.apache.felix.eventadmin [version 1.4.8]
  • org.apache.felix.log [version 1.0.1]
  • org.apache.felix.metatype [version 1.1.2]
  • org.apache.felix.scr [version 2.0.8]
  • org.apache.felix.scr.compat [version 1.0.4]

What am I doing wrong?

Cheers, Mario

EDIT 1:

I've upgraded to felix framework 5.6.2 but the issue still remains.

Mario Toffia
  • 510
  • 5
  • 16
  • File a bug on Felix, this is not a stackoverflow question? – Peter Kriens Apr 01 '17 at 15:33
  • OK I'll do that, thanks! – Mario Toffia Apr 12 '17 at 06:04
  • Did you file a bug? Can you give me a link to the bug tracker please? – fuemf5 Jul 31 '18 at 16:48
  • Sorry, no I didn't – Mario Toffia Aug 16 '18 at 13:31
  • I also see this problem on Felix 6.0.1. However, the threads are daemon threads, so they don't stop the VM from shutting down. In my case, I was starting the Felix framework from a class invoked from maven-exec-plugin:java, and the build was hanging for 15 seconds while the plugin waited for threads to shut down. Adding `false` to the plugin config resolved the problem. But it seems to me like a bug in Felix. – gjoranv Sep 27 '18 at 13:29

0 Answers0