Right, so it sounds like the service method needs to call another annotated
method, thus the DTO (which is serializable) will be cached, not the
response. Is there something planned in JAX-RS maybe to support this? It
seems like something that would be a common requirement.

On Thu, Dec 3, 2015 at 5:22 PM, Romain Manni-Bucau <[email protected]>
wrote:

> Not returning response and or cache in next app layer. Alternative is to
> wrap the response in a serialisable one in an interceptor but a response is
> not a simple dto so doesnt sound the easiest with not a lot of benefits.
> Le 3 déc. 2015 23:15, "sgjava" <[email protected]> a écrit :
>
> > I'm trying to cache a JAX-RS Response using
> >
> >     @Path("/somepath")
> >     @POST
> >     @CacheResult(cacheName = "customerSTBData", cacheKeyGenerator
> >             = CustStbDtoKeyGenerator.class)
> >     public Response getCustomerSTBData(final CustStbDto custStbDto)
> >
> > And I'm getting:
> >
> > Caused by:
> com.hazelcast.nio.serialization.HazelcastSerializationException:
> > There is no suitable serializer for class
> > org.apache.cxf.jaxrs.impl.ResponseImpl
> >
> > This is usually caused by not having a default constructor which Response
> > doesn't:
> >
> >     protected Response() {
> >     }
> >
> > Is there a simple solution to this?
> >
> >
> >
> > --
> > View this message in context:
> >
> http://tomee-openejb.979440.n4.nabble.com/JCache-with-javax-ws-rs-core-Response-tp4677129.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
> >
>



-- 
Steven P. Goldsmith

Reply via email to