Did anyone get a change to look at this?

regards,
~Poorna



-----Original Message-----
From: Poorna Ramasamy 
Sent: Wednesday, December 12, 2007 10:24 PM
To: Beehive Developers
Cc: Carlin Rogers
Subject: RE: BEEHIVE-1094

Attached diff is the new solution I have in my mind now. That is,
request is being tracked right from where the pageflow is removed from
session using the SessionBindingEvent. At the destroy method if request
is available, context is created or else onDestroy(session) is called
without context.

But I feel, with this approach, customers would not be certain about the
context being associated with onDestroy(session). If session
invalidation occurs, onDestroy(session) will be called without context.
So to overcome this, I feel, a new callback onDestroy(request, session)
is required here. Does this sound reasonable? Or if there is a way in
which I can create control container context without requiring "request"
object, please let me know.

regards,
~Poorna
        

Notice:  This email message, together with any attachments, may contain 
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated 
entities,  that may be confidential,  proprietary,  copyrighted  and/or legally 
privileged, and is intended solely for the use of the individual or entity 
named in this message. If you are not the intended recipient, and have received 
this message in error, please immediately return this by email and then delete 
it.
==== 
//depot/dev/sandbox/beehive/wl92_ga/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java#1
 - 
E:\P4\dev\sandbox\beehive\wl92_ga\netui\src\pageflow\org\apache\beehive\netui\pageflow\FlowController.java
 ====
606c606
<     void destroy( HttpSession session )
---
>     void destroy( HttpServletRequest request, HttpSession session )
609c609
<         super.destroy( session );
---
>         super.destroy( request, session );
==== 
//depot/dev/sandbox/beehive/wl92_ga/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowManagedObject.java#1
 - 
E:\P4\dev\sandbox\beehive\wl92_ga\netui\src\pageflow\org\apache\beehive\netui\pageflow\PageFlowManagedObject.java
 ====
19a20,22
> import org.apache.beehive.controls.api.context.ControlContainerContext;
> 
> import 
> org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandler;
101c104
<     void destroy( HttpSession session )
---
>     void destroy( HttpServletRequest request, HttpSession session )
103c106,119
<         onDestroy( session );
---
>       if (request != null)
>       {
>               // initialize context if request is available
>               PageFlowControlContainer cc = 
> PageFlowControlContainerFactory.getControlContainer(request, 
> session.getServletContext());
>               ControlContainerContext ccContext = 
> cc.getControlContainerContext(this);
>               cc.beginContextOnPageFlow(this, request, null, 
> session.getServletContext());
>               onDestroy( session );
>               cc.endContextOnPageFlow(this);
>       }
>       else
>       {
>               onDestroy( session );
>       }
>       
153c169,174
<                 destroy( session );
---
>               HttpServletRequest req = null;
>               if (event instanceof 
> DeferredSessionStorageHandler.SessionBindingEvent)
>               {
>                       req = 
> ((DeferredSessionStorageHandler.SessionBindingEvent)event).getRequest();
>               }
>                 destroy( req, session );
==== 
//depot/dev/sandbox/beehive/wl92_ga/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowStack.java#1
 - 
E:\P4\dev\sandbox\beehive\wl92_ga\netui\src\pageflow\org\apache\beehive\netui\pageflow\PageFlowStack.java
 ====
22a23
> import 
> org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandler;
222c223
<                 if ( ! popped.isLongLived() ) popped.destroy( 
request.getSession( false ) );
---
>                 if ( ! popped.isLongLived() ) popped.destroy( request, 
> request.getSession( false ) );
376c377,385
<             if ( ! jpf.isLongLived() ) jpf.destroy( event.getSession() );
---
>             if ( ! jpf.isLongLived() ) 
>             {
>               HttpServletRequest req = null;
>               if (event instanceof 
> DeferredSessionStorageHandler.SessionBindingEvent)
>               {
>                       req = 
> ((DeferredSessionStorageHandler.SessionBindingEvent)event).getRequest();
>               }
>               jpf.destroy( req, event.getSession() );
>             }
==== 
//depot/dev/sandbox/beehive/wl92_ga/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/DeferredSessionStorageHandler.java#2
 - 
E:\P4\dev\sandbox\beehive\wl92_ga\netui\src\pageflow\org\apache\beehive\netui\pageflow\internal\DeferredSessionStorageHandler.java
 ====
72c72
<     private static final class SessionBindingEvent
---
>     public static final class SessionBindingEvent
74a75,76
>       HttpServletRequest request;
>       
83a86,96
>         
>         public SessionBindingEvent( HttpServletRequest req, HttpSession 
> httpSession, String attrName, Object attrVal )
>         {
>             this( httpSession, attrName, attrVal );
>             request = req;
>         }
>         
>         public HttpServletRequest getRequest()
>         {
>               return request;
>         }
108c121
<             HttpSessionBindingEvent event = new SessionBindingEvent( session, 
attrName, currentValue );
---
>             HttpSessionBindingEvent event = new SessionBindingEvent( request, 
> session, attrName, currentValue );
139c152
<             HttpSessionBindingEvent event = new SessionBindingEvent( 
request.getSession(), attrName, currentValue );
---
>             HttpSessionBindingEvent event = new SessionBindingEvent( request, 
> request.getSession(), attrName, currentValue );

Reply via email to