Environment:
apache tomcat 7
java 7
oracle 11g
eclipse
apache jmeter 2.1
The problem is that @Transactional begins the session before entering the synchronized method and commits the changes after the method is finished, so changes to the database will not be applied inside the synchronized method.
Please check Spring @Transactional section 10.5.1.
You can try adding a synchronized block when calling this method instead of making it synchronized:
synchronized(this){
generateSequenseNumber();
}