public void setProperty(String name, Object value) throws java.lang.IllegalArgumentException {
    if (name == null || value == null || !fPropertyManager.containsProperty(name)) {
      throw new IllegalArgumentException("Property " + name + "is not supported");
    }
    if (name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)) {
      fReuseInstance = ((Boolean) value).booleanValue();
      if (DEBUG) System.out.println("fReuseInstance is set to " + fReuseInstance);

      // TODO: XMLStreamWriters are not Thread safe,
      // don't let application think it is optimizing
      if (fReuseInstance) {
        throw new IllegalArgumentException(
            "Property " + name + " is not supported: XMLStreamWriters are not Thread safe");
      }
    } else { // for any other property set the flag
      // REVISIT: Even in this case instance can be reused, by passing PropertyManager
      fPropertyChanged = true;
    }
    fPropertyManager.setProperty(name, value);
  }