Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
Description
Giuseppe Rogato found this problem and reported a solution in the mailinglist. Thank you so much!!
-------- Original Message --------
Subject: [Hippo-cms7-user] Jaxrs Service Configuration
Date: Tue, 31 Jan 2012 10:51:27 +0100
From: Giuseppe Rogato
To: Hippo CMS 7 development public mailinglist <hippo-cms7-user@lists.onehippo.org>
Hi guys
since hst 2.22.09 i noticed a small issue in the class org.hippoecm.hst.jaxrs.cxf.CXFJaxrsService.
Basically the method createBus
is used to configure all the CXF Bus Incerceptors but all the interceptors are managed as InInterceptor
That the actual implementation: (hst 2.22.10)
protected Bus createBus() {
BusFactory.setThreadDefaultBus(null);
Bus bus = BusFactory.getThreadDefaultBus(true);
if (inInterceptors != null && !inInterceptors.isEmpty())
{ bus.getInInterceptors().addAll(inInterceptors); }if (inFaultInterceptors != null && !inFaultInterceptors.isEmpty()) { bus.getInInterceptors().addAll(inFaultInterceptors); }
if (outInterceptors != null && !outInterceptors.isEmpty()) { bus.getInInterceptors().addAll(outInterceptors); }
if (outFaultInterceptors != null && !outFaultInterceptors.isEmpty()) { bus.getInInterceptors().addAll(outFaultInterceptors); }
return bus;
}
I have fixed the issue changing the implementation in this way:
protected Bus createBus() {
BusFactory.setThreadDefaultBus(null);
Bus bus = BusFactory.getThreadDefaultBus(true);
if (inInterceptors != null && !inInterceptors.isEmpty()) { bus.getInInterceptors().addAll(inInterceptors); }
if (inFaultInterceptors != null && !inFaultInterceptors.isEmpty())
{ bus.getInFaultInterceptors().addAll(inFaultInterceptors); }if (outInterceptors != null && !outInterceptors.isEmpty())
{ bus.getOutInterceptors().addAll(outInterceptors); }if (outFaultInterceptors != null && !outFaultInterceptors.isEmpty())
{ bus.getOutFaultInterceptors().addAll(outFaultInterceptors); } return bus;
}