Package bank

Examples of bank.BankApplicationImpl


        new ClientId("Lefebvre", "Alexandre", "Grenoble")
    };

    public static void main(String[] args) {
        System.out.println("Bank created or loaded");
        BankApplicationImpl ba = new BankApplicationImpl();

        Properties p = new Properties();
        try {
            p.load(new FileInputStream(args[0]));
        } catch (IOException e) {
            System.err.println(e.getMessage());
            e.printStackTrace(System.err);
            System.exit(-1);
        }
        BankApplicationImpl.pmf = JDOHelper.getPersistenceManagerFactory(p);

        String[] accountNumbers = new String[clientsNames.length];
        try {
            for (int i = 0; i < agencyNames.length; i++) {
                ba.createAgency(agencyNames[i]);
                System.out.println("Agency '" + agencyNames[i] + "' created");
            }
           
            for (int i = 0; i < clientsNames.length; i++) {
                ba.createClient(clientsNames[i], agencyNames[0]);
                System.out.println("Client '" + clientsNames[i] + "' created");
                accountNumbers[i] = ba.createAccount(clientsNames[i], agencyNames[0]);
                System.out.println("Account '" + accountNumbers[i] + "' created");
            }

            printBank(ba);
        } catch (RemoteException e) {
View Full Code Here

TOP

Related Classes of bank.BankApplicationImpl

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.