Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Handle destroy callback #1048

Closed
snicoll opened this issue Sep 21, 2021 · 2 comments
Closed

Handle destroy callback #1048

snicoll opened this issue Sep 21, 2021 · 2 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@snicoll
Copy link
Contributor

snicoll commented Sep 21, 2021

CommonAnnotationBeanPostProcessor is not invoked as we disable it when running in AOT mode. We should scan for PostConstruct and PreDestroy and update the bean definition metadata accordingly.

We're currently not writing that information so we should do that as well so that the container can pick it up. Since it's called via reflection, we'll have to update the native configuration for that as well.

@snicoll
Copy link
Contributor Author

snicoll commented Sep 24, 2021

Repurposing this issue to handle destroy callbacks as init callbacks are taken care of as part of #1059

@snicoll snicoll changed the title Handle init and destroy callbacks Handle destroy callback Sep 24, 2021
@christophstrobl christophstrobl removed a link to a pull request Sep 27, 2021
@snicoll snicoll modified the milestones: 0.11.x, 0.11.0-M1 Sep 27, 2021
@snicoll snicoll self-assigned this Sep 27, 2021
snicoll added a commit that referenced this issue Sep 27, 2021
This commit rework the original proposal by writing the init and
destroy methods and using them to instantiate a dedicated bean post
processor that is similar to the original one used at runtime.

Both method names defined on the bean definition itself as well as
externally managed ones are supported. If the bean name is '(inferred)'
similar logic is applied at build time.

Closes gh-1048
See gh-1059
@snicoll
Copy link
Contributor Author

snicoll commented Sep 27, 2021

Fixed by 1f96ae9

@snicoll snicoll closed this as completed Sep 27, 2021
snicoll added a commit that referenced this issue Sep 28, 2021
This commit rework the original proposal by writing the init and
destroy methods and using them to instantiate a dedicated bean post
processor that is similar to the original one used at runtime.

Both method names defined on the bean definition itself as well as
externally managed ones are supported. If the bean name is '(inferred)'
similar logic is applied at build time.

Closes gh-1048
See gh-1059
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement A general enhancement
Development

No branches or pull requests

2 participants