Package org.jboss.test.cmp2.passivation.interfaces

Examples of org.jboss.test.cmp2.passivation.interfaces.RapidlyPassivatedEntityHome


   }

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


   }

   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

   protected void setUp() throws Exception
   {
      super.setUp();
      Object homeObject =
         getInitialContext().lookup(RapidlyPassivatedEntityHome.JNDI_NAME);
      RapidlyPassivatedEntityHome home =
         (RapidlyPassivatedEntityHome) PortableRemoteObject.narrow(
            homeObject,
            RapidlyPassivatedEntityHome.class);

      mEntities = new ArrayList(getBeanCount());
      for (int i = 0, n = getBeanCount(); i < n; ++i)
         mEntities.add(home.create("nothing to see here"));

   }
View Full Code Here

TOP

Related Classes of org.jboss.test.cmp2.passivation.interfaces.RapidlyPassivatedEntityHome

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.