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

Gerhard Petracek edited comment on DELTASPIKE-296 at 12/2/12 5:21 PM:
----------------------------------------------------------------------

that's an intended warning for dependent scoped beans, because you have to 
handle the lifecycle of such instances on your own.

you can use e.g.:

  CdiContainer cdiContainer = CdiContainerLoader.getCdiContainer();
  cdiContainer.boot(); //if needed
  ContextControl contextControl = cdiContainer.getContextControl();

instead.
                
      was (Author: gpetracek):
    that's an intended warning for dependent scoped beans, because you have to 
handle the lifecycle of such instances on your own.

you can use e.g.:

  CdiContainer cdiContainer = CdiContainerLoader.getCdiContainer();
  cdiContainer.boot();
  ContextControl contextControl = cdiContainer.getContextControl();

instead.
                  
> Retrieving owb-CdiControl with BeanProvider causes Warning
> ----------------------------------------------------------
>
>                 Key: DELTASPIKE-296
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-296
>             Project: DeltaSpike
>          Issue Type: Bug
>         Environment: OpenWebBeans v1.1.6
> Deltaspike 0.3-Incubating
>            Reporter: Karl Kildén
>            Priority: Minor
>
> Using BeanProvider to get ctxCtrl causes WARNING: BeanProvider shall not be 
> used to create @Dependent scoped beans. Bean: OpenWebBeansContextControl, 
> Name:null, WebBeans Type:MANAGED, API 
> Types:[org.apache.deltaspike.cdise.api.ContextControl,org.apache.deltaspike.cdise.owb.OpenWebBeansContextControl,java.lang.Object],
>  Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default]

--
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

Reply via email to