Conversation
|
This is a draft because it also includes the I'd especially welcome review of the changes to the Portable Extensions API, because I'm not familiar with those. |
f6e8561 to
3116c49
Compare
|
Just to check I have this right:
I'm having trouble working out the order of operations for auto-closable synthetic beans. I originally had this:
However, |
Correct.
Correct.
This is a bit more involved, but essentially correct. Note that "destroying an instance of a bean" is what happens during
The following is wrong. I covered synthetic beans above, but I'll cover the issues here as well:
No. There are no
No. There are no disposer methods for synthetic beans, synthetic beans are not producer methods. Instead, we call the disposer callback as configured through the Portable Extensions configurator API / through the Build Compatible Extensions API. If the user provided a custom
Hard NO!
Right, as mentioned above.
Right.
Right.
I think I covered this above. The main misconception comes from the nature of |
Aha, this was the bit that I was confused by, having previously had to do a custom It seemed odd to have an |
|
Rebased. This still includes the |
Just putting this out here for wider audience. I think the nature of this PR covers it well. All standard beans ultimately use |
|
Right. I think it would be fair to override It also seems fair to add to the other places that the destruction callbacks must not call |
This annotation marks _auto-closeable_ beans. If the class of an instance of auto-closeable bean implements `AutoCloseable`, the `close()` method is called during bean destruction (after `@PreDestroy` callbacks or disposer method invocation, but before destroying dependent instances).
|
Added a commit with an override of I eventually decided that we should not clutter the javadoc of public APIs with minutiae about |
This commit should be squashed before merging.
|
Also, I'm still not sure if making |
Fixes #876