You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Davanum Srinivas <da...@gmail.com> on 2006/08/01 20:34:18 UTC

Re: [axis2] use spring configured bean inside axis2 as implementation class

Dave,Shaowei,

If you pick up tonight's nightly, i've fixed this issue class loader
problem and you won't need the hack.

thanks,
dims

On 7/31/06, Shaowei Mao <sm...@amindsolutions.com> wrote:
>
>
>
>
> Dave, thanks for info. I solved class loader problem by setting current
> thread context class loader. This should work for me now.
>
>
>
> Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
>
>
>
>  ________________________________
>
>
> From: Dave Andreasen [mailto:davea@knetica.com]
>  Sent: Monday, July 31, 2006 1:11 PM
>  To: axis-user@ws.apache.org; smao@amindsolutions.com
>  Subject: RE: [axis2] use spring configured bean inside axis2 as
> implementation class
>
>
>
>
> I had the same issue.  The problem is related to the Service using it's own
> classloader and Spring wanting to use the thread context classloader.  See
> http://issues.apache.org/jira/browse/AXIS2-400.
>
>
>
> There have been some extensions made to support Spring in Axis2 in the
> nightly builds.  You try pulling them down to see if they help you out.
> Look at JIRA issue
> http://issues.apache.org/jira/browse/AXIS2-272 for more
> information
>
>
>
> I didn't use the extensions because they didn't apply to the approach we
> used for creating our Spring beans.  I did create an Axis module that loads
> my Spring beans on Axis startup.
>
>
>
> Hope this helps!
>
>
>
> Dave Andreasen
>
>
>
>  ________________________________
>
>
> From: Shaowei Mao [mailto:smao@amindsolutions.com]
>  Sent: Monday, July 31, 2006 2:59 PM
>  To: axis-user@ws.apache.org
>  Subject: [axis2] use spring configured bean inside axis2 as implementation
> class
>
>
>
> Hi, I am trying to use spring configured bean by creating spring container
> inside skeleton generated by wsdl2java to create my own implementation class
> for web service, but spring container BeanFactory can't load my classes
> packaged inside axis2 aar file. I think this is related to class loader
> aixs2 is using for each web service. Does anyone have sample code to solve
> this problem?
>
>
>
> Shaowei Mao
>
> aMind Solutions LLC
>
> Phone: 425-313-3107
>
> Email: smao@amindsolutions.com
>
> website: www.amindsolutions.com
>
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

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


Re: [axis2] use spring configured bean inside axis2 as implementation class

Posted by Davanum Srinivas <da...@gmail.com>.
http://mail-archives.apache.org/mod_mbox/ws-axis-cvs/200608.mbox/%3c20060801175621.0C96C1A981A@eris.apache.org%3e
http://mail-archives.apache.org/mod_mbox/ws-axis-cvs/200608.mbox/%3c20060801182408.ADF611A981D@eris.apache.org%3e

-- dims

