Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Developer's Guide

- Previous: Sessions, Cookies, and URL Rewriting
- Next: Distributed Sessions and Persistence

### Coordinating Session Access

Make sure that multiple threads don’t simultaneously modify the same session object in conflicting ways. If the persistence type is `ha` (see The ha Persistence Type), the following message in the log file indicates that this might be happening:

    Primary Key Constraint violation while saving session session_id

This is especially likely to occur in web applications that use HTML frames where multiple servlets are executing simultaneously on behalf of the same client. A good solution is to ensure that one of the servlets modifies the session and the others have read-only access.

- Previous: Sessions, Cookies, and URL Rewriting
- Next: Distributed Sessions and Persistence

- © 2010, Oracle Corporation and/or its affiliates