Hi all
We are currently "clusterizing" an existing application on 3.2.6 (it was born on JBoss 3.0 and has grown to about 80 entity beans and 50 session beans). After having deployed on two servers in the "all" configuration, we experience problems with transactional integrity.
In particular, we have a piece of sessionbean code like this:
/** * @ejb:interface-method * @ejb:transaction type="RequiresNew" */ public void sendReminderMail(AuctionEntityPK pk) throws Exception { Date now = SQLHelper.getDatabaseNow(); LocalAuctionEntity auction = m_auctionEntityHome.findByPrimaryKey(pk); if (auction.getReminderMailSentDate() != null) return; auction.setReminderMailSentDate(now); // (imagine code to compose and send mail here) }
<container-configuration extends="Instance Per Transaction CMP 2.x EntityBean"> <container-name>Optimistic CMP EntityBean</container-name> <locking-policy>org.jboss.ejb.plugins.lock.JDBCOptimisticLock</locking-policy> <commit-option>B</commit-option> </container-configuration>
Enable TRACE logging level for org.jboss.ejb.plugins.cmp category, add thread info to the logging pattern (%t), run two concurrent clients that update the instance and watch the UPDATE statements executed and parameter bindings.