svn commit: r1049485 - in /axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp: ./ util/

2010-12-15 Thread hemapani
Author: hemapani
Date: Wed Dec 15 10:46:37 2010
New Revision: 1049485

URL: http://svn.apache.org/viewvc?rev=1049485&view=rev
Log:
Fix a bug in the XMPP transport which lead to faluires when it is loaded

Modified:

axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/XMPPListener.java

axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/XMPPSender.java

axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPClientSidePacketListener.java

axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPConnectionFactory.java

axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPConstants.java

axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPOutTransportInfo.java

axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPPacketListener.java

axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPServerCredentials.java

Modified: 
axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/XMPPListener.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/XMPPListener.java?rev=1049485&r1=1049484&r2=1049485&view=diff
==
--- 
axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/XMPPListener.java
 (original)
+++ 
axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/XMPPListener.java
 Wed Dec 15 10:46:37 2010
@@ -19,6 +19,14 @@
 
 package org.apache.axis2.transport.xmpp;
 
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
 import org.apache.axiom.om.OMElement;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
@@ -39,20 +47,18 @@ import org.jivesoftware.smack.Roster;
 import org.jivesoftware.smack.XMPPConnection;
 import org.jivesoftware.smack.Roster.SubscriptionMode;
 
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-
 
 public class XMPPListener implements TransportListener {
+ 
+   /**
+ Uncomment this enable XMPP logging, this is useful for testing.   
+static {
+  XMPPConnection.DEBUG_ENABLED = true;
+}
+**/
 private static Log log = LogFactory.getLog(XMPPListener.class);
 private ConfigurationContext configurationContext = null;
-private String xmppServerUsername = "";
-private String xmppServerUrl = "";
+private XMPPServerCredentials serverCredentials;
 
 /**
  * A Map containing the connection factories managed by this, 
@@ -108,21 +114,20 @@ public class XMPPListener implements Tra
 }
 
 Iterator params = pi.getParameters().iterator();
-XMPPServerCredentials serverCredentials = 
-   new XMPPServerCredentials();
+serverCredentials = new XMPPServerCredentials();
 
 while (params.hasNext()) {
 Parameter param = (Parameter) params.next();
 if(XMPPConstants.XMPP_SERVER_URL.equals(param.getName())){
-   xmppServerUrl = (String)param.getValue();
-   serverCredentials.setServerUrl(xmppServerUrl);  

+   
serverCredentials.setServerUrl((String)param.getValue());   
 }else 
if(XMPPConstants.XMPP_SERVER_USERNAME.equals(param.getName())){
-   xmppServerUsername = (String) param.getValue();
-   serverCredentials.setAccountName(xmppServerUsername);
+   
serverCredentials.setAccountName((String)param.getValue());
 }else 
if(XMPPConstants.XMPP_SERVER_PASSWORD.equals(param.getName())){

serverCredentials.setPassword((String)param.getValue());
 }else 
if(XMPPConstants.XMPP_SERVER_TYPE.equals(param.getName())){
-   
serverCredentials.setServerType((String)param.getValue());  
+   
serverCredentials.setServerType((String)param.getValue());   
+}else 
if(XMPPConstants.XMPP_DOMAIN_NAME.equals(param.getName())){
+   
serverCredentials.

svn commit: r1049486 - in /axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util: XMPPClientConnectionFactory.java XMPPClientResponseManager.java

2010-12-15 Thread hemapani
Author: hemapani
Date: Wed Dec 15 10:47:27 2010
New Revision: 1049486

URL: http://svn.apache.org/viewvc?rev=1049486&view=rev
Log:
Fix a bug in the XMPP transport which lead to faluires when it is loaded, 
adding missing files

Added:

axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPClientConnectionFactory.java
   (with props)

axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPClientResponseManager.java
   (with props)

Added: 
axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPClientConnectionFactory.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPClientConnectionFactory.java?rev=1049486&view=auto
==
--- 
axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPClientConnectionFactory.java
 (added)
+++ 
axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPClientConnectionFactory.java
 Wed Dec 15 10:47:27 2010
@@ -0,0 +1,206 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.axis2.transport.xmpp.util;
+
+import org.apache.axis2.AxisFault;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jivesoftware.smack.ConnectionConfiguration;
+import org.jivesoftware.smack.ConnectionListener;
+import org.jivesoftware.smack.XMPPConnection;
+import org.jivesoftware.smack.XMPPException;
+import org.jivesoftware.smack.filter.FromContainsFilter;
+import org.jivesoftware.smack.filter.PacketFilter;
+import org.jivesoftware.smack.filter.ToContainsFilter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class XMPPClientConnectionFactory {
+   private static Log log = 
LogFactory.getLog(XMPPClientConnectionFactory.class);
+   private XMPPConnection xmppConnection = null;
+   private PacketFilter packetFilter = null;
+   private Map xmppConnections = new 
HashMap();
+   
+   public XMPPClientConnectionFactory(){}
+
+   /**
+* Connects to a XMPP server based on the details available in 
serverCredentials object
+* @param serverCredentials
+* @throws XMPPException 
+*/
+   public XMPPConnection connect(final XMPPServerCredentials 
serverCredentials) throws AxisFault {
+   //XMPPConnection.DEBUG_ENABLED = true;  
+   
if(XMPPConstants.XMPP_SERVER_TYPE_JABBER.equals(serverCredentials.getServerType())){
+   xmppConnection = new 
XMPPConnection(serverCredentials.getServerUrl());
+   try {
+   xmppConnection.connect();
+   } catch (XMPPException e) {
+   log.error("Failed to connect to server 
:"+serverCredentials.getServerUrl(), e);
+   throw new AxisFault("Failed to connect to 
server :"+serverCredentials.getServerUrl());
+   }
+   //Pause for a small time before trying to login.
+   //This prevents random ssl exception from Smack API
+   try {
+   Thread.sleep(100);
+   } catch (InterruptedException e5) {
+   log.debug("Sleep interrupted ",e5);
+   }
+
+   if(xmppConnection.isConnected()){
+   String resource = 
serverCredentials.getResource()+ new Object().hashCode();
+   if(! xmppConnection.isAuthenticated()){
+   try {
+   
//xmppConnection.login(serverCredentials.getAccountName()+"@"+
+   //
serverCredentials.getServerUrl(),
+   
xmppConnection.login(serverCredentials.getAccountName(), 
+ 

svn commit: r1051544 - in /axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl: Java2WSDL.java Java2WSDLCodegenEngine.java

2010-12-21 Thread hemapani
Author: hemapani
Date: Tue Dec 21 16:31:09 2010
New Revision: 1051544

URL: http://svn.apache.org/viewvc?rev=1051544&view=rev
Log:
fixing https://issues.apache.org/jira/browse/AXIS2-4540 by adding a log to 
print the WSDL

Modified:

axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java

axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java

Modified: 
axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java?rev=1051544&r1=1051543&r2=1051544&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java
 Tue Dec 21 16:31:09 2010
@@ -19,10 +19,14 @@
 
 package org.apache.ws.java2wsdl;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.ws.java2wsdl.utils.Java2WSDLCommandLineOptionParser;
 import org.apache.ws.java2wsdl.utils.Java2WSDLOptionsValidator;
 
 public class Java2WSDL {
+   private static Log log = LogFactory.getLog(Java2WSDL.class);
+   
 public static void main(String[] args) throws Exception {
 Java2WSDLCommandLineOptionParser commandLineOptionParser = new 
Java2WSDLCommandLineOptionParser(
 args);
@@ -30,6 +34,7 @@ public class Java2WSDL {
 validateCommandLineOptions(commandLineOptionParser);
 Java2WSDLCodegenEngine engine = new 
Java2WSDLCodegenEngine(commandLineOptionParser.getAllOptions());
 engine.generate();
+log.info("WSDL created at "+ engine.getOutputFile());
 }
 
 public static void printUsage() {

Modified: 
axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java?rev=1051544&r1=1051543&r2=1051544&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java
 Tue Dec 21 16:31:09 2010
@@ -37,6 +37,7 @@ public class Java2WSDLCodegenEngine impl
 private Java2WSDLBuilder java2WsdlBuilder;
 public static final String WSDL_FILENAME_SUFFIX = ".wsdl";
 public static final String COMMA = ",";
+private File outputFile;
 
 public Java2WSDLCodegenEngine(Map 
optionsMap) throws Exception {
 //create a new  Java2WSDLBuilder and populate it
@@ -82,7 +83,7 @@ public class Java2WSDLCodegenEngine impl
 }
 
 //first create a file in the given location
-File outputFile = new File(outputFolder, outputFileName);
+outputFile = new File(outputFolder, outputFileName);
 FileOutputStream out;
 try {
 if (!outputFile.exists()) {
@@ -289,4 +290,9 @@ public class Java2WSDLCodegenEngine impl
 }
 return pkg2nsMap;
 }
+
+   public File getOutputFile() {
+   return outputFile;
+}
+
 }




svn commit: r1051767 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/Utils.java

2010-12-21 Thread hemapani
Author: hemapani
Date: Wed Dec 22 06:17:36 2010
New Revision: 1051767

URL: http://svn.apache.org/viewvc?rev=1051767&view=rev
Log:
fixing https://issues.apache.org/jira/browse/AXIS2-4776

Modified:

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/Utils.java

Modified: 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/Utils.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/Utils.java?rev=1051767&r1=1051766&r2=1051767&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/Utils.java 
(original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/Utils.java 
Wed Dec 22 06:17:36 2010
@@ -262,6 +262,12 @@ public class Utils {
 if (path == null) {
 return null;
 }
+
+//with this chances that substring matching a different place in the 
URL is reduced
+if(!servicePath.endsWith("/")){
+   servicePath = servicePath+"/";
+}
+
 int index = path.lastIndexOf(servicePath);
 String serviceOpPart = null;
 
@@ -269,8 +275,8 @@ public class Utils {
 int serviceStart = index + servicePath.length();
 
 //get the string after services path
-if (path.length() > serviceStart + 1) {
-serviceOpPart = path.substring(serviceStart + 1);
+if (path.length() > serviceStart) {
+serviceOpPart = path.substring(serviceStart);
 
 //remove everything after ?
 int queryIndex = serviceOpPart.indexOf('?');




svn commit: r1051774 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java

2010-12-21 Thread hemapani
Author: hemapani
Date: Wed Dec 22 06:59:17 2010
New Revision: 1051774

URL: http://svn.apache.org/viewvc?rev=1051774&view=rev
Log:
apply patch for https://issues.apache.org/jira/browse/AXIS2-4566, thanks 
prabath for veiryfing this 

Modified:

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java

Modified: 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java?rev=1051774&r1=1051773&r2=1051774&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
 Wed Dec 22 06:59:17 2010
@@ -1124,6 +1124,7 @@ public abstract class DeploymentEngine i
 try {
 in = fileListUrl.openStream();
 } catch (IOException e) {
+   log.info(e.getMessage() + " -  as per axis2.repository.url, the 
URL is "+fileListUrl+" that will be used relative to "+new 
File(".").getAbsolutePath());
 return fileList;
 }
 BufferedReader input = null;




svn commit: r1051846 - /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java

2010-12-22 Thread hemapani
Author: hemapani
Date: Wed Dec 22 11:22:46 2010
New Revision: 1051846

URL: http://svn.apache.org/viewvc?rev=1051846&view=rev
Log:
Checking in fixes done by Pradeeban to 4524

Modified:

axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java

Modified: 
axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?rev=1051846&r1=1051845&r2=1051846&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
 Wed Dec 22 11:22:46 2010
@@ -20,7 +20,13 @@
 package org.apache.axis2.databinding.utils;
 
 
-import org.apache.axiom.om.*;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMAttribute;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMText;
+import org.apache.axiom.om.OMXMLBuilderFactory;
+import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.util.Base64;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
@@ -39,19 +45,29 @@ import java.beans.BeanInfo;
 import java.beans.IntrospectionException;
 import java.beans.Introspector;
 import java.beans.PropertyDescriptor;
-import java.lang.reflect.*;
-import java.util.*;
+import java.lang.reflect.Array;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
 
 
 public class BeanUtil {
 
 private static int nsCount = 1;
-
+private static Map beanInfoMap = new HashMap();
 
 /**
  * To Serilize Bean object this method is used, this will create an object 
array using given
  * bean object
- *
  */
 public static XMLStreamReader getPullParser(Object beanObject,
 QName beanName,
@@ -60,21 +76,21 @@ public class BeanUtil {
 boolean processingDocLitBare) {
 
 Class beanClass = beanObject.getClass();
-List propertyQnameValueList = getPropertyQnameList(beanObject,
-beanClass, beanName, typeTable, qualified, 
processingDocLitBare);
+List propertyQnameValueList = getPropertyQnameList(beanObject,
+   beanClass, 
beanName, typeTable, qualified, processingDocLitBare);
 
-ArrayList objectAttributes = new ArrayList();
+ArrayList objectAttributes = new ArrayList();
 
-if ((typeTable != null)){
+if ((typeTable != null)) {
 QName qNamefortheType = 
typeTable.getQNamefortheType(getClassName(beanClass));
-if (qNamefortheType != null){
+if (qNamefortheType != null) {
 objectAttributes.add(new QName(Constants.XSI_NAMESPACE, 
"type", "xsi"));
 objectAttributes.add(qNamefortheType);
 }
 }
 
 return new ADBXMLStreamReaderImpl(beanName, 
propertyQnameValueList.toArray(), objectAttributes.toArray(),
-typeTable, qualified);
+  typeTable, qualified);
 
 }
 
@@ -86,6 +102,35 @@ public class BeanUtil {
 return name;
 }
 
+
+private static BeanInfo getBeanInfo(Class beanClass, Class beanSuperclass) 
throws IntrospectionException {
+
+String beanInfoKey;
+if (beanSuperclass != null)
+beanInfoKey = 
beanClass.getName().concat("|").concat(beanSuperclass.getName());
+else
+beanInfoKey = beanClass.getName();
+
+BeanInfo beanInfo = beanInfoMap.get(beanInfoKey);
+if (beanInfo == null) {
+try {
+if (beanSuperclass != null)
+beanInfo = Introspector.getBeanInfo(beanClass, 
beanSuperclass);
+else
+beanInfo = Introspector.getBeanInfo(beanClass);
+}
+catch (IntrospectionException e) {
+throw e;
+}
+beanInfoMap.put(beanInfoKey, beanInfo);
+}
+return beanInfo;
+}
+
+private static BeanInfo getBeanInfo(Class beanClass) throws 
IntrospectionException {
+return getBeanInfo(beanClass, null);
+}
+
 private static List getPropertyQnameList(Object beanObject,
   

svn commit: r1054928 - /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java

2011-01-03 Thread hemapani
Author: hemapani
Date: Tue Jan  4 07:44:41 2011
New Revision: 1054928

URL: http://svn.apache.org/viewvc?rev=1054928&view=rev
Log:
revert the change done for https://issues.apache.org/jira/browse/AXIS2-4524

Modified:

axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java

Modified: 
axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?rev=1054928&r1=1054927&r2=1054928&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
 Tue Jan  4 07:44:41 2011
@@ -20,6 +20,27 @@
 package org.apache.axis2.databinding.utils;
 
 
+import java.beans.BeanInfo;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Array;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamReader;
+
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMAttribute;
 import org.apache.axiom.om.OMElement;
@@ -39,31 +60,9 @@ import org.apache.axis2.engine.ObjectSup
 import org.apache.axis2.util.Loader;
 import org.apache.axis2.util.StreamWrapper;
 
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-import java.beans.BeanInfo;
-import java.beans.IntrospectionException;
-import java.beans.Introspector;
-import java.beans.PropertyDescriptor;
-import java.lang.reflect.Array;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
 
 public class BeanUtil {
-
 private static int nsCount = 1;
-private static Map beanInfoMap = new HashMap();
 
 /**
  * To Serilize Bean object this method is used, this will create an object 
array using given
@@ -104,26 +103,18 @@ public class BeanUtil {
 
 
 private static BeanInfo getBeanInfo(Class beanClass, Class beanSuperclass) 
throws IntrospectionException {
-
-String beanInfoKey;
-if (beanSuperclass != null)
-beanInfoKey = 
beanClass.getName().concat("|").concat(beanSuperclass.getName());
-else
-beanInfoKey = beanClass.getName();
-
-BeanInfo beanInfo = beanInfoMap.get(beanInfoKey);
-if (beanInfo == null) {
-try {
-if (beanSuperclass != null)
-beanInfo = Introspector.getBeanInfo(beanClass, 
beanSuperclass);
-else
-beanInfo = Introspector.getBeanInfo(beanClass);
-}
-catch (IntrospectionException e) {
-throw e;
-}
-beanInfoMap.put(beanInfoKey, beanInfo);
+BeanInfo beanInfo; 
+try {
+if (beanSuperclass != null)
+   beanInfo = Introspector.getBeanInfo(beanClass, beanSuperclass);
+else
+beanInfo = Introspector.getBeanInfo(beanClass);
+}
+catch (IntrospectionException e) {
+throw e;
 }
+
+ 
 return beanInfo;
 }
 




svn commit: r1055338 - in /axis/axis2/java/core/trunk/modules: integration/test/org/apache/axis2/engine/ kernel/src/org/apache/axis2/context/ kernel/src/org/apache/axis2/description/ kernel/src/org/ap

2011-01-04 Thread hemapani
Author: hemapani
Date: Wed Jan  5 07:48:44 2011
New Revision: 1055338

URL: http://svn.apache.org/viewvc?rev=1055338&view=rev
Log:
fixing https://issues.apache.org/jira/browse/AXIS2-4196

Modified:

axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/engine/MessageContextChangeTest.java

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/MessageContext.java

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/Utils.java

axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java

Modified: 
axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/engine/MessageContextChangeTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/engine/MessageContextChangeTest.java?rev=1055338&r1=1055337&r2=1055338&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/engine/MessageContextChangeTest.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/engine/MessageContextChangeTest.java
 Wed Jan  5 07:48:44 2011
@@ -56,7 +56,7 @@ public class MessageContextChangeTest ex
 new FieldDescription("java.lang.String", "TRANSPORT_SUCCEED"),
 new FieldDescription("java.lang.String", 
"DEFAULT_CHAR_SET_ENCODING"),
 new FieldDescription("int", "FLOW"),
-new FieldDescription("java.lang.String", "TRANSPORT_NON_BLOCKING"),
+new FieldDescription("java.lang.String", 
"CLIENT_API_NON_BLOCKING"),
 new FieldDescription("java.lang.String", 
"DISABLE_ASYNC_CALLBACK_ON_TRANSPORT_ERROR"),
 new FieldDescription("boolean", "processingFault"),
 new FieldDescription("boolean", "paused"),

Modified: 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/MessageContext.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/MessageContext.java?rev=1055338&r1=1055337&r2=1055338&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/MessageContext.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/MessageContext.java
 Wed Jan  5 07:48:44 2011
@@ -235,11 +235,15 @@ public class MessageContext extends Abst
 public int FLOW = IN_FLOW;
 
 /**
- * To invoke fireAndforget method we have to hand over transport sending 
logic to a thread
- * other wise user has to wait till it get transport response (in the case 
of HTTP its HTTP
- * 202)
+  * To invoke fireAndforget method we have to hand over transport sending 
logic to a thread
+  * other wise user has to wait till it get transport response (in the 
case of HTTP its HTTP
+  * 202)
+  * 202). This was eariler named TRANSPORT_NON_BLOCKING, but that name is 
wrong as transport non blocking is NIO,
+  * which has nothing to do with this property. See 
https://issues.apache.org/jira/browse/AXIS2-4196. 
+  * Renaming this to CLIENT_API_NON_BLOCKING instead.  
+  * 
  */
-public static final String TRANSPORT_NON_BLOCKING = "transportNonBlocking";
+public static final String CLIENT_API_NON_BLOCKING = 
"ClientApiNonBlocking";
 
 /**
  * This property allows someone (e.g. RM) to disable an async callback from

Modified: 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java?rev=1055338&r1=1055337&r2=1055338&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
 Wed Jan  5 07:48:44 2011
@@ -307,7 +307,7 @@ class OutInAxisOperationClient extends O
 }
 
 //if we don't do this , this guy will wait till it gets HTTP 202 in 
the HTTP case
-mc.setProperty(MessageContext.TRANSPORT_NON_BLOCKING, Boolean.TRUE);
+mc.setProperty(MessageContext.CLIENT_API_NON_BLOCKING, Boolean.TRUE);
 
mc.getConfigurationContext().registerOperationContext(mc.getMes

svn commit: r1060360 - /axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/handler/HandlerChainProcessor.java

2011-01-18 Thread hemapani
Author: hemapani
Date: Tue Jan 18 13:28:17 2011
New Revision: 1060360

URL: http://svn.apache.org/viewvc?rev=1060360&view=rev
Log:
fixing https://issues.apache.org/jira/browse/AXIS2-4365 by putting a copy on 
write array list

Modified:

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/handler/HandlerChainProcessor.java

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/handler/HandlerChainProcessor.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/handler/HandlerChainProcessor.java?rev=1060360&r1=1060359&r2=1060360&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/handler/HandlerChainProcessor.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/handler/HandlerChainProcessor.java
 Tue Jan 18 13:28:17 2011
@@ -49,8 +49,10 @@ import javax.xml.ws.handler.Handler;
 import javax.xml.ws.handler.LogicalHandler;
 import javax.xml.ws.handler.soap.SOAPHandler;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
 
 public class HandlerChainProcessor {
 
@@ -75,7 +77,7 @@ public class HandlerChainProcessor {
 
 // Copy of the handler chain used by HandlerChainProcessor
 private List handlers = null;
-private static final List EMPTY_CHAIN = new ArrayList(); 
+private static final List EMPTY_CHAIN = new 
ArrayList(0); 
 
 // for tracking purposes -- see trackInternalCall
 private static Handler currentHandler = null;
@@ -123,8 +125,7 @@ public class HandlerChainProcessor {
 // Use empty chain to avoid excessive garbage collection
 this.handlers = EMPTY_CHAIN;
 } else {
-this.handlers = new ArrayList(); 
-this.handlers.addAll(chain);
+this.handlers = new CopyOnWriteArrayList(chain); 
 }
 }
 } else {