digitalroastery / weblounge

Web Content Management System
12 stars 4 forks source link

Intermittent hangup when registering endpoints #314

Closed ghost closed 10 years ago

ghost commented 10 years ago

Looking at the stack trace, the lockup seems to be stemming from the EndpointPublishingService's activate() method, which is finding all bundles that are in ACTIVE state and manually crafting an event for every service that is registered by the bundle.

So obviously those bundles may sometimes be in a state where they are not ready to be accessed by the service registry, which is happening further down the line when the EndpointPublishingService is trying to get a hold of them to look for JAXRS @Path annotations.

ghost commented 10 years ago

Stack trace (waiting for ServiceRegistry)

Object.wait(long) line: not available [native method] ServiceRegistry(Object).wait() line: 485 [local variables unavailable] ServiceRegistry.getService(Bundle, ServiceReference) line: 281 Felix.getService(Bundle, ServiceReference) line: 3568 BundleContextImpl.getService(ServiceReference) line: 468 EndpointPublishingService$JSR311AnnotatedServiceListener.serviceChanged(ServiceEvent) line: 332 EndpointPublishingService.activate(ComponentContext) line: 161