Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-1737

Properties from javax.ws.rs.core.Application.getProperties are not registered

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 7.0.0.ER4
    • 7.0.0.DR13 (Alpha)
    • REST
    • None
    • Hide

      HttpServer server = HttpServer.create(new InetSocketAddress(9998), 1);
      HttpContextBuilder contextBuilder = new HttpContextBuilder();
      Application application = new Application() {
      @Override
      public Map<String, Object> getProperties()

      { return Collections.<String, Object> singletonMap("Prop1", "Value1"); }

      @Override
      public Set<Class<?>> getClasses()

      { Set<Class<?>> classes = new HashSet<>(); classes.add(UsersResource.class); classes.add(ServerSecurityFeature.class); return classes; }

      @Override
      public Set<Object> getSingletons() {
      return Collections.<Object> singleton(new Feature() {
      @Override
      public boolean configure(FeatureContext featureContext)

      { // Always return false event if the property is // correctly registered return featureContext.getConfiguration() .getProperties().containsKey("Prop1"); }

      });
      }

      };
      contextBuilder.getDeployment().setApplication(application);
      HttpContext context = contextBuilder.bind(server);
      server.start();

      Show
      HttpServer server = HttpServer.create(new InetSocketAddress(9998), 1); HttpContextBuilder contextBuilder = new HttpContextBuilder(); Application application = new Application() { @Override public Map<String, Object> getProperties() { return Collections.<String, Object> singletonMap("Prop1", "Value1"); } @Override public Set<Class<?>> getClasses() { Set<Class<?>> classes = new HashSet<>(); classes.add(UsersResource.class); classes.add(ServerSecurityFeature.class); return classes; } @Override public Set<Object> getSingletons() { return Collections.<Object> singleton(new Feature() { @Override public boolean configure(FeatureContext featureContext) { // Always return false event if the property is // correctly registered return featureContext.getConfiguration() .getProperties().containsKey("Prop1"); } }); } }; contextBuilder.getDeployment().setApplication(application); HttpContext context = contextBuilder.bind(server); server.start();

      Properties from javax.ws.rs.core.Application.getProperties are not registered by ResteasyProviderFactory.
      ResteasyDeployment.processApplication() seems to only care about Application.getClasses() and Application.getSingletons() not Application.getProperties()

            rsigal@redhat.com Ronald Sigal
            kanovotn Katerina Odabasi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: