0 Replies Latest reply on Mar 4, 2004 3:17 AM by mattix

    refresh cache on request

    mattix Newbie

      hi folks,
      i'm just dealing with a testsuite. because of several problems i decided to use dbunit to roll back my test database (mysql).
      i do that after each test. but if i inserted something about my entity beans and roll the database back, the system seems to be out of sync.

      part of the error message:

      javax.ejb.EJBException: Update failed. Expected one affected row: rowsAffected=0id=20
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.execute(JDBCStoreEntityCommand.java:165)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.storeEntity(JDBCStoreManager.java:649)
      at org.jboss.ejb.plugins.CMPPersistenceManager.storeEntity(CMPPersistenceManager.java:434)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.storeEntity(CachedConnectionInterceptor.java:388)
      at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:702)
      at org.jboss.ejb.GlobalTxEntityMap.synchronizeEntities(GlobalTxEntityMap.java:163)
      at org.jboss.ejb.GlobalTxEntityMap$GlobalTxEntityMapCleanup.beforeCompletion(GlobalTxEntityMap.java:227)
      at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1297)
      at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:338)
      .
      .
      .

      i tryed to force my beans to read always new the database by setting the commit-options in standardjboss to B or C - without success :-(

      is there any possibility to refresh the entity beans with the new values?

      regards
      mattix