Examples of TxController


Examples of com.sun.ebank.ejb.tx.TxController

      fromAccountId = "";
      toAccountId = "";
   }

   public void populate() {
      TxController txCtl = beanManager.getTxController();
      try {
         txCtl.transferFunds(transferAmount, "Transfer", fromAccountId, toAccountId);
      } catch (RemoteException e) {
      } catch (IllegalArgumentException e) {
      } catch (AccountNotFoundException e) {
      } catch (InsufficientFundsException e) {
      } catch (InsufficientCreditException e) {
View Full Code Here

Examples of com.sun.ebank.ejb.tx.TxController

    prepString = null;
    selectedAccount = null;
  }

  public void populate() {
    TxController txctl = beanManager.getTxController();
    operationString = messages.getString("WithdrewString");
    prepString = messages.getString("FromString");

    try {
      selectedAccount = beanManager.getAccountController().getDetails(accountId);
    } catch (RemoteException e) {
    } catch (IllegalArgumentException e) {
    } catch (AccountNotFoundException e) {
    }
    boolean isCreditAcct = false;
    if (selectedAccount.getType().equals("Credit"))
      isCreditAcct = true;

    if (isCreditAcct) {
      if (operation == 0) { 
        try {
          txctl.makeCharge(amount, "ATM Withdrawal", accountId);
        } catch (RemoteException e) {
        } catch (IllegalArgumentException e) {
        } catch (AccountNotFoundException e) {
        } catch (InsufficientCreditException e) {
        } catch (IllegalAccountTypeException e) {
        }
      } else {
        operationString = messages.getString("DepositedString");
        prepString = messages.getString("ToString");
        try {
          txctl.makePayment(amount, "ATM Deposit", accountId);
        } catch (RemoteException e) {
        } catch (IllegalArgumentException e) {
        } catch (AccountNotFoundException e) {
        } catch (IllegalAccountTypeException e) {
        }
      }
    } else
      if (operation == 0) { 
        try {
          txctl.withdraw(amount, "ATM Withdrawal", accountId);
        } catch (RemoteException e) {
        } catch (IllegalArgumentException e) {
        } catch (AccountNotFoundException e) {
        } catch (InsufficientFundsException e) {
        } catch (IllegalAccountTypeException e) {
        }
      } else
        operationString = messages.getString("DepositedString");
        prepString = messages.getString("ToString");
        try {
          txctl.deposit(amount, "ATM Deposit", accountId);
        } catch (RemoteException e) {
        } catch (IllegalArgumentException e) {
        } catch (AccountNotFoundException e) {
        } catch (IllegalAccountTypeException e) {
        }
View Full Code Here

Examples of com.sun.ebank.ejb.tx.TxController

      messages = null;
   }

    public String doTx() {
      String message = null;
      TxController txCtl = beanManager.getTxController();

      try {
         txCtl.transferFunds(transferAmount, "Transfer", fromAccountId, toAccountId);
      } catch (RemoteException e) {
        message = e.getMessage();
        Debug.print(message);
      } catch (InvalidParameterException e) {
        // Not possible
View Full Code Here

Examples of com.sun.ebank.ejb.tx.TxController

    selectedAccount = null;
  }

  public String doTx() {
    String message = null;
    TxController txctl = beanManager.getTxController();

    operationString = messages.getString("WithdrewString");
    prepString = messages.getString("FromString");
    Debug.print(accountId);


    beanManager.setAccount(accountId);
    selectedAccount = beanManager.getAccountDetails();
   
    boolean isCreditAcct = false;
    if (selectedAccount.getType().equals("Credit"))
      isCreditAcct = true;

    if (isCreditAcct) {
      if (operation == 0) { 
        try {
          txctl.makeCharge(amount, "ATM Withdrawal", accountId);
        } catch (RemoteException e) {
          Debug.print(message);
          return e.getMessage()
        } catch (InvalidParameterException e) {
          // Not possible
        } catch (AccountNotFoundException e) {
          // Not possible
        } catch (InsufficientCreditException e) {
          message = messages.getString("InsufficientCreditError");
          Debug.print(message);
        } catch (IllegalAccountTypeException e) {
          // Not possible
        }
      } else {
        operationString = messages.getString("DepositedString");
        prepString = messages.getString("ToString");
        try {
          txctl.makePayment(amount, "ATM Deposit", accountId);
        } catch (RemoteException e) {
          Debug.print(message);
          return e.getMessage();
        } catch (InvalidParameterException e) {
          // Not possible
        } catch (AccountNotFoundException e) {
          // Not possible
        } catch (IllegalAccountTypeException e) {
          // Not possible
        }
      }
    } else
      if (operation == 0) { 
        try {
          txctl.withdraw(amount, "ATM Withdrawal", accountId);
        } catch (RemoteException e) {
          Debug.print(message);
          return e.getMessage();
        } catch (InvalidParameterException e) {
          // Not possible
        } catch (AccountNotFoundException e) {
          // Not possible
        } catch (IllegalAccountTypeException e) {
          // Not possible
        } catch (InsufficientFundsException e) {
          message = messages.getString("InsufficientFundsError");
          Debug.print(message);
        }
      } else
        operationString = messages.getString("DepositedString");
        prepString = messages.getString("ToString");
        try {
          txctl.deposit(amount, "ATM Deposit", accountId);
        } catch (RemoteException e) {
          Debug.print(message);
          return e.getMessage();
        } catch (InvalidParameterException e) {
          // Not possible
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.