Examples of Bank


Examples of Banking.Bank

    BankImpl bankImpl = new BankImpl();
    LOG.info("Bank created");

    // get object reference from the servant
    org.omg.CORBA.Object ref = rootpoa.servant_to_reference(bankImpl);
    Bank bankRef = BankHelper.narrow(ref);
    LOG.info("Bank reference created");

    // get the NameService
    org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
    NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
View Full Code Here

Examples of Banking.Bank

     
        NamingContextExt namingCtx = NamingContextExtHelper.narrow(objRef);
  
        // resolve the object reference
        String bankname = "swissbank";
        Bank bank = BankHelper.narrow(namingCtx.resolve_str(bankname));

        System.out.println("Obtained a handle on server object: " + bank);
       
        String accNum = "0234.234432.50L";
        CurrentAccount currentAccount = bank.createCurrentAccount(accNum, 123);
       
        int i = currentAccount.loanLimit();
        System.out.println("loanlimit: " + i);
        System.out.print(currentAccount.accountNumber());
        currentAccount.deposit(100);
       
        bank.payInterest();

        System.out.print(currentAccount.balance());

        //        currentAccount.deposit(100);
//        System.out.println("yeeeee: " + currentAccount.balance());
View Full Code Here

Examples of bank.Bank

    ExecutorService service = Executors.newFixedThreadPool(accountsCount);
//    Bank bank = new NotSynchronizedBank(1000, accountsCount);
//    Bank bank = new ExplicitLockSynchronizedBank(1000, accountsCount);
//    Bank bank = new ImplicitLockSynchronizedBank(1000, accountsCount);
//    Bank bank = new ExplicitLockSynchronizedBankWithCondition(1000, accountsCount);
    Bank bank = new ImplicitLockSynchronizedBankWithCondition(1000, accountsCount);
//    Bank bank = new BlockLockSynchronizedBankWithCondition(1000, accountsCount);
    while(--accountsCount>=0)
    {
      service.submit(new Transfert(bank, accountsCount));
    }
View Full Code Here

