You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pd...@apache.org on 2014/11/24 10:32:31 UTC
svn commit: r1641341 -
/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java
Author: pderop
Date: Mon Nov 24 09:32:31 2014
New Revision: 1641341
URL: http://svn.apache.org/r1641341
Log:
When a componen can't be removed timely (when a bundle is being stopped), log a message in order to ask
the user to make a dump stacktrace in order to check if other component's callbacks are blocked on another
thread.
Don't throw an exception from the getClassName() method.
Modified:
felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java
Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java?rev=1641341&r1=1641340&r2=1641341&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java Mon Nov 24 09:32:31 2014
@@ -267,11 +267,14 @@ public class ComponentImpl implements Co
}
try {
- if (!stopLatch.await(15000, TimeUnit.MILLISECONDS)) { // todo make the delay configurable
- m_logger.warn("Could not stop component %s timely.", this);
+ if (!stopLatch.await(5000, TimeUnit.MILLISECONDS)) { // todo make the delay configurable
+ m_logger.warn(
+ "Could not stop component %s timely. " +
+ "You should dump jvm stacktraces and check if some component callbacks are blocked somewhere else on another thread.",
+ this);
}
} catch (InterruptedException e) {
- m_logger.info("Thread interrupted while stopping component %s.", this);
+ m_logger.warn("Thread interrupted while stopping component %s.", this);
}
}
}
@@ -1305,7 +1308,8 @@ public class ComponentImpl implements Co
if (instanceFactory != null) {
return instanceFactory.getClass().getName();
} else {
- throw new IllegalStateException("can't find the component class name");
+ // unexpected.
+ return ComponentImpl.class.getName();
}
}