[hibernate-dev] Regarding extended bean managers and the CDI spec

Yoann Rodiere yoann at hibernate.org
Tue Jul 16 02:41:34 EDT 2019


Hello,

As far as I know, delaying the call to beanManagerInitialized even more is
not a problem for ORM itself, it's just that you won't be able to use ORM
(or at least some features of ORM) until it is called.
So the only way I can see this being a problem is there is a need to rely
on ORM on the AfterBeanDiscovery/AfterDeploymentValidation events.

Now, WildFly apparently also calls this method on AfterDeploymentValidation.
So if they didn't have any problem with it, I'd say it's safe to say you
won't, either.

Thanks for the heads-up, I'll try to give better advice next time.

Regards,


Yoann Rodière
Hibernate NoORM Team
yoann at hibernate.org


On Mon, 15 Jul 2019 at 17:47, Benjamin Confino <BENJAMIC at uk.ibm.com> wrote:

> Hello
>
> Just a quick FYI for hibernate developers and anyone else who might be
> implementing extended bean managers.
>
> When I asked the mailing list for advice in implementing extended bean
> managers I was advised to call beanManagerInitialized during
> AfterBeanDiscovery if at all possible. However AfterBeanDiscovery triggers
> a call to BeanManager.createInstance(), and according to the CDI 2.0 spec
> section 11.3 an exception is thrown if createInstance is called before
> AfterDeploymentValidation. I was able to get it working by invoking
> beanManagerInitialized during the AfterDeploymentValidation event. However
> I wanted to check with you that you think that's going to work ok incase I
> missed anything; and bring this to everyone's attention just encase it is
> helpful.
>
> Regards
> Benjamin
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>


More information about the hibernate-dev mailing list