Package org.jboss.test.dbtest.interfaces

Examples of org.jboss.test.dbtest.interfaces.AllTypesHome


      Context ctx = new InitialContext();

      getLog().debug(++test + "- " + "Looking up the home AllTypes...");

      AllTypesHome allTypesHome;

      try
      {
         allTypesHome = (AllTypesHome)ctx.lookup("AllTypes");

         if (allTypesHome == null)
         {
            throw new Exception("abort");
         }
         getLog().debug("OK");

      }
      catch (Exception e)
      {
         getLog().debug("Could not lookup the context:  the beans are probably not deployed");
         getLog().debug("Check the server trace for details");
         log.debug("failed", e);
         throw new Exception();
      }

      getLog().debug(++test + "- " + "Calling findByPrimaryKey on AllTypesHome with name seb...");

      AllTypes allTypes = null;

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

      if (allTypes == null)
      {

         getLog().debug("not found OK");
         getLog().debug(++test + "- " + "Calling create on AllTypesHome with name seb...");
         allTypes = allTypesHome.create("seb");
      }

      if (allTypes != null)
      {
         getLog().debug("OK");
View Full Code Here

TOP

Related Classes of org.jboss.test.dbtest.interfaces.AllTypesHome

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.