You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Mark Struberg (JIRA)" <ji...@apache.org> on 2012/10/02 16:27:07 UTC

[jira] [Commented] (DELTASPIKE-275) org.apache.deltaspike.core.impl.exception.control.extension.ExceptionControlExtension#verifyInjectionPoints calls BeanProvider while cdi is not completely started

    [ https://issues.apache.org/jira/browse/DELTASPIKE-275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13467747#comment-13467747 ] 

Mark Struberg commented on DELTASPIKE-275:
------------------------------------------

Oki, Jason tried this out yesterday and did hit the reason for this being lazy so far ;)

The lazily initialized code in question currently calls BeanManager#getBeans(). If we would invoke this eagerly during the boot time at registration (in @Observes ProcessBean) then we would end up with a random generator as the result of getBeans() would be depending on the order in which ProcessBean gets invoked. 

Another issue is that the spec says nothing about the absolute order of the Events. It only says that ProcessBean must get fired after ProcessAnnotatedType. But the spec doesnt define that ALL Classes must first processed via ProcessAnnotatedType and THEN all those AnnotatedTypes must get transferred to a bean and invoke ProcessBean for all classes.

It is perfectly valid to to all the stuff class per class, which is the way it's done in OWB atm. (take a class, build an AnnotatedType, fire ProcessAnnotatedType, create the bean, fire ProcessBean, ... then do the stuff with the next class).

Calling getBeans() before AfterDeploymentValidation would give you nonsense values and must not be done.

The point is that the exception control HandlerMethodImpl must only get activated in AfterDeploymentValidation and must NOT be triggered before that time.
                
> org.apache.deltaspike.core.impl.exception.control.extension.ExceptionControlExtension#verifyInjectionPoints calls BeanProvider while cdi is not completely started
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-275
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-275
>             Project: DeltaSpike
>          Issue Type: Bug
>            Reporter: Romain Manni-Bucau
>
> call due to org.apache.deltaspike.core.impl.exception.control.HandlerMethodImpl#initBean call

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira