-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple services and factory services in bundle dependent on same configuration pid #698
Merged
pelliott-mathworks
merged 5 commits into
development
from
multiple-factories-in-bundle-same-pids
Jul 6, 2022
Merged
Multiple services and factory services in bundle dependent on same configuration pid #698
pelliott-mathworks
merged 5 commits into
development
from
multiple-factories-in-bundle-same-pids
Jul 6, 2022
Conversation
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
Signed-off-by: The MathWorks, Inc. <alchrist@mathworks.com>
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>
Codecov Report
@@ Coverage Diff @@
## development #698 +/- ##
===============================================
- Coverage 90.46% 90.26% -0.21%
===============================================
Files 248 230 -18
Lines 13628 12531 -1097
===============================================
- Hits 12329 11311 -1018
+ Misses 1299 1220 -79
|
jeffdiclemente
requested changes
Jul 1, 2022
jeffdiclemente
requested changes
Jul 1, 2022
compendium/test_bundles/TestBundleMultipleManagedService/src/ManagedServiceImpl.cpp
Outdated
Show resolved
Hide resolved
Replaced while loop with for_each and replaced for loops with range based for loops. Signed-off-by The MathWorks, Inc. <pelliott@mathworks.com>
Added const to parameter lists for new for_each statements. Signed-off-by The MathWorks, Inc. <pelliott@mathworks.com>
Check that managedServiceWrapper and managedServiceFactoryWrapper shared_ptr are not default constructed before dereferencing them. Signed-off-by The MathWorks, Inc. <pelliott@mathworks.com>
jeffdiclemente
approved these changes
Jul 6, 2022
insi-eb
pushed a commit
to insi-eb/CppMicroServices-cpp14
that referenced
this pull request
Feb 3, 2023
…nfiguration pid (CppMicroServices#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>
jeffdiclemente
pushed a commit
that referenced
this pull request
Feb 3, 2023
…nfiguration pid (#698) (#790) * Added new test bundle and test * 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: pelliott-mathworks <67922241+pelliott-mathworks@users.noreply.github.com> Co-authored-by: Alexander Christoforides <38366659+achristoforides@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Multiple services and service factories can be dependent on the same configuration object and should be notified if the configuration object changes. Right now only one will be notified. This pull request fixes this problem in Configuration Admin for any service implementing the ManagedService interface or the ManagedServiceFactory interface. All services implementing those interfaces should be notified when configuration objects on which they are dependent change.