diff options
author | Ryan Goulding <ryandgoulding@gmail.com> | 2017-09-06 11:47:00 -0400 |
---|---|---|
committer | Ryan Goulding <ryandgoulding@gmail.com> | 2017-09-06 11:50:20 -0400 |
commit | 21788cc75a85a6e7b2097c5549957a38178a9197 (patch) | |
tree | 2f1cc40eeaa5190f75a5022e9178178e997855a6 /sliPluginUtils/provider/src/main/resources | |
parent | b6ad62d01b1045ff03c03aa05ee1beeaabc633c7 (diff) |
Fix service registration for SDNC
sliPluginUtils was using a BundleActivator for Service Instantiation, which
is prone to heisenbugs due to indeterminate service instantiation logic. This
removes the BundleActivator and instantiates services using blueprint.
Since dme2.properties are parsed using Properties instead of using a
ManagedService, the decision was to just keep them immutable.
Future work may involve making instance variables private in DME2, since
currently Dme2Test performs direct member access on DME2 instance variables
which is considered bad practices (violates encapsulation).
Issue-Id: SDNC-54
Change-Id: Ib1155565e04e9a95d222bc4028a0845d9d81bd82
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Diffstat (limited to 'sliPluginUtils/provider/src/main/resources')
-rw-r--r-- | sliPluginUtils/provider/src/main/resources/org/opendaylight/blueprint/slipluginutils-blueprint.xml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sliPluginUtils/provider/src/main/resources/org/opendaylight/blueprint/slipluginutils-blueprint.xml b/sliPluginUtils/provider/src/main/resources/org/opendaylight/blueprint/slipluginutils-blueprint.xml new file mode 100644 index 000000000..c0952d2a2 --- /dev/null +++ b/sliPluginUtils/provider/src/main/resources/org/opendaylight/blueprint/slipluginutils-blueprint.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" + xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0" + odl:use-default-for-reference-types="true"> + + + <bean id="sliPluginUtils" class="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" /> + <service ref="sliPluginUtils" interface="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" /> + + <bean id="sliStringUtils" class="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" /> + <service ref="sliStringUtils" interface="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" /> + + <bean id="dme2Properties" class="org.onap.ccsdk.sli.core.slipluginutils.Dme2PropertiesProvider" /> + <bean id="dme2" class="org.onap.ccsdk.sli.core.slipluginutils.DME2"> + <argument ref="dme2Properties" /> + </bean> + <service ref="dme2" interface="org.onap.ccsdk.sli.core.slipluginutils.DME2" /> + +</blueprint>
\ No newline at end of file |