Skip to content

CRaC Resource adapter for bean lifecycle in application context #30242

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

Closed
jhoeller opened this issue Mar 30, 2023 · 0 comments
Closed

CRaC Resource adapter for bean lifecycle in application context #30242

jhoeller opened this issue Mar 30, 2023 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@jhoeller
Copy link
Contributor

jhoeller commented Mar 30, 2023

In addition to our CRaC-oriented revisiting of the existing contracts for the bean lifecycle in an application context (#29921), we consider providing an org.crac.Resource adapter for Spring's DefaultLifecycleProcessor out of the box - e.g. as an implicit optional part of the DefaultLifecycleProcessor implementation or as a dedicated subclass of it. This allows for stopping/restarting of beans in an application context on a fine-grained basis, with some tightening of the Lifecycle contract and possibly even some dedicated extensions in SmartLifecycle that participating component implementations may rely on.

@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement labels Mar 30, 2023
@jhoeller jhoeller added this to the 6.1.0-M1 milestone Mar 30, 2023
@jhoeller jhoeller self-assigned this Mar 30, 2023
jhoeller added a commit that referenced this issue May 3, 2023
sdeleuze added a commit to sdeleuze/spring-framework that referenced this issue May 4, 2023
RuntimeHintsAgentPlugin purpose is to verify that the reflective
invocations expected match the ones performed.

spring-projectsgh-30242 introduces a code path where the reflective invocation
is skipped when running on native.

This issue set the system property "org.graalvm.nativeimage.imagecode"
to "runtime" when running runtime tests with the agent in order to
make sure the code path tested for those tests is the native one.

Closes spring-projectsgh-30422
sdeleuze added a commit to sdeleuze/spring-framework that referenced this issue May 4, 2023
Skip CRaC support with native images to avoid compiling related
infrastructure to the native image and to fix tests via
spring-projectsgh-30422.

See spring-projectsgh-30242
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant