Permalink
Browse files

FELIX-2823 Catch all exceptions from BundleContext.getService for pro…

…pery logging and recovery

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1067009 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 3f987eb commit a8c553e315930bdb3410a542ae44bd0d2521ec3d Felix Meschberger committed Feb 3, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
@@ -784,14 +784,14 @@ Object getService( ServiceReference serviceReference )
{
service = m_componentManager.getActivator().getBundleContext().getService( serviceReference );
}
- catch ( IllegalStateException ise )
+ catch ( Exception e )
{
// caused by getService() called on invalid bundle context
// or if there is a service reference cycle involving service
// factories !
m_componentManager.log( LogService.LOG_ERROR, "Failed getting service {0} ({1}/{2,number,#})", new Object[]
{ m_dependencyMetadata.getName(), m_dependencyMetadata.getInterface(),
- serviceReference.getProperty( Constants.SERVICE_ID ) }, ise );
+ serviceReference.getProperty( Constants.SERVICE_ID ) }, e );
service = null;
}

0 comments on commit a8c553e

Please sign in to comment.