/**
   * Constructor
   *
   * @param prop The resource adapter properties
   * @param type The connection type
   */
  public HornetQRAConnectionRequestInfo(final HornetQRAProperties prop, final int type) {
    if (HornetQRAConnectionRequestInfo.trace) {
      HornetQRALogger.LOGGER.trace("constructor(" + prop + ")");
    }

    userName = prop.getUserName();
    password = prop.getPassword();
    clientID = prop.getClientID();
    this.type = type;
    transacted = true;
    acknowledgeMode = Session.AUTO_ACKNOWLEDGE;
  }
  /**
   * Fill in default values if they are missing
   *
   * @param prop The resource adapter properties
   */
  public void setDefaults(final HornetQRAProperties prop) {
    if (HornetQRAConnectionRequestInfo.trace) {
      HornetQRALogger.LOGGER.trace("setDefaults(" + prop + ")");
    }

    if (userName == null) {
      userName = prop.getUserName();
    }
    if (password == null) {
      password = prop.getPassword();
    }
    if (clientID == null) {
      clientID = prop.getClientID();
    }
  }