I have a @Component with immediate=true which fires up a thread in its
@Activate to listen on a socket. The @Deactivate, if it were ever
called, would kill the thread.
What I appear to be seeing is that the @Activate is called twice with no
call to @Deactivate (so I get two threads, one of which crashes because
the port is in use).
There may be a hint that this is connected to the processing of
configuration.json, even though there is nothing in configuration.json
for this particular @Component.
Any ideas?
When I shut down the system some time later there *are* two calls to the
@Deactivate method logged, which suggests that it is being called and
the logging is working. If I leave out the "immediate=true" there are no
calls to @Activate.
2016-11-23 11:49:16,058 | INFO | pool-84-thread-3 |
provider | 1195 -
osgi.enroute.configurer.simple.provider - 2.0.0.201610141744 | Reading
configurations for bundle com.telensa.apps.planet.p2c.provider
1.0.0.201611231149 in configuration/configuration.json
2016-11-23 11:49:16,058 | INFO | pool-84-thread-3 |
provider | 1195 -
osgi.enroute.configurer.simple.provider - 2.0.0.201610141744 | Reading
configuration for bundle com.telensa.apps.planet.p2c.provider
1.0.0.201611231149 in configuration/configuration.json null
2016-11-23 11:49:16,074 | INFO | pool-84-thread-3 |
P2cImpl | 1196 -
com.telensa.apps.planet.p2c.provider - 1.0.0.201611231149 | activate
2016-11-23 11:49:16,074 | INFO | pool-84-thread-3 |
bundle | 917 -
org.apache.aries.spifly.dynamic.bundle - 1.0.1 | Bundle Considered for
SPI providers: com.telensa.apps.planet.p2c.provider
2016-11-23 11:49:16,074 | INFO | pool-84-thread-3 |
bundle | 917 -
org.apache.aries.spifly.dynamic.bundle - 1.0.1 | No 'SPI-Provider'
Manifest header. Skipping bundle: com.telensa.apps.planet.p2c.provider
2016-11-23 11:49:16,074 | INFO | pool-84-thread-3 |
provider | 1195 -
osgi.enroute.configurer.simple.provider - 2.0.0.201610141744 | Reading
configurations for bundle com.telensa.apps.planet.p2c.provider
1.0.0.201611231149 in configuration/configuration.json
2016-11-23 11:49:16,074 | INFO | pool-84-thread-3 |
provider | 1195 -
osgi.enroute.configurer.simple.provider - 2.0.0.201610141744 | Reading
configuration for bundle com.telensa.apps.planet.p2c.provider
1.0.0.201611231149 in configuration/configuration.json null
2016-11-23 11:49:16,089 | INFO | Thread-47 |
P2cImpl | 1196 -
com.telensa.apps.planet.p2c.provider - 1.0.0.201611231149 | Thread
started running
2016-11-23 11:49:16,105 | INFO | pool-84-thread-3 |
P2cImpl | 1196 -
com.telensa.apps.planet.p2c.provider - 1.0.0.201611231149 | activate
2016-11-23 11:49:16,199 | INFO | pool-84-thread-3 |
provider | 1195 -
osgi.enroute.configurer.simple.provider - 2.0.0.201610141744 | Reading
configurations for bundle org.zeromq.jeromq 0.3.5 in
configuration/configuration.json
2016-11-23 11:49:16,199 | INFO | Thread-48 |
P2cImpl | 1196 -
com.telensa.apps.planet.p2c.provider - 1.0.0.201611231149 | Thread
started running
.....................................................
2016-11-23 12:00:03,195 | INFO | nsole user karaf |
LogoutAction | 41 - org.apache.karaf.shell.commands
- 4.0.7 | Disconnecting from current session...
2016-11-23 12:00:03,211 | INFO | FelixShutdown |
BlueprintExtender | 12 - org.apache.aries.blueprint.core
- 1.6.2 | Destroying BlueprintContainer for bundle
org.apache.karaf.shell.core/4.0.7
2016-11-23 12:00:03,211 | INFO | FelixShutdown |
BlueprintExtender | 12 - org.apache.aries.blueprint.core
- 1.6.2 | Destroying BlueprintContainer for bundle
org.apache.karaf.jaas.blueprint.config/4.0.7
2016-11-23 12:00:03,226 | INFO | FelixShutdown |
BlueprintExtender | 12 - org.apache.aries.blueprint.core
- 1.6.2 | Destroying BlueprintContainer for bundle
org.apache.aries.blueprint.core/1.6.2
2016-11-23 12:00:03,226 | INFO | FelixShutdown |
BlueprintExtender | 12 - org.apache.aries.blueprint.core
- 1.6.2 | Destroying BlueprintContainer for bundle
org.apache.aries.blueprint.cm/1.0.8
2016-11-23 12:00:03,257 | INFO | FelixStartLevel |
P2cImpl | 1196 -
com.telensa.apps.planet.p2c.provider - 1.0.0.201611231149 | deactivate
2016-11-23 12:00:03,273 | INFO | FelixStartLevel |
P2cImpl | 1196 -
com.telensa.apps.planet.p2c.provider - 1.0.0.201611231149 | deactivate
--
Tim Ward
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev