Package org.jboss.test.cmp2.optimisticlock.interfaces

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


    * @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

    * @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

      testSessionRemote.test(oID);
   }

   public void testNullLockedFields() throws Exception
   {
      Facade facade = getFacadeHome().create();
      facade.createCmpEntity(ENTITY_MODIFIED_LOCKING, id,
         null, new Integer(1), null, "str2", null, new Double(2.2));
      try
      {
         facade.testNullLockedFields(ENTITY_MODIFIED_LOCKING, id);
      }
      finally
      {
         tearDown(ENTITY_MODIFIED_LOCKING);
      }
View Full Code Here

   }

   public void testKeygenStrategyPass() throws Exception
   {
      setup(ENTITY_KEYGEN_LOCKING);
      Facade facade = getFacadeHome().create();
      try
      {
         facade.testKeygenStrategyPass(ENTITY_KEYGEN_LOCKING, id);
      }
      finally
      {
         tearDown(ENTITY_KEYGEN_LOCKING);
      }
View Full Code Here

   }

   public void testKeygenStrategyFail() throws Exception
   {
      setup(ENTITY_KEYGEN_LOCKING);
      Facade facade = getFacadeHome().create();
      try
      {
         facade.testKeygenStrategyFail(ENTITY_KEYGEN_LOCKING, id);
         fail("Should have failed to update.");
      }
      catch(Exception e)
      {
      }
View Full Code Here

   }

   public void testTimestampStrategyPass() throws Exception
   {
      setup(ENTITY_TIMESTAMP_LOCKING);
      Facade facade = getFacadeHome().create();
      try
      {
         facade.testTimestampStrategyPass(ENTITY_TIMESTAMP_LOCKING, id);
      }
      finally
      {
         tearDown(ENTITY_TIMESTAMP_LOCKING);
      }
View Full Code Here

   }

   public void testTimestampStrategyFail() throws Exception
   {
      setup(ENTITY_TIMESTAMP_LOCKING);
      Facade facade = getFacadeHome().create();
      try
      {
         facade.testTimestampStrategyFail(ENTITY_TIMESTAMP_LOCKING, id);
         fail("Should have failed to update.");
      }
      catch(Exception e)
      {
      }
View Full Code Here

   }

   public void testVersionStrategyPass() throws Exception
   {
      setup(ENTITY_VERSION_LOCKING);
      Facade facade = getFacadeHome().create();
      try
      {
         facade.testVersionStrategyPass(ENTITY_VERSION_LOCKING, id);
      }
      finally
      {
         tearDown(ENTITY_VERSION_LOCKING);
      }
View Full Code Here

   }

   public void testVerionStrategyFail() throws Exception
   {
      setup(ENTITY_VERSION_LOCKING);
      Facade facade = getFacadeHome().create();
      try
      {
         facade.testVersionStrategyFail(ENTITY_VERSION_LOCKING, id);
         fail("Should have failed to update.");
      }
      catch(Exception e)
      {
      }
View Full Code Here

TOP

Related Classes of org.jboss.test.cmp2.optimisticlock.interfaces.CmpEntityLocal

Copyright © 2018 www.massapicom. 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.