[teiid-commits] teiid SVN: r1759 - in trunk/console: .settings and 5 other directories.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Wed Jan 20 13:29:37 EST 2010


Author: tejones
Date: 2010-01-20 13:29:36 -0500 (Wed, 20 Jan 2010)
New Revision: 1759

Added:
   trunk/console/.classpath
   trunk/console/.project
   trunk/console/.settings/
   trunk/console/.settings/org.eclipse.jdt.core.prefs
   trunk/console/.settings/org.maven.ide.eclipse.prefs
   trunk/console/src/main/java/org/teiid/rhq/plugin/ModelComponent.java
   trunk/console/src/main/java/org/teiid/rhq/plugin/ModelDiscoveryComponent.java
   trunk/console/src/main/java/org/teiid/rhq/plugin/VDBComponent.java
   trunk/console/src/main/java/org/teiid/rhq/plugin/VDBDiscoveryComponent.java
Removed:
   trunk/console/src/main/java/org/teiid/rhq/plugin/ConnectorComponent.java
   trunk/console/src/main/java/org/teiid/rhq/plugin/ConnectorDiscoveryComponent.java
   trunk/console/src/main/java/org/teiid/rhq/plugin/HostComponent.java
   trunk/console/src/main/java/org/teiid/rhq/plugin/HostDiscoveryComponent.java
   trunk/console/src/main/java/org/teiid/rhq/plugin/ProcessComponent.java
   trunk/console/src/main/java/org/teiid/rhq/plugin/ProcessDiscoveryComponent.java
   trunk/console/src/main/java/org/teiid/rhq/plugin/SystemComponent.java
Modified:
   trunk/console/pom.xml
   trunk/console/src/assembly/assemble-artifacts.xml
   trunk/console/src/main/java/org/teiid/rhq/comm/ConnectionConstants.java
   trunk/console/src/main/java/org/teiid/rhq/plugin/Facet.java
   trunk/console/src/main/java/org/teiid/rhq/plugin/util/PluginConstants.java
   trunk/console/src/resources/embedded/META-INF/rhq-plugin.xml
Log:
TEIID-807: Adding discovery of more resources and restructuring tree

Added: trunk/console/.classpath
===================================================================
--- trunk/console/.classpath	                        (rev 0)
+++ trunk/console/.classpath	2010-01-20 18:29:36 UTC (rev 1759)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: trunk/console/.project
===================================================================
--- trunk/console/.project	                        (rev 0)
+++ trunk/console/.project	2010-01-20 18:29:36 UTC (rev 1759)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>teiid-console</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+	</natures>
+</projectDescription>

Added: trunk/console/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/console/.settings/org.eclipse.jdt.core.prefs	                        (rev 0)
+++ trunk/console/.settings/org.eclipse.jdt.core.prefs	2010-01-20 18:29:36 UTC (rev 1759)
@@ -0,0 +1,5 @@
+#Wed Nov 25 10:51:47 CST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.source=1.6

Added: trunk/console/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- trunk/console/.settings/org.maven.ide.eclipse.prefs	                        (rev 0)
+++ trunk/console/.settings/org.maven.ide.eclipse.prefs	2010-01-20 18:29:36 UTC (rev 1759)
@@ -0,0 +1,9 @@
+#Wed Jan 20 12:26:36 CST 2010
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=true
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1

Modified: trunk/console/pom.xml
===================================================================
--- trunk/console/pom.xml	2010-01-20 03:58:44 UTC (rev 1758)
+++ trunk/console/pom.xml	2010-01-20 18:29:36 UTC (rev 1759)
@@ -5,7 +5,7 @@
 	<parent>
 		<artifactId>teiid</artifactId>
 		<groupId>org.jboss.teiid</groupId>
-		<version>7.0.0-SNAPSHOT</version>
+		<version>6.3.0-SNAPSHOT</version>
 	</parent>
 
 	<modelVersion>4.0.0</modelVersion>

Modified: trunk/console/src/assembly/assemble-artifacts.xml
===================================================================
--- trunk/console/src/assembly/assemble-artifacts.xml	2010-01-20 03:58:44 UTC (rev 1758)
+++ trunk/console/src/assembly/assemble-artifacts.xml	2010-01-20 18:29:36 UTC (rev 1759)
@@ -4,7 +4,7 @@
 	<property name="embedded.temp.dir" value="${temp.dir}/embedded"/>
 	
 	<!--  this contains jars to be included in the embedded war -->
-	<property name="embedded.jar" value="${basedir}/target/distribution/jbedsp-embedded-plugin-${product.version}.jar"/>
+	<property name="embedded.jar" value="${basedir}/target/distribution/teiid-embedded-plugin-${product.version}.jar"/>
 
 	<property name="enterprise.temp.dir" value="${temp.dir}/enterprise"/>
 	<!--  this is the plugin to be deployed to JON that get sent to the agent -->

Modified: trunk/console/src/main/java/org/teiid/rhq/comm/ConnectionConstants.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/comm/ConnectionConstants.java	2010-01-20 03:58:44 UTC (rev 1758)
+++ trunk/console/src/main/java/org/teiid/rhq/comm/ConnectionConstants.java	2010-01-20 18:29:36 UTC (rev 1759)
@@ -91,14 +91,7 @@
 					}
         		}
         		       		