On 8/1/06, Shaowei Mao <sm...@amindsolutions.com> wrote:
> How did you fix it?
>
> -----Original Message-----
> From: Davanum Srinivas [mailto:davanum@gmail.com]
> Sent: Tuesday, August 01, 2006 11:34 AM
> To: axis-user@ws.apache.org; smao@amindsolutions.com
> Subject: Re: [axis2] use spring configured bean inside axis2 as
> implementation class
>
> Dave,Shaowei,
>
> If you pick up tonight's nightly, i've fixed this issue class loader
> problem and you won't need the hack.
>
> thanks,
> dims
>
> On 7/31/06, Shaowei Mao <sm...@amindsolutions.com> wrote:
> >
> >
> >
> >
> > Dave, thanks for info. I solved class loader problem by setting current
> > thread context class loader. This should work for me now.
> >
> >
> >
> >
> Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader(
> ));
> >
> >
> >
> >  ________________________________
> >
> >
> > From: Dave Andreasen [mailto:davea@knetica.com]
> >  Sent: Monday, July 31, 2006 1:11 PM
> >  To: axis-user@ws.apache.org; smao@amindsolutions.com
> >  Subject: RE: [axis2] use spring configured bean inside axis2 as
> > implementation class
> >
> >
> >
> >
> > I had the same issue.  The problem is related to the Service using it's
> own
> > classloader and Spring wanting to use the thread context classloader.  See
> > http://issues.apache.org/jira/browse/AXIS2-400.
> >
> >
> >
> > There have been some extensions made to support Spring in Axis2 in the
> > nightly builds.  You try pulling them down to see if they help you out.
> > Look at JIRA issue
> > http://issues.apache.org/jira/browse/AXIS2-272 for more
> > information
> >
> >
> >
> > I didn't use the extensions because they didn't apply to the approach we
> > used for creating our Spring beans.  I did create an Axis module that
> loads
> > my Spring beans on Axis startup.
> >
> >
> >
> > Hope this helps!
> >
> >
> >
> > Dave Andreasen
> >
> >
> >
> >  ________________________________
> >
> >
> > From: Shaowei Mao [mailto:smao@amindsolutions.com]
> >  Sent: Monday, July 31, 2006 2:59 PM
> >  To: axis-user@ws.apache.org
> >  Subject: [axis2] use spring configured bean inside axis2 as
> implementation
> > class
> >
> >
> >
> > Hi, I am trying to use spring configured bean by creating spring container
> > inside skeleton generated by wsdl2java to create my own implementation
> class
> > for web service, but spring container BeanFactory can't load my classes
> > packaged inside axis2 aar file. I think this is related to class loader
> > aixs2 is using for each web service. Does anyone have sample code to solve
> > this problem?
> >
> >
> >
> > Shaowei Mao
> >
> > aMind Solutions LLC
> >
> > Phone: 425-313-3107
> >
> > Email: smao@amindsolutions.com
> >
> > website: www.amindsolutions.com
> >
> >
> >
>
>
> --
> Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
>
> ---------------------------------------------------------------------
> 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
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

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


RE: [axis2] use spring configured bean inside axis2 as implementation class

Posted by Shaowei Mao <sm...@amindsolutions.com>.
How did you fix it?

-----Original Message-----
From: Davanum Srinivas [mailto:davanum@gmail.com] 
Sent: Tuesday, August 01, 2006 11:34 AM
To: axis-user@ws.apache.org; smao@amindsolutions.com
Subject: Re: [axis2] use spring configured bean inside axis2 as
implementation class

Dave,Shaowei,

If you pick up tonight's nightly, i've fixed this issue class loader
problem and you won't need the hack.

thanks,
dims

On 7/31/06, Shaowei Mao <sm...@amindsolutions.com> wrote:
>
>
>
>
> Dave, thanks for info. I solved class loader problem by setting current
> thread context class loader. This should work for me now.
>
>
>
>
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader(
));
>
>
>
>  ________________________________
>
>
> From: Dave Andreasen [mailto:davea@knetica.com]
>  Sent: Monday, July 31, 2006 1:11 PM
>  To: axis-user@ws.apache.org; smao@amindsolutions.com
>  Subject: RE: [axis2] use spring configured bean inside axis2 as
> implementation class
>
>
>
>
> I had the same issue.  The problem is related to the Service using it's
own
> classloader and Spring wanting to use the thread context classloader.  See
> http://issues.apache.org/jira/browse/AXIS2-400.
>
>
>
> There have been some extensions made to support Spring in Axis2 in the
> nightly builds.  You try pulling them down to see if they help you out.
> Look at JIRA issue
> http://issues.apache.org/jira/browse/AXIS2-272 for more
> information
>
>
>
> I didn't use the extensions because they didn't apply to the approach we
> used for creating our Spring beans.  I did create an Axis module that
loads
> my Spring beans on Axis startup.
>
>
>
> Hope this helps!
>
>
>
> Dave Andreasen
>
>
>
>  ________________________________
>
>
> From: Shaowei Mao [mailto:smao@amindsolutions.com]
>  Sent: Monday, July 31, 2006 2:59 PM
>  To: axis-user@ws.apache.org
>  Subject: [axis2] use spring configured bean inside axis2 as
implementation
> class
>
>
>
> Hi, I am trying to use spring configured bean by creating spring container
> inside skeleton generated by wsdl2java to create my own implementation
class
> for web service, but spring container BeanFactory can't load my classes
> packaged inside axis2 aar file. I think this is related to class loader
> aixs2 is using for each web service. Does anyone have sample code to solve
> this problem?
>
>
>
> Shaowei Mao
>
> aMind Solutions LLC
>
> Phone: 425-313-3107
>
> Email: smao@amindsolutions.com
>
> website: www.amindsolutions.com
>
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

---------------------------------------------------------------------
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