juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcunn...@apache.org
Subject svn commit: r893621 - /webservices/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java
Date Wed, 23 Dec 2009 20:28:47 GMT
Author: tcunning
Date: Wed Dec 23 20:28:47 2009
New Revision: 893621

URL: http://svn.apache.org/viewvc?rev=893621&view=rev
Log:
JUDDI-324
Make sure we check system properties for an alternate uddi.xml filename
to use for XML configuration.

Modified:
    webservices/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java

Modified: webservices/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java
URL: http://svn.apache.org/viewvc/webservices/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java?rev=893621&r1=893620&r2=893621&view=diff
==============================================================================
--- webservices/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java
(original)
+++ webservices/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java
Wed Dec 23 20:28:47 2009
@@ -38,6 +38,7 @@
  */
 public class ClientConfig 
 {
+	private final static String UDDI_CONFIG_FILENAME_PROPERTY = "uddi.client.xml";
 	private final static String UDDI_CONFIG = "META-INF/uddi.xml";
 	private Logger log = Logger.getLogger(ClientConfig.class);
 	private Configuration config = null;;
@@ -72,7 +73,14 @@
 		CompositeConfiguration compositeConfig = new CompositeConfiguration();
 		compositeConfig.addConfiguration(new SystemConfiguration());
 		//Properties from XML file
-		XMLConfiguration xmlConfig = new XMLConfiguration(UDDI_CONFIG);
+		XMLConfiguration xmlConfig = null;	
+		final String filename = System.getProperty(UDDI_CONFIG_FILENAME_PROPERTY);
+		if (filename != null) 
+		{
+			xmlConfig = new XMLConfiguration(filename);
+		} else { 
+			xmlConfig = new XMLConfiguration(UDDI_CONFIG);	
+		}
 		long refreshDelay = xmlConfig.getLong(Property.UDDI_RELOAD_DELAY, 1000l);
 		log.debug("Setting refreshDelay to " + refreshDelay);
 		FileChangedReloadingStrategy fileChangedReloadingStrategy = new FileChangedReloadingStrategy();



---------------------------------------------------------------------
To unsubscribe, e-mail: juddi-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: juddi-cvs-help@ws.apache.org


Mime
View raw message