Skip to content
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

Manage the lifecycle of components constructed using 'new' in a provider (Bugzilla Bug 467320) #25

Open
mcculls opened this issue Oct 25, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@mcculls
Copy link
Contributor

mcculls commented Oct 25, 2021

This issue was created automatically with bugzilla2github

Bugzilla Bug 467320

Date: 2015-05-14 07:30:45 -0400
From: Stuart McCulloch <[email protected]>
To: Project Inbox <[email protected]>

Last updated: 2015-05-14 07:30:45 -0400

Comment 2563401

Date: 2015-05-14 07:30:45 -0400
From: Stuart McCulloch <[email protected]>

Currently any components constructed using 'new' in a provider are not managed by the LifecycleModule. This is because they are not covered by Guice's TypeListener, instead we need to use the ProvisionListener to detect them (though we need to be careful to avoid duplicates, since the same component could trigger multiple provision calls).

Note it is possible to tell the BeanManager about external instances:

   if (beanManager.manage(instance.getClass()) {
       beanManager.manage(instance);
   }

but this is a bit clunky and could be improved to be a single call.

@mcculls mcculls added the bug Something isn't working label Oct 25, 2021
@mcculls mcculls added enhancement New feature or request and removed bug Something isn't working labels Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant