**********************************************************************************************
Your attention is drawn to the warning notice at the end of this message.
**********************************************************************************************

An intermittent bug is occurring on a live struts based application. A
value is being set on a DynaActionForm variable (userId ) when a user
navigates to the screen. However when the user submits the resultant
form the value is lost (its becomes null). The bug appears on the live
system and then disappears with no apparent consistency. The
DynaActionForm is configured with session scope. The form has been
extended with an implemention of the reset method (as below) which seems
to continually set this form attribute with a value. My guess then is
that the only way this value can be null is when the form bean is first
created (it is not configured with an 'initial' value). Although using
ValidatorForm, validation is done manually rather than through the
validation configuration.

public class UserDynaValidatorForm extends DynaValidatorForm
{
    public void reset(ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
    {
        HttpSession session = request.getSession();
        DynaActionForm dynaForm =
(DynaActionForm)session.getAttribute("userInputNav");
        String userId = "0";
        if(dynaForm.get("userId")!=null) {
          userId=(String)dynaForm.get("userId");
        }
        super.getMap().clear();
        dynaForm.set("userId",userId);
        session.setAttribute("userInputNav",dynaForm);
    }
}

The application is running on Oracle9iAS Release 2 on one machine using
a two node cluster with Web Cache enabled and configured for 'sticky'
sessions.

Does anyone have any ideas about what might be happening here, and why
it might be happening, or has had experience of something similar ?

Many thanks





***********************************************************************************
We would ask you to treat any communication from us as confidentially as you would 
want us to treat communication from you.  If you are not an intended recipient, please 
notify [EMAIL PROTECTED] immediately. You should know that some of our communications 
may contain confidential information which it could be a criminal offence for you to 
disclose or use without authority. This e-mail is not intended nor should it be taken 
to create any legal relations, contractual or otherwise.
The Financial Services Authority 
25 The North Colonnade, Canary Wharf, London E14 5HS United Kingdom
Registered as a Limited Company in England and Wales No.1920623. Registered Office as 
above 
Switchboard: 020 7066 1000
Web Site:   http://www.fsa.gov.uk
***********************************************************************************

Reply via email to