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
Polish reference documentation #220
Polish reference documentation #220
Changes from 18 commits
0e0c50e
9f871c6
af9fca5
1e3eacd
a5070d7
eabebb8
2e64ed0
d7b3be5
fcda98f
c6fa5f5
6cfca56
be59542
182c3f5
fba973e
1d58923
facbff8
0e3b348
bce7092
ec296d2
cac8f77
3c3d224
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.
Please scratch that.
@DependsOn
is not a recommended means for ordering user-facing components.@Order
/Ordered
is exactly what was meant.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 reverted the wording but I have a question:
@Order
is mentioned in the context of Application Module Initializers which are intended to be used for different modules, not multiple implementations of the same module:This is why I think the
@Order
parallel is confusing as it's intended to order multiple implementations of the same interface while initializers are intended for different modules altogether. Does this 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.
I think what plays into this is the fact that for module-specific initialization, you usually want transactional behavior. That's not something you can get with simple components and an
@PostConstruct
callback in components you'd interconnect via@DependsOn
.In other words, you typically declare an interface for the initializer with a custom method that can be
@Transactional
and a central component that would depend onList<MyInitializer>
and invoke those transactional methods. For that list to be ordered, you'd either use@Order
/Ordered
. Pretty similar to what we actually implement withApplicationModuleInitializer
.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.
@odrotbohm Got it, thank you for the explanation!