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

2011-04-23 Thread isurues
Author: isurues
Date: Sat Apr 23 12:05:26 2011
New Revision: 1096134

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

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=1096134&r1=1096133&r2=1096134&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
 Sat Apr 23 12:05:26 2011
@@ -1029,12 +1029,14 @@ public abstract class DeploymentEngine i
  */
 protected void setClassLoaders(String axis2repoURI) throws 
DeploymentException {
 ClassLoader sysClassLoader =
-
Utils.getClassLoader(Thread.currentThread().getContextClassLoader(), 
axis2repoURI, false);
+
Utils.getClassLoader(Thread.currentThread().getContextClassLoader(), 
axis2repoURI,
+axisConfig.isChildFirstClassLoading());
 
 axisConfig.setSystemClassLoader(sysClassLoader);
 if (servicesDir.exists()) {
 axisConfig.setServiceClassLoader(
-Utils.getClassLoader(axisConfig.getSystemClassLoader(), 
servicesDir, axisConfig.isChildFirstClassLoading()));
+Utils.getClassLoader(axisConfig.getSystemClassLoader(), 
servicesDir,
+axisConfig.isChildFirstClassLoading()));
 } else {
 
axisConfig.setServiceClassLoader(axisConfig.getSystemClassLoader());
 }




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

2011-04-23 Thread isurues
Author: isurues
Date: Sat Apr 23 12:06:39 2011
New Revision: 1096135

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

Modified:

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

Modified: 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java?rev=1096135&r1=1096134&r2=1096135&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java
 Sat Apr 23 12:06:39 2011
@@ -301,7 +301,8 @@ public class RepositoryListener implemen
 Deployer deployer = 
deploymentEngine.getDeployer(dir, extension);
 deployer.setDirectory(dir);
 addFileToDeploy(file, deployer, 
WSInfo.TYPE_CUSTOM);
-} else if (file.isDirectory() && 
!file.getName().startsWith(".")) {
+} else if (file.isDirectory() && 
!file.getName().startsWith(".") &&
+!(dir.equals(directory.getName()) && 
"lib".equalsIgnoreCase(file.getName( {
 //look in the child directory also
 findFileForGivenDirectory(file, extension, dir);
 }




svn commit: r1096136 - /axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/framework/JAXWSDeployer.java

2011-04-23 Thread isurues
Author: isurues
Date: Sat Apr 23 12:07:09 2011
New Revision: 1096136

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

Modified:

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/framework/JAXWSDeployer.java

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/framework/JAXWSDeployer.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/framework/JAXWSDeployer.java?rev=1096136&r1=1096135&r2=1096136&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/framework/JAXWSDeployer.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/framework/JAXWSDeployer.java
 Sat Apr 23 12:07:09 2011
@@ -52,6 +52,7 @@ import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -145,6 +146,10 @@ public class JAXWSDeployer extends Abstr
 ArrayList urls = new ArrayList();
 urls.add(deploymentFileData.getFile().toURL());
 urls.add(axisConfig.getRepository());
+
+// adding libs under jaxws deployment dir
+addJaxwsLibs(urls, axisConfig.getRepository().getPath() + 
directory);
+
 String webLocation = DeploymentEngine.getWebLocationString();
 if (webLocation != null) {
 urls.add(new File(webLocation).toURL());
@@ -348,5 +353,31 @@ public class JAXWSDeployer extends Abstr
 map.put(key, axisService);
 }
 }
+
+/**
+ * Checks whether there's a 'lib' folder inside the provided folder and 
adds all the lib URLs
+ * into the provided URL list.
+ *
+ * @param urls - list of URLs
+ * @param jaxwsDepDirPath - jaxws deployment folder path
+ * @throws Exception - on error while geting URLs of libs
+ */
+private void addJaxwsLibs(ArrayList urls, String jaxwsDepDirPath)
+throws Exception {
+File jaxwsDepDirLib = new File(jaxwsDepDirPath + File.separator + 
"lib");
+if (jaxwsDepDirLib.exists() && jaxwsDepDirLib.isDirectory()) {
+for (File file : jaxwsDepDirLib.listFiles()) {
+if (file.isFile()) {
+try {
+urls.add(file.toURI().toURL());
+} catch (MalformedURLException e) {
+throw new Exception("Error while loading libraries 
from the " +
+"'lib' directory under jaxws deployment 
direcotry.", e);
+}
+}
+}
+}
+}
+
 }