You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2006/10/30 20:08:33 UTC
svn commit: r469232 - in
/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2:
deployment/DeploymentEngine.java deployment/RepositoryListener.java
i18n/resource.properties
Author: dims
Date: Mon Oct 30 11:08:32 2006
New Revision: 469232
URL: http://svn.apache.org/viewvc?view=rev&rev=469232
Log:
- Cleanup message, we don't really create a new directory
- Add the name of the directory where we tried to look for a modules /
services sub directory in the message
- Do, what we say...Actually look in the ClassLoader hierarchy for the
names of possible mar's and load them in addition to looking in the
same directory as the axis jar like we do now.
Modified:
webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java
webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/i18n/resource.properties
Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java?view=diff&rev=469232&r1=469231&r2=469232
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java (original)
+++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java Mon Oct 30 11:08:32 2006
@@ -16,7 +16,6 @@
package org.apache.axis2.deployment;
-
import org.apache.axiom.om.OMElement;
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
@@ -29,7 +28,13 @@
import org.apache.axis2.deployment.scheduler.SchedulerTask;
import org.apache.axis2.deployment.util.PhasesInfo;
import org.apache.axis2.deployment.util.Utils;
-import org.apache.axis2.description.*;
+import org.apache.axis2.description.AxisModule;
+import org.apache.axis2.description.AxisOperation;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisServiceGroup;
+import org.apache.axis2.description.Flow;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.description.WSDL11ToAxisServiceBuilder;
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.axis2.engine.MessageReceiver;
import org.apache.axis2.i18n.Messages;
@@ -39,7 +44,15 @@
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamException;
-import java.io.*;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.io.StringWriter;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
@@ -48,7 +61,6 @@
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
-
public class DeploymentEngine implements DeploymentConstants {
private static final Log log = LogFactory.getLog(DeploymentEngine.class);
@@ -881,7 +893,7 @@
servicesDir = new File(repository, DeploymentConstants.SERVICE_PATH);
}
if (!servicesDir.exists()) {
- log.info(Messages.getMessage("noservicedirfound"));
+ log.info(Messages.getMessage("noservicedirfound", getRepositoryPath(repository)));
}
if (modulesPath != null) {
modulesDir = new File(modulesPath);
@@ -892,7 +904,15 @@
modulesDir = new File(repository, DeploymentConstants.MODULE_PATH);
}
if (!modulesDir.exists()) {
- log.info(Messages.getMessage("nomoduledirfound"));
+ log.info(Messages.getMessage("nomoduledirfound", getRepositoryPath(repository)));
+ }
+ }
+
+ private String getRepositoryPath(File repository) {
+ try {
+ return repository.getCanonicalPath();
+ } catch (IOException e) {
+ return repository.getAbsolutePath();
}
}
Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java?view=diff&rev=469232&r1=469231&r2=469232
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java (original)
+++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java Mon Oct 30 11:08:32 2006
@@ -22,9 +22,10 @@
import org.apache.axis2.util.Loader;
import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
import java.net.URLDecoder;
-
public class RepositoryListener implements DeploymentConstants {
private DeploymentEngine deploymentEngine;
@@ -113,6 +114,29 @@
}
}
}
+
+ ClassLoader cl = deploymentEngine.getAxisConfig().getModuleClassLoader();
+ while (cl != null) {
+ if (cl instanceof URLClassLoader) {
+ URL[] urls = ((URLClassLoader) cl).getURLs();
+ for (int i = 0; (urls != null) && i < urls.length; i++) {
+ String path = urls[i].getPath();
+ //If it is a drive letter, adjust accordingly.
+ if (path.length() >= 3 && path.charAt(0) == '/' && path.charAt(2) == ':')
+ path = path.substring(1);
+ java.io.File file = new java.io.File(URLDecoder.decode(urls[i].getPath()).replace('/',
+ File.separatorChar).replace('|', ':'));
+ if (file.isFile()) {
+ if (ArchiveFileData.isModuleArchiveFile(file.getName())) {
+ //adding modules in the class path
+ wsInfoList.addWSInfoItem(file, TYPE_MODULE);
+ }
+ }
+ }
+ }
+ cl = cl.getParent();
+ }
+
deploymentEngine.doDeploy();
}
Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/i18n/resource.properties
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/i18n/resource.properties?view=diff&rev=469232&r1=469231&r2=469232
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/i18n/resource.properties (original)
+++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/i18n/resource.properties Mon Oct 30 11:08:32 2006
@@ -174,8 +174,8 @@
bothrepoandconfignull=neither repository location nor axis2.xml are given so system will continue using default configuration (using default_axis2.xml)
cannotfindrepo=System can not find the given repository location: {0}
norepofoundinaxis2=no repository location found in axis2.xml
-noservicedirfound=no services directory found , new one created
-nomoduledirfound=no modules directory found , new one created
+noservicedirfound=no services directory found under {0}
+nomoduledirfound=no modules directory found under {0}
confdirnotfound=conf directory not found , and no axis2.xml file is given ! System will continue using default_axis2.xml
noaxis2xmlfound=axis2.xml file not found in conf directory , system will continue using default_axis2.xml
badelementfound=Looking for ''{0}'' element, but found ''{1}''
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org