On May 29, 2013, at 1:52 PM, "KARR, DAVID" <[email protected]> wrote:
>> -----Original Message----- >> From: KARR, DAVID >> Sent: Wednesday, May 29, 2013 9:34 AM >> To: [email protected] >> Subject: Need to turn off keepalive for cxf jax-rs requests? >> >> I have a CXF JAX-RS app running within a larger EAR serving normal web pages, >> running in WebLogic. >> >> We're seeing occurrences of the following exception: >> >> Caused by: java.lang.NullPointerException >> at >> weblogic.servlet.internal.ServletRequestImpl$SessionHelper.initSessionInfo(Se >> rvletRequestImpl.java:2611) >> >> From the google results for this, it appears that WebLogic is caching a >> request object that should not be cached (or something like that). The >> recommended solution is to "disable keepalive". Is this something I can do >> in the CXF controller, or perhaps in an outbound interceptor? > > Assuming turning off keepalive is what I need to do, I assume I need to write > a class extending "AbstractOutDatabindingInterceptor" (as described at < > http://cxf.apache.org/docs/jax-rs-filters.html#JAX-RSFilters-Overridingresponsestatuscodeandheaders>) > and add a "Keep-Alive: timeout=0" header, and reference this bean in the > "jaxrs:outInterceptors" section of my "jaxrs:server" definition. Does this > seem like the right thing to do? Probably. Maybe add a "Connection: Close" header as well. -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
