Issue 12414

Webservice resource interceptors not bound

12414
Reporter: mdoering
Assignee: kbraak
Type: Bug
Summary: Webservice resource interceptors not bound
Priority: Critical
Resolution: Fixed
Status: Closed
Created: 2012-11-27 13:54:40.318
Updated: 2013-12-06 12:06:30.22
Resolved: 2012-12-19 14:35:20.858
        
Description: Some of our webservices are annotated with NullForNotFound which should result into a NullToNotFoundInterceptor being bound to that method via guice in the common-ws WsJerseyModule.
This does never seem to happen, I suspect as the web resource classes are created by jersey via package scanning that they are not going through our guice injector. This needs to be verified and a solution proposed how we can bind the interceptors. Alternatively as the NullToNotFoundInterceptor is the only current service side interceptor we might get by not using interceptors at all]]>
    


Author: mdoering@gbif.org
Comment: ChecklistBankWsModuleTest checks this for clb which caused the original problem in the portal, but the test runs fine and interceptors are applied. Maybe all this is just a maven snapshot dependency hickup and after cleaning we"re all good?
Created: 2012-11-28 16:09:24.906
Updated: 2012-11-28 16:09:24.906


Author: kbraak@gbif.org
Created: 2012-12-18 18:03:39.188
Updated: 2012-12-18 18:03:39.188
        
The root of this problem was fixed in POR-399. Basically what was happening, was that the MetricsWsClient and ChecklistBankWsClientModule had not been properly installed/instantiated due to problems with calls to their constructors. The client packages weren't properly used in the call to the constructor, and therefore, the package scanning where the interceptors get bound was not happening.

To build on the work in POR-399, I created a new test class that will test that each module gets properly installed. I have only added a test for ChecklistBankWsClientModule so far, and you can see the work here: http://dev.gbif.org/code/changelog/gbif-portal?cs=1270 [~mdoering@gbif.org] Do you think it's worth continuing work on this test class? 
    


Author: mdoering@gbif.org
Comment: yes, probably worthwhile. But better call it PortalModuleIT as its an integration test. Not a very high priority though if all interceptors are indeed bound and working now
Created: 2012-12-18 22:30:48.45
Updated: 2012-12-18 22:30:48.45


Author: kbraak@gbif.org
Created: 2012-12-19 14:35:20.889
Updated: 2012-12-19 14:35:20.889
        
I'd like to close this issue, since all interceptors are indeed bound and working now.

I renamed the test class to PortalModuleIT as you suggested, and extended it a little more. See: http://code.google.com/p/gbif-portal/source/detail?r=1271