So, is this not relevant? I try to make things cross container, but if it's
global then I'd like to use final methods when I don't want the bean's
methods extended.

http://stackoverflow.com/questions/20681981/why-cdi-beans-dont-support-final-methods

On Fri, Aug 7, 2015 at 11:39 AM, Romain Manni-Bucau <[email protected]>
wrote:

> Le 7 août 2015 08:04, "Steve Goldsmith" <[email protected]> a écrit :
> >
> > Since CDI beans do not support final methods could I make filter final by
> > using @Vetoed?
> >
>
> Yes but cdi does support it if the bean is dependent ;)
>
> > On Fri, Aug 7, 2015 at 10:54 AM, Romain Manni-Bucau <
> [email protected]
> >
> > wrote:
> >
> > > just curiosity: remove @Singleton and making the class @Vetoed should
> > > ensure it is not a CDI bean or an EJB so it would be a bit faster for
> this
> > > particular impl.
> > >
> > >
> > > Romain Manni-Bucau
> > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > <http://rmannibucau.wordpress.com> | Github <
> > > https://github.com/rmannibucau> |
> > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > <http://www.tomitribe.com>
> > >
> > > 2015-08-07 7:48 GMT-07:00 sgjava <[email protected]>:
> > >
> > > > This is what I ended up with:
> > > >
> > > > @Singleton
> > > > @Provider
> > > > public class ServerResponseLoggingFilter implements
> > > ContainerResponseFilter
> > > > {
> > > >
> > > >     /**
> > > >      * Logger.
> > > >      */
> > > >     //CHECKSTYLE:OFF ConstantName
> > > >     private static final Logger log = LoggerFactory.
> > > >             getLogger(ServerResponseLoggingFilter.class);
> > > >     //CHECKSTYLE:ON ConstantName
> > > >
> > > >    @Override
> > > >     public void filter(final ContainerRequestContext requestContext,
> > > >             final ContainerResponseContext responseContext) {
> > > >         log.debug(String.format("Entity: %s",
> > > > responseContext.getEntity()));
> > > >     }
> > > > }
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > >
>
> http://tomee-openejb.979440.n4.nabble.com/ContainerResponseFilter-for-logging-tp4675772p4675778.html
> > > > Sent from the TomEE Users mailing list archive at Nabble.com.
> > > >
> > >
> >
> >
> >
> > --
> > Steven P. Goldsmith
>



-- 
Steven P. Goldsmith

Reply via email to