Examples of bank.client.Bank

    public static void main(String args[]) throws Exception {
        URL wsdlUrl = new URL("file:./../resources/bank.wsdl");
   
        BankCORBAService ss = new BankCORBAService(wsdlUrl, SERVICE_NAME);
        Bank port = ss.getBankCORBAPort()
       

        System.out.print("Invoking createAccount for Mr. John... ");
        javax.xml.ws.Holder<Account> account = new javax.xml.ws.Holder<Account>(new Account());
        try {
            if (port.createAccount("John", account)) {
                System.out.println("success");
            } else {
                System.out.println("failure (Unknown)");
            }
        } catch (AccountAlreadyExistsException ex) {
            System.out.println("failure (" + ex.getMessage() + " : " + ex.getFaultInfo().getName() + ")");
        }

        Account bankAccount = account.value;
        if (bankAccount != null) {
            System.out.println("Created Account : " + bankAccount);
        }

        System.out.println("Getting Mr. John's account...");
        try {
            bankAccount = port.getAccount("John");
            if (bankAccount != null) {
                System.out.println("success");
            } else {
                System.out.println("failure");
            }
        } catch (AccountNotFoundException ex) {
            System.out.println("failure (" + ex.getMessage() + " : " + ex.getFaultInfo().getName() + ")");
        }      

        System.out.println("Getting an non-existent account (Ms. Helen)...");
        try {
            bankAccount = port.getAccount("Helen");
        } catch (AccountNotFoundException ex) {
            System.out.println("Caught the expected AccountNotFoundException(" + ex.getFaultInfo().getName() + ")");
        }
               
        System.exit(0);
View Full Code Here

Examples of bank.client.Bank

    public static void main(String args[]) throws Exception {
        URL wsdlUrl = new URL("file:./../resources/bank.wsdl");
   
        BankSOAPService ss = new BankSOAPService(wsdlUrl, SERVICE_NAME);
        Bank port = ss.getBankSOAPPort()
       

        System.out.print("Invoking createAccount for Mr. John... ");
        javax.xml.ws.Holder<Account> account = new javax.xml.ws.Holder<Account>();
        try {
            if (port.createAccount("John", account)) {
                System.out.println("success");
            } else {
                System.out.println("failure (Unknown)");
            }
        } catch (AccountAlreadyExistsException ex) {
            System.out.println("failure (" + ex.getMessage() + " : " + ex.getFaultInfo().getName() + ")");
        }

        Account bankAccount = account.value;
        if (bankAccount != null) {
            System.out.println("Created Account : " + bankAccount);
        }

        System.out.println("Getting Mr. John's account...");
        try {
            bankAccount = port.getAccount("John");
            if (bankAccount != null) {
                System.out.println("success");
            } else {
                System.out.println("failure");
            }
        } catch (AccountNotFoundException ex) {
            System.out.println("failure (" + ex.getMessage() + " : " + ex.getFaultInfo().getName() + ")");
        }      

        System.out.println("Getting an non-existent account (Ms. Helen)...");
        try {
            bankAccount = port.getAccount("Helen");
        } catch (AccountNotFoundException ex) {
            System.out.println("Caught the expected AccountNotFoundException(" + ex.getFaultInfo().getName() + ")");
        }
               
        System.exit(0);
View Full Code Here

Examples of bank.common.Bank

    public static void main(String args[]) throws Exception {
        URL wsdlUrl = new URL("file:./../resources/bank.wsdl");
   
        BankCORBAService ss = new BankCORBAService(wsdlUrl, SERVICE_NAME);
        Bank port = ss.getBankCORBAPort()
       

        System.out.print("Invoking createAccount for Mr. John... ");
        javax.xml.ws.Holder<Account> account = new javax.xml.ws.Holder<Account>(new Account());
        try {
            if (port.createAccount("John", account)) {
                System.out.println("success");
            } else {
                System.out.println("failure (Unknown)");
            }
        } catch (AccountAlreadyExistsException ex) {
            System.out.println("failure (" + ex.getMessage() + " : " + ex.getFaultInfo().getName() + ")");
        }

        Account bankAccount = account.value;
        if (bankAccount != null) {
            System.out.println("Created Account : "
                               + bankAccount.getName() + ": " + bankAccount.getBalance());
        }

        System.out.println("Getting Mr. John's account...");
        try {
            bankAccount = port.getAccount("John");
            if (bankAccount != null) {
                System.out.println("success");
                System.out.println(bankAccount.getName() + ": " + bankAccount.getBalance());
            } else {
                System.out.println("failure");
            }
        } catch (AccountNotFoundException ex) {
            System.out.println("failure (" + ex.getMessage() + " : " + ex.getFaultInfo().getName() + ")");
        }      

        System.out.println("Getting an non-existent account (Ms. Helen)...");
        try {
            bankAccount = port.getAccount("Helen");
        } catch (AccountNotFoundException ex) {
            System.out.println("Caught the expected AccountNotFoundException("
                               + ex.getFaultInfo().getName() + ")");
        }
               
View Full Code Here

Examples of bank.common.Bank

    public static void main(String args[]) throws Exception {
        URL wsdlUrl = Client.class.getResource("/wsdl/bank.wsdl");
   
        BankCORBAService ss = new BankCORBAService(wsdlUrl, SERVICE_NAME);
        Bank port = ss.getBankCORBAPort()
       

        System.out.print("Invoking createAccount for Mr. John... ");
        javax.xml.ws.Holder<Account> account = new javax.xml.ws.Holder<Account>(new Account());
        try {
            if (port.createAccount("John", account)) {
                System.out.println("success");
            } else {
                System.out.println("failure (Unknown)");
            }
        } catch (AccountAlreadyExistsException ex) {
            System.out.println("failure (" + ex.getMessage() + " : " + ex.getFaultInfo().getName() + ")");
        }

        Account bankAccount = account.value;
        if (bankAccount != null) {
            System.out.println("Created Account : "
                               + bankAccount.getName() + ": " + bankAccount.getBalance());
        }

        System.out.println("Getting Mr. John's account...");
        try {
            bankAccount = port.getAccount("John");
            if (bankAccount != null) {
                System.out.println("success");
                System.out.println(bankAccount.getName() + ": " + bankAccount.getBalance());
            } else {
                System.out.println("failure");
            }
        } catch (AccountNotFoundException ex) {
            System.out.println("failure (" + ex.getMessage() + " : " + ex.getFaultInfo().getName() + ")");
        }      

        System.out.println("Getting an non-existent account (Ms. Helen)...");
        try {
            bankAccount = port.getAccount("Helen");
        } catch (AccountNotFoundException ex) {
            System.out.println("Caught the expected AccountNotFoundException("
                               + ex.getFaultInfo().getName() + ")");
        }
               
View Full Code Here

Examples of bankqueue.Bank

    @Before
    public void setUp() {
        events = new ArrayList<CustomerArriveEvent>();
        sw = new StringWriter();
        bank = new Bank();
    }
View Full Code Here

Examples of br.com.buyFast.model.Bank

 
  private int count;
 
  public CartController() {
    this.count = 0;
    this.bank = new Bank();
  }
View Full Code Here

Examples of br.com.buyFast.model.Bank

   * Ir para a página de gerenciamento de bancos.
   * @return
   */
  public String manageBank() {
   
    this.bank = new Bank();
   
    return "bankPage";
  }
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.