org.enhydra.barracuda.contrib.dbroggisch.page
Class PageEventDispatcher
java.lang.Object
org.enhydra.barracuda.core.event.DefaultEventDispatcher
org.enhydra.barracuda.contrib.dbroggisch.page.PageEventDispatcher
- All Implemented Interfaces:
- EventDispatcher
- public class PageEventDispatcher
- extends DefaultEventDispatcher
The PageEventDispatcher
is used to suppress errors that can result
from using the page model with session based pages. If a user makes two requests short
after each other it can happen that concurrent modifications of the page stored in the
session occur. Then for example a control event that expects a certain page to be stored in
the session can get into trouble, usually resulting in classcastexceptions.
The PageEventDispatcher
solves this by synchronizing the request around the
session object.
Future enhacements might include the possibility to turn the behaviour on or
off on a per-session basis.
- Version:
- 1.0
- Author:
- Diez B. Roggisch
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PAGE_SYNCHRONIZATION_ACTIVATED
public static boolean PAGE_SYNCHRONIZATION_ACTIVATED
PAGE_SYNCHRONIZATION_ACTIVATED
can be used to globally
deactivate the synchronization. Default value is true.
PageEventDispatcher
public PageEventDispatcher()
dispatchEvent
public void dispatchEvent(EventBroker eb,
EventContext context)
throws EventException
- Synchronizes around the session if
PAGE_SYNCHRONIZATION_ACTIVATED
is true.
- Specified by:
dispatchEvent
in interface EventDispatcher
- Overrides:
dispatchEvent
in class DefaultEventDispatcher
- Parameters:
eb
- an EventBroker
valuecontext
- an EventContext
value
- Throws:
EventException
- if an error occurs
Copyright © 2003 BarracudaMVC.org All Rights Reserved.