axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rolando Cuevas" <rcnun...@gmail.com>
Subject Re: axis2 with spring and application scope
Date Thu, 22 Nov 2007 14:10:49 GMT
On Nov 22, 2007 9:39 AM, robert lazarski <robertlazarski@gmail.com> wrote:
> Does your class have "implements ServiceLifeCycle" ?  Basically,
> ServiceLifeCycle is a axis2 supplied way to do init somewhat like what
> HttpServlet and load-on-startup does - mostly for  any type of inside
> the aar init IIRC. So ServiceLifeCycle is just one option.

Yes The class I use to init Spring implements ServiceLifeCycle.
There are no exceptions in the log. I see the startup method is
called. Also the log shows the spring beans are created.
However when the service is called, the needed beans are not there.
When the service has application scope, it seems as if the classes for
the services are obtained by Axis itself (without using spring)
I also tested the exploded version of my service. It shows the same
behavior, the needed bean s are null.

The easiest way to reproduce the situation is to modify the sample
service pojoguidespring (from axis distribution). When services.xml is
modified to use application scope, the service does not work. (the
sample pojoguidespring works when using scope request).

Thanks.

> Perhaps Deepal can comment on application scope with ServiceLifeCycle
> as I've never tried that. Are you seeing any exceptions in the logs?
>
> I know its possible to run spring outside the aar, using the servlet
> container to init spring via putting all the spring jars in
> WEB-INF/lib .
>
> HTH,
> Robert
>
>
> On Nov 22, 2007 8:08 AM, Rolando Cuevas <rcnunhes@gmail.com> wrote:
> > I'm using axis2 1.3 with spring 2.0.4. Maybe I'm doing something
> > wrong, I have a <servicegroup> and the services inside the group have
> > scope="application". The services are spring beans, and they
> > themselves use other springbeans. I tested that the scope is working.
> > However, the services are not injected with  the beans they need. (the
> > beans that the services use are null)
> >
> > If you modify the sample service pojoguidespring (from axis
> > distribution) to use application scope, it does not work.
> > (from services.xml
> >   <service name="SpringInit" class="sample.spring.service.SpringInit"
> > scope="application">
> >   <service name="WeatherSpringService" scope="application">
> > )
> > However when not setting scope (which defaults to request) sample
> > service pojoguidespring  works.
> >
> > Is there a way to use Spring with a servicegroup and services with
> > application scope?
> >
> > Thanks in advance.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message