geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r943780 - in /geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client: Axis2ClientConfigurationFactory.java Axis2ConfigGBean.java Axis2PortMethodInterceptor.java
Date Thu, 13 May 2010 03:14:57 GMT
Author: xuhaihong
Date: Thu May 13 03:14:56 2010
New Revision: 943780

URL: http://svn.apache.org/viewvc?rev=943780&view=rev
Log:
Remove unused imports and the deprecated classes

Modified:
    geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ClientConfigurationFactory.java
    geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ConfigGBean.java
    geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2PortMethodInterceptor.java

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ClientConfigurationFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ClientConfigurationFactory.java?rev=943780&r1=943779&r2=943780&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ClientConfigurationFactory.java
(original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ClientConfigurationFactory.java
Thu May 13 03:14:56 2010
@@ -23,7 +23,6 @@ import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.jaxws.ClientConfigurationFactory;
-import org.apache.axis2.jaxws.util.ClassLoaderUtils;
 import org.apache.geronimo.axis2.GeronimoConfigurator;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -31,18 +30,18 @@ import org.slf4j.LoggerFactory;
 public class Axis2ClientConfigurationFactory extends ClientConfigurationFactory
 {
     private static final Logger LOG = LoggerFactory.getLogger(Axis2ClientConfigurationFactory.class);
-    
-    private Map<ClassLoader, ConfigurationContext> contextCache = 
+
+    private Map<ClassLoader, ConfigurationContext> contextCache =
         new Hashtable<ClassLoader, ConfigurationContext>();
 
     private boolean reuseConfigurationContext;
-    
+
     public Axis2ClientConfigurationFactory(boolean reuse) {
         this.reuseConfigurationContext = reuse;
     }
-    
+
     public ConfigurationContext getClientConfigurationContext() {
-        ClassLoader cl = ClassLoaderUtils.getContextClassLoader(null);
+        ClassLoader cl = Thread.currentThread().getContextClassLoader();
         if (cl == null) {
             if (this.reuseConfigurationContext) {
                 cl = ClientConfigurationFactory.class.getClassLoader();
@@ -55,10 +54,10 @@ public class Axis2ClientConfigurationFac
             return getConfigurationContext(cl);
         }
     }
-    
+
     private ConfigurationContext getConfigurationContext(ClassLoader cl) {
         ConfigurationContext context = this.contextCache.get(cl);
-        if (context == null) {            
+        if (context == null) {
             context = createConfigurationContext();
             this.contextCache.put(cl, context);
             if (LOG.isDebugEnabled()) {
@@ -71,22 +70,22 @@ public class Axis2ClientConfigurationFac
         }
         return context;
     }
-    
+
     private ConfigurationContext removeConfigurationContext(ClassLoader cl) {
         return this.contextCache.remove(cl);
     }
-    
+
     public void clearCache() {
         this.contextCache.clear();
     }
-    
+
     public ConfigurationContext clearCache(ClassLoader cl) {
         ConfigurationContext context = null;
         if (cl != null) {
             synchronized (cl) {
                 context = removeConfigurationContext(cl);
             }
-            
+
             if (LOG.isDebugEnabled()) {
                 LOG.debug("Removed configuration context " + context + " for " + cl);
             }
@@ -94,7 +93,7 @@ public class Axis2ClientConfigurationFac
 
         return context;
     }
-    
+
     private ConfigurationContext createConfigurationContext() {
         try {
             GeronimoConfigurator configurator = new GeronimoConfigurator("META-INF/geronimo-axis2.xml");

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ConfigGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ConfigGBean.java?rev=943780&r1=943779&r2=943780&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ConfigGBean.java
(original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ConfigGBean.java
Thu May 13 03:14:56 2010
@@ -22,19 +22,18 @@ import org.apache.axis2.context.Configur
 import org.apache.axis2.jaxws.ClientConfigurationFactory;
 import org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl;
 import org.apache.axis2.metadata.registry.MetadataFactoryRegistry;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.Kernel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class Axis2ConfigGBean implements GBeanLifecycle {
 
     private final static Logger LOG = LoggerFactory.getLogger(Axis2ConfigGBean.class);
-    
+
     private AbstractName moduleName;
     private ClassLoader classLoder;
 
@@ -57,17 +56,17 @@ public class Axis2ConfigGBean implements
             LOG.debug("Registered client configuration factory: " + factory);
             // ensure that the factory was installed at the right time
             if (factory != DescriptionFactoryImpl.getClientConfigurationFactory()) {
-                throw new RuntimeException("Client configuration factory was registered too
late");           
+                throw new RuntimeException("Client configuration factory was registered too
late");
             }
             return (Axis2ClientConfigurationFactory)factory;
         }
     }
-    
+
     public void doStart() throws Exception {
         registerClientConfigurationFactory();
     }
-    
-    public void doStop() throws Exception {             
+
+    public void doStop() throws Exception {
         ConfigurationContext configContext =
             registerClientConfigurationFactory().clearCache(this.classLoder);
         DescriptionFactoryImpl.clearServiceDescriptionCache(configContext);
@@ -80,14 +79,14 @@ public class Axis2ConfigGBean implements
 
     static {
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(Axis2ConfigGBean.class,
Axis2ConfigGBean.class, GBeanInfoBuilder.DEFAULT_J2EE_TYPE);
-                
+
         infoFactory.addAttribute("classLoader", ClassLoader.class, false);
         infoFactory.addAttribute("kernel", Kernel.class, false);
         infoFactory.addAttribute("configurationBaseUrl", URL.class, true);
         infoFactory.addAttribute("moduleName", AbstractName.class, true);
-        
+
         infoFactory.setConstructor(new String[]{"classLoader", "kernel", "configurationBaseUrl",
"moduleName"});
-        
+
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2PortMethodInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2PortMethodInterceptor.java?rev=943780&r1=943779&r2=943780&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2PortMethodInterceptor.java
(original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2PortMethodInterceptor.java
Thu May 13 03:14:56 2010
@@ -26,7 +26,6 @@ import javax.xml.ws.handler.Handler;
 import net.sf.cglib.proxy.MethodProxy;
 
 import org.apache.axis2.description.AxisService;
-import org.apache.axis2.jaxws.description.EndpointDescription;
 import org.apache.axis2.jaxws.description.impl.DescriptionUtils;
 import org.apache.axis2.jaxws.spi.BindingProvider;
 import org.apache.geronimo.jaxws.client.EndpointInfo;
@@ -37,20 +36,20 @@ public class Axis2PortMethodInterceptor 
     public Axis2PortMethodInterceptor(Map<Object, EndpointInfo> seiInfoMap) {
         super(seiInfoMap);
     }
-    
+
     public Object intercept(Object target, Method method, Object[] arguments, MethodProxy
methodProxy) throws Throwable {
         Object proxy = super.intercept(target, method, arguments, methodProxy);
-        
+
         BindingProvider axisProxy = (BindingProvider) proxy;
-        
-        List<Handler> handlers = 
+
+        List<Handler> handlers =
             (axisProxy.getBinding() != null) ? axisProxy.getBinding().getHandlerChain() :
null;
         AxisService axisService =
             (axisProxy.getEndpointDescription() != null) ? axisProxy.getEndpointDescription().getAxisService()
: null;
-        
+
         DescriptionUtils.registerHandlerHeaders(axisService, handlers);
-        
+
         return proxy;
     }
-    
+
 }
\ No newline at end of file



Mime
View raw message