Added bundle RESOLVED/UNRESOLVED events (FELIX-34).


git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@425361 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java b/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java
index a22d47d..2ba26db 100644
--- a/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java
+++ b/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java
@@ -295,6 +295,7 @@
                             if (bundle.getInfo().getCurrentModule() == event.getModule())
                             {
                                 bundle.getInfo().setState(Bundle.RESOLVED);
+                                fireBundleEvent(BundleEvent.RESOLVED, bundle);
                             }
                         }
                         finally
@@ -1422,8 +1423,9 @@
             // if successful.
             if (rethrow == null)
             {
-                info.setState(Bundle.INSTALLED);
                 info.setLastModified(System.currentTimeMillis());
+                info.setState(Bundle.INSTALLED);
+                fireBundleEvent(BundleEvent.UNRESOLVED, bundle);
                 
                 // Mark previous the bundle's old module for removal since
                 // it can no longer be used to resolve other modules per the spec.
@@ -3160,6 +3162,7 @@
                     BundleInfo newInfo = createBundleInfo(info.getArchive());
                     newInfo.syncLock(info);
                     m_bundle.setInfo(newInfo);
+                    fireBundleEvent(BundleEvent.UNRESOLVED, m_bundle);
                 }
                 catch (Exception ex)
                 {