-        		public interface Host {
-					public final static String TYPE = "Runtime.Host"; //$NON-NLS-1$
-
-					public static interface Operations {
-					   	public final static String GET_HOSTS = "getHosts"; //$NON-NLS-1$            
-											
-					}        			
-        		}
+        	
         		
         		public interface Process {
 
@@ -160,6 +153,27 @@
         	
         	}
         	public interface Resource {
+        		
+        		public interface VDB {
+					public final static String TYPE = "teiid"; //$NON-NLS-1$
+					public final static String SUBTYPE = "vdb"; //$NON-NLS-1$
+
+
+					public static interface Operations {
+											
+					}        			
+        		}
+        		
+        		public interface Model {
+					public final static String TYPE = "teiid"; //$NON-NLS-1$
+					public final static String SUBTYPE = "model"; //$NON-NLS-1$
+
+
+					public static interface Operations {
+											
+					}        			
+        		}
+        		
         		public interface Service {
 
 					public final static String TYPE = "Resource.Service"; //$NON-NLS-1$

Deleted: trunk/console/src/main/java/org/teiid/rhq/plugin/ConnectorComponent.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/ConnectorComponent.java	2010-01-20 03:58:44 UTC (rev 1758)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/ConnectorComponent.java	2010-01-20 18:29:36 UTC (rev 1759)
@@ -1,129 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-package org.teiid.rhq.plugin;
-
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.measurement.MeasurementReport;
-import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
-import org.teiid.rhq.comm.ConnectionConstants;
-import org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.Connector;
-import org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.Connector.Operations;
-
-
-/**
- * MetaMatrix Connector component class
- * 
- */
-public class ConnectorComponent extends Facet {
-
-	private final Log LOG = LogFactory.getLog(ConnectorComponent.class);
-
-	/**
-	 * @see org.teiid.rhq.plugin.Facet#getComponentType()
-	 * @since 1.0
-	 */
-	@Override
-	String getComponentType() {
-		return Connector.TYPE;
-	}
-	
-	protected void setOperationArguments(String name, Configuration configuration,
-			Map argumentMap) {
-
-			if (name.equals(Operations.STOP_CONNECTOR)){
-				Boolean stopNow = configuration.getSimple(ConnectionConstants.ComponentType.Operation.Value.STOP_NOW).getBooleanValue();
-				argumentMap.put(ConnectionConstants.ComponentType.Operation.Value.STOP_NOW, stopNow);
-			}
-			//Need identifier for all Connector operations
-			String key = ConnectionConstants.IDENTIFIER;
-			argumentMap.put(key, getComponentIdentifier());				 
-		
-	}	
-
-	@Override
-	public void getValues(MeasurementReport arg0,
-			Set<MeasurementScheduleRequest> arg1) throws Exception {
-		// TODO Auto-generated method stub
-
-	}
-
-//	@Override
-//	public OperationResult invokeOperation(String name,
-//			Configuration configuration) {
-//		Map valueMap = new HashMap();
-//		Connection conn = null;
-//
-//		Set operationDefinitionSet = this.resourceContext.getResourceType()
-//				.getOperationDefinitions();
-//
-//		ExecutedOperationResult result = initResult(name, operationDefinitionSet);
-//			
-//		setValueMap(name, configuration, valueMap);
-//		
-//		execute(conn, result, getComponentType(), name, valueMap);
-//		
-//		return ((ExecutedOperationResultImpl) result).getOperationResult();
-//		
-		
-//		Connection conn = null;
-//		Map valueMap = new HashMap();
-//		MMOperationResult result = null;
-//
-//		// Add "stop now" value if we are attempting to stop a connector
-//		if (name.equals(ComponentType.Operation.STOP_CONNECTOR)) {
-//			Boolean stopNow = configuration.getSimple(
-//					ConnectionConstants.ComponentType.Operation.Value.STOP_NOW)
-//					.getBooleanValue();
-//			valueMap.put(
-//					ConnectionConstants.ComponentType.Operation.Value.STOP_NOW,
-//					stopNow);
-//		}
-//
-//		valueMap.put(ConnectionConstants.IDENTIFIER, getComponentIdentifier());
-//
-//		try {
-//			conn = getConnection();
-//
-//            if (!conn.isValid()) {
-//                return null;
-//            }
-//			// Object operationReturnObject = 
-//            conn.executeOperation(result,
-//					getComponentType(), name, valueMap);
-//            
-//            
-//		} catch (Exception e) {
-//			final String msg = "Failed to invoke operation [" + name + "]. Cause: " + e; //$NON-NLS-1$ //$NON-NLS-2$
-//			LOG.error(msg);
-//			throw new RuntimeException(msg); 
-//		} finally {
-//			conn.close();
-//		}
-//
-//		return (OperationResult)result;
-//	}
-}
\ No newline at end of file

Deleted: trunk/console/src/main/java/org/teiid/rhq/plugin/ConnectorDiscoveryComponent.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/ConnectorDiscoveryComponent.java	2010-01-20 03:58:44 UTC (rev 1758)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/ConnectorDiscoveryComponent.java	2010-01-20 18:29:36 UTC (rev 1759)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-package org.teiid.rhq.plugin;
-
-import java.util.Collection;
-
-import org.teiid.rhq.comm.Component;
-import org.teiid.rhq.comm.Connection;
-import org.teiid.rhq.comm.ConnectionConstants;
-import org.teiid.rhq.comm.ConnectionException;
-
-
-/**
- * Discovery component used to discover the monitored connector bindings
- * 
- */
-public class ConnectorDiscoveryComponent extends NodeChildrenDiscoveryComponent {
-	
-	 Collection<Component> getComponents(Connection conn, Facet parent) throws ConnectionException {
-		 return conn.discoverComponents(ConnectionConstants.ComponentType.Runtime.Connector.TYPE, parent.getComponentIdentifier());
-	 }
-	
-
-}
\ No newline at end of file

Modified: trunk/console/src/main/java/org/teiid/rhq/plugin/Facet.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/Facet.java	2010-01-20 03:58:44 UTC (rev 1758)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/Facet.java	2010-01-20 18:29:36 UTC (rev 1759)
@@ -55,11 +55,9 @@
 import org.teiid.rhq.admin.utils.SingletonConnectionManager;
 import org.teiid.rhq.comm.Component;
 import org.teiid.rhq.comm.Connection;
-import org.teiid.rhq.comm.ConnectionConstants;
 import org.teiid.rhq.comm.ConnectionException;
 import org.teiid.rhq.comm.ExecutedResult;
 import org.teiid.rhq.comm.VMComponent;
-import org.teiid.rhq.comm.ConnectionConstants.ComponentType;
 import org.teiid.rhq.plugin.objects.ExecutedOperationResultImpl;
 
 
@@ -112,31 +110,6 @@
 	 */
 	public void start(ResourceContext context) {
 		resourceContext = context;
-		
-		
-		systemKey = resourceContext.getPluginConfiguration()
-				.getSimpleProperties().get(Component.SYSTEM_KEY)
-				.getStringValue();
-		name = resourceContext.getPluginConfiguration().getSimpleProperties()
-				.get(Component.NAME).getStringValue();
-
-		// because the system may not be up, name and
-		// identifier may be null at initial creation
-		// and will be updated when the system becomes available.
-		if (name == null)
-			name = "NotSet"; //$NON-NLS-1$
-
-		identifier = resourceContext.getPluginConfiguration()
-				.getSimpleProperties().get(Component.IDENTIFIER)
-				.getStringValue();
-		if (identifier == null)
-			identifier = "";//$NON-NLS-1$
-		if (resourceContext.getPluginConfiguration().getSimpleProperties().get(
-				VMComponent.PORT) != null) {
-			port = resourceContext.getPluginConfiguration()
-					.getSimpleProperties().get(VMComponent.PORT)
-					.getStringValue();
-		}
 	}
 
 	/**
@@ -244,31 +217,9 @@
 	 */
 	public AvailabilityType getAvailability() {
 
-		if (!connMgr.hasServersDefined()) {
-			this.isAvailable = false;
-			return AvailabilityType.DOWN;
-			
-		}
-		Connection connection = null;
-		try {
-
-			LOG.debug("Checking availability of  " + identifier); //$NON-NLS-1$
-			connection = getConnection();
-			if (connection.isAvailable(getComponentType(), identifier)) {
-				LOG.info("Availability of  " + identifier + " is up"); //$NON-NLS-1$  //$NON-NLS-2$
-				this.isAvailable = true;
-				return AvailabilityType.UP;
-			} 
-		} catch (InvalidPluginConfigurationException ipce) {
-			// dont log anything, already done when getconnection is called
-		} catch (Throwable err) {
-			LOG.error("Unknown exception occured when checking availability for resource " + identifier, err); //$NON-NLS-1$ 
-		} finally {
-			connection.close();
-		}
-		LOG.error("Availability of  " + identifier + " is down"); //$NON-NLS-1$ //$NON-NLS-2$
-		this.isAvailable = false;
-		return AvailabilityType.DOWN;
+		LOG.debug("Checking availability of  " + identifier); //$NON-NLS-1$
+		
+		return AvailabilityType.UP;
 	}
 
 	/**
@@ -339,9 +290,9 @@
 			// start with.
 			// note that it is empty, so we're assuming there are no required
 			// configs in the plugin descriptor.
-			resourceConfiguration = new Configuration();
+			resourceConfiguration = this.resourceContext.getPluginConfiguration();
 		}
-
+		
 		Configuration config = resourceConfiguration;
 
 		return config;
@@ -438,4 +389,6 @@
 	 */
 	public void deleteResource() {
 	}
+	
+	
 }

Deleted: trunk/console/src/main/java/org/teiid/rhq/plugin/HostComponent.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/HostComponent.java	2010-01-20 03:58:44 UTC (rev 1758)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/HostComponent.java	2010-01-20 18:29:36 UTC (rev 1759)
@@ -1,176 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-package org.teiid.rhq.plugin;
-
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.measurement.MeasurementDataNumeric;
-import org.rhq.core.domain.measurement.MeasurementReport;
-import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
-import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
-import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
-import org.rhq.core.pluginapi.measurement.MeasurementFacet;
-import org.teiid.rhq.comm.ConnectionConstants;
-import org.teiid.rhq.comm.ConnectionException;
-import org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.Host;
-
-
-/**
- * Component class for the MetaMatrix Host Controller process.
- * 
- */
-public class HostComponent extends Facet {
-	private final Log LOG = LogFactory
-			.getLog(HostComponent.class);
-
-
-	public static final String CONNECTOR_ADDRESS_CONFIG_PROPERTY = "connectorAddress"; //$NON-NLS-1$
-
-	public static final String CONNECTION_TYPE = "type"; //$NON-NLS-1$
-
-	public static final String PARENT_TYPE = "PARENT"; //$NON-NLS-1$
-	
-	public static final String INSTALL_DIR = "install.dir"; //$NON-NLS-1$
-	
-    
-	private String install_dir;
-    /** 
-     * @see org.teiid.rhq.plugin.Facet#getComponentType()
-     * @since 1.0
-     */
-    @Override
-    String getComponentType() {
-        return Host.TYPE;
-    }
-    
-    
-    
-    String getInstallDirectory() {
-    	
-    	if (install_dir != null) {
-    		return install_dir;
-    	}
-    	install_dir = resourceContext.getPluginConfiguration()
-		.getSimpleProperties().get(INSTALL_DIR)
-		.getStringValue(); 
- 
-    	return install_dir;
-    }
-
-
-	/**
-	 * The plugin container will call this method when your resource component
-	 * has been scheduled to collect some measurements now. It is within this
-	 * method that you actually talk to the managed resource and collect the
-	 * measurement data that is has emitted.
-	 * 
-	 * @see MeasurementFacet#getValues(MeasurementReport, Set)
-	 */
-	public void getValues(MeasurementReport report,
-			Set<MeasurementScheduleRequest> requests) {
-		for (MeasurementScheduleRequest request : requests) {
-			String name = request.getName();
-
-			// TODO: based on the request information, you must collect the
-			// requested measurement(s)
-			// you can use the name of the measurement to determine what you
-			// actually need to collect
-			try {
-				Number value = new Integer(1); // dummy measurement value -
-												// this should come from the
-												// managed resource
-				report.addData(new MeasurementDataNumeric(request, value
-						.doubleValue()));
-			} catch (Exception e) {
-				LOG.error("Failed to obtain measurement [" + name //$NON-NLS-1$
-						+ "]. Cause: " + e); //$NON-NLS-1$
-			}
-		}
-
-		return;
-	}
-	
-	protected void setOperationArguments(String name, Configuration configuration,
-			Map argumentMap) {
-
-		if (name.equals(ConnectionConstants.ComponentType.Operation.GET_PROPERTIES)){
-			String key = ConnectionConstants.IDENTIFIER;
-			argumentMap.put(key, getComponentIdentifier());
-		}
- 		
-	} 
-	
-	/**
-	 * The plugin container will call this method and it needs to obtain the
-	 * current configuration of the managed resource. Your plugin will obtain
-	 * the managed resource's configuration in your own custom way and populate
-	 * the returned Configuration object with the managed resource's
-	 * configuration property values.
-	 * 
-	 * @see ConfigurationFacet#loadResourceConfiguration()
-	 * 
-	 */
-	@Override
-	public Configuration loadResourceConfiguration() {
-		// here we simulate the loading of the managed resource's configuration
-		Configuration config = this.getResourceConfiguration() ;
-		if (config == null) {
-			// for this example, we will create a simple dummy configuration to
-			// start with.
-			// note that it is empty, so we're assuming there are no required
-			// configs in the plugin descriptor.
-			config = new Configuration();
-		}
-
-   		Properties props;
-		try {
-			props = getConnection().getProperties(this.getComponentType(), this.getComponentIdentifier());
-		} catch (ConnectionException e) {
-			LOG.error("Failed to obtain host properties for [" + this.getComponentIdentifier() //$NON-NLS-1$
-					+ "]. Cause: " + e); //$NON-NLS-1$
-			 throw new InvalidPluginConfigurationException(e); 
-		}
-        
-   		if (props != null && props.size() > 0) {
-   			Iterator it=props.keySet().iterator();
-   			while(it.hasNext())  {
-   				String k = (String)it.next();
-   				
-   				config.put(new PropertySimple(k, props.get(k)));
-
-   			}
-   			
-   		}
-
-				
-		this.setResourceConfiguration(config);
-		return this.getResourceConfiguration();
-	}
-
-}
\ No newline at end of file

Deleted: trunk/console/src/main/java/org/teiid/rhq/plugin/HostDiscoveryComponent.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/HostDiscoveryComponent.java	2010-01-20 03:58:44 UTC (rev 1758)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/HostDiscoveryComponent.java	2010-01-20 18:29:36 UTC (rev 1759)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-package org.teiid.rhq.plugin;
-
-import java.util.Collection;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
-import org.teiid.rhq.comm.Component;
-import org.teiid.rhq.comm.Connection;
-import org.teiid.rhq.comm.ConnectionConstants;
-import org.teiid.rhq.comm.ConnectionException;
-
-
-/**
- * Discovery component for the MetaMatrix Host controller process
- *
- */
-public class HostDiscoveryComponent extends NodeChildrenDiscoveryComponent {
-
-
-	@Override
-	 Collection<Component> getComponents(Connection conn, Facet parent) throws ConnectionException {
-		 return conn.discoverComponents(ConnectionConstants.ComponentType.Runtime.Host.TYPE, "*");
-	 }
-	
-	@Override
-	protected void addAdditionalProperties(Configuration configuration, Component component) throws InvalidPluginConfigurationException {
-		 String installdir = component.getProperty(HostComponent.INSTALL_DIR);
-		 configuration.put(new PropertySimple(HostComponent.INSTALL_DIR,
-				 installdir));     
-	}
-	
-	
-}
\ No newline at end of file

Added: trunk/console/src/main/java/org/teiid/rhq/plugin/ModelComponent.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/ModelComponent.java	                        (rev 0)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/ModelComponent.java	2010-01-20 18:29:36 UTC (rev 1759)
@@ -0,0 +1,101 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+package org.teiid.rhq.plugin;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.measurement.MeasurementDataNumeric;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
+import org.rhq.core.pluginapi.measurement.MeasurementFacet;
+import org.teiid.rhq.comm.ConnectionConstants;
+
+
+/**
+ * Component class for the MetaMatrix Host Controller process.
+ * 
+ */
+public class ModelComponent extends Facet {
+	private final Log LOG = LogFactory
+			.getLog(ModelComponent.class);
+
+
+	/** 
+     * @see org.teiid.rhq.plugin.Facet#getComponentType()
+     * @since 1.0
+     */
+    @Override
+    String getComponentType() {
+        return ConnectionConstants.ComponentType.Resource.Model.TYPE;
+    }
+    
+    /**
+	 * The plugin container will call this method when your resource component
+	 * has been scheduled to collect some measurements now. It is within this
+	 * method that you actually talk to the managed resource and collect the
+	 * measurement data that is has emitted.
+	 * 
+	 * @see MeasurementFacet#getValues(MeasurementReport, Set)
+	 */
+	public void getValues(MeasurementReport report,
+			Set<MeasurementScheduleRequest> requests) {
+		for (MeasurementScheduleRequest request : requests) {
+			String name = request.getName();
+
+			// TODO: based on the request information, you must collect the
+			// requested measurement(s)
+			// you can use the name of the measurement to determine what you
+			// actually need to collect
+			try {
+				Number value = new Integer(1); // dummy measurement value -
+												// this should come from the
+												// managed resource
+				report.addData(new MeasurementDataNumeric(request, value
+						.doubleValue()));
+			} catch (Exception e) {
+				LOG.error("Failed to obtain measurement [" + name //$NON-NLS-1$
+						+ "]. Cause: " + e); //$NON-NLS-1$
+			}
+		}
+
+		return;
+	}
+	
+	protected void setOperationArguments(String name, Configuration configuration,
+			Map argumentMap) {
+
+		if (name.equals(ConnectionConstants.ComponentType.Operation.GET_PROPERTIES)){
+			String key = ConnectionConstants.IDENTIFIER;
+			argumentMap.put(key, getComponentIdentifier());
+		}
+ 		
+	} 
+	
+}
\ No newline at end of file

Added: trunk/console/src/main/java/org/teiid/rhq/plugin/ModelDiscoveryComponent.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/ModelDiscoveryComponent.java	                        (rev 0)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/ModelDiscoveryComponent.java	2010-01-20 18:29:36 UTC (rev 1759)
@@ -0,0 +1,150 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+package org.teiid.rhq.plugin;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.managed.api.ComponentType;
+import org.jboss.managed.api.ManagedComponent;
+import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.plugins.ManagedObjectImpl;
+import org.jboss.metatype.api.values.CollectionValueSupport;
+import org.jboss.metatype.api.values.GenericValueSupport;
+import org.jboss.metatype.api.values.MetaValue;
+import org.jboss.metatype.api.values.SimpleValueSupport;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.Property;
+import org.rhq.core.domain.configuration.PropertyList;
+import org.rhq.core.domain.configuration.PropertyMap;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.teiid.rhq.plugin.util.PluginConstants;
+import org.teiid.rhq.plugin.util.ProfileServiceUtil;
+
+/**
+ * Discovery component for the MetaMatrix Host controller process
+ * 
+ */
+public class ModelDiscoveryComponent implements ResourceDiscoveryComponent {
+
+	private final Log log = LogFactory.getLog(this.getClass());
+
+	public Set<DiscoveredResourceDetails> discoverResources(
+			ResourceDiscoveryContext discoveryContext)
+			throws InvalidPluginConfigurationException, Exception {
+		Set<DiscoveredResourceDetails> discoveredResources = new HashSet<DiscoveredResourceDetails>();
+
+		PropertyList list = discoveryContext.getParentResourceContext().getPluginConfiguration().getList("models");
+
+		Iterator<Property> listIter = list.getList().iterator();
+		
+		while(listIter.hasNext()){
+			PropertyMap propertyMap = (PropertyMap)listIter.next();
+			
+			String modelName = ((PropertySimple)propertyMap.getMap().get("name")).getStringValue();
+		
+			ManagedComponent model = ProfileServiceUtil
+			.getManagedComponent(new ComponentType(
+					PluginConstants.ComponentType.Model.TYPE,
+					PluginConstants.ComponentType.Model.SUBTYPE),
+					modelName);
+	
+			/**
+			 * 
+			 * A discovered resource must have a unique key, that must stay the same
+			 * when the resource is discovered the next time
+			 */
+			DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
+					discoveryContext.getResourceType(), // ResourceType
+					modelName, // Resource Key
+					modelName, // Resource Name
+					null, // Version TODO can we get that from discovery ?
+					PluginConstants.ComponentType.Model.DESCRIPTION, // Description
+					discoveryContext.getDefaultPluginConfiguration(), // Plugin Config
+					null // Process info from a process scan
+			);
+					
+			// modelURI, connectorBindingNames, source, visible, modelType, visibility, supportsMultiSourceBindings, 
+			// name, path, uuid, properties
+			String name = ((SimpleValueSupport)model.getProperty("name").getValue()).getValue().toString();
+			String path = ((SimpleValueSupport)model.getProperty("path").getValue()).getValue().toString();
+			String modelURI = ((SimpleValueSupport)model.getProperty("modelURI").getValue()).getValue().toString();
+			String source = ((SimpleValueSupport)model.getProperty("source").getValue()).getValue().toString();
+			String visible = ((SimpleValueSupport)model.getProperty("visible").getValue()).getValue().toString();
+			String modelType = ((SimpleValueSupport)model.getProperty("modelType").getValue()).getValue().toString();
+			String supportsMultiSourceBindings = ((SimpleValueSupport)model.getProperty("supportsMultiSourceBindings").getValue()).getValue().toString();
+			
+			Configuration c = detail.getPluginConfiguration(); 
+			
+			getConnectors(model, c);
+			
+			c.put(new PropertySimple("name", name));
+			c.put(new PropertySimple("path", path));
+			c.put(new PropertySimple("modelURI", modelURI));
+			c.put(new PropertySimple("source", source));
+			c.put(new PropertySimple("visible", visible));
+			c.put(new PropertySimple("modelType", modelType));
+			c.put(new PropertySimple("supportsMultiSourceBindings", supportsMultiSourceBindings));	
+			
+			
+			// Add to return values
+			discoveredResources.add(detail);
+			log.info("Discovered Teiid Model: " + modelName);
+		}
+
+		return discoveredResources;
+	}
+	
+	/**
+	 * @param mcVdb
+	 * @param configuration
+	 */
+	private void getConnectors(ManagedComponent model, Configuration configuration) {
+		//Get Connector(s) from Model
+		ManagedProperty property = model.getProperty("connectorBindingNames");
+		CollectionValueSupport valueSupport = (CollectionValueSupport) property.getValue();
+		MetaValue[] metaValues = valueSupport.getElements();
+ 
+		PropertyList connectorsList = new PropertyList("connectors");
+		configuration.put(connectorsList);
+				
+		for (MetaValue value : metaValues) {
+			SimpleValueSupport simpleValueSupport = (SimpleValueSupport) value;
+			String connectorName = (String)simpleValueSupport.getValue();
+			
+			PropertyMap connector = new PropertyMap("connector", new PropertySimple("name", connectorName));
+			connectorsList.add(connector);
+		}
+	}	
+	
+}
\ No newline at end of file

Deleted: trunk/console/src/main/java/org/teiid/rhq/plugin/ProcessComponent.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/ProcessComponent.java	2010-01-20 03:58:44 UTC (rev 1758)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/ProcessComponent.java	2010-01-20 18:29:36 UTC (rev 1759)
@@ -1,316 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-package org.teiid.rhq.plugin;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.event.EventSeverity;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.domain.measurement.MeasurementDataNumeric;
-import org.rhq.core.domain.measurement.MeasurementReport;
-import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
-import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
-import org.rhq.core.pluginapi.event.EventContext;
-import org.rhq.core.pluginapi.event.EventPoller;
-import org.rhq.core.pluginapi.event.log.LogFileEventPoller;
-import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
-import org.rhq.core.pluginapi.inventory.ResourceContext;
-import org.teiid.rhq.comm.Connection;
-import org.teiid.rhq.comm.ConnectionConstants;
-import org.teiid.rhq.comm.ConnectionException;
-import org.teiid.rhq.comm.ConnectionConstants.ComponentType;
-import org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.Process;
-import org.teiid.rhq.plugin.log.JBEDSPErrorLogEntryProcessor;
-
-
-/**
- * 
- * MetaMatrix server component class. This class represents the node for the
- * MMProcess.
- * 
- */
-public class ProcessComponent extends Facet {
-	private final Log LOG = LogFactory.getLog(ProcessComponent.class);
-    
-    
-    public static final String PLUGIN_CONFIG_PROP_ERROR_LOG_EVENTS_ENABLED = "enabled"; //$NON-NLS-1$
-    public static final String PLUGIN_CONFIG_PROP_ERROR_LOG_MINIMUM_SEVERITY = "minimumSeverity"; //$NON-NLS-1$
-    public static final String PLUGIN_CONFIG_PROP_ERROR_LOG_INCLUDES_PATTERN = "errorLogIncludesPattern"; //$NON-NLS-1$
-    public static final String PLUGIN_CONFIG_PROP_ERROR_LOG_FILE_PATH = "errorLogFilePath"; //$NON-NLS-1$
-	public static final String INSTALL_DIR = "install.dir"; //$NON-NLS-1$
-   
-    private static final String ERROR_LOG_ENTRY_EVENT_TYPE = "errorLogEntry"; //$NON-NLS-1$
-   
-    
-    
-    private EventContext eventContext;   
-    private File errorLogFile;
-
-    
-    /** 
-     * @see org.teiid.rhq.plugin.Facet#start(org.rhq.core.pluginapi.inventory.ResourceContext)
-     */
-    @Override
-    public void start(ResourceContext context) {
-        super.start(context);
-        
-        this.eventContext = resourceContext.getEventContext();
-       
- //       startEventPollers();
-    }
-    
-    /** 
-     * @see org.teiid.rhq.plugin.Facet#stop()
-     */
-    @Override
-    public void stop() {
-        stopEventPollers();
-        super.stop();
-            
-    }   
-    
-	public AvailabilityType getAvailability() {
-
-		return AvailabilityType.UP;
-		}
-    
-    /** 
-     * @see org.teiid.rhq.plugin.Facet#getComponentType()
-     * @since 1.0
-     */
-    @Override
-    String getComponentType() {
-        return Process.TYPE;
-    }
-    
-	protected void setOperationArguments(String name, Configuration configuration,
-			Map argumentMap) {
-
-		if (name.equals(ConnectionConstants.ComponentType.Operation.GET_PROPERTIES)){
-			String key = ConnectionConstants.IDENTIFIER;
-			argumentMap.put(key, getComponentIdentifier());
-		}
- 		
-	}   
-    
-
-	@Override
-	public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) throws Exception {
-		 Connection conn = null;
-		    Map valueMap = new HashMap();
-		    
-		    try{ 
-		        conn = getConnection();
-                if (!conn.isValid()) {
-                    return;
-                }                
-		        for (MeasurementScheduleRequest request : requests) {
-		            String name = request.getName();
-		            LOG.info("Measurement name = " + name);  //$NON-NLS-1$
-		            
-		            Object metricReturnObject = conn.getMetric(getComponentType(), this.getComponentIdentifier(), name, valueMap);
-
-		            try {
-		                if (request.getName().equals(ComponentType.Metric.HIGH_WATER_MARK)) {
-		                    report.addData(new MeasurementDataNumeric(request,
-		                            (Double)metricReturnObject));
-		                }
-		            } catch (Exception e) {
-		                LOG.error("Failed to obtain measurement [" + name  //$NON-NLS-1$
-		                        + "]. Cause: " + e); //$NON-NLS-1$
-		                throw(e);
-		            }
-		        }
-		    }finally{
-		        conn.close();
-		    }
-		
-	}
-	
-	
-	/**
-	 * The plugin container will call this method and it needs to obtain the
-	 * current configuration of the managed resource. Your plugin will obtain
-	 * the managed resource's configuration in your own custom way and populate
-	 * the returned Configuration object with the managed resource's
-	 * configuration property values.
-	 * 
-	 * @see ConfigurationFacet#loadResourceConfiguration()
-	 * 
-	 */
-	@Override
-	public Configuration loadResourceConfiguration() {
-		// here we simulate the loading of the managed resource's configuration
-		Configuration config = this.getResourceConfiguration() ;
-		if (config == null) {
-			// for this example, we will create a simple dummy configuration to
-			// start with.
-			// note that it is empty, so we're assuming there are no required
-			// configs in the plugin descriptor.
-			config = new Configuration();
-		}
-
-   		Properties props;
-		try {
-			props = getConnection().getProperties(this.getComponentType(), this.getComponentIdentifier());
-		} catch (ConnectionException e) {
-			LOG.error("Failed to obtain process properties for [" + this.getComponentIdentifier() //$NON-NLS-1$
-					+ "]. Cause: " + e); //$NON-NLS-1$
-			 throw new InvalidPluginConfigurationException(e); 
-		}
-        
-   		if (props != null && props.size() > 0) {
-   			Iterator it=props.keySet().iterator();
-   			while(it.hasNext())  {
-   				String k = (String)it.next();
-   				
-   				config.put(new PropertySimple(k, props.get(k)));
-
-   			}
-   			
-   		}
-
-				
-		this.setResourceConfiguration(config);
-		return this.getResourceConfiguration();
-	}	
-
-    
-	protected static String deriveFileName(final String identifier) {
-		
-		 String startFileName = identifier.substring(0, identifier.indexOf("|")); //$NON-NLS-1$
-         String endFileName = identifier.substring(identifier.indexOf("|")+1, identifier.length()); //$NON-NLS-1$
-         
-         startFileName = replaceAll(startFileName, ".", "_"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-         String logfilename = startFileName.toLowerCase() + "_" + endFileName + ".log"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-         
-         return logfilename;
-		
-	}
-    
-    private void startEventPollers() {
-		Configuration pluginConfig = resourceContext.getPluginConfiguration();
-		Boolean enabled = Boolean.valueOf(pluginConfig.getSimpleValue(
-				PLUGIN_CONFIG_PROP_ERROR_LOG_EVENTS_ENABLED, null)); //$NON-NLS-1$
-		if (enabled) {
-
-			String installdir = pluginConfig.getSimpleValue(
-					INSTALL_DIR, null); //$NON-NLS-1$
-			if (installdir == null) {
-				throw new InvalidPluginConfigurationException(
-						"Installation directory could not be determined in order for the process to monitor the log files"); //$NON-NLS-1$ //$NON-NLS-2$
-				
-			}
-
-			String logFileName = deriveFileName(this.getComponentIdentifier());
-
-			String relativelogname = pluginConfig.getSimpleValue(
-					PLUGIN_CONFIG_PROP_ERROR_LOG_FILE_PATH,
-					"/log/" + logFileName); //$NON-NLS-1$
-
-			errorLogFile = new File(installdir + "/" + relativelogname); //$NON-NLS-1$
-
-			LOG.info("Start event polling on logfile: " + errorLogFile.getAbsolutePath()); //$NON-NLS-1$
-
-			JBEDSPErrorLogEntryProcessor processor = new JBEDSPErrorLogEntryProcessor(
-					ERROR_LOG_ENTRY_EVENT_TYPE, errorLogFile);
-			String includesPatternString = pluginConfig.getSimpleValue(
-					PLUGIN_CONFIG_PROP_ERROR_LOG_INCLUDES_PATTERN, null);
-			if (includesPatternString != null) {
-				try {
-					Pattern includesPattern = Pattern
-							.compile(includesPatternString);
-					processor.setIncludesPattern(includesPattern);
-				} catch (PatternSyntaxException e) {
-					throw new InvalidPluginConfigurationException(
-							"Includes pattern [" + includesPatternString + "] is not a valid regular expression."); //$NON-NLS-1$ //$NON-NLS-2$
-				}
-			}
-			String minimumSeverityString = pluginConfig.getSimpleValue(
-					PLUGIN_CONFIG_PROP_ERROR_LOG_MINIMUM_SEVERITY, null);
-			if (minimumSeverityString != null) {
-				EventSeverity minimumSeverity = EventSeverity
-						.valueOf(minimumSeverityString.toUpperCase());
-				processor.setMinimumSeverity(minimumSeverity);
-			}
-			EventPoller poller = new LogFileEventPoller(this.eventContext,
-					ERROR_LOG_ENTRY_EVENT_TYPE, errorLogFile, processor);
-			this.eventContext.registerEventPoller(poller, 30, errorLogFile
-					.getPath());
-		}
-	}
-
-    private void stopEventPollers() {
-// Configuration pluginConfig = this.resourceContext.getPluginConfiguration();
-// File errorLogFile =
-// resolvePathRelativeToServerRoot(pluginConfig.getSimpleValue(PLUGIN_CONFIG_PROP_ERROR_LOG_FILE_PATH,
-// DEFAULT_ERROR_LOG_PATH));
-        this.eventContext.unregisterEventPoller(ERROR_LOG_ENTRY_EVENT_TYPE, errorLogFile.getPath());
-    }
-    
-    
-    /*
-     * Replace all occurrences of the search string with the replace string
-     * in the source string. If any of the strings is null or the search string
-     * is zero length, the source string is returned.
-     * @param source the source string whose contents will be altered
-     * @param search the string to search for in source
-     * @param replace the string to substitute for search if present
-     * @return source string with *all* occurrences of the search string
-     * replaced with the replace string
-     */
-    private static String replaceAll(String source, String search, String replace) {
-        if (source != null && search != null && search.length() > 0 && replace != null) {
-            int start = source.indexOf(search);
-            if (start > -1) {
-                StringBuffer newString = new StringBuffer(source);
-                replaceAll(newString, search, replace);
-                return newString.toString();
-            }
-        }
-        return source;    
-    }
-    
-    private static void replaceAll(StringBuffer source, String search, String replace) {
-        if (source != null && search != null && search.length() > 0 && replace != null) {
-            int start = source.toString().indexOf(search);
-            while (start > -1) {
-                int end = start + search.length();
-                source.replace(start, end, replace);
-                start = source.toString().indexOf(search, start + replace.length());
-            }
-        }
-    }
-    
-
-}
\ No newline at end of file

Deleted: trunk/console/src/main/java/org/teiid/rhq/plugin/ProcessDiscoveryComponent.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/ProcessDiscoveryComponent.java	2010-01-20 03:58:44 UTC (rev 1758)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/ProcessDiscoveryComponent.java	2010-01-20 18:29:36 UTC (rev 1759)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-package org.teiid.rhq.plugin;
-
-import java.util.Collection;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
-import org.teiid.rhq.comm.Component;
-import org.teiid.rhq.comm.Connection;
-import org.teiid.rhq.comm.ConnectionConstants;
-import org.teiid.rhq.comm.ConnectionException;
-import org.teiid.rhq.comm.VMComponent;
-
-
-
-/**
- * 
- * The discovery component class for the MetaMatrix server node
- * 
- */
-public class ProcessDiscoveryComponent extends NodeChildrenDiscoveryComponent {
- 
-    
-	 Collection<Component> getComponents(Connection conn, Facet parent) throws ConnectionException {
-		 return conn.discoverComponents(ConnectionConstants.ComponentType.Runtime.Process.TYPE, parent.getComponentIdentifier());
-	 }
-	 
-		protected void addAdditionalProperties(Configuration configuration, Component component) throws InvalidPluginConfigurationException {
-            configuration.put(new PropertySimple(VMComponent.PORT, ((VMComponent)component).getPort()));   
-   
-		}
-}
\ No newline at end of file

Deleted: trunk/console/src/main/java/org/teiid/rhq/plugin/SystemComponent.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/SystemComponent.java	2010-01-20 03:58:44 UTC (rev 1758)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/SystemComponent.java	2010-01-20 18:29:36 UTC (rev 1759)
@@ -1,169 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-package org.teiid.rhq.plugin;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.measurement.MeasurementDataNumeric;
-import org.rhq.core.domain.measurement.MeasurementReport;
-import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
-import org.teiid.rhq.comm.Connection;
-import org.teiid.rhq.comm.ConnectionConstants;
-import org.teiid.rhq.comm.ConnectionConstants.ComponentType;
-import org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.Queries.Query;
-import org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.System.Metrics;
-import org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.System.Operations;
-
-
-/**
- * 
- */
-public class SystemComponent extends Facet {
-	private final Log LOG = LogFactory.getLog(SystemComponent.class);
-
-	/**
-	 * Property is used to identify an unreachable system
-	 */
-	protected static final String UNREACHABLE_NAME = "UNREACHABLE_SYSTEM"; //$NON-NLS-1$
-
-	/**
-	 * @see org.teiid.rhq.plugin.Facet#getComponentType()
-	 * @since 4.3
-	 */
-	@Override
-	String getComponentType() {
-		return ConnectionConstants.ComponentType.Runtime.System.TYPE;
-	}
-	
-	protected void setOperationArguments(String name, Configuration configuration,
-			Map valueMap) {
-
-		// Parameter logic for System Operations
-		if (name.equals(Query.GET_QUERIES) ||
-			name.equals(Operations.GET_LONGRUNNINGQUERIES)) {
-			Boolean includeSourceQueries = configuration.getSimple(ConnectionConstants.ComponentType.Operation.Value.INCLUDE_SOURCE_QUERIES).getBooleanValue();
-			Integer long_running_value = getResourceConfiguration().getSimple(ConnectionConstants.ComponentType.Operation.Value.LONG_RUNNING_QUERY_LIMIT).getIntegerValue();
-			valueMap.put(ConnectionConstants.ComponentType.Operation.Value.INCLUDE_SOURCE_QUERIES, includeSourceQueries);
-			valueMap.put(ConnectionConstants.ComponentType.Operation.Value.LONG_RUNNING_QUERY_LIMIT, long_running_value);				
-		}else if (name.equals(Operations.BOUNCE_SYSTEM)) {
-			Boolean waitUntilFinished = configuration.getSimple(ConnectionConstants.ComponentType.Operation.Value.WAIT_UNTIL_FINISHED).getBooleanValue();
-			valueMap.put(ConnectionConstants.ComponentType.Operation.Value.WAIT_UNTIL_FINISHED, waitUntilFinished);
-		}else if (name.equals(ConnectionConstants.ComponentType.Operation.KILL_REQUEST)) {
-			String key = ConnectionConstants.ComponentType.Operation.Value.REQUEST_ID;
-			valueMap.put(key, configuration.getSimple(key).getStringValue());
-		}else if (name.equals(ConnectionConstants.ComponentType.Operation.GET_PROPERTIES) ) {
-			String key = ConnectionConstants.IDENTIFIER;
-			valueMap.put(key, getComponentIdentifier());
-		}
- 		
-	}	
-
-
-	@Override
-	public void getValues(MeasurementReport report,
-			Set<MeasurementScheduleRequest> requests) throws Exception {
-		
-		// because the sytsem object will be created before the use actually connects, checks have to be
-		// made not to perform actions that will require a connection before its available
-		if (!this.isAvailable()) {
-			return;
-		}
-
-		Connection conn = null;
-		Map valueMap = new HashMap();
-
-		try {
-			conn = getConnection();
-			if (!conn.isValid()) {
-				return;
-			}
-			for (MeasurementScheduleRequest request : requests) {
-				String name = request.getName();
-				LOG.debug("Measurement name = " + name); //$NON-NLS-1$
-				
-				//Initialize any parameters to be used in the retrieval of metric values
-				if (request.getName().equals(Metrics.LONG_RUNNING_QUERIES)) {
-					Integer value = getResourceConfiguration().getSimple(ConnectionConstants.ComponentType.Operation.Value.LONG_RUNNING_QUERY_LIMIT).getIntegerValue();
-					valueMap.put(ComponentType.Operation.Value.LONG_RUNNING_QUERY_LIMIT, value);
-				}
-				
-				Object metricReturnObject = conn.getMetric(getComponentType(),
-						this.getComponentIdentifier(),
-						name, 
-						valueMap);
-
-				try {
-					if (request.getName().equals(
-							Metrics.QUERY_COUNT)) {
-						report.addData(new MeasurementDataNumeric(request,
-								(Double) metricReturnObject));
-					} else {
-						if (request.getName().equals(
-								Metrics.SESSION_COUNT)) {
-							report.addData(new MeasurementDataNumeric(request,
-									(Double) metricReturnObject));
-						} else {
-							if (request.getName().equals(
-									Metrics.LONG_RUNNING_QUERIES)) {
-								report.addData(new MeasurementDataNumeric(
-										request, (Double) metricReturnObject));
-							}
-						}
-					}
-
-				} catch (Exception e) {
-					LOG.error("Failed to obtain measurement [" + name //$NON-NLS-1$
-							+ "]. Cause: " + e); //$NON-NLS-1$
-					// throw(e);
-				}
-			}
-		} finally {
-			if (conn != null) {
-				conn.close();
-			}
-		}
-	}
-	
-//
-//	@Override
-//	public void updateResourceConfiguration(ConfigurationUpdateReport report) {
-//		
-//		Properties props = System.getProperties();
-//		
-//		Iterator<PropertySimple> pluginPropIter = report.getConfiguration().getSimpleProperties().values().iterator();
-//		
-//		while (pluginPropIter.hasNext()){
-//			PropertySimple pluginProp = pluginPropIter.next();
-//			props.put(pluginProp.getName(), pluginProp.getStringValue());
-//		}
-//		
-//		SingletonConnectionManager.getInstance().initialize(props);
-//		super.updateResourceConfiguration(report);
-//		
-//	}	
-
-}
\ No newline at end of file

Copied: trunk/console/src/main/java/org/teiid/rhq/plugin/VDBComponent.java (from rev 1588, trunk/console/src/main/java/org/teiid/rhq/plugin/HostComponent.java)
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/VDBComponent.java	                        (rev 0)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/VDBComponent.java	2010-01-20 18:29:36 UTC (rev 1759)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+package org.teiid.rhq.plugin;
+
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.measurement.MeasurementDataNumeric;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.pluginapi.measurement.MeasurementFacet;
+import org.teiid.rhq.comm.ConnectionConstants;
+
+
+/**
+ * Component class for a Teiid VDB
+ * 
+ */
+public class VDBComponent extends Facet {
+	private final Log LOG = LogFactory
+			.getLog(VDBComponent.class);
+
+	/**
+	 * The plugin container will call this method when your resource component
+	 * has been scheduled to collect some measurements now. It is within this
+	 * method that you actually talk to the managed resource and collect the
+	 * measurement data that is has emitted.
+	 * 
+	 * @see MeasurementFacet#getValues(MeasurementReport, Set)
+	 */
+	public void getValues(MeasurementReport report,
+			Set<MeasurementScheduleRequest> requests) {
+		for (MeasurementScheduleRequest request : requests) {
+			String name = request.getName();
+
+			// TODO: based on the request information, you must collect the
+			// requested measurement(s)
+			// you can use the name of the measurement to determine what you
+			// actually need to collect
+			try {
+				Number value = new Integer(1); // dummy measurement value -
+												// this should come from the
+												// managed resource
+				report.addData(new MeasurementDataNumeric(request, value
+						.doubleValue()));
+			} catch (Exception e) {
+				LOG.error("Failed to obtain measurement [" + name //$NON-NLS-1$
+						+ "]. Cause: " + e); //$NON-NLS-1$
+			}
+		}
+
+		return;
+	}
+	
+	protected void setOperationArguments(String name, Configuration configuration,
+			Map argumentMap) {
+
+		if (name.equals(ConnectionConstants.ComponentType.Operation.GET_PROPERTIES)){
+			String key = ConnectionConstants.IDENTIFIER;
+			//argumentMap.put(key, getComponentIdentifier());
+		}
+ 		
+	}
+
+	@Override
+	String getComponentType() {
+		// TODO Auto-generated method stub
+		return null;
+	} 
+	
+}
+

