[jboss-svn-commits] JBL Code SVN: r6443 - labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/common
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Sep 27 12:46:51 EDT 2006
Author: tfennelly
Date: 2006-09-27 12:46:49 -0400 (Wed, 27 Sep 2006)
New Revision: 6443
Modified:
labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/common/Configuration.java
Log:
temp mod to the property manager stuff to gt the properties from the System
Modified: labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/common/Configuration.java
===================================================================
--- labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/common/Configuration.java 2006-09-27 16:46:17 UTC (rev 6442)
+++ labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/common/Configuration.java 2006-09-27 16:46:49 UTC (rev 6443)
@@ -22,11 +22,19 @@
package org.jboss.soa.esb.common;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Properties;
+
import org.jboss.soa.esb.helpers.KeyValuePair;
import com.arjuna.common.internal.util.propertyservice.plugins.io.XMLFilePlugin;
+import com.arjuna.common.util.exceptions.LoadPropertiesException;
+import com.arjuna.common.util.exceptions.ManagementPluginException;
+import com.arjuna.common.util.exceptions.SavePropertiesException;
import com.arjuna.common.util.propertyservice.PropertyManager;
import com.arjuna.common.util.propertyservice.PropertyManagerFactory;
+import com.arjuna.common.util.propertyservice.plugins.PropertyManagementPlugin;
public class Configuration
{
@@ -37,23 +45,8 @@
return propertyManager;
}
- private static KeyValuePair[] s_oaKV = new KeyValuePair[]
- {
- new KeyValuePair(Environment.SMTP_HOST, getSmtpHost()),
- new KeyValuePair(Environment.SMTP_USERNAME, getSmtpUsername()),
- new KeyValuePair(Environment.SMTP_PASSWORD, getSmtpPassword()),
- new KeyValuePair(Environment.SMTP_PORT, getSmtpPort()),
- new KeyValuePair(Environment.SMTP_FROM, getSmtpFrom()),
- new KeyValuePair(Environment.SMTP_AUTH, getSmtpAuth()),
- new KeyValuePair(Environment.JNDI_SERVER_TYPE, getJndiServerType()),
- new KeyValuePair(Environment.JNDI_SERVER_URL, getJndiServerURL()),
- new KeyValuePair(Environment.PARAMS_REPOS_IMPL_CLASS,
- getParamRepositoryImplClass()),
- new KeyValuePair(Environment.OBJECT_STORE_CONFIG_FILE, getObjStoreConfigFile()),
- new KeyValuePair(Environment.ENCRYPT_FACTORY_CLASS, getEncryptionFactoryClass())
+ private static KeyValuePair[] s_oaKV;
- };
-
public static String dump()
{
StringBuilder sb = new StringBuilder("Dump of Configuration:\n");
@@ -138,17 +131,83 @@
* TODO
*/
- propertyManager = PropertyManagerFactory.getPropertyManager("com.arjuna.ats.propertymanager");
+ propertyManager = new TempPropertyManager();
+ //propertyManager = PropertyManagerFactory.getPropertyManager("com.arjuna.ats.propertymanager");
- String propertiesFilename = getPropertyManager().getProperty(Environment.PROPERTIES_FILE, Environment.DEFAULT_PROPERTY_FILE);
+ //String propertiesFilename = getPropertyManager().getProperty(Environment.PROPERTIES_FILE, Environment.DEFAULT_PROPERTY_FILE);
try
{
- propertyManager.load(XMLFilePlugin.class.getName(), propertiesFilename);
+ //propertyManager.load(XMLFilePlugin.class.getName(), propertiesFilename);
}
catch (Exception e)
{
throw new ExceptionInInitializerError(e.toString());
}
+
+ s_oaKV = new KeyValuePair[]
+ {
+ new KeyValuePair(Environment.SMTP_HOST, getSmtpHost()),
+ new KeyValuePair(Environment.SMTP_USERNAME, getSmtpUsername()),
+ new KeyValuePair(Environment.SMTP_PASSWORD, getSmtpPassword()),
+ new KeyValuePair(Environment.SMTP_PORT, getSmtpPort()),
+ new KeyValuePair(Environment.SMTP_FROM, getSmtpFrom()),
+ new KeyValuePair(Environment.SMTP_AUTH, getSmtpAuth()),
+ new KeyValuePair(Environment.JNDI_SERVER_TYPE, getJndiServerType()),
+ new KeyValuePair(Environment.JNDI_SERVER_URL, getJndiServerURL()),
+ new KeyValuePair(Environment.PARAMS_REPOS_IMPL_CLASS,
+ getParamRepositoryImplClass()),
+ new KeyValuePair(Environment.OBJECT_STORE_CONFIG_FILE, getObjStoreConfigFile()),
+ new KeyValuePair(Environment.ENCRYPT_FACTORY_CLASS, getEncryptionFactoryClass())
+
+ };
}
+
+ private static class TempPropertyManager implements PropertyManager {
+
+ public String getProperty(String arg0) {
+ return System.getProperty(arg0);
+ }
+
+ public String getProperty(String arg0, String arg1) {
+ return System.getProperty(arg0, arg1);
+ }
+
+ public String setProperty(String arg0, String arg1, boolean arg2) {
+ throw new UnsupportedOperationException("Not supported! Temporarily out of action");
+ }
+
+ public String setProperty(String arg0, String arg1) {
+ return System.setProperty(arg0, arg1);
+ }
+
+ public String removeProperty(String arg0) {
+ return (String) System.getProperties().remove(arg0);
+ }
+
+ public Properties getProperties() {
+ return System.getProperties();
+ }
+
+ public Enumeration propertyNames() {
+ return System.getProperties().keys();
+ }
+
+ public void load(String arg0, String arg1) throws IOException, ClassNotFoundException, LoadPropertiesException {
+ throw new UnsupportedOperationException("Not supported! Temporarily out of action");
+ }
+
+ public void save(String arg0, String arg1) throws IOException, ClassNotFoundException, SavePropertiesException {
+ throw new UnsupportedOperationException("Not supported! Temporarily out of action");
+ }
+
+ public void addManagementPlugin(PropertyManagementPlugin arg0) throws IOException, ManagementPluginException {
+ throw new UnsupportedOperationException("Not supported! Temporarily out of action");
+ }
+
+ public boolean verbose() {
+ return false;
+ }
+
+ }
}
\ No newline at end of file
More information about the jboss-svn-commits
mailing list