code: public static SoaFeatures getFeatures(Environment environment)
      {
          SoaFeaturesImpl features = (SoaFeaturesImpl)environment.getApplicationContext().getAttribute(SoaFeatures.class.getName());
          if ( features == null )
          {
              features = new SoaFeaturesImpl();   // temp version so that named values can be set
              environment.getApplicationContext().setAttribute(SoaFeatures.class.getName(), features);
          }
  
          if ( !features.hasDynamicAttributes() )
          {
              DynamicAttributes dynamicAttributes = (DynamicAttributes)environment.getApplicationContext().getAttribute(DynamicAttributes.class.getName());
              features.setDynamicAttributes(dynamicAttributes);
          }
  
          return features;
      }
docs: Return the SoaFeatures instance. Note: the instance is also
  registered in Jersey's dependency injection framework.
  
  @param environment Dropwizard environment
  @return SoaFeatures instance