Author: rareddy
Date: 2009-02-25 22:19:01 -0500 (Wed, 25 Feb 2009)
New Revision: 505
Modified:
trunk/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java
trunk/server/src/test/java/com/metamatrix/platform/config/spi/xml/TestCurrentConfiguration.java
Log:
TEIID-309: adding host properties to Host object, so that they can be viewed by the client
applications such as Admin API.
Modified:
trunk/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java
===================================================================
---
trunk/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java 2009-02-26
01:02:42 UTC (rev 504)
+++
trunk/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java 2009-02-26
03:19:01 UTC (rev 505)
@@ -216,14 +216,14 @@
*/
public Host getDefaultHost() throws ConfigurationException {
String name = getBootStrapProperties().getProperty(CONFIGURATION_NAME);
- BasicHost host = new BasicHost(new ConfigurationID(name), new HostID(name), new
ComponentTypeID(name));
+ BasicHost host = new BasicHost(new ConfigurationID(name), new HostID(name),
Host.HOST_COMPONENT_TYPE_ID);
Properties props = new Properties();
- props.setProperty(com.metamatrix.admin.api.objects.Host.INSTALL_DIR,
getBootStrapProperties().getProperty(com.metamatrix.admin.api.objects.Host.INSTALL_DIR));
- props.setProperty(com.metamatrix.admin.api.objects.Host.HOST_DIRECTORY,
getBootStrapProperties().getProperty(com.metamatrix.admin.api.objects.Host.HOST_DIRECTORY));
- props.setProperty(com.metamatrix.admin.api.objects.Host.LOG_DIRECTORY,
getBootStrapProperties().getProperty(com.metamatrix.admin.api.objects.Host.LOG_DIRECTORY));
- props.setProperty(com.metamatrix.admin.api.objects.Host.HOST_BIND_ADDRESS,
getBootStrapProperties().getProperty(com.metamatrix.admin.api.objects.Host.HOST_BIND_ADDRESS));
- props.setProperty(com.metamatrix.admin.api.objects.Host.HOST_PHYSICAL_ADDRESS,
getBootStrapProperties().getProperty(com.metamatrix.admin.api.objects.Host.HOST_PHYSICAL_ADDRESS));
+ props.setProperty(com.metamatrix.admin.api.objects.Host.INSTALL_DIR,
getBootStrapProperties().getProperty(com.metamatrix.admin.api.objects.Host.INSTALL_DIR,
"")); //$NON-NLS-1$
+ props.setProperty(com.metamatrix.admin.api.objects.Host.HOST_DIRECTORY,
getBootStrapProperties().getProperty(com.metamatrix.admin.api.objects.Host.HOST_DIRECTORY,
"")); //$NON-NLS-1$
+ props.setProperty(com.metamatrix.admin.api.objects.Host.LOG_DIRECTORY,
getBootStrapProperties().getProperty(com.metamatrix.admin.api.objects.Host.LOG_DIRECTORY,
"")); //$NON-NLS-1$
+ props.setProperty(com.metamatrix.admin.api.objects.Host.HOST_BIND_ADDRESS,
getBootStrapProperties().getProperty(com.metamatrix.admin.api.objects.Host.HOST_BIND_ADDRESS,
"")); //$NON-NLS-1$
+ props.setProperty(com.metamatrix.admin.api.objects.Host.HOST_PHYSICAL_ADDRESS,
getBootStrapProperties().getProperty(com.metamatrix.admin.api.objects.Host.HOST_PHYSICAL_ADDRESS,
"")); //$NON-NLS-1$
host.setProperties(props);
return host;
Modified:
trunk/server/src/test/java/com/metamatrix/platform/config/spi/xml/TestCurrentConfiguration.java
===================================================================
---
trunk/server/src/test/java/com/metamatrix/platform/config/spi/xml/TestCurrentConfiguration.java 2009-02-26
01:02:42 UTC (rev 504)
+++
trunk/server/src/test/java/com/metamatrix/platform/config/spi/xml/TestCurrentConfiguration.java 2009-02-26
03:19:01 UTC (rev 505)
@@ -113,8 +113,8 @@
printMsg("Starting testCurrentHost"); //$NON-NLS-1$
try {
+ System.setProperty(CurrentConfiguration.CONFIGURATION_NAME,
"DummyHost"); //$NON-NLS-1$ //$NON-NLS-2$
System.setProperty("metamatrix.vmname",
"MetaMatrixProcess"); //$NON-NLS-1$ //$NON-NLS-2$
- VMNaming.setup("DummyHost", null, null); //$NON-NLS-1$
init(CONFIG_FILE);
Show replies by date