Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions framework/src/main/java/org/apache/felix/framework/Felix.java
Original file line number Diff line number Diff line change
Expand Up @@ -2198,12 +2198,19 @@ void startBundle(BundleImpl bundle, int options) throws BundleException
int bundleLevel = bundle.getStartLevel(getInitialBundleStartLevel());
if (isTransient && (bundleLevel > m_activeStartLevel))
{
// Throw an exception for transient starts.
throw new BundleException(
"Cannot start bundle " + bundle + " because its start level is "
+ bundleLevel
+ ", which is greater than the framework's start level of "
+ m_activeStartLevel + ".", BundleException.START_TRANSIENT_ERROR);
// This can happen if a bundle's start level has been changed when framework is
// starting to framework start level.
// When framework start level has been reached, the start order will be recalculated
// and meanwhile changed start order will be updated.
// This is NOT an ERROR, we simply log an INFO messages as maybe the way start levels
// will be changed needs to be verified
m_logger.log(
Logger.LOG_INFO,
"Will not start bundle " + bundle + " because its start level is "
+ bundleLevel
+ ", which is greater than the framework's start level of "
+ m_activeStartLevel + ".");
return;
}
else if (bundleLevel > m_targetStartLevel)
{
Expand Down
Loading