Ejemplo n.º 1
0
  /**
   * Business unit of work This method is used to add a new customer
   *
   * @param - new customer details
   * @return true or false whether the new customer is added or not
   */
  public boolean newCustomer(RhccCustInfos newCustomer) throws RemoteException {
    USFEnv.getLog().writeWarn(" Inside newCustomer", this, null);
    boolean bTmp = false;

    // Get the connection
    RhccCustInfos rhcc_obj = new RhccCustInfos(conn);

    try {
      if (conn != null) {
        bTmp = rhcc_obj.insertCustomerInfo(newCustomer);
        USFEnv.getLog()
            .writeDebug("newCustomer DB connection, ref: " + conn.toString(), this, null);
      }
    } catch (Exception e) {
      USFEnv.getLog().writeCrit("Error in business EJB: ", this, e);
    }
    return bTmp;
  }