Hi Willem,
On 05/10/2011 04:02 PM, Willem Jiang wrote:
Hi Alessio,
I checked the code of CXF before I commit the patch, there is no code
which set the ClassLoad extension on the bus. I think the patch just
bring the issue of ClientImpl::doInvoke() to the table.
Yes, I agree.
The ClassLoader extension is useful in the OSGi environment. If we can
set the right TCCL (that could be a application bundle classloader),
the application can be a good citizen of the OSGi.
I think that is why CXF 2.4.x ClientImpl::doInvoke did that kind of
change. Anyway, it's worth documenting :)
A "svn blame" tells that change in ClientImpl came in rev.
------------------------------------------------------------------------
r1087406 | dkulp | 2011-03-31 20:40:03 +0200 (Thu, 31 Mar 2011) | 1 line
Get jaxws:client working in blueprint
------------------------------------------------------------------------
Dan, any insight / opinion here?
Thanks
Alessio
Willem
On 5/10/11 9:26 PM, Alessio Soldano wrote:
Hi,
I'm looking at the changes for CXF-3497 as it seems I've a regression
because of that.
As far as I understand, the ClassLoader that was used to create the bus
application context is stored within the bus as an extension.
Given the same extension is then later retrieved in
ClientImpl::doInvoke(..) and used (when available) to override the
current thread classloader, each client using that bus ends up using
that specific classloader. While I won't probably object to this
behaviour, this seems to me a major change to the default behaviour for
the user, am I wrong / missing something? It might be worth documenting
/ applying in 2.4.x only?
Cheers
Alessio
On 05/06/2011 12:30 PM, [email protected] wrote:
Author: ningjiang
Date: Fri May 6 10:30:54 2011
New Revision: 1100162
URL: http://svn.apache.org/viewvc?rev=1100162&view=rev
Log:
CXF-3497 Set the ClassLoader Extension when the bus is load from Spring
Modified:
cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java
Modified:
cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java?rev=1100162&r1=1100161&r2=1100162&view=diff
==============================================================================
---
cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java
(original)
+++
cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java
Fri May 6 10:30:54 2011
@@ -57,6 +57,10 @@ public class SpringBus extends Extension
}
ac = ac.getParent();
}
+
+ // set the classLoader extension with the application context
classLoader
+ setExtension(applicationContext.getClassLoader(), ClassLoader.class);
+
setExtension(new ConfigurerImpl(applicationContext), Configurer.class);
ResourceManager m = getExtension(ResourceManager.class);
--
Alessio Soldano
Web Service Lead, JBoss