It doesn't work currently, meaning concurrent transactions get access to the same instance after the EntityLockInterceptor.
The next interceptor is the EntityInstanceInterceptor where we obtain the instance from the cache (which is safe). But then when the instance is obtained we set the current principal which is not safe as we don't lock the instance. The next interceptor is the EntityReentranceInterceptor which locks the instance for the duration of the invocation but only if the instance or the method is not reentrant. If it is reentrant we have concurrent loading and update problems that are currently fixed by synchronizing on the persistent context in EntitySynchronizationInterceptor. There should be at least true pessimistic locking implementation for the duration of the invocation which should be done before the EntityLockInterceptor. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3832493#3832493 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3832493 ------------------------------------------------------- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297 _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
