1 Reply Latest reply on Jan 29, 2011 7:20 AM by Aslak Knutsen

    Testing Web Services in Jetty - Interceptor not working

    sschaffert Newbie



      I am trying to set up testing of RESTeasy web services (using Apache HttpClient) in Jetty 6 with CDI/Weld using Arquillian. Everything works mostly, but unfortunately in the test setting the CDI Interceptors I defined for the project are not executed (or are only sometimes executed?). In standalone Jetty (run from Gradle) outside the testing environment everything runs perfectly, but not in Arquillian Jetty.


      My guess is that it is related to Arquillian providing its own configuration to Jetty, so that my project configuration in jetty-web.xml is ignored and thus the jetty-annotations configuration is not executed. This is based on the following statements in the log that do not appear when running standalone:


      11:28:50.693 [Outgoing Connection channel:tcp://localhost:57977!0 Thread 3] INFO  org.mortbay.log - org.jboss.arquillian.container.jetty.embedded_6_1.CompositeConfiguration does not support annotations on source. Use org.mortbay.jetty.annotations.Configuration instead


      Any ideas how to solve this? If the Arquillian team can reproduce this, maybe the easiest solution is to add the annotations configuration to the CompositeConfiguration for jetty 6.1.