Package org.jboss.test.lock.interfaces

Examples of org.jboss.test.lock.interfaces.EnterpriseEntityHome


   {
      try
      {
         log.debug("setNextEntity: " + beanName);
         EJBObject ejbObject = entityContext.getEJBObject();
         EnterpriseEntityHome home = (EnterpriseEntityHome) ejbObject.getEJBHome();
         try
         {
            nextEntity = home.findByPrimaryKey(beanName);
         }
         catch (FinderException e)
         {
            nextEntity = home.create(beanName);
         }
         lastEntity = beanName;
      }
      catch (Exception e)
      {
View Full Code Here


   static void create() throws Exception
   {
      InitialContext jndiContext = new InitialContext();
      Object obj = jndiContext.lookup("EnterpriseEntity_A");
      obj = PortableRemoteObject.narrow(obj, EnterpriseEntityHome.class);
      EnterpriseEntityHome home = (EnterpriseEntityHome)obj;
      try
      {
         home.create("Bean1");
      }
      catch (CreateException e)
      {
      }
   }
View Full Code Here

   static void remove() throws Exception
   {
      InitialContext jndiContext = new InitialContext();
      Object obj = jndiContext.lookup("EnterpriseEntity_A");
      obj = PortableRemoteObject.narrow(obj, EnterpriseEntityHome.class);
      EnterpriseEntityHome home = (EnterpriseEntityHome)obj;
      try
      {
         home.remove("Bean1");
      }
      catch (RemoveException e)
      {
      }
   }
View Full Code Here

   {
      getLog().debug("+++ testContention()");
      InitialContext jndiContext = new InitialContext();
      Object obj = jndiContext.lookup("EnterpriseEntity_A");
      obj = PortableRemoteObject.narrow(obj, EnterpriseEntityHome.class);
      EnterpriseEntityHome home = (EnterpriseEntityHome)obj;
      getLog().debug("Found EnterpriseEntityHome @ jndiName=EnterpriseEntity");
      Run r0 = new Run(home.findByPrimaryKey("Bean1"), getLog());
      Run r1 = new Run(home.findByPrimaryKey("Bean1"), getLog());
      Run r2 = new Run(home.findByPrimaryKey("Bean1"), getLog());
      Thread t0 = new Thread(r0);
      Thread t1 = new Thread(r1);
      Thread t2 = new Thread(r2);
      t0.start();
      Thread.sleep(100);
View Full Code Here

   {
      super.setUp();
      nbThreads = getThreadCount();//DEFAULT_THREAD_COUNT;
      iterations = getIterationCount();//DEFAULT_ITERATIONS;
      getLog().debug("+++ Setting up: " + getClass().getName() + " test: " + getName());
      EnterpriseEntityHome home =
          (EnterpriseEntityHome)getInitialContext().lookup(jndiname);

      try
      {
         entity = home.findByPrimaryKey("seb");
      }
      catch (FinderException e)
      {
         entity = home.create("seb");
      }

      // setup the threads
      threads = new Worker[nbThreads];
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.lock.interfaces.EnterpriseEntityHome

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.