Copied: trunk/console/src/main/java/org/teiid/rhq/plugin/VDBDiscoveryComponent.java (from rev 1588, trunk/console/src/main/java/org/teiid/rhq/plugin/HostDiscoveryComponent.java)
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/VDBDiscoveryComponent.java	                        (rev 0)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/VDBDiscoveryComponent.java	2010-01-20 18:29:36 UTC (rev 1759)
@@ -0,0 +1,142 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+package org.teiid.rhq.plugin;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.managed.api.ComponentType;
+import org.jboss.managed.api.ManagedComponent;
+import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.plugins.ManagedObjectImpl;
+import org.jboss.metatype.api.values.CollectionValueSupport;
+import org.jboss.metatype.api.values.GenericValueSupport;
+import org.jboss.metatype.api.values.MetaValue;
+import org.jboss.metatype.api.values.SimpleValueSupport;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertyList;
+import org.rhq.core.domain.configuration.PropertyMap;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.teiid.rhq.plugin.util.PluginConstants;
+import org.teiid.rhq.plugin.util.ProfileServiceUtil;
+
+/**
+ * Discovery component for VDs
+ * 
+ */
+public class VDBDiscoveryComponent implements ResourceDiscoveryComponent {
+
+	private final Log log = LogFactory.getLog(this.getClass());
+
+	public Set<DiscoveredResourceDetails> discoverResources(
+			ResourceDiscoveryContext discoveryContext)
+			throws InvalidPluginConfigurationException, Exception {
+		Set<DiscoveredResourceDetails> discoveredResources = new HashSet<DiscoveredResourceDetails>();
+
+		Set<ManagedComponent> vdbs = ProfileServiceUtil
+				.getManagedComponents(new ComponentType(
+						PluginConstants.ComponentType.VDB.TYPE,
+						PluginConstants.ComponentType.VDB.SUBTYPE));
+
+		for (ManagedComponent mcVdb : vdbs) {
+
+			String vdbName = ((SimpleValueSupport) mcVdb.getProperty("name")
+					.getValue()).getValue().toString();
+			String vdbVersion = ((SimpleValueSupport) mcVdb.getProperty("version")
+					.getValue()).getValue().toString();
+			//TODO: Correct this after deploying proper VDB/Metadata
+			String vdbDescription = "description"; // mcVdb.getProperty("description");
+			String vdbStatus = "active"; // mcVdb.getProperty("status");
+			String vdbURL = "url"; // mcVdb.getProperty("url");
+			
+			/**
+			 * 
+			 * A discovered resource must have a unique key, that must stay the
+			 * same when the resource is discovered the next time
+			 */
+			DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
+					discoveryContext.getResourceType(), // ResourceType
+					vdbName, // Resource Key
+					vdbName, // Resource Name
+					vdbVersion, // Version
+					PluginConstants.ComponentType.VDB.DESCRIPTION, // Description
+					discoveryContext.getDefaultPluginConfiguration(), // Plugin Config
+					null // Process info from a process scan
+			);
+			
+			//Get plugin config map for models
+			Configuration configuration = detail.getPluginConfiguration();
+
+			configuration.put(new PropertySimple("name", vdbName));
+			configuration.put(new PropertySimple("version", vdbVersion));
+			configuration.put(new PropertySimple("description", vdbDescription));
+			configuration.put(new PropertySimple("status", vdbStatus));
+			configuration.put(new PropertySimple("url", vdbURL));			
+			
+			getModels(mcVdb, configuration);
+
+			detail.setPluginConfiguration(configuration);
+			
+			// Add to return values
+			discoveredResources.add(detail);
+			log.info("Discovered Teiid VDB: " + vdbName);
+		}
+
+		return discoveredResources;
+	}
+
+	/**
+	 * @param mcVdb
+	 * @param configuration
+	 */
+	private void getModels(ManagedComponent mcVdb, Configuration configuration) {
+		//Get models from VDB
+		ManagedProperty property = mcVdb.getProperty("models");
+		CollectionValueSupport valueSupport = (CollectionValueSupport) property.getValue();
+		MetaValue[] metaValues = valueSupport.getElements();
+ 
+		PropertyList modelsList = new PropertyList("models");
+		configuration.put(modelsList);
+				
+		for (MetaValue value : metaValues) {
+			GenericValueSupport genValueSupport = (GenericValueSupport) value;
+			ManagedObjectImpl managedObject = (ManagedObjectImpl)genValueSupport.getValue();
+			String modelName = managedObject.getName();
+			String type = ((SimpleValueSupport) managedObject.getProperty("modelType").getValue()).getValue().toString();
+			String visibility = ((SimpleValueSupport) managedObject.getProperty("visible").getValue()).getValue().toString();
+			String path = ((SimpleValueSupport) managedObject.getProperty("path").getValue()).getValue().toString();
+			
+			PropertyMap model = new PropertyMap("model", new PropertySimple("name", modelName),
+					new PropertySimple("type", type), new PropertySimple("path", path), 
+					new PropertySimple("visibility", visibility));
+			modelsList.add(model);
+		}
+	}	
+	
+
+}

