tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Luis Cetina <maxtorz...@gmail.com>
Subject Re: JAX-RS
Date Thu, 16 Oct 2014 17:53:49 GMT
Thanks @Romain, then how can i use the "standard way" of JAX-RS filter with
Tomee? I want to use ContainerResponseFilter is possible? if yes, how?

2014-10-16 12:49 GMT-05:00 Romain Manni-Bucau <rmannibucau@tomitribe.com>:

> 2014-10-16 19:47 GMT+02:00 José Luis Cetina <maxtorzito@gmail.com>:
> > Hi i want to use a Filter for my rest services, im reading the apache cxf
> > doc, i could create my filter implementing RequestHandler interfaces and
> > start using it.
> >
> > After reading more i saw this:
> > CXF RequestHandler and ResponseHandler filters have been removed, please
> > use JAX-RS 2.0 ContainerRequestFilter and ContainerResponseFilter and
> also
> > WriterInterceptor and ReaderInterceptor when needed.  (
> > http://cxf.apache.org/docs/30-migration-guide.html )
> >
> > Then i try to change RequestHandler to ContainerResponseFilter when i try
> > to run my webapp i could see java.lang.NoClassDefFoundError:
> > javax/ws/rs/container/ContainerRequestFilter.
> >
> > Then i have this questions.
> >
> > 1. What version of Apache CXF is using TomEE 1.7.1? i guess 2.6.14 can i
> > upgrade to apaache cxf 3.x? if yes, how?  which jars do i have to remove?
> >
>
> No you cant'
>
> > 2. Is ContainerRequestFilter only available in CXF 3.x? If no then why im
> > getting NoClassDefFoundError?
> >
>
> In jaxrs2 actually but yes
>
> > 3. Is possible to inject and ejb using @EJB into this filter? Because i
> > tried and always is null. If is possible how?
> >
>
> not in cxf components
>
> > 4. Is ContainerResponseFilter the "standard way" to use filters in
> jax-rs?
> > If yes how can i use it, do i need another dependency?
> >
>
> cxf has a nice page speaking about difference between cxf interceptors
> and jaxrs new APIs, this is not 1-1 and cxf interceptors are still
> useful but yes jaxrs has now a standard API to use if possible. Note
> in cxf 3 handler were removed for standard filters.
>
> >
> > I just want to use a JAX-RS filter i dont care to use CXF interceptors or
> > filters extended.
> >
> >
> > Im using TomEE 1.7.1 JAX-RS
> >
> > --
> > -------------------------------------------------------------------
> > *José Luis Cetina*
> > -------------------------------------------------------------------
>



-- 
-------------------------------------------------------------------
*José Luis Cetina*
-------------------------------------------------------------------

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message