Examples of CmpEntityLocal


Examples of org.jboss.test.cmp2.optimisticlock.interfaces.CmpEntityLocal

    * @ejb.interface-method
    */
   public void testModifiedStrategyPass(String jndiName, Integer id) throws Exception
   {
      log.debug("testModifiedStrategyPass> begin");
      CmpEntityLocal entity = getCmpEntityHome(jndiName).findByPrimaryKey(id);
      entity.setIntegerGroup1(new Integer(111));
      entity.setStringGroup1("modified in testModifiedStrategyPass");
      entity.setDoubleGroup1(new Double(111.111));
      myHome.create().modifyGroup2InRequiresNew(jndiName, id);
      log.debug("testModifiedStrategyPass> done");
   }
View Full Code Here

Examples of org.jboss.test.cmp2.optimisticlock.interfaces.CmpEntityLocal

    * @ejb.interface-method
    */
   public void testModifiedStrategyFail(String jndiName, Integer id) throws Exception
   {
      log.debug("testModifiedStrategyFail> begin");
      CmpEntityLocal entity = getCmpEntityHome(jndiName).findByPrimaryKey(id);
      entity.setStringGroup2("modified by testModifiedStrategyFail");
      myHome.create().modifyGroup2InRequiresNew(jndiName, id);
      log.debug("testModifiedStrategyFail> done");
   }
View Full Code Here

Examples of org.jboss.test.cmp2.optimisticlock.interfaces.CmpEntityLocal

    * @ejb.transaction type="RequiresNew"
    */
   public void modifyGroup2InRequiresNew(String jndiName, Integer id) throws Exception
   {
      log.debug("modifyGroup2InRequiresNew");
      CmpEntityLocal entity = getCmpEntityHome(jndiName).findByPrimaryKey(id);
      entity.setIntegerGroup2(new Integer(222));
      entity.setStringGroup2("modified by modifyGroup2InRequiresNew");
      entity.setDoubleGroup2(new Double(222.222));
   }
View Full Code Here

Examples of org.jboss.test.cmp2.optimisticlock.interfaces.CmpEntityLocal

    * @ejb.transaction type="RequiresNew"
    */
   public void modifyGroup1InRequiresNew(String jndiName, Integer id) throws Exception
   {
      log.debug("modifyGroup1InRequiresNew");
      CmpEntityLocal entity = getCmpEntityHome(jndiName).findByPrimaryKey(id);
      entity.setIntegerGroup1(new Integer(333));
      entity.setStringGroup1("modified by modifyGroup1InRequiresNew");
      entity.setDoubleGroup1(new Double(333.333));
   }
View Full Code Here

Examples of org.jboss.test.cmp2.optimisticlock.interfaces.CmpEntityLocal

    * @ejb.interface-method
    */
   public void testUpdateLockOnSync(String jndiName, Integer id) throws Exception
   {
      log.debug("testUpdateLockOnSync> begin");
      CmpEntityLocal entity = getCmpEntityHome(jndiName).findById(id);
      entity.setStringGroup1("FIRST UPDATE");

      entity = getCmpEntityHome(jndiName).findById(id);
      entity.setStringGroup1("SECOND UPDATE");

      log.debug("testUpdateLockOnSync> done");
   }
View Full Code Here

Examples of org.jboss.test.cmp2.optimisticlock.interfaces.CmpEntityLocal

    * @ejb.interface-method
    */
   public void testExplicitVersionUpdateOnSync(String jndiName, Integer id) throws Exception
   {
      log.debug("testExplicitVersionUpdateOnSync> begin");
      CmpEntityLocal entity = getCmpEntityHome(jndiName).findById(id);
      if(entity.getVersionField().longValue() != 1)
         throw new Exception("entity.getVersionField().longValue() != 1");
      entity.setStringGroup1("FIRST UPDATE");

      entity = getCmpEntityHome(jndiName).findById(id);
      if(entity.getVersionField().longValue() != 2)
         throw new Exception("entity.getVersionField().longValue() != 2");
      entity.setStringGroup1("SECOND UPDATE");

      log.debug("testExplicitVersionUpdateOnSync> done");
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.