<div dir="ltr"><div><div><div><div>Hi Christian,<br></div>I could not find something like what you mentioned, in RESTEasy. AFAICS, the registry is meant for adding (registering) / removing resource factories and getting resource invokers. Btw, I suspect it won&#39;t be safe to alter a ResourceMethod metadata once it&#39;s been added to the registry. If that&#39;s really the case, you should probably kick in before a resource (factory) is actually added.<br></div>Have you looked at the resteasy-cdi integration btw? I&#39;m wondering if your scenario could be covered by extending the resteasy-cdi integration, considering you said that MVC controllers are CDI-based JAX-RS resources.<br></div>Cheers<br></div>Alessio<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 20, 2017 at 6:28 AM, Christian Kaltepoth <span dir="ltr">&lt;<a href="mailto:christian@kaltepoth.de" target="_blank">christian@kaltepoth.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Alessio,<div><br></div><div>thanks a lot for your reply. Yes, I saw the ResourceBuilder class and it looks quite interesting. But is there some kind of SPI which allows me to alter the resource model that RESTEasy creates for the discovered resources? Something like:</div><div><br></div><div><font face="monospace, monospace">    public interface ResourceModelPostProcessorPlug<wbr>in {</font></div><div><font face="monospace, monospace">        void process( <span style="color:rgb(36,41,46);font-size:12px;white-space:pre-wrap">ResourceClassBuilder builder </span>);</font></div><div><font face="monospace, monospace">    }</font></div><div class="gmail_extra"><br></div><div class="gmail_extra">Best regards<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra"><br></div><div class="gmail_extra">Christian Kaltepoth</div></font></span><div><div class="h5"><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-09-19 0:30 GMT+02:00 Alessio Soldano <span dir="ltr">&lt;<a href="mailto:asoldano@redhat.com" target="_blank">asoldano@redhat.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Christian,<br></div>sorry for the late reply, been on PTO for a couple of weeks.<br></div>Have you checked <a href="https://github.com/resteasy/Resteasy/blob/master/testsuite/unit-tests/src/test/java/org/jboss/resteasy/test/resource/ProgammaticTest.java#L59" target="_blank">https://github.com/resteasy/Re<wbr>steasy/blob/master/testsuite/<wbr>unit-tests/src/test/java/org/<wbr>jboss/resteasy/test/resource/<wbr>ProgammaticTest.java#L59</a> ? (produces(..) method). Is that what you&#39;re looking for?</div><div>Cheers</div><div>Alessio<br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_4503715142247034323h5">On Fri, Sep 8, 2017 at 5:47 PM, Christian Kaltepoth <span dir="ltr">&lt;<a href="mailto:christian@kaltepoth.de" target="_blank">christian@kaltepoth.de</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_4503715142247034323h5"><div dir="ltr">Hi,<div><br></div><div>My name is Christian Kaltepoth and I&#39;m specification lead of JSR 371 (MVC 1.0). As you may know, JSR 371 is about creating an action-based web framework on top of JAX-RS. </div><div><br></div><div><div>The reference implementation of JSR 371 was previously only targeted to support Jersey. But we want to change that. Therefore, we are currently looking for ways to integrate with other JAX-RS implementations. Unfortunately there are certain features which cannot be implemented using the plain JAX-RS API. That&#39;s why we are also looking into using JAX-RS implementation specific SPIs.</div><div><br></div><div>One thing we are currently working on is the following requirement: MVC controllers (which are just special CDI-based JAX-RS resources) should be treated as if they are annotated with @Produces(&quot;text/html) without the need to add the annotation manually. The current draft of the specification states:</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><i>The semantics of controller methods differ slightly from JAX-RS resource methods; [...] Moreover, the default media type for a response is assumed to be text/html , but otherwise can be declared using @Produces just like in JAX-RS.</i></blockquote></div><div><br></div><div>Jersey provides a special SPI which allows us to hook into the metadata for JAX-RS resources:</div><div><br></div><div><a href="https://github.com/jersey/jersey/blob/master/core-server/src/main/java/org/glassfish/jersey/server/model/ModelProcessor.java#L75" target="_blank">https://github.com/jersey/jers<wbr>ey/blob/master/core-server/src<wbr>/main/java/org/glassfish/jerse<wbr>y/server/model/ModelProcessor.<wbr>java#L75</a><br></div><div><br></div><div>Is there anything like that in RESTEasy? I looked into the code but unfortunately didn&#39;t find anything like that.</div><span class="m_4503715142247034323m_6818016017494719860HOEnZb"><font color="#888888"><div><br></div><div><br></div><div>Christian<br></div><div><br></div><div><br></div>-- <br><div class="m_4503715142247034323m_6818016017494719860m_-3485256363508612578m_5280828543437390495gmail_signature"><div>Christian Kaltepoth</div><div>Blog: <a href="http://blog.kaltepoth.de/" target="_blank">http://blog.kaltepoth.de/</a></div><div>Twitter: <a href="http://twitter.com/chkal" target="_blank">http://twitter.com/chkal</a></div><div>GitHub: <a href="https://github.com/chkal" target="_blank">https://github.com/chkal</a></div><div><br></div></div>
</font></span></div></div>
<br></div></div>______________________________<wbr>_________________<br>
resteasy-dev mailing list<br>
<a href="mailto:resteasy-dev@lists.jboss.org" target="_blank">resteasy-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/resteasy-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/resteasy-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_4503715142247034323gmail_signature" data-smartmail="gmail_signature"><div>Christian Kaltepoth</div><div>Blog: <a href="http://blog.kaltepoth.de/" target="_blank">http://blog.kaltepoth.de/</a></div><div>Twitter: <a href="http://twitter.com/chkal" target="_blank">http://twitter.com/chkal</a></div><div>GitHub: <a href="https://github.com/chkal" target="_blank">https://github.com/chkal</a></div><div><br></div></div>
</div></div></div></div>
</blockquote></div><br></div>