Package org.jboss.test.testbean.interfaces

Examples of org.jboss.test.testbean.interfaces.EntityBMPHome


      getLog().debug("====================");
      getLog().debug("");


      getLog().debug(++test+"- "+"Looking up home for nextgen.EntityBMP...");
      EntityBMPHome bmpHome = (EntityBMPHome) ctx.lookup("nextgen.EntityBMP");
      assertTrue("bmpHome != null", bmpHome != null);
      getLog().debug("ok");

      // the current test will always return

      getLog().debug(++test+"- "+"Calling create on the home...");
      EntityBMP bmpBean = bmpHome.create("Marc");
      assertTrue("bmpBean != null", bmpBean != null);
      getLog().debug("ok");

      // Let's call a business method to see the flow of server calls

      getLog().debug(++test+"- "+"Calling getEJBHome() on EntityBMP...");
      assertTrue("bmpBean.getEJBHome() != null", bmpBean.getEJBHome() != null);
      getLog().debug("ok");

      getLog().debug(++test+"- "+"Calling business methodA on BMP bean...");
      getLog().debug(bmpBean.callBusinessMethodA());
      getLog().debug(++test+"- "+"Calling business methodB (B2B) on BMP bean and it says ");
      getLog().debug(bmpBean.callBusinessMethodB());


      getLog().debug(++test+"- "+"Calling Business Method B(String) on BMP... ");
      getLog().debug(bmpBean.callBusinessMethodB("of wisdom"));

      getLog().debug(++test+"- "+"calling remove() on BMP...");
      bmpBean.remove();

      getLog().debug(++test+"- "+"calling findCollectionKeys....");
      Collection pks = bmpHome.findCollectionKeys(3);
      Iterator pkIterator = pks.iterator();
      while (pkIterator.hasNext()) {
         EntityBMP currentBean = (EntityBMP)pkIterator.next();
         getLog().debug((String)currentBean.getPrimaryKey());
      }
      getLog().debug("ok");

      getLog().debug(++test+"- "+"calling findEnumeratedKeys....");
      Enumeration pksEnumeration = bmpHome.findEnumeratedKeys(3);
      while (pksEnumeration.hasMoreElements()) {
         EntityBMP currentBean = (EntityBMP)pksEnumeration.nextElement();
         getLog().debug((String)currentBean.getPrimaryKey());
      }
      getLog().debug("ok");

      getLog().debug(++test+"- "+"Calling create<METHOD> on the home...");
      bmpBean = bmpHome.createMETHOD("Marc2");
      assertTrue("bmpBean != null", bmpBean != null);
      getLog().debug("ok");

      getLog().debug(++test+"- "+"calling remove() on BMP...");
      bmpBean.remove();
View Full Code Here

TOP

Related Classes of org.jboss.test.testbean.interfaces.EntityBMPHome

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.