Package org.jboss.test.cmp2.perf.interfaces

Examples of org.jboss.test.cmp2.perf.interfaces.LocalCheckBookEntry


   }

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


   }

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

   }

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

   }

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

   }

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

   }

   public void testUpdateLockOnSync() throws Exception
   {
      setup(ENTITY_VERSION_LOCKING);
      Facade facade = getFacadeHome().create();
      try
      {
         facade.testUpdateLockOnSync(ENTITY_VERSION_LOCKING, id);
      }
      catch(Exception e)
      {
         fail("Locked fields are not updated on sync!");
      }
View Full Code Here

   // Private

   private void setup(String jndiName) throws Exception
   {
      Facade facade = getFacadeHome().create();
      facade.createCmpEntity(jndiName, id,
         "str1", new Integer(1), new Double(1.1),
         "str2", new Integer(2), new Double(2.2));
   }
View Full Code Here

         "str2", new Integer(2), new Double(2.2));
   }

   private void tearDown(String jndiName) throws Exception
   {
      Facade facade = getFacadeHome().create();
      facade.safeRemove(jndiName, id);
   }
View Full Code Here

      double total = checkBook.getBalance();

      Iterator entries = checkBook.getCheckBookEntries().iterator();
      while (entries.hasNext())
      {
          LocalCheckBookEntry entry = (LocalCheckBookEntry) entries.next();
          total -= entry.getAmount();
      }
      log.info("End getBalance");

      return total;
   }
View Full Code Here

         for(int day = 2; day < lastDay; day ++)
         {
            long timestamp = cal.getTime().getTime();
            for(int n = 0; n < categories.length; n ++)
            {
               LocalCheckBookEntry entry = home.create(new Integer(entryNo));
               entryNo ++;
               entry.setAmount(1);
               entry.setTimestamp(timestamp);
               entry.setLogger(categories[n]);
               entries.add(entry);
               timestamp += 3600 * 1000;
            }
            cal.set(2003, month, day);
         }
View Full Code Here

TOP

Related Classes of org.jboss.test.cmp2.perf.interfaces.LocalCheckBookEntry

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.