Fix FinalModifierException due to BindingToNormalizedNodeCodec final
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / main / resources / org / opendaylight / blueprint / binding-broker.xml
index 79d0868d0d445117816f20774a9b62f032574e8a..f1438c650e6b3bdffa841873dfcef9ac158c2ab4 100644 (file)
@@ -13,7 +13,7 @@
   </bean>
 
   <!-- Register the BindingToNormalizedNodeCodec with the SchemaService as a SchemaContextListener -->
-  <bean id="mappingCodecReg" class="org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodecFactory"
+  <bean id="mappingCodecListenerReg" class="org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodecFactory"
          factory-method="registerInstance" destroy-method="close">
     <argument ref="mappingCodec"/>
     <argument ref="schemaService"/>
 
   <!-- We also register the BindingToNormalizedNodeCodec with its actual class name for
        backwards compatibility for CSS users that inject the binding-dom-mapping-service -->
-  <service ref="mappingCodec" interface="org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec"
-        odl:type="default">
-    <!-- Set the appropriate service properties so the corresponding CSS module is restarted if this
-         blueprint container is restarted -->
-    <service-properties>
-      <entry key="config-module-namespace" value="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl"/>
-      <entry key="config-module-name" value="runtime-generated-mapping"/>
-      <entry key="config-instance-name" value="runtime-mapping-singleton"/>
-    </service-properties>
-  </service>
+  <bean id="mappingCodecServiceReg" class="org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodecFactory"
+         factory-method="registerOSGiService" destroy-method="unregister">
+    <argument ref="mappingCodec"/>
+    <argument ref="blueprintBundleContext"/>
+  </bean>
 
   <!-- Binding RPC Registry Service -->