Package org.jboss.test.bmp.interfaces

Examples of org.jboss.test.bmp.interfaces.SimpleBMPHome.findByPrimaryKey()


            home.create (i + 3, ("Dummy "+i));

         try
         {
            getLog().debug ("trying to find Robert again");
            b1 = home.findByPrimaryKey (new Integer (2));
            getLog().debug ("getName (): "+b1.getName ());
         }
         catch (Exception _e)
         {
            getLog().debug (_e.toString ());
View Full Code Here


         }

         try
         {
            getLog().debug ("trying to find an not existing bean");
            b1 = home.findByPrimaryKey (new Integer (0));
            getLog().debug ("getName (): "+b1.getName ());
         }
         catch (Exception _e)
         {
            getLog().debug (_e.toString ());
View Full Code Here

            getLog().debug (_e.toString ());
         }
        
        
         getLog().debug ("rename Daniel to Maria: 1, Daniel");
         b1 = home.findByPrimaryKey (new Integer (1));
         getLog().debug ("name old: " + b1.getName ());
         b1.setName ("Maria");
         getLog().debug ("name new: " + b1.getName ());
       
        
View Full Code Here

      StringBuffer sb = new StringBuffer ();
      SimpleBMP b;
      try
      {
         SimpleBMPHome home = (SimpleBMPHome) new InitialContext ().lookup ("java:comp/env/bean");
         b = home.findByPrimaryKey(new Integer (1));
      }
      catch (Exception _ne)
      {
         throw new EJBException ("couldnt find entity: "+_ne.getMessage ());
      }
View Full Code Here

      StringBuffer sb = new StringBuffer ();
      SimpleBMP b;
      try
      {
         SimpleBMPHome home = (SimpleBMPHome) new InitialContext ().lookup ("java:comp/env/bean");
         b = home.findByPrimaryKey(new Integer (1));
      }
      catch (Exception _ne)
      {
         throw new EJBException ("couldnt find entity: "+_ne.getMessage ());
      }
View Full Code Here

      getLog().debug(++test+"- create some more dummys:");
      for (int i = 0; i < 50; ++i)
         home.create (i + 3, ("Dummy "+i));

      getLog().debug(++test+"- trying to find Robert again");
      b1 = home.findByPrimaryKey (new Integer (2));
      getLog().debug ("getName (): "+b1.getName ());

      try
      {
         getLog().debug(++test+"- trying to find an not existing bean");
View Full Code Here

      getLog().debug ("getName (): "+b1.getName ());

      try
      {
         getLog().debug(++test+"- trying to find an not existing bean");
         b1 = home.findByPrimaryKey (new Integer (0));
         assertTrue("findByPrimaryKey(0) should fail", b1 == null);
      }
      catch (Exception _e)
      {
         getLog().debug (_e.toString ());
View Full Code Here

      {
         getLog().debug (_e.toString ());
      }

      getLog().debug(++test+"- rename Daniel to Maria: 1, Daniel");
      b1 = home.findByPrimaryKey (new Integer (1));
      getLog().debug ("name old: " + b1.getName ());
      b1.setName ("Maria");
      assertTrue("getName == Maria", "Maria".equals(b1.getName ()));

      getLog().debug(++test+"- find all beans:");
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.