-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multiple services and factory services in bundle dependent on same co…
…nfiguration pid (#698) * Added new test bundle and test Signed-off-by: The MathWorks, Inc. <alchrist@mathworks.com> * Configuration Admin multiple notifications When more than one service that implements the ManagedServiceInterface or ManagedServiceFactoryInterface is dependent on a configuration object, then all services dependent on that object should be updated when the configuration object is updated. Signed-off-by <pelliott@mathworks.com> * Replaced while and for loops with more efficient constructs Replaced while loop with for_each and replaced for loops with range based for loops. Signed-off-by The MathWorks, Inc. <pelliott@mathworks.com> * Update ConfigurationAdminImpl.cpp Added const to parameter lists for new for_each statements. Signed-off-by The MathWorks, Inc. <pelliott@mathworks.com> * Update ConfigurationAdminImpl.cpp Check that managedServiceWrapper and managedServiceFactoryWrapper shared_ptr are not default constructed before dereferencing them. Signed-off-by The MathWorks, Inc. <pelliott@mathworks.com> Co-authored-by: Alexander Christoforides <38366659+achristoforides@users.noreply.github.com>
- Loading branch information
1 parent
31a12d8
commit ebd854d
Showing
20 changed files
with
683 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
compendium/test_bundles/TestBundleMultipleManagedService/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
usFunctionCreateDSTestBundle(TestBundleMultipleManagedService) | ||
|
||
usFunctionCreateTestBundleWithResources(TestBundleMultipleManagedService | ||
SOURCES src/ManagedServiceImpl.cpp ${_glue_file} | ||
RESOURCES manifest.json | ||
BUNDLE_SYMBOLIC_NAME TestBundleMultipleManagedService | ||
OTHER_LIBRARIES usTestInterfaces usServiceComponent cm) |
34 changes: 34 additions & 0 deletions
34
compendium/test_bundles/TestBundleMultipleManagedService/resources/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"bundle.symbolic_name": "TestBundleMultipleManagedService", | ||
"bundle.name": "TestBundleMultipleManagedService", | ||
"bundle.activator": false, | ||
"scr": { | ||
"version": 1, | ||
"components": [ | ||
{ | ||
"implementation-class": "cppmicroservices::service::cm::test::TestManagedServiceImpl3", | ||
"properties": { | ||
"service.pid": "cm.testservice" | ||
}, | ||
"service": { | ||
"interfaces": [ | ||
"test::TestManagedServiceInterface", | ||
"cppmicroservices::service::cm::ManagedService" | ||
] | ||
} | ||
}, | ||
{ | ||
"implementation-class": "cppmicroservices::service::cm::test::TestManagedServiceImpl4", | ||
"properties": { | ||
"service.pid": "cm.testservice" | ||
}, | ||
"service": { | ||
"interfaces": [ | ||
"test::TestManagedServiceInterface", | ||
"cppmicroservices::service::cm::ManagedService" | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.