cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: How to make ServiceBeans created by CXF Servlet to be in prototype or HTTP Session Scope
Date Thu, 17 Jun 2010 14:23:43 GMT
Hi

JAXRS module also ships prototypes aware factories :
http://cxf.apache.org/docs/jax-rs.html#JAX-RS-Lifecyclemanagement

cheers, Sergey

On Thu, Jun 17, 2010 at 2:57 PM, Daniel Kulp <dkulp@apache.org> wrote:

>
>
> I believe the easiest way to do it is to just use the Spring AOP stuff and
> set
> the bookService bean to be scope=session.  Spring will handle the rest.
>
> Dan
>
>
> On Thursday 17 June 2010 6:19:21 am Balaji Sankar Chopparapu wrote:
> > Hi,
> >
> >
> >
> > We Observed Servicebeans created by
> > "org.apache.cxf.transport.servlet.CXFServlet” is always singleton. How
> can
> > I change their scope to prototype or in best case HTTP Session Scope?
> > Please Suggest.
> >
> >
> >
> >
> >
> > *WEB.xml:*
> >
> >         <servlet>
> >
> >                <servlet-name>CXFServlet</servlet-name>
> >
> >                <display-name>CXF Servlet</display-name>
> >
> >                <servlet-class>
> >
> >                        org.apache.cxf.transport.servlet.CXFServlet
> >
> >                </servlet-class>
> >
> >                <load-on-startup>1</load-on-startup>
> >
> >         </servlet>
> >
> > *Bean Definitions:*
> >
> > <jaxrs:server id="restServer" address="/services/">
> >
> >
> >
> >         <jaxrs:serviceBeans>
> >
> >             <ref bean="bookService"/>
> >
> > </jaxrs:serviceBeans>
> >
> >
> > Thanks in Advance,
> >
> > Balaji
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
>

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