You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Douglas Bitting <Do...@agile.com> on 2002/08/20 06:33:01 UTC

PATCH: JavaProvider.java

Here is a patch to JavaProvider.java that correctly queries the MessageContext for it's class loader.  There was already a comment about pulling the
class loader from the MessageContext, but there was no code in place.  This patch corrects that.

---- snip here ----
Index: src/org/apache/axis/providers/java/JavaProvider.java
===================================================================
RCS file: /home/cvspublic/xml-axis/java/src/org/apache/axis/providers/java/JavaProvider.java,v
retrieving revision 1.72
diff -r1.72 JavaProvider.java
458,459c458,465
<         // otherwise get the current threads classloader
<         cl = Thread.currentThread().getContextClassLoader();
---
>         // otherwise get the current thread's classloader
>         if (null != msgContext) {
>            cl = msgContext.getClassLoader();
>         }
>         
>         if (null == cl) {
>             cl = Thread.currentThread().getContextClassLoader();
>         }
---- snip here ----

Cheers,
--Doug

Doug Bitting
Agile Software
1 Almaden Blvd
San Jose, CA  95113
(408) 999-7120



Re: PATCH: JavaProvider.java

Posted by Davanum Srinivas <di...@yahoo.com>.
Doug,

This should not be required as all calls eventually filter down to ClassUtils.forName method. So
please let us know only if you see a problem.

Thanks,
dims

--- Douglas Bitting <Do...@agile.com> wrote:
> Here is a patch to JavaProvider.java that correctly queries the MessageContext for it's class
> loader.  There was already a comment about pulling the
> class loader from the MessageContext, but there was no code in place.  This patch corrects that.
> 
> ---- snip here ----
> Index: src/org/apache/axis/providers/java/JavaProvider.java
> ===================================================================
> RCS file: /home/cvspublic/xml-axis/java/src/org/apache/axis/providers/java/JavaProvider.java,v
> retrieving revision 1.72
> diff -r1.72 JavaProvider.java
> 458,459c458,465
> <         // otherwise get the current threads classloader
> <         cl = Thread.currentThread().getContextClassLoader();
> ---
> >         // otherwise get the current thread's classloader
> >         if (null != msgContext) {
> >            cl = msgContext.getClassLoader();
> >         }
> >         
> >         if (null == cl) {
> >             cl = Thread.currentThread().getContextClassLoader();
> >         }
> ---- snip here ----
> 
> Cheers,
> --Doug
> 
> Doug Bitting
> Agile Software
> 1 Almaden Blvd
> San Jose, CA  95113
> (408) 999-7120
> 
> 


=====
Davanum Srinivas - http://xml.apache.org/~dims/

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com