Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-21 Thread Steve Ebersole
Yep, I saw it. Just not sure I agree that this is not enough. On Thu, Dec 21, 2017 at 9:42 AM Yoann Rodiere wrote: > > However, I do think that there is still a need to expand the proposal > Scott and I want to make to the CDI spec wrt something like our > ExtendedBeanManager to also account fo

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-21 Thread Yoann Rodiere
> However, I do think that there is still a need to expand the proposal Scott and I want to make to the CDI spec wrt something like our ExtendedBeanManager to also account for the shutdown phase +1, I sent an email about just that on the mailing list. There are some drawbacks to this approach thou

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-21 Thread Steve Ebersole
Awesome! Glad it worked out. However, I do think that there is still a need to expand the proposal Scott and I want to make to the CDI spec wrt something like our ExtendedBeanManager to also account for the shutdown phase. In addition to knowing when the BeanManager is ready to use, it would be

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-21 Thread Yoann Rodiere
Hi, Following our conversations on HipChat and the various changes you implemented (thanks!), I tested the current implementation. There were a few issues, but I managed to fix them and make all the tests in Hibernate Search pass. Here is a PR with the fixes: https://github.com/hibernate/hibernate

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-14 Thread Steve Ebersole
Here is the commit with initial support for named CDI beans and support for bypassing registry caching of ManagedBeans : https://github.com/hibernate/hibernate-orm/commit/ddc1f03abc675a27ed025b8c00495d39bca7fb60 There is still a question of whether named beans support needs to do the javax.enterpr

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-14 Thread Steve Ebersole
Yoann, does this approach still need to do the injections (javax.enterprise.inject.spi.InjectionTarget)? On Thu, Dec 14, 2017 at 8:01 AM Yoann Rodiere wrote: > Here is how it should work from what I understand (adapted from an > implementation in Search, which has slightly different requirement

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-14 Thread Yoann Rodiere
Here is how it should work from what I understand (adapted from an implementation in Search, which has slightly different requirements): static T getBeanInstance(BeanManager beanManager, String beanName, Class contract) { Set> beans = beanManager.getBeans(contract, new NamedQualifier( beanName));

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-14 Thread Sanne Grinovero
On 14 December 2017 at 13:47, Steve Ebersole wrote: > Actually my fault. Apparently renaming the package was way too aggressive > and renamed the artifact A relocation would have been helpful.. /me ducks and runs > > On Thu, Dec 14, 2017 at 6:40 AM Steve Ebersole wrote: > >> Ah, nm. They cha

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-14 Thread Steve Ebersole
But your answer above does not answer my question ;) I still have no idea how to go from name+Class -> bean. On Thu, Dec 14, 2017 at 7:41 AM Yoann Rodiere wrote: > Yeah, it was 4AM in France when you asked :) I answered later on HipChat, > the answer is basically the one I gave in my email. >

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-14 Thread Steve Ebersole
I'll be on HipChat later after I get back from taking my son and daughter to school. Maybe it is easier to discuss there. On Thu, Dec 14, 2017 at 7:44 AM Steve Ebersole wrote: > But your answer above does not answer my question ;) > > I still have no idea how to go from name+Class -> bean. > >

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-14 Thread Yoann Rodiere
Yeah, it was 4AM in France when you asked :) I answered later on HipChat, the answer is basically the one I gave in my email. Yoann Rodière Hibernate NoORM Team yo...@hibernate.org On 14 December 2017 at 14:38, Steve Ebersole wrote: > WRT to named beans, I asked Guillaume on HipChat what that i

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-14 Thread Steve Ebersole
WRT to named beans, I asked Guillaume on HipChat what that is supposed to look like. IIRC he mentioned producers in Paris, but I found no straight-forward way to get from name+class to a bean. He may have answered, I just have not been on HipChat yet today... On Thu, Dec 14, 2017 at 7:36 AM Stev

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-14 Thread Steve Ebersole
Its easier to cleanup On Thu, Dec 14, 2017 at 6:52 AM Steve Ebersole wrote: > There are a lot of changes to digest here, but if anyone wanted to take a > look at this so far... > > > https://github.com/hibernate/hibernate-orm/commit/564ec55ca10c0d5d2afd73243dc0aa31759e8f5b > > > On Thu, Dec 14,

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-14 Thread Yoann Rodiere
Thanks. As mentioned on the commit, I'm wondering if it's such a good idea to cache the beans... Like you seem to do here: https://github.com/hibernate/hibernate-orm/commit/564ec55ca10c0d5d2afd73243dc0aa31759e8f5b#diff-8daedd2dae71b88377be643ed78b5c5dR33 CDI already has features to make sure that a

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-14 Thread Steve Ebersole
There are a lot of changes to digest here, but if anyone wanted to take a look at this so far... https://github.com/hibernate/hibernate-orm/commit/564ec55ca10c0d5d2afd73243dc0aa31759e8f5b On Thu, Dec 14, 2017 at 6:47 AM Steve Ebersole wrote: > Actually my fault. Apparently renaming the packag

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-14 Thread Steve Ebersole
Actually my fault. Apparently renaming the package was way too aggressive and renamed the artifact On Thu, Dec 14, 2017 at 6:40 AM Steve Ebersole wrote: > Ah, nm. They change the artifact name. Boo! > > On Thu, Dec 14, 2017 at 6:39 AM Steve Ebersole > wrote: > >> Anyone know what happened to

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-14 Thread Steve Ebersole
Ah, nm. They change the artifact name. Boo! On Thu, Dec 14, 2017 at 6:39 AM Steve Ebersole wrote: > Anyone know what happened to the 2.0 CDI artifact on Maven Central? It > was there last week, but is no longer there... > > On Thu, Dec 14, 2017 at 5:54 AM Steve Ebersole > wrote: > >> Thanks

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-14 Thread Steve Ebersole
Anyone know what happened to the 2.0 CDI artifact on Maven Central? It was there last week, but is no longer there... On Thu, Dec 14, 2017 at 5:54 AM Steve Ebersole wrote: > Thanks for the replies. So unless we hear otherwise from anyone else, I > will plan on supporting just one DI container.

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-14 Thread Steve Ebersole
Thanks for the replies. So unless we hear otherwise from anyone else, I will plan on supporting just one DI container. On Thu, Dec 14, 2017 at 2:54 AM Yoann Rodiere wrote: > Same here, compositions don't seem to be a reasonable use case. And even if > users provide a custom bean registry, the

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-14 Thread Yoann Rodiere
Same here, compositions don't seem to be a reasonable use case. And even if users provide a custom bean registry, they could just implement their specific behavior for a few specific case, then retrieve another implementations on their own and delegate to it however they want. Overriding the servic

Re: [hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-13 Thread Christian Beikov
I don't think someone is actually going to use more than a single DI framework and even if they do, they will probably bridge one way or another between the DI frameworks to be able to access beans from one in the other. So I don't think we should do "compositions" since it's not a big deal to

[hibernate-dev] ManagedBeanRegistry - dependency injection support

2017-12-13 Thread Steve Ebersole
https://hibernate.atlassian.net/browse/HHH-11259 and friends are mainly about back porting the work I did on 6.0 for the ManagedBeanRegistry abstraction over dependency injection containers. We will ship support for CDI as well as non-managed beans (things we directly instantiate). Of course we'd