struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sitaram Reddy (JIRA)" <j...@apache.org>
Subject [jira] Created: (WW-2902) Session token usage error: java.lang.IllegalStateException: Context has not been prepared for next connection
Date Mon, 01 Dec 2008 22:15:36 GMT
Session token usage error: java.lang.IllegalStateException: Context has not been prepared for
next connection
-------------------------------------------------------------------------------------------------------------

                 Key: WW-2902
                 URL: https://issues.apache.org/struts/browse/WW-2902
             Project: Struts 2
          Issue Type: Bug
          Components: Core Interceptors
    Affects Versions: 2.1.2
            Reporter: Sitaram Reddy


I have looked into the source code and found the reason. In TokenInterceptor.doIntercept(...),
there is this code:

		Map session = ActionContext.getContext().getSession();

		synchronized (session) {
			if (!TokenHelper.validToken()) {
				return handleInvalidToken(invocation);
			}

			return handleValidToken(invocation);
		}
I found that the session Map is thread dependant and so the above block is essentially not
synchronized! An previous bug WW-1786 also points out that the block is not synchronized -
that fix would be redundant once this issue is resolved.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message