axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Douglas Bitting <Douglas.Bitt...@agile.com>
Subject RE: PATCH: JavaProvider.java
Date Tue, 20 Aug 2002 15:03:06 GMT
Well, I guess I should have put the two submitted patches together and explained a little more.
 It was late (for me, anyway) and I wanted to check
one more thing off my to-do list... :-)

The issue was that I needed a way to have a service loaded with my own classloader, which
is setup within one of my flow handlers.  The MessageContext
had the methods to support it.  JavaProvider had the comment suggesting that it should be
supported.  However, two changes were needed in order to
make it so: this change to JavaProvider, and the other change to WSDDService.  I'm sure there
are other ways to deal with this (i.e., loading services
from a custom classloader based on some logic within a flow handler), similar to how the JWS
processing happens, but this allowed me to reuse all
existing Axis logic... all I had to do was stipulate which class loader to use.

Thanks,
--Doug

-----Original Message-----
From: Davanum Srinivas [mailto:dims@yahoo.com]
Sent: Tuesday, August 20, 2002 5:27 AM
To: axis-dev@xml.apache.org
Subject: Re: PATCH: JavaProvider.java


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 <Douglas.Bitting@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

Mime
View raw message