Examples of findByPrimaryKey()


Examples of org.jboss.test.cmp2.perf.interfaces.LocalCheckBookHome.findByPrimaryKey()

         InitialContext ctx = new InitialContext();
         Context enc = (Context) ctx.lookup("java:comp/env");
         LocalCheckBookHome home = (LocalCheckBookHome) enc.lookup("ejb/LocalCheckBookHome");
         try
         {
            checkBook = home.findByPrimaryKey(account);
         }
         catch(FinderException e)
         {
            log.info("Failed to find CheckBook for: "+account);
            checkBook = home.create(account, balance);
View Full Code Here

Examples of org.jboss.test.cts.interfaces.CtsBmpHome.findByPrimaryKey()

         getLog().debug("Create a bean...");
         doEjbCreate(pk, BEAN_NAME);
         getLog().debug("OK");

         getLog().debug("Use a finder method to retrieve the bean...");
         bean = home.findByPrimaryKey( pk );
         getLog().debug("OK");

         getLog().debug("Assert it is the same bean as passed to a method..." );
         // Send to a method as a reference, make sure it is usable by the method
         assertTrue( this.gotRefOkay(bean, BEAN_NAME) );
View Full Code Here

Examples of org.jboss.test.cts.interfaces.CtsCmpLocalHome.findByPrimaryKey()

      {
         bean1 = home.create(key1, "testEntityIdentity");
      }
      catch(DuplicateKeyException e)
      {
         bean1 = home.findByPrimaryKey(key1);
      }
      AccountPK key2 = new AccountPK("2");
      CtsCmpLocal bean2 = null;
      try
      {
View Full Code Here

Examples of org.jboss.test.dbtest.interfaces.AllTypesHome.findByPrimaryKey()

      AllTypes allTypes = null;

      try
      {
         allTypes = allTypesHome.findByPrimaryKey("seb");
      }
      catch (Exception e)
      {
         getLog().debug(e.getMessage());
      }
View Full Code Here

Examples of org.jboss.test.dbtest.interfaces.RecordHome.findByPrimaryKey()

      Record[] record = new Record[3];
      for (int i = 0; i < 3; i++)
      {
         try
         {
            record[i] = recordHome.findByPrimaryKey("bill " + i);
         }
         catch (FinderException e)
         {
            record[i] = recordHome.create("bill " + i);
         }
View Full Code Here

Examples of org.jboss.test.deadlock.interfaces.EnterpriseEntityHome.findByPrimaryKey()

      throws Exception
   {
      EnterpriseEntityHome home = (EnterpriseEntityHome) new InitialContext().lookup("nextgenEnterpriseEntity");
      try
      {
         EnterpriseEntity A = home.findByPrimaryKey("A");
      }
      catch (ObjectNotFoundException ex)
      {
         home.create("A");
      }
View Full Code Here

Examples of org.jboss.test.deadlock.interfaces.EnterpriseEntityLocalHome.findByPrimaryKey()

     // Call the next in the chain
     try
     {
        EnterpriseEntityLocalHome home = (EnterpriseEntityLocalHome)entityContext.getEJBLocalObject().getEJBLocalHome();
        beanOrder.next++;
        EnterpriseEntityLocal nextBean = home.findByPrimaryKey(beanOrder.order[beanOrder.next]);
        try
        {
           nextBean.callAnotherBean(beanOrder);
        }
        finally
View Full Code Here

Examples of org.jboss.test.ejbconf.beans.interfaces.ReadOnlyHome.findByPrimaryKey()

   {
      ReadOnlyHelperHome rohh = (ReadOnlyHelperHome)getInitialContext().lookup("ReadOnlyHelper");
      ReadOnlyHelper roHelper = rohh.create();
      roHelper.setUp();
      ReadOnlyHome roh = (ReadOnlyHome)getInitialContext().lookup("ReadOnly");
      ReadOnly ro = roh.findByPrimaryKey(new Integer(1));
      assertTrue("ReadOnly didn't get correct initial value", ro.getValue().equals(new Integer(1)));
      try
      {
         ro.setValue(new Integer(2));
         fail("Was able to set read-only field");
View Full Code Here

Examples of org.jboss.test.entity.interfaces.PathologicalEntityHome.findByPrimaryKey()

   public void removePathological(String name, boolean pathological)
   {
      try
      {
         PathologicalEntityHome home = getPathologicalEJB();
         PathologicalEntity bean = home.findByPrimaryKey(name);
         Pathological.setPathological(pathological);
         bean.remove();
      }
      catch (Throwable e)
      {
View Full Code Here

Examples of org.jboss.test.hello.interfaces.HelloLogHome.findByPrimaryKey()

      getLog().debug(reply);
      hello.remove();

      // Find
      HelloLogHome logHome = (HelloLogHome) ctx.lookup("helloworld/HelloLogHTTP");
      HelloLog log = logHome.findByPrimaryKey("World");
      long start = log.getStartTime();
      long end = log.getEndTime();
      getLog().debug("HelloLog times: "+start+","+end);
      long elapsed = log.getElapsedTime();
      getLog().debug("HelloLog elapsed: "+elapsed);
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.