Examples of AccountHome


Examples of org.jboss.test.bankiiop.interfaces.AccountHome

         teller.transfer(from, to, 50);
      long end = System.currentTimeMillis();
      getLog().info("Average call time: "+((end - start) / (iter*6)));
     
      getLog().debug("Show balance");
      AccountHome accountHome = (AccountHome)PortableRemoteObject.narrow(
                            getInitialContext().lookup(AccountHome.JNDI_NAME),
                            AccountHome.class);
      Collection accts = accountHome.findAll();
      Iterator i = accts.iterator();
      while(i.hasNext())
      {
         Account acct = (Account)PortableRemoteObject.narrow(i.next(),
                                                             Account.class);
View Full Code Here

Examples of org.jboss.test.bankiiop.interfaces.AccountHome

   public void testFinder()
      throws Exception
   {
      //create some accounts
      testPassivation();
      AccountHome home = (AccountHome)PortableRemoteObject.narrow(
                            getInitialContext().lookup(AccountHome.JNDI_NAME),
                            AccountHome.class);
     
      getLog().info("Get large accounts");
      Iterator i = home.findLargeAccounts(-1).iterator();
      while (i.hasNext())
      {
         Account acct = (Account)PortableRemoteObject.narrow(i.next(),
                                                             Account.class);
         getLog().debug(acct.getOwner().getName()+":"+acct.getBalance());
View Full Code Here

Examples of org.jboss.test.bankiiop.interfaces.AccountHome

      super.setUp();
      if (System.getSecurityManager() == null)
         System.setSecurityManager(new java.rmi.RMISecurityManager());
      getLog().info("Remove accounts");
      {
         AccountHome home = (AccountHome)PortableRemoteObject.narrow(
                            getInitialContext().lookup(AccountHome.JNDI_NAME),
                            AccountHome.class);
         Collection accounts = home.findAll();
         Iterator i = accounts.iterator();
         while(i.hasNext())
         {
            Account acct = (Account)PortableRemoteObject.narrow(i.next(),
                                                                Account.class);
            getLog().debug("Removing "+acct.getPrimaryKey());
            acct.remove();
         }
      }
      getLog().info("Remove customers");
      {
         CustomerHome home = (CustomerHome)PortableRemoteObject.narrow(
                           getInitialContext().lookup(CustomerHome.JNDI_NAME),
                           CustomerHome.class);
         Collection customers = home.findAll();
         Iterator i = customers.iterator();
         while(i.hasNext())
         {
            Customer cust =
               (Customer)PortableRemoteObject.narrow(i.next(),
View Full Code Here

Examples of org.jboss.test.jca.bank.interfaces.AccountHome

    */
   public Account createAccount(Integer id)
   {
      try
      {
         AccountHome home = (AccountHome)new InitialContext().lookup("Account");
         Account acct = home.create(id, 0, null);

         return acct;
      } catch (Exception e)
      {
         throw new EJBException("Could not create account", e);
View Full Code Here

Examples of test.interfaces.AccountHome

        CustomerNormalValue normal = new CustomerNormalValue();
        normal.getCredit();
        CustomerLightValue light = new CustomerLightValue();
        light.getCredit();
        try {
            AccountHome home = (AccountHome) new InitialContext().lookup("java:comp/env/ejb/bank/Account");
            return home.findByOwner((Customer) ctx.getEJBObject());
        }
        catch (Exception e) {
            throw new EJBException(e);
        }
    }
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.