All handlers assigned to any bean should be cleared after a web request has completed -------------------------------------------------------------------------------------
Key: LABS-156 URL: https://issues.apache.org/jira/browse/LABS-156 Project: Labs Issue Type: Bug Components: Magma Reporter: Simone Gianni Assignee: Simone Gianni Currently the handler is thread local and softreferenced. Anyway, this could happen : * A get arrives, trying to modify a bean * The modification fails, but the exception is catched, and the handler still contains bad values * Or even, the handler is not committed, and just stays there * The reference to the handler is lost, the thread returns to the pool * Another get arrives * It reuses the same thread * For some reason (JPA cache, bean in cache, whatever) it obtains the same bean as the previous get * The garbage collector hasn't cleared the reference * The second get obtains the same handler, potentially committing on the bean data from the previous get. A solution would be to give access to all ThreadLocals? in a single place (another ThreadLocal? maybe :) ) so that at specific events they can all get cleared and the thread be fresh again. The first of these events would obviously be the arrival of a new get. It could be done with a single aspect intercepting new ThreadLocal? or calls to ThreadLocal?.set. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]