I am using JBoss 4.0.3 and DB2 8.1. I would to obtain a pessimistic lock (row lock) for my entity bean's findByPrimaryKey() method. So, I have the row-locking set to true in my jbosscmp-jdbc.xml file and also set the row-locking-template for DB2 to "SELECT ?1 FROM ?2 WHERE ?3 FOR UPDATE" in the standardjbosscmp-jdbc.xml file.
However, I don't see any select for update when the findByPrimaryKey() method is invoked. Is this a known issue with JBoss, or am I doing something amiss here?
It looks like findByPrimaryKey doesn't use the row locking template for whatever reason. All other finders do. Tested with 4.0.2