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.
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
[#252] Support for 'addresshierarchy' domain. #254
[#252] Support for 'addresshierarchy' domain. #254
Changes from 1 commit
e81a3f8
aec83be
8b3dbd3
27ce839
9a61b09
aec02f4
7281385
c9464a8
0938baa
a0ccc37
a21f9ef
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mogoodrich this is always gona initialize the i18n cache at startup from here.
initializeFullAddressCache()
is implicitly called byAddressConfigurationLoader.loadAddressConfiguration(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've also tweaked this to ensure the
initializeFullAddressCache
is always called not only when checksums are changed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would seem like Initializer should stick to loading in AH entries, and not try to take responsibllity over the full address cache or the i18n cache. I'd be more inclined to make changes to the
AddressConfigurationLoader.loadAddressConfiguration
method to ensure these caches are initialized whenever it is called. Basically at the bottom ofAddressConfigurationLoader.loadAddressConfiguration
:1 If the AH entries are changed and reloaded, it should reload these caches
2.If the AH entries are not changed and reloaded, but the caches have not been initialized yet, reload these caches
@mogoodrich does that make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, @mseaton that is my preference as well, that Iniz sticks to loading metadata, and not being responsible for setting up in-memory caches.
I believe the original loadAddressConfiguration method already did #1: reloads the cache if the AH entries are reloaded. #2 could be added as well, but is not really necessary if the if we keep the method that refreshes the cache in the contextRefreshed method of the Address Hierarchy activator.
@Ruhanga @mks-d I assume the intent of Iniz is primarily to do metadata loading, not to do overall module start-up tasks? For instance, if for some reason Iniz was uninstalled from an implementation, I'd still expect a module to start up properly, as long as it's metadata was already loaded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think that's explicitly the purpose here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mogoodrich, @ibacher, this would cause some malfunctioning already(as is the case) since Iniz does load the i18n message properties necessary for proper cache initialization from the now proxy
addresshierarchy
domain (in the context of Iniz).