Examples of create()


Examples of org.jboss.test.web.interfaces.StatelessSessionLocalHome.create()

      {
         InitialContext ctx = new InitialContext();
         StatelessSessionLocalHome home = null;
         Context enc = (Context) ctx.lookup("java:comp/env");
         home = (StatelessSessionLocalHome) enc.lookup("ejb/local/SecuredEJB");
         StatelessSessionLocal bean = home.create();
         if( method.equals("echo") )
            bean.echo("UnsecureEJBServlet called SecuredEJB.echo");
         else if( method.equals("unchecked") )
            bean.unchecked();
         else if( method.equals("checkRunAs") )

Examples of org.jboss.test.xa.interfaces.XATestHome.create()

         // sed kicks ass
        System.out.print(++test+"- "+"Creating an the XATest bean...");
        XATest bean;
        try {
            bean = home.create();
            if(bean == null) throw new Exception("No Bean!");
            log.debug("OK");
        } catch (Exception e) {
             // sed kicks ass
            log.debug("Could not create the bean!");

Examples of org.jboss.tutorial.blob.bean.LobTester.create()

{
   public static void main(String[] args) throws Exception
   {
      InitialContext ctx = new InitialContext();
      LobTester test = (LobTester) ctx.lookup("LobTesterBean/remote");
      long blobId = test.create();
      HashMap map = test.findBlob(blobId);
      System.out.println("is hello in map: " + map.get("hello"));
      System.out.println(test.findClob(blobId));
      System.out.println("creating and getting a BlobEntity2 that uses byte[] and String instead of Clob/Blob");
      blobId = test.create2();

Examples of org.jboss.tutorial.callback.bean.CustomerDAO.create()

   {
      InitialContext ctx = new InitialContext();
      CustomerDAO dao = (CustomerDAO) ctx.lookup("CustomerDAOBean/remote");

      System.out.println("Create Bill Burke and Monica Smith");
      dao.create("Bill", "Burke", "1 Boston Road", "Boston", "MA", "02115");
      int moId = dao.create("Monica", "Smith", "1 Boston Road", "Boston", "MA", "02115");

      System.out.println("Bill and Monica get married");
      Customer monica = dao.find(moId);
      monica.setLast("Burke");

Examples of org.jboss.tutorial.ejb21_client_adaptors.bean.Session1RemoteHome.create()

  
   public static void accessHomes() throws Exception
   {
      InitialContext jndiContext = new InitialContext();
      Session1RemoteHome home = (Session1RemoteHome)jndiContext.lookup("Session1/home");
      Session1Remote session1 = home.create();
      String initValue1 = session1.getInitValue();
      System.out.println("Session1 init value is " + initValue1);
     
      String initValue2 = session1.getLocalSession2InitValue();
      System.out.println("Session2 init value is " + initValue2);

Examples of org.jboss.tutorial.embeddable.bean.CustomerDAO.create()

   {
      InitialContext ctx = new InitialContext();
      CustomerDAO dao = (CustomerDAO) ctx.lookup("CustomerDAOBean/remote");

      System.out.println("Create Bill Burke and Monica Smith");
      dao.create("Bill", "Burke", "1 Boston Road", "Boston", "MA", "02115");
      int moId = dao.create("Monica", "Smith", "1 Boston Road", "Boston", "MA", "02115");

      System.out.println("Bill and Monica get married");
      Customer monica = dao.find(moId);
      monica.getName().setLast("Burke");

Examples of org.jboss.tutorial.merge.bean.CustomerDAO.create()

   {
      InitialContext ctx = new InitialContext();
      CustomerDAO dao = (CustomerDAO) ctx.lookup("CustomerDAOBean/remote");

      System.out.println("Create Bill Burke and Monica Smith");
      dao.create("Bill", "Burke", "1 Boston Road", "Boston", "MA", "02115");
      int moId = dao.create("Monica", "Smith", "1 Boston Road", "Boston", "MA", "02115");

      System.out.println("Bill and Monica get married");
      Customer monica = dao.find(moId);
      monica.setLast("Burke");

Examples of org.jboss.tutorial.reference21_30.bean.Stateless2Home.create()

         Stateless3 test3 = (Stateless3)ctx.lookup("Stateless3");
         test3.testAccess();
        
         System.out.println("Testing EJB2.x references to EJB3.0");
         Stateless2Home home = (Stateless2Home)ctx.lookup("Stateless2");
         Stateless2 test2 = home.create();
         test2.testAccess();
        
         System.out.println("Succeeded");
        
         printMessage(resp, "Successfully referenced EJB3 from EJB2.1 and vice versa");

Examples of org.jboss.tutorial.secondary.bean.CustomerDAO.create()

      InitialContext ctx = new InitialContext();
      CustomerDAO dao = (CustomerDAO) ctx.lookup("CustomerDAOBean/remote");

      System.out.println("Create Bill Burke and Monica Smith");
      dao.create("Bill", "Burke", "1 Boston Road", "Boston", "MA", "02115");
      int moId = dao.create("Monica", "Smith", "1 Boston Road", "Boston", "MA", "02115");

      System.out.println("Bill and Monica get married");
      Customer monica = dao.find(moId);
      monica.setLast("Burke");

Examples of org.jboss.util.CachePolicy.create()

         }
      }
   
      try
      {
         policy.create();
         policy.start();
      }
      catch(Exception e)
      {
         throw new IllegalStateException("Error starting domain cache", e);
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.