Package com.ibm.demo.entity

Examples of com.ibm.demo.entity.CustomerHomeRemote


  /**
   * @return
   */
  public List deniedLoans() {
   
    CustomerHomeRemote customerHome = null;
   
    try{
      Context jndiContext = new InitialContext();
      Object obj = jndiContext.lookup("java:comp/env/ejb/CustomerHomeRemote");

      customerHome = (CustomerHomeRemote) PortableRemoteObject.narrow(obj, CustomerHomeRemote.class);
    } catch (NamingException ne){
      System.out.println("Naming Exception: " + ne.getMessage());
    }
   
    List granted = new ArrayList();
   
    //loop through all customers
    CustomerRemote customer = null;
    for (int i = 1; ; i++){
      Integer pk = new Integer(i);
      try{
        customer = customerHome.findByPrimaryKey(pk);
      } catch(FinderException fe){
        System.out.println("Find Exception: " + fe.getMessage());
        break;
      } catch(RemoteException re){
        System.out.println("Remote Exception: " + re.getMessage());
View Full Code Here


   * @param loanAmount
   */
  public void submitLoanApplication(Integer id, String name, String address, Date birthdate,
                    String sssNo, Double annualSalary, Double loanAmount) {
   
    CustomerHomeRemote customerHome = null;
    CustomerRemote customer = null;
   
    try{
      Context jndiContext = new InitialContext();
      Object obj = jndiContext.lookup("java:comp/env/ejb/CustomerHomeRemote");

      customerHome = (CustomerHomeRemote) PortableRemoteObject.narrow(obj, CustomerHomeRemote.class);
    } catch (NamingException ne){
      System.out.println("Naming Exception: " + ne.getMessage());
    }
   
    try{
      customer = customerHome.create(id, name, sssNo, address, birthdate, annualSalary, loanAmount);
      submit_count++;
    } catch(RemoteException re){
      System.out.println("Remote Exception: " + re.getMessage());
    } catch(CreateException ce){
      System.out.println("Create Exception: " + ce.getMessage());
View Full Code Here

   * @return
   */
  public int getMaxPK(){
    int maxPK = 0;
   
    CustomerHomeRemote customerHome = null;
    CustomerRemote customer = null;
   
    try{
      Context jndiContext = new InitialContext();
      Object obj = jndiContext.lookup("java:comp/env/ejb/CustomerHomeRemote");

      customerHome = (CustomerHomeRemote) PortableRemoteObject.narrow(obj, CustomerHomeRemote.class);
    } catch (NamingException ne){
      System.out.println("Naming Exception: " + ne.getMessage());
    }
   
    for(int pk = 1;;pk++){
      try{
        customer = customerHome.findByPrimaryKey(new Integer(pk));
      } catch(FinderException fe){
        System.out.println("Find Exception: " + fe.getMessage());
        maxPK = pk - 1;
        break;
      } catch(RemoteException re){
View Full Code Here

TOP

Related Classes of com.ibm.demo.entity.CustomerHomeRemote

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.