OpenDaylight uses Jersey framework to support JAX-RS compliant Northbound API. 94/94/2
authorMadhu Venugopal <vmadhu@cisco.com>
Tue, 2 Apr 2013 11:31:43 +0000 (04:31 -0700)
committerMadhu Venugopal <vmadhu@cisco.com>
Tue, 2 Apr 2013 13:08:16 +0000 (06:08 -0700)
OSGi makes sure the dependent modules are loaded first and before moving a module
into RESOLVED state. But the module implementation can result in one bundle become
ACTIVE before the other. This can be resolved properly by having these sequentialized
by monitoring the service bringup order.
In this case, com.sun.jersey.spi.container expects the jersey-server and core to be
active too soon causing the exceptions as seen in Bug 5.
But, as per OSGi specification, any bundle can be independently shutdown and restored
and the dependent bundles must be robust in handling this. Fortunately, the jersey
and dependent framework bundles handles this scenario properly and hence this exception
is just informational and has no impact on the running system.

OSGi also provides another mechanism called startlevel, which forces some infrastructure
bundles to be loaded sooner than the actual dependency is resolved. This accelerates the
bundle loading and solves problems like these. But, using this mechanism is discouraged,
because a well-made OSGi bundle need not depend on such bundle load parameters for its
operation. We are anyways adding this fix as a temporary measure to check the status
of the issue in various runtime environments. This fix can be removed after the current
work on Apache Valve integration is in place.

Change-Id: I2980cc1f79e1d50d457de96b19f3032d8e808609
Signed-off-by: Madhu Venugopal <vmadhu@cisco.com>
opendaylight/distribution/opendaylight/src/assemble/bin.xml
opendaylight/distribution/opendaylight/src/main/resources/configuration/config.ini

index 3c163fdd354bfc960862b7f7d289e5fc8bd7a782..96ecf13a81cee18c9091d5b51e03e44951c4f1bf 100644 (file)
@@ -53,6 +53,9 @@
                <exclude>org.slf4j:slf4j-api</exclude>
                <exclude>ch.qos.logback:logback-core</exclude>
                <exclude>ch.qos.logback:logback-classic</exclude>
+               <exclude>com.sun.jersey:jersey-core</exclude>
+               <exclude>com.sun.jersey:jersey-json</exclude>
+               <exclude>com.sun.jersey:jersey-server</exclude>
       </excludes>
       <outputFileNameMapping>
         ${artifact.groupId}.${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}      
                <include>org.slf4j:slf4j-api</include>
                <include>ch.qos.logback:logback-core</include>
                <include>ch.qos.logback:logback-classic</include>
+               <include>com.sun.jersey:jersey-core</include>
+               <include>com.sun.jersey:jersey-json</include>
+               <include>com.sun.jersey:jersey-server</include>
+               
       </includes>
       <useTransitiveDependencies>false</useTransitiveDependencies>
       <outputFileNameMapping>
index 3f373e95b78fb7ca409c0949b1613275e5658f98..1b90fc77980413422f1f782fb948d487fe6ad0be 100644 (file)
@@ -8,7 +8,10 @@ osgi.bundles=\
        reference\:file\:../lib/slf4j-api-1.7.2.jar@1:start,\
        reference\:file\:../lib/logback-classic-1.0.9.jar@1:start,\
        reference\:file\:../lib/logback-core-1.0.9.jar@1:start,\
-        reference\:file\:../lib/logging.bridge-0.4.0-SNAPSHOT@1:start
+    reference\:file\:../lib/logging.bridge-0.4.0-SNAPSHOT@1:start,\
+    reference\:file\:../lib/jersey-core-1.17.jar@2:start,\
+    reference\:file\:../lib/jersey-json-1.17.jar@2:start,\
+    reference\:file\:../lib/jersey-server-1.17.jar@2:start
 
 # Set Default start level for framework
 osgi.bundles.defaultStartLevel=4