Modified: trunk/console/src/main/java/org/teiid/rhq/plugin/util/PluginConstants.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/util/PluginConstants.java	2010-01-20 03:58:44 UTC (rev 1758)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/util/PluginConstants.java	2010-01-20 18:29:36 UTC (rev 1759)
@@ -104,7 +104,8 @@
 		public interface Connector {
 
 			public final static String TYPE = "ConnectionFactory"; //$NON-NLS-1$
-			public final static String SUBTYPE = "NoTx"; //$NON-NLS-1$
+			public final static String SUBTYPE_NOTX = "NoTx"; //$NON-NLS-1$
+			public final static String SUBTYPE_TX = "Tx"; //$NON-NLS-1$
 			public final static String NAME = "Enterprise Connector"; //$NON-NLS-1$
 			public final static String DESCRIPTION = "JBoss Enterprise Connector Binding"; //$NON-NLS-1$
 			

Modified: trunk/console/src/resources/embedded/META-INF/rhq-plugin.xml
===================================================================
--- trunk/console/src/resources/embedded/META-INF/rhq-plugin.xml	2010-01-20 03:58:44 UTC (rev 1758)
+++ trunk/console/src/resources/embedded/META-INF/rhq-plugin.xml	2010-01-20 18:29:36 UTC (rev 1759)
@@ -1,38 +1,117 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 
-<!--
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */-->
+	<!--
+		* JBoss, Home of Professional Open Source. * See the COPYRIGHT.txt
+		file distributed with this work for information * regarding copyright
+		ownership. Some portions may be licensed * to Red Hat, Inc. under one
+		or more contributor license agreements. * * This library is free
+		software; you can redistribute it and/or * modify it under the terms
+		of the GNU Lesser General Public * License as published by the Free
+		Software Foundation; either * version 2.1 of the License, or (at your
+		option) any later version. * * This library is distributed in the hope
+		that it will be useful, * but WITHOUT ANY WARRANTY; without even the
+		implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR
+		PURPOSE. See the GNU * Lesser General Public License for more details.
+		* * You should have received a copy of the GNU Lesser General Public *
+		License along with this library; if not, write to the Free Software *
+		Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
+		02110-1301 USA. */
+	-->
 
 <plugin name="TeiidPlugin" displayName="Teiid Plugin" package="org.teiid.rhq.plugin"
 	version="2.0.0" description="Supports management and monitoring of JBoss Teiid"
-
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:xmlns:rhq-plugin"
 	xmlns:c="urn:xmlns:rhq-configuration">
 
-	<depends plugin="JMX" useClasses="true"/>
+	<depends plugin="JMX" />
+	<depends plugin="JBossAS5" useClasses="true" />
 
 
-	<server name="Teiid Data Services" description="Teiid Datasources" class="PlatformComponent"
-		discovery="PlatformDiscoveryComponent" createDeletePolicy="both">
+	<server name="Data Services" description="JBoss Enterprise Data Services"
+		class="PlatformComponent" discovery="PlatformDiscoveryComponent"
+		createDeletePolicy="both">
+
+
+		<runs-inside>
+			<parent-resource-type name="JBossAS Server"
+				plugin="JBossAS5" />
+		</runs-inside>
+
+		<service name="Virtual Database VDB(s)"
+			description="JBoss Enterprise Data Services Virtual Databases" class="VDBComponent"
+			discovery="VDBDiscoveryComponent" createDeletePolicy="both">
+
+			<resource-configuration>
+				<c:group name="general" displayName="General"
+					hiddenByDefault="false">
+					<c:simple-property name="name" type="string"
+						description="The Virtual Database Name" />
+					<c:simple-property name="version" type="string"
+						description="The Virtual Database Version" />
+					<c:simple-property name="description" type="string"
+						description="The Virtual Database Description" />
+					<c:simple-property name="status" type="string"
+						description="The Virtual Database Status" />
+					<c:simple-property name="url" type="string"
+						description="The Virtual Database URL" />
+				</c:group>
+				<c:group name="models" displayName="Models" hiddenByDefault="false">
+					<c:list-property name="models" description="The models for this VDB.">
+						<c:map-property name="model">
+							<c:simple-property name="name" displayName="Name"
+								description="Name of the model" required="true" />
+							<c:simple-property name="type" displayName="Type"
+								description="Type of model" required="true" />
+							<c:simple-property name="path" displayName="Path"
+								description="Path to the model" required="false" />
+							<c:simple-property name="visibility"
+								displayName="Visible" description="Visbility of the model"
+								required="false" />
+						</c:map-property>
+					</c:list-property>
+				</c:group>
+			</resource-configuration>
+
+			<service name="Models" description="Models that map to a datasource"
+				class="ModelComponent" discovery="ModelDiscoveryComponent"
+				createDeletePolicy="both">
+				<resource-configuration>
+					<c:group name="general" displayName="General"
+						hiddenByDefault="false">
+						<c:simple-property name="name" type="string"
+							description="The model name" readOnly="true" />
+						<c:simple-property name="type" type="string"
+							description="The model type. e.g. Source or Virtual" readOnly="true" />
+						<c:simple-property name="path" type="string"
+							description="The model path" readOnly="true" />
+						<c:simple-property name="modelURI" type="string"
+							description="The model URI" readOnly="true" />
+						<c:simple-property name="source" type="string"
+							description="True if this is a physical source model" readOnly="true" />
+						<c:simple-property name="visible" type="string"
+							description="True if the model is visible" readOnly="true" />
+						<c:simple-property name="modelType" type="string"
+							description="Type for this model" readOnly="true" />
+						<c:simple-property name="supportsMultiSourceBindings"
+							type="string" description="True if this models supports multiple source bindings"
+							readOnly="true" />
+					</c:group>
+					<c:group name="connectors" displayName="Connectors"
+						hiddenByDefault="false">
+						<c:list-property name="connectors"
+							description="The connector(s) for this Model">
+							<c:map-property name="connector">
+								<c:simple-property name="name" displayName="Name"
+									description="Connector for this model" required="true" />
+							</c:map-property>
+						</c:list-property>
+					</c:group>
+				</resource-configuration>
+
+			</service>
+
+		</service>
+
 	</server>
 
 </plugin>
\ No newline at end of file



More information about the teiid-commits mailing list