Move GlobalBundleScanningSchemaServiceImpl to its own bundle 58/40458/4
authorTom Pantelis <tpanteli@brocade.com>
Thu, 16 Jun 2016 01:04:02 +0000 (21:04 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Mon, 4 Jul 2016 19:38:38 +0000 (19:38 +0000)
commit0e5d0eeeda176fe4ef0d5f65097998b32e38abf1
treeea9bce1f1fcbecc2288e528261f4a92d0161f882
parent08cebe000ade997fd2c84ee0e690beddd4ce9209
Move GlobalBundleScanningSchemaServiceImpl to its own bundle

Moved the GlobalBundleScanningSchemaServiceImpl and the associated
BundleActivator, SchemaServiceActivator, from sal-dom-broker to a new
bundle sal-schema-service.

A couple reasons for this. One is to break the circular service imports
between sal-dom-broker and sal-distributed-datastore, where
sal-distributed-datastore imports the SchemaService from sal-dom-broker
and sal-dom-broker imports the DOMDataBroker from
sal-distributed-datastore. The result of this was that if the
sal-dom-broker blueprint container was restarted, it would also cause
the sal-distributed-datastore container to restart, which isn't
necessary/desirable.

The other reason is that apps can register a SchemaContextListener as an
OSGi service which is picked up by the
GlobalBundleScanningSchemaServiceImpl. In terms of service usage this
makes sal-dom-broker a dependency of the app bundle so if the app
container restarts, it also restarts sal-dom-broker,
sal-distributed-datastore etc which isn't desirable.

So moving the GlobalBundleScanningSchemaServiceImpl to its own bundle
alleviates both issues.

Change-Id: I75d1009f6bfc1d80a19a61050703a1ca7e049575
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
12 files changed:
features/mdsal/pom.xml
features/mdsal/src/main/features/features.xml
opendaylight/md-sal/mdsal-artifacts/pom.xml
opendaylight/md-sal/pom.xml
opendaylight/md-sal/sal-distributed-datastore/src/main/resources/org/opendaylight/blueprint/clustered-datastore.xml
opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomBrokerImplModule.java
opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/SchemaServiceImplSingletonModule.java
opendaylight/md-sal/sal-dom-broker/pom.xml
opendaylight/md-sal/sal-dom-broker/src/main/resources/org/opendaylight/blueprint/dom-broker.xml
opendaylight/md-sal/sal-schema-service/pom.xml [new file with mode: 0644]
opendaylight/md-sal/sal-schema-service/src/main/java/org/opendaylight/controller/sal/schema/service/impl/GlobalBundleScanningSchemaServiceImpl.java [moved from opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/GlobalBundleScanningSchemaServiceImpl.java with 92% similarity]
opendaylight/md-sal/sal-schema-service/src/main/java/org/opendaylight/controller/sal/schema/service/impl/SchemaServiceActivator.java [moved from opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/SchemaServiceActivator.java with 72% similarity]