Examples of BankAccount


Examples of de.xanders.data.customer.dao.BankAccount

    /**
     * @see BankAccountService#getBankAccountById(java.lang.Long)
     */
    protected BankAccountVO handleGetBankAccountById(java.lang.Long bankAccountId)
        throws java.lang.Exception {
      BankAccount bankAccount = this.getBankAccountDao().load(bankAccountId);
      return this.getBankAccountDao().toBankAccountVO(bankAccount);
    }
View Full Code Here

Examples of de.xanders.data.customer.dao.BankAccount

    /**
     * @see BankAccountService#saveBankAccount(BankAccountVO)
     */
    protected BankAccountVO handleSaveBankAccount(BankAccountVO bankAccountVO)
        throws java.lang.Exception {
      BankAccount bankAccount = this.getBankAccountDao().bankAccountVOToEntity(bankAccountVO);
        if (bankAccount.getBankAccountId() == null) {
            bankAccount = this.getBankAccountDao().create(bankAccount);
            bankAccountVO.setBankAccountId(bankAccount.getBankAccountId());
        }
        else {
            this.getBankAccountDao().update(bankAccount);           
        }
        return bankAccountVO;
View Full Code Here

Examples of edu.vt.rt.hyflow.benchmark.realtimermi.bank.rw.BankAccount

    for(int i=0; i<localObjectsCount; i++)
      if((i % nodes)== id)
        try {
          Logger.debug("Created:" + id + "-" + i);
          //new BankAccount(id + "-" + i).deposit(10000);
          BankAccount temp = new BankAccount(id + "-" + i);
          temp.deposit(10000);
        } catch (Throwable e) {
          e.printStackTrace();
        }
  }
View Full Code Here

Examples of edu.vt.rt.hyflow.benchmark.tm.bank.BankAccount

   
    System.out.println("Creating Local Objects");
    // Local accounts
    for(int i=1; i<args.length; i++)
      if(args[i].startsWith(args[0]))
        new BankAccount(args[i]).deposit(50);
   
    System.out.println("Sleeping to objects populated");
    Thread.sleep(5000);

    // Making money transfer
    final String luckyAccount = args[nodeId+1]// pick one of the accounts
    for(int i=nodeId+2; i<args.length; i++){
      final int index = i;
      if(!args[i].equals(luckyAccount))
        new Thread(){
          public void run() {
          System.out.println("Transaction<" + args[index] + "," + luckyAccount + ">:");
          try {
            BankAccount.transfer(args[index], luckyAccount, 10);
          } catch (Throwable e) {
            e.printStackTrace();
          }
//          transaction.cleanup();
        }
      }.start();
    }
    Thread.sleep(10000);

    // View final output
    DirectoryManager locator = HyFlow.getLocator();
    if(nodeId==1){ // just one node view output
      System.out.println("Sleep till transactions complete");
      Thread.sleep(10000);
      for(int i=1; i<args.length; i++){
       
        BankAccount account = (BankAccount)locator.open(args[i], "r");
        System.out.println(account.checkBalance());
        locator.release(account);

        BankAccount account2 = (BankAccount)locator.open(args[i], "r");
        System.out.println(account2.checkBalance());
        locator.release(account2);
      }
    }
   
    System.out.println("Test complete");
View Full Code Here

Examples of edu.vt.rt.hyflow.benchmark.tm.bank.BankAccount

    HyFlow.start(5);
    System.out.println("Sleeping");
    Thread.sleep(1000);
   
    //   Local accounts
    BankAccount account = new BankAccount("5-123");
    account .deposit(50);

    DirectoryManager locator = HyFlow.getLocator();
   
    System.out.println("Acquire1");
    BankAccount account1 = (BankAccount)locator.open("5-123");
    System.out.println("Release1");
//    locator.release(account1);
   
    System.out.println("Acquire2");
    BankAccount account2 = (BankAccount)locator.open("5-123");
    System.out.println("Release2");
    locator.release(account1);
   
    System.out.println("Complete Test");
    System.exit(0);
View Full Code Here

Examples of edu.vt.rt.hyflow.benchmark.tm.bank.BankAccount

    Thread.sleep(1000);
   
    //   Local accounts
    for(int i=1; i<args.length; i++)
      if(args[i].startsWith(args[0]))
        new BankAccount(args[i]).deposit(50);
   
    Thread.sleep(1000);
   
    // Remote accounts
    DirectoryManager locator = HyFlow.getLocator();
    for(int i=1; i<args.length; i++){
        BankAccount account = (BankAccount)locator.open(args[i]);
        if(account!=null){
          account.deposit(50);
          System.out.println(account.withdraw(10*Integer.parseInt(args[0])));
          locator.release(account);
        }
        else
          System.out.println("Account " + args[i] + " is not found!");
      }

    // Check results
    Thread.sleep(1000);
    for(int i=1; i<args.length; i++){
      BankAccount account = (BankAccount)HyFlow.getLocator().open(args[i], "r");
      System.out.println(account.checkBalance());
      locator.release(account);
    }
   
    System.out.println("Complete Test");
  }
View Full Code Here

Examples of org.hibernate.ogm.backendtck.associations.collection.manytomany.BankAccount

    final EntityManager em = getFactory().createEntityManager();

    owner = new AccountOwner( "owner_1" );
    owner.setSSN( "0123456" );

    soge = new BankAccount( "account_1" );
    soge.setAccountNumber( "X2345000" );
    soge.getOwners().add( owner );
    owner.getBankAccounts().add( soge );

    barclays = new BankAccount( "account_2" );
    barclays.setAccountNumber( "ZZZ-009" );
    barclays.getOwners().add( owner );
    owner.getBankAccounts().add( barclays );

    em.persist( owner );
View Full Code Here

Examples of org.hibernate.ogm.backendtck.associations.collection.manytomany.BankAccount

    final EntityManager em = getFactory().createEntityManager();

    owner = new AccountOwner( "owner_1" );
    owner.setSSN( "0123456" );

    soge = new BankAccount( "account_1" );
    soge.setAccountNumber( "X2345000" );
    soge.getOwners().add( owner );
    owner.getBankAccounts().add( soge );

    barclays = new BankAccount( "account_2" );
    barclays.setAccountNumber( "ZZZ-009" );
    barclays.getOwners().add( owner );
    owner.getBankAccounts().add( barclays );

    em.persist( owner );
View Full Code Here

Examples of tests.jfun.models.BankAccount

        "tests/jfun/yan/web/yan.xml");
    HttpServlet servlet = new YanLoaderServlet();
    MockServletConfig config = new MockServletConfig();
    config.setServletContext(sc);
    servlet.init(config);
    final BankAccount acct = verifyBean(sc, "account");
    servlet.destroy();
    assertTrue("Destroyed", acct.isDestroyed());
  }
View Full Code Here

Examples of tests.jfun.models.BankAccount

  }
  private void verifyListener(ServletContext sc, String beanname){
    ServletContextListener listener = new YanLoaderListener();
    ServletContextEvent event = new ServletContextEvent(sc);
    listener.contextInitialized(event);
    final BankAccount acct = verifyBean(sc, beanname);
    listener.contextDestroyed(event);
    assertTrue(acct.isDestroyed());
  }
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.