ControlException thrown during shared flow onCreate() when control has a 
PageFlowController contextual service.
---------------------------------------------------------------------------------------------------------------

         Key: BEEHIVE-1104
         URL: http://issues.apache.org/jira/browse/BEEHIVE-1104
     Project: Beehive
        Type: Bug

  Components: NetUI  
    Versions: 1.0.1    
    Reporter: Carlin Rogers


Controls that use the PageFlowController contextual service in a shared flow, 
do not get initialized correctly during the shared flow onCreate() life cycle 
method. The Shared Flow objects for a given page flow are created before the 
PageFlowController. Therefor, when a shared flow makes a call to an @Control 
control (that has a @Context PageFlowController context) from within the shared 
flow's onCreate() method, the PageFlowController contextual service will not 
yet be available. The generated control bean impl initializer method 
initServices() throws the ControlException when it cannot get the contextual 
service.

However, in a follow up call to the shared flow that requires use of the 
control, there is another call to ControlBean ensureControl() which will 
successfully find the PageFlowController contextual service and the 
initialization will be complete. The shared flow will still function correctly.

Here's a stack trace...

[Contextual service org.apache.beehive.netui.pageflow.PageFlowController is not 
available]
        at 
org.apache.beehive.controls.runtime.bean.ControlBean.ensureControl(ControlBean.java:334)
        at 
org.apache.beehive.netui.test.controls.pfcontainer.PageFlowContextControlBean.checkPageFlow(PageFlowContextControlBean.java:112)
        at controls.sfLifecycle.SharedFlow.checkControl(SharedFlow.java:129)
        at controls.sfLifecycle.SharedFlow.checkControl(SharedFlow.java:121)
        at controls.sfLifecycle.SharedFlow.onCreate(SharedFlow.java:83)
        at 
org.apache.beehive.netui.pageflow.PageFlowManagedObject.create(PageFlowManagedObject.java:94)
        at 
org.apache.beehive.netui.pageflow.FlowController.create(FlowController.java:582)
        at 
org.apache.beehive.netui.pageflow.FlowControllerFactory.createSharedFlow(FlowControllerFactory.java:416)
        at 
org.apache.beehive.netui.pageflow.FlowControllerFactory.createSharedFlow(FlowControllerFactory.java:393)
        at 
org.apache.beehive.netui.pageflow.FlowControllerFactory.addSharedFlow(FlowControllerFactory.java:552)
        at 
org.apache.beehive.netui.pageflow.FlowControllerFactory.getSharedFlowsForPath(FlowControllerFactory.java:483)
        at 
org.apache.beehive.netui.pageflow.FlowControllerFactory.getSharedFlowsForRequest(FlowControllerFactory.java:442)
        at 
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:511)
        at 
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:854)
        at 
org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:631)
        at 
org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:157)
        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
...

Caused by: org.apache.beehive.controls.api.ControlException: Contextual service
org.apache.beehive.netui.pageflow.PageFlowController is not available
        at 
org.apache.beehive.netui.test.controls.pfcontainer.PageFlowContextControlImplInitializer.initServices(PageFlowContextControlImplInitializer.java:95)
        at 
org.apache.beehive.controls.runtime.bean.ImplInitializer.initialize(ImplInitializer.java:33)
        at 
org.apache.beehive.controls.runtime.bean.ControlBean.ensureControl(ControlBean.java:329)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to