[teiid-commits] teiid SVN: r1859 - in branches/JCA/console/src/main/java/org/teiid/rhq: admin/utils and 10 other directories.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Fri Feb 19 15:41:30 EST 2010


Author: rareddy
Date: 2010-02-19 15:41:28 -0500 (Fri, 19 Feb 2010)
New Revision: 1859

Removed:
   branches/JCA/console/src/main/java/org/teiid/rhq/admin/ConnectionMgr.java
   branches/JCA/console/src/main/java/org/teiid/rhq/admin/utils/SingletonConnectionManager.java
   branches/JCA/console/src/main/java/org/teiid/rhq/comm/Component.java
   branches/JCA/console/src/main/java/org/teiid/rhq/comm/Connection.java
   branches/JCA/console/src/main/java/org/teiid/rhq/comm/ConnectionFactory.java
   branches/JCA/console/src/main/java/org/teiid/rhq/comm/ConnectionPool.java
   branches/JCA/console/src/main/java/org/teiid/rhq/comm/VMComponent.java
   branches/JCA/console/src/main/java/org/teiid/rhq/comm/impl/ComponentImpl.java
   branches/JCA/console/src/main/java/org/teiid/rhq/comm/impl/InvalidConnectionImpl.java
   branches/JCA/console/src/main/java/org/teiid/rhq/embedded/EmbeddedConnectionMgr.java
   branches/JCA/console/src/main/java/org/teiid/rhq/embedded/pool/ConnectionPoolImpl.java
   branches/JCA/console/src/main/java/org/teiid/rhq/enterprise/EnterpriseConnectionMgr.java
   branches/JCA/console/src/main/java/org/teiid/rhq/enterprise/pool/ConnectionPoolImpl.java
   branches/JCA/console/src/main/java/org/teiid/rhq/plugin/NodeChildrenDiscoveryComponent.java
   branches/JCA/console/src/main/java/org/teiid/rhq/plugin/NodeDiscoveryComponent.java
   branches/JCA/console/src/main/java/org/teiid/rhq/plugin/log/JBEDSPErrorLogEntryProcessor.java
Modified:
   branches/JCA/console/src/main/java/org/teiid/rhq/comm/ExecutedResult.java
   branches/JCA/console/src/main/java/org/teiid/rhq/plugin/Facet.java
   branches/JCA/console/src/main/java/org/teiid/rhq/plugin/PlatformComponent.java
   branches/JCA/console/src/main/java/org/teiid/rhq/plugin/PlatformDiscoveryComponent.java
   branches/JCA/console/src/main/java/org/teiid/rhq/plugin/VDBComponent.java
   branches/JCA/console/src/main/java/org/teiid/rhq/plugin/VDBDiscoveryComponent.java
   branches/JCA/console/src/main/java/org/teiid/rhq/plugin/objects/ExecutedOperationResultImpl.java
   branches/JCA/console/src/main/java/org/teiid/rhq/plugin/objects/ExecutedResourceConfigurationResultImpl.java
   branches/JCA/console/src/main/java/org/teiid/rhq/plugin/util/DeploymentUtils.java
   branches/JCA/console/src/main/java/org/teiid/rhq/plugin/util/PluginConstants.java
   branches/JCA/console/src/main/java/org/teiid/rhq/plugin/util/ProfileServiceUtil.java
Log:
TEIID-807: merging the trunk/console into jca/console -r 1840:1858

Deleted: branches/JCA/console/src/main/java/org/teiid/rhq/admin/ConnectionMgr.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/admin/ConnectionMgr.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/admin/ConnectionMgr.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -1,66 +0,0 @@
-package org.teiid.rhq.admin;
-
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import org.teiid.rhq.comm.Connection;
-import org.teiid.rhq.comm.ConnectionException;
-
-
-public interface ConnectionMgr {
-
-	/**
-	 * Called to indicate that this manager should be initialized.
-	 * @param props
-	 * @param cl is the ClassLoader to use to instantiate any classes downstream
-	 */
-	void initialize(Properties props, ClassLoader cl);
-	
-	/**
-	 * Called to reset the pool.   A subsequent call to @see #initialize(Properties, ClassLoader)
-	 * would establish a new set of installations based on the properties.
-	 */
-	void shutdown();
-	
-	/**
-	 * Returns <code>true</code> if server installations have been configured and will be returned
-	 * in the {@link #getServerInstallations()} call.
-	 * @return true if servers are defined.
-	 */
-	
-	 boolean hasServersDefined();
-	 
-	 
-	 /**
-	  * Returns the unique set of keys for each installation
-	  * @return Set of unique keys 
-	  */
-	 Set getInstallationSystemKeys();
-	 
-
-	
-	/**
-     * this is called only during discovery to obtain a connection for each 
-     * system (or server installation) on the local machine.
-     * 
-     *  In cases where a connection cannot be obtained, an entry in the
-     *  <code>Map</code> will be added with a null set for the value <code>Connection</code>
-     * @return Map <key=installdir value=Connection>
-     * @throws Exception
-     * @since 1.0
-     */
-	 Map<String, Connection> getServerInstallations();
-
-    /**
-     * Called to get a {@link Connection} that will be used to
-     * call the MetaMatrix Server.
-     * @param key is the unique identifier for the system in
-     * which to obtain the connection for.  
-     * @return Connection for the system to communicate with.
-     * @throws Exception
-     * @since 1.0
-     */	
-    Connection getConnection(String key) throws ConnectionException;
-
-}

Deleted: branches/JCA/console/src/main/java/org/teiid/rhq/admin/utils/SingletonConnectionManager.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/admin/utils/SingletonConnectionManager.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/admin/utils/SingletonConnectionManager.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -1,145 +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.admin.utils;
-
-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.pluginapi.inventory.InvalidPluginConfigurationException;
-import org.teiid.rhq.admin.ConnectionMgr;
-import org.teiid.rhq.comm.Connection;
-import org.teiid.rhq.comm.ConnectionException;
-
-
-public class SingletonConnectionManager {
-
-	private static final Log log = LogFactory.getLog(SingletonConnectionManager.class);
-    
-    private static final String ENTERPRISE_CONNECTION_MGR="org.teiid.rhq.enterprise.EnterpriseConnectionMgr"; //$NON-NLS-1$
-    private static final String EMBEDDED_CONNECTION_MGR="org.teiid.rhq.embedded.EmbeddedConnectionMgr"; //$NON-NLS-1$
-
-	private static SingletonConnectionManager instance = null;
-	private ConnectionMgr connmgr;
-	private ClassLoader loader;
-	private boolean initialized = false;
-
-
-    private SingletonConnectionManager() {	
-         
-         
-	}
-
-	public synchronized static SingletonConnectionManager getInstance() {
-
-    		if (instance == null) {
-                   instance = new SingletonConnectionManager();
-                   instance.setupConnectionMgr();
-    		}
-            
-		return instance;
-	}	
-    
-	public Set getInstallationSystemKeys() {
-		return connmgr.getInstallationSystemKeys();
-	}
-
-	public Connection getConnection(String key) throws ConnectionException {
-    	return  connmgr.getConnection(key);
-    }
-	
-
-	public void initialize(Properties props) {
-		if (connmgr != null && initialized) {
-			// re-establish the connectionfactory and pool
-			shutdown();
-			setupConnectionMgr();
-		}
-		initializeConnectionMgr(props);
-		
-	}
-
-	public Map getServerInstallations() {
-		return connmgr.getServerInstallations();
-	}
-
-	public boolean hasServersDefined() {
-		return connmgr.hasServersDefined();
-	}
-
-	public void shutdown() {
-		connmgr.shutdown();
-		connmgr = null;
-	}
-
-	
-	
-	private void setupConnectionMgr() {
-		this.loader = this.getClass().getClassLoader();
-    	ConnectionMgr mgr = null;
-    	Class clzz = null;
-    	// first try enterprise version
-    	try { 
-    		clzz = Class.forName(ENTERPRISE_CONNECTION_MGR, true, this.loader); 
-    	} catch (ClassNotFoundException noent) {
-    		
-    		// no try the embedded connection pool version
-        	try { 
-        		clzz = Class.forName(EMBEDDED_CONNECTION_MGR, true, this.loader); 
-        	} catch (ClassNotFoundException noemb) {
-        		
-        	}
-    	}
-    	
-    	if (clzz == null) {
-    		throw new InvalidPluginConfigurationException("System Error: cannot load either enterprise or embedded connection mgr");
-    	}
-    	
-        try {
-			mgr = (ConnectionMgr) clzz.newInstance();
-		} catch (Exception e) {
-			throw new InvalidPluginConfigurationException(e);
-		}              
-
-    	this.connmgr = mgr;
-    	
-    }
-	
-	private void initializeConnectionMgr(Properties props) {
-            
-		connmgr.initialize(props, this.loader);
-		this.initialized = true;
-    	
-    }
-	
-	public boolean isEmbedded() {
-    	try { 
-    		Class.forName(EMBEDDED_CONNECTION_MGR);
-    		return true;
-    	} catch (ClassNotFoundException noent) {
-    		return false;    		
-    	}    	
-    }
-
-}

Deleted: branches/JCA/console/src/main/java/org/teiid/rhq/comm/Component.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/comm/Component.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/comm/Component.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -1,85 +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.comm;
-
-import java.util.Map;
-
-
-/** 
- * @since 4.3
- */
-public interface Component extends Comparable<Object> {
-    
-    public static final String SYSTEM_KEY = "teiid.system.key"; //$NON-NLS-1$
-    public static final String NAME = "teiid.name"; //$NON-NLS-1$
-    public static final String IDENTIFIER = "teiid.identifier"; //$NON-NLS-1$
-    public static final String DESCRIPTION = "teiid.description"; //$NON-NLS-1$
-    public static final String VERSION = "teiid.version"; //$NON-NLS-1$
-    
-    /**
-     * Return the system key that this component identifies with.
-     * @return String system key
-     */
-    String getSystemKey();
-    
-    /**
-     * Return the name for this component
-     * @return String name
-     */
-    String getName();
-    
-    /**
-     * return the unique identifier for this component
-     * @return String unique identifier
-     */
-    String getIdentifier();
-    
-    /**
-     * Return the description
-     * @return String description
-     */
-    String getDescription();
-    
-    /**
-     * Return the version
-     * @return String version
-     */
-    String getVersion();
-    
-    /**
-     * Return a value for the request property key
-     * @param key is the identifier to look for
-     * @return String value
-     */
-    String getProperty(String key);
-    
-    
-    /**
-     * Return the map of properties.
-     * @return Map of properties
-     */
-    Map getProperties();
-
-    
-    
-
-}

Deleted: branches/JCA/console/src/main/java/org/teiid/rhq/comm/Connection.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/comm/Connection.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/comm/Connection.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -1,140 +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.comm;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.Properties;
-
-import org.teiid.rhq.admin.utils.SingletonConnectionManager;
-
-
-
-public interface Connection {
-    
-    /**
-     * Called to find out if the connection represents a valid connection to the
-     * JBEDSP system.   This call should be used only after obtaining a connection
-     * from the {@link SingletonConnectionManager#getConnection(String)}.
-     * The connection can become invalid if the JBEDSP system goes down.
-     */
-    boolean isValid();
-    
-    /**
-     * Called by the {@link ConnectionPool} to check if the connection is still open. 
-     * @return true is the connection is alive.
-
-     */
-    boolean isAlive();
-	
-    /**
-     * Call to indicate the connection is no longer needed and that
-     * resources can be released. 
-     */
-    public void close() ;
-     
-	
-	/**
-	 * This method is called by a component of the JBEDSP RHQ plugin. The
-	 * component identifier, type and metric operation are used to execute the correlating logic.
-	 * The valueMap is a map of values (0-n) that are required by
-	 * the logic to determine the metric.
-	 * @param componentType @see ConnectionConstants.ComponentType
-	 * @param identifier 
-	 * @param metric
-	 * @param valueMap
-	 * @return Object
-     * @throws ConnectionException
-	 */
-	public Object getMetric(final String componentType, String identifier, final String metric, final Map valueMap) throws ConnectionException;
-
-	/**
-	 * This method is called by a component of the JBEDSP RHQ plugin. The
-	 * component type and operation are used to execute the correlating logic.
-	 * The valueMap is a collection of values (0-n) that are required by
-	 * the operation.
-	 * {@link ConnectionConstants.ComponentType} for <code>componentType</code> values
-	 * @param result
-	 * @param componentType
-	 * @param operationName
-	 * @param valueMap
-     * @throws ConnectionException
-	 */
-	public void executeOperation(final ExecutedResult result, final Map valueMap) throws ConnectionException;
-	
-	/**
-	 * This method is called by a component to determine if that particular component is con. The
-	 * component type and identifier are used to execute the correlating logic.
-	 * 
-     * {@link ConnectionConstants.ComponentType} for <code>componentType</code> values
-     * 
-	 * The return value is true if UP else false if DOWN
-	 * 
-	 * @param componentType
-	 * @param identifier
-	 * @return Boolean 
-     * @throws ConnectionException
-	 */
-	public Boolean isAvailable(final String componentType, final String identifier) throws ConnectionException;
-	
-   
-    /**
-     *  Return the properties for component of a specified resource type {@link ConnectionConstants.ComponentType}  
-     * @param componentType {@link ConnectionConstants.ComponentType}
-     * @param identifier
-     * @return
-     * @throws ConnectionException
-     * @since 4.3
-     */
-    
-    public Properties getProperties(String componenType, String identifier) throws ConnectionException; 
-    
-	/**
-	 * Returns a property for a given identifier
-	 * 
-	 * @param identifier
-	 * @param property
-     * @throws ConnectionException
-	 */
-	public String getProperty(String identifier, String property) throws ConnectionException;
-	
-	/**
-	 * Returns the unique key that maps this connection to the system that is being connected to.
-	 * This key used during the enterprise monitoring to keep track of which connection belongs to
-	 * what's being monitored.
-	 * 
-	 * @return key JBEDSP represented by this connection
-     * @throws Exception
-	 */
-	public String getKey() throws Exception;
-    
-    /**
-     * Returns a <code>Collection</code> of {@link Component Component}s for the given identifier for the
-     * given name of the {@link ConnectionConstants.ComponentType}
-     * @param componentType
-     * @param identifier
-     * @return
-     * @throws ConnectionException
-     */
-    public Collection<Component> discoverComponents(String componentType, String identifier) throws ConnectionException;
-   
-}

Deleted: branches/JCA/console/src/main/java/org/teiid/rhq/comm/ConnectionFactory.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/comm/ConnectionFactory.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/comm/ConnectionFactory.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -1,77 +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.comm;
-
-import java.util.Properties;
-
-
-/**
- * The primary interface to be implemented by the pool user.  The ConnectionFactory
- * is called by the {@link ConnectionPool} to create and close the connection. 
- * 
- * 
- * This
- */
-public interface ConnectionFactory {
-	
-    public static final String CONNECTION_FACTORY_DEFAULT="org.teiid.rhq.comm.impl.TeiidConnectionFactory";  //$NON-NLS-1$
-
-
-
-    /**
-     * Set the environment that this factory is being run in - typically used 
-     * to obtain properties when creating connections and to log messages as 
-     * necessary.
-     * @param env The environment properties needed to create a connection by the connector manager
-     *     {@link ConnectionConstants} 
-     * @param connectionPool is passed so the factory can set the pool on the connection.
-     */
-    void initialize(Properties env, ConnectionPool connectionPool) throws ConnectionException;
-    
-    /**
-     * Return the url used to connect to the server.
-     * @return String url
-     */
-    String getURL();
-
-    /**
-     * Create the connection. This connection is to an existing MetaMatrix server.
-     * @return The Connection form of source-specific connection
-     * @throws ConnectorException If an error occurs while creating the connection
-     */
-    Connection createConnection() throws ConnectionException;
-    
-    
-    /**
-     * Called by the {@link ConnectionPool} when a connection is being cleaned up from the pool.
-     * This will allow the creator of the connection to do any last cleanup steps necessary in order
-     * to release all resources.   
-     * 
-     * In cases where the {@link Connection}, when the {@link Connection#close()} method only returns
-     * the connection to the pool and does not actually close the connection, this close will be 
-     * responsible for actually closing the connection to the source.
-     * @param connection
-
-     */
-    void closeConnection(Connection connection) ;
-
-}

Deleted: branches/JCA/console/src/main/java/org/teiid/rhq/comm/ConnectionPool.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/comm/ConnectionPool.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/comm/ConnectionPool.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -1,103 +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.comm;
-
-import java.util.Properties;
-
-
-
-
-/**
- * The primary interface for the ConnectionPool used by the connection manager
- * responsible for handing out connections to the discovery and resource JON objects.
- *
- * After the instantiation of the ConnectionPool, the @link #initialize(String, Properties) method
- * will be called so the pool can be initialized.  
- * @since 1.0
- *  
- */
-public interface ConnectionPool extends ConnectionPoolConstants {
-    
-
-    /**
-     * Set the connection factory responsible for creating a connection
-     * when the pool needs a new one.   @see ConnectionPoolConstants for the
-     * avalable settings to configure the pool.
-      * @param env are the environment variables needed to iniatilize the connection pool.
-     * @since 1.0
-     */
-    void initialize(Properties env, ClassLoader cl) throws ConnectionException ;
-    
-    /**
-     * Return a unique key that identifies this connection pool
-     * 
-     * @return
-     */
-    String getKey();
-    
-    
-    /**
-     * Returns a {@link Connection} from the pool.
-     * @return Connction
-     */
-    Connection getConnection() throws ConnectionException;
-    
-    
-    /**
-     * Return the connection to the pool.   It's up to the 
-     * implementation of the pool if the connection is reused or not
-     * @param connection returned to the pool
-     */
-    void close(Connection connection)  throws ConnectionException;
-    
-    
-    /** 
-     * Called to shutdown the pool. 
-     * 
-     */
-    void shutdown()  throws ConnectionException;
-    
-    
-    /**
-     * Return the <code>ClassLoader</code> used to instantiate the {@link ConnectionFactory} and
-     * will be used on all calls in the {@link Connection} 
-     * @return
-     */
-    ClassLoader getClassLoader();
-    
-    /**
-     * Return the number of connection that are currently in use.
-     * @return int is the number of connections in use
-     *
-     * @since
-     */
-    int getConnectionsInUseCount();
-    
-    /**
-     * Return the number of connections that are currently available in the pool.
-     * @return int is the number of connections currently available in the pool.
-     *
-     * @since 6.2
-     */
-    int getAvailableConnectionCount();
-    
-}

Modified: branches/JCA/console/src/main/java/org/teiid/rhq/comm/ExecutedResult.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/comm/ExecutedResult.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/comm/ExecutedResult.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -21,6 +21,7 @@
  */
 package org.teiid.rhq.comm;
 
+import java.util.Collection;
 import java.util.List;
 
 public interface ExecutedResult {
@@ -33,7 +34,7 @@
 	
 	List<String> getFieldNameList();
 	
-	void setContent(List content);
+	void setContent(Collection content);
 	
 	void setContent(String content);
 	

Deleted: branches/JCA/console/src/main/java/org/teiid/rhq/comm/VMComponent.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/comm/VMComponent.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/comm/VMComponent.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -1,32 +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.comm;
-
-
-/** 
- * @since 4.3
- */
-public interface VMComponent extends Component {
-    public static final String PORT = "mm.port"; //$NON-NLS-1$
-
-    String getPort();
-}

Deleted: branches/JCA/console/src/main/java/org/teiid/rhq/comm/impl/ComponentImpl.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/comm/impl/ComponentImpl.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/comm/impl/ComponentImpl.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -1,244 +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.comm.impl;
-
-import java.util.Map;
-import java.util.Properties;
-
-import org.teiid.rhq.comm.Component;
-import org.teiid.rhq.comm.VMComponent;
-
-import com.metamatrix.core.util.HashCodeUtil;
-
-
-/** 
- */
-public class ComponentImpl implements VMComponent {
-    private String systemKey;
-    private String description;
-    private String name;
-    private String identifier;
-    private String version="1.0"; //$NON-NLS-1$
-    private String port;
-    int hashCode;
-   
-    
-    private Properties compprops = new Properties();
-    
-    
-    public void addProperty(String key, String value) {
-    	compprops.put(key, value);
-    }
-    
-    public void setProperties(Properties props) {
-    	compprops.putAll(props);
-    }
-    
-    public String getProperty(String key) {
-    	return (String)compprops.get(key);
-    }
-    
-    public Map getProperties() {
-    	return compprops;
-    }
-    
-    /** 
-     * @return Returns the systemKey.
-     * @since 1.0
-     */
-    public String getSystemKey() {
-        return this.systemKey;
-    }
-
-    
-    /** 
-     * @param systemKey The systemKey to set.
-     * @since 1.0
-     */
-    public void setSystemKey(String systemKey) {
-        this.systemKey = systemKey;
-    }
-
-    /** 
-     * @see org.teiid.rhq.comm.Component#getDescription()
-     * @since 1.0
-     */
-    public String getDescription() {
-        return description;
-    }
-
-    /** 
-     * @see org.teiid.rhq.comm.Component#getIdentifier()
-     * @since 1.0
-     */
-    public String getIdentifier() {
-        return identifier;
-    }
-
-    /** 
-     * @see org.teiid.rhq.comm.Component#getName()
-     * @since 1.0
-     */
-    public String getName() {
-        return name;
-    }
-
-    /** 
-     * @see org.teiid.rhq.comm.Component#getVersion()
-     * @since 1.0
-     */
-    public String getVersion() {
-        return version;
-    }
-         
-    
-    /** 
-     * @return Returns the port.
-     */
-    public String getPort() {
-        return this.port;
-    }
-
-
-    
-    /** 
-     * @param port The port to set.
-     */
-    public void setPort(String port) {
-        this.port = port;
-    }
-
-
-    /** 
-     * @param description The description to set.
-     * @since 1.0
-     */
-    protected void setDescription(String description) {
-        this.description = description;
-    }
-
-    
-    /** 
-     * @param identifier The identifier to set.
-     * @since 1.0
-     */
-    protected void setIdentifier(String identifier) {
-        this.identifier = identifier;
-        this.hashCode = HashCodeUtil.hashCode(0, this.identifier);
-    }
-
-    
-    /** 
-     * @param name The name to set.
-     * @since 1.0
-     */
-    protected void setName(String name) {
-        this.name = name;
-    }
-
-    
-    /** 
-     * @param version The version to set.
-     * @since 1.0
-     */
-    protected void setVersion(String version) {
-        this.version = version;
-    }
-
-    /**
-     * Returns true if the specified object is semantically equal to this instance.
-     * Note:  this method is consistent with <code>compareTo()</code>.
-     * <p>
-     * @param obj the object that this instance is to be compared to.
-     * @return whether the object is equal to this object.
-     */
-    public boolean equals(Object obj) {
-        // Check if instances are identical ...
-        if (this == obj) {
-            return true;
-        }
-
-        // Check if object can be compared to this one
-        // (this includes checking for null ) ...
-        if (obj instanceof Component) {
-
-        	
-            // fail fast on different hash codes
-            if (this.hashCode() != obj.hashCode()) {
-                return false;
-            }
-
-            // slower comparison
-            Component that = (Component)obj;
-            return ( that.getSystemKey().equals(this.getSystemKey()) );
-        }
-
-        // Otherwise not comparable ...
-        return false;
-    }
-
-    /**
-     * Compares this object to another. If the specified object is an instance of
-     * the same class, then this method compares the name; otherwise, it throws a
-     * ClassCastException (as instances are comparable only to instances of the same
-     * class).  Note:  this method is consistent with <code>equals()</code>.
-     * <p>
-     * @param obj the object that this instance is to be compared to.
-     * @return a negative integer, zero, or a positive integer as this object
-     *      is less than, equal to, or greater than the specified object, respectively.
-     * @throws ClassCastException if the specified object's type prevents it
-     *      from being compared to this instance.
-     */
-    public int compareTo(Object obj) {
-        // Check if instances are identical ...
-        if (this == obj) {
-            return 0;
-        }
-        if (obj == null ) {
-            throw new IllegalArgumentException("Object is null, must be of type " + this.getClass().getName());
-        }
-
-        // Check if object cannot be compared to this one
-        // (this includes checking for null ) ...
-        if (!(obj instanceof Component)) {
-            throw new IllegalArgumentException(obj.getClass().getName() + " is not of type " + this.getClass().getName());
-        }
-
-        // Check if everything else is equal ...
-        Component that = (Component)obj;
-        int result = that.hashCode() - this.hashCode;
-        if ( result != 0 ) return result;
-        return this.getIdentifier().compareTo(that.getIdentifier());
-    }
-
-    /**
-     * Returns a string representing this instance.
-     * @return the string representation of this instance.
-     */
-    public String toString() {
-        return this.getIdentifier();
-    }
-
-    
-    
- 
-}

Deleted: branches/JCA/console/src/main/java/org/teiid/rhq/comm/impl/InvalidConnectionImpl.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/comm/impl/InvalidConnectionImpl.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/comm/impl/InvalidConnectionImpl.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -1,200 +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.comm.impl;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.teiid.rhq.comm.Component;
-import org.teiid.rhq.comm.Connection;
-import org.teiid.rhq.comm.ConnectionException;
-import org.teiid.rhq.comm.ConnectionPool;
-import org.teiid.rhq.comm.ExecutedResult;
-
-
-
-/** 
- */
-public class InvalidConnectionImpl implements
-                                    Connection,
-                                    TeiidConnectionConstants {
-
-
-	private static final Log LOG = LogFactory.getLog(InvalidConnectionImpl.class);
-
-    private static final Object METRIC=new Double(0);
-    private static final String EMPTY_STRING="";  //$NON-NLS-1$
-
-    
-    private String key = EMPTY_STRING;
-    private Properties environmentProps = null;
-    private ConnectionPool connectionPool = null;
-    
-    public InvalidConnectionImpl (final String key,
-                                final Properties envProps,
-                                final ConnectionPool pool) {
-        this.key = key;
-        this.environmentProps = envProps;       
-        this.connectionPool = pool;
-    }
-    
-    public boolean isValid() {
-        return false;
-    }
-    /** 
-     * @see org.teiid.rhq.comm.Connection#isAlive()
-     * @since 1.0
-     */
-    public boolean isAlive() {
-        return false;
-    }
-
-    /** 
-     * @see org.teiid.rhq.comm.Connection#close()
-     * @since 1.0
-     */
-    public void close() {
-        try {
-            if (connectionPool != null) {
-                 connectionPool.close(this);
-             }
-                
-        } catch (Exception e) {
-            LOG.error("Error returning connection to the connection pool", e); //$NON-NLS-1$
-        } 
-    }
-    
-    /** 
-     * @see org.teiid.rhq.comm.Connection#getMetric(java.lang.String, java.lang.String, java.util.Map)
-     * @since 1.0
-     */
-    public Object getMetric(String componentType,
-    						String identifier,
-                            String metric,
-                            Map valueMap) throws ConnectionException {
-        return METRIC;
-    }
-
-    /** 
-     * @see org.teiid.rhq.comm.Connection#executeOperation(java.lang.String, java.lang.String, java.util.Map)
-     * @since 1.0
-     */
-    public void executeOperation(ExecutedResult operationResult,
-    							 Map argumentMap) throws ConnectionException {       
-    }
-
-    /** 
-     * @see org.teiid.rhq.comm.Connection#isAvailable(java.lang.String, java.lang.String)
-     * @since 1.0
-     */
-    public Boolean isAvailable(String componentType,
-                               String identifier) throws ConnectionException {
-        return false;
-    }
-    
-    
-
-    /** 
-     * @see org.teiid.rhq.comm.Connection#getProperties(java.lang.String, java.lang.String)
-     * @since 1.0
-     */
-    public Properties getProperties(String resourceType,
-                                    String identifier) throws ConnectionException {
-        return new Properties();
-    }
-
-    /** 
-     * @see org.teiid.rhq.comm.Connection#getProperty(java.lang.String, java.lang.String)
-     * @since 1.0
-     */
-    public String getProperty(String identifier,
-                              String property) throws ConnectionException {
-        return EMPTY_STRING;
-    }
-
-    /** 
-     * @see org.teiid.rhq.comm.Connection#getKey()
-     * @since 1.0
-     */
-    public String getKey() throws Exception {
-        return key;
-    }
-
-    /** 
-     * @see org.teiid.rhq.comm.Connection#getConnectors(java.lang.String)
-     * @since 1.0
-     */
-    public Collection<Component> getConnectors(String vmname) throws ConnectionException {
-        return Collections.EMPTY_LIST;
-    }
-
-    
-    public Collection<Component> getVMs(String hostname) throws ConnectionException {
-        return Collections.EMPTY_LIST;
-    }    
-    
-    public Collection<Component> getVDBs(List fieldNameList) throws ConnectionException {
-		return Collections.EMPTY_LIST;
-	}
-
-    
-    public Collection getAllHosts() throws ConnectionException {
-        return Collections.EMPTY_LIST;
-    }
-
-	public Component getHost(String identifier) throws ConnectionException {
-		// TODO Auto-generated method stub
-		return null;
-	}
-    
-    public Collection<Component> getConnectorsForConfig(String vmidentifier)
-	throws ConnectionException {
-// TODO Auto-generated method stub
-return Collections.EMPTY_LIST;
-}
-
-public Collection<Component> getServices(String vmIdentifier)
-	throws ConnectionException {
-// TODO Auto-generated method stub
-return Collections.EMPTY_LIST;
-}
-
-public Collection<Component> getServicesForConfig(String identifier)
-	throws ConnectionException {
-// TODO Auto-generated method stub
-return Collections.EMPTY_LIST;
-}
-
-public Collection<Component> discoverComponents(String componentType,
-		String identifier) throws ConnectionException {
-	// TODO Auto-generated method stub
-	return Collections.EMPTY_LIST;
-}  
-
-
-
-}

Deleted: branches/JCA/console/src/main/java/org/teiid/rhq/embedded/EmbeddedConnectionMgr.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/embedded/EmbeddedConnectionMgr.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/embedded/EmbeddedConnectionMgr.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -1,97 +0,0 @@
-package org.teiid.rhq.embedded;
-
-import java.util.HashMap;
-import java.util.HashSet;
-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.pluginapi.inventory.InvalidPluginConfigurationException;
-import org.teiid.rhq.admin.ConnectionMgr;
-import org.teiid.rhq.comm.Connection;
-import org.teiid.rhq.comm.ConnectionException;
-import org.teiid.rhq.comm.ConnectionPool;
-import org.teiid.rhq.embedded.pool.ConnectionPoolImpl;
-import org.teiid.rhq.embedded.pool.EmbeddedConnectionConstants;
-
-
-
-public class EmbeddedConnectionMgr implements ConnectionMgr {
-	private static final Log log = LogFactory.getLog(EmbeddedConnectionMgr.class);
-		
-	private ConnectionPool pool;
-	private Properties props;
-	private ClassLoader loader;
-	
-	private Map<String, Connection> connectionList = new HashMap(1);
-	 
-
-	public Connection getConnection(String key) throws ConnectionException {
-		return pool.getConnection();
-	}
-	
-	
-
-	public Set<String> getInstallationSystemKeys() {
-		Set<String> keys = new HashSet<String>(1);
-		keys.add(EmbeddedConnectionConstants.SYSTEM_KEY);
-		return keys;
-	}
-
-
-
-	public Map getServerInstallations() {
-		connectionList = new HashMap(1);
-		try {
-			connectionList.put(pool.getKey(), pool.getConnection());
-		} catch (ConnectionException e) {
-			// TODO Auto-generated catch block
-			throw new InvalidPluginConfigurationException(e);
-		}
-		return connectionList;
-	}
-
-	public void shutdown() {
-
-			try {
-				pool.shutdown();
-			} catch (ConnectionException e) {
-				// TODO Auto-generated catch block
-				log.error("Error shutting down connection pool", e);
-
-			}
-			pool = null;
-			
-			connectionList.clear();
-		
-	}
-
-	   public boolean hasServersDefined() {
-		   return (pool !=null);
-	   }
-	   
-		  public void initialize(Properties props, ClassLoader cl) {
-				this.props = props;
-				this.loader = cl;
-		
-		            // allow override of the factory class
-		            // this was put in to allow testing to set the factory
-		            String factoryclass = System.getProperty(ConnectionPool.CONNECTION_FACTORY);
-		            if (factoryclass != null) {
-		                props.setProperty(ConnectionPool.CONNECTION_FACTORY, factoryclass);
-		            }
-		            
-		            try {	            
-		                 Class clzz = Class.forName(ConnectionPoolImpl.class.getName(), true, this.loader);
-		                 this.pool = (ConnectionPoolImpl) clzz.newInstance(); 
-		                	 //new ConnectionPoolImpl();
-		                this.pool.initialize(props, cl); 
-		           
-		                log.info("ConnectionPool created for key " + pool.getKey()); //$NON-NLS-1$ //$NON-NLS-2$
-		            } catch (Throwable t) {
-		                throw new InvalidPluginConfigurationException(t);
-		            }
-		      }
-}

Deleted: branches/JCA/console/src/main/java/org/teiid/rhq/embedded/pool/ConnectionPoolImpl.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/embedded/pool/ConnectionPoolImpl.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/embedded/pool/ConnectionPoolImpl.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -1,266 +0,0 @@
-package org.teiid.rhq.embedded.pool;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.Properties;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-
-import org.teiid.rhq.comm.Connection;
-import org.teiid.rhq.comm.ConnectionException;
-import org.teiid.rhq.comm.ConnectionFactory;
-import org.teiid.rhq.comm.ConnectionPool;
-
-
-/*
- * 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.
- */
-
-/**
- * Simple pooling built on JDBCUtil.  Not compatible with DataSources, etc.
- * Added due to poor 1.6 support among common connection pool implementations.
- * 
- * TODO: Should be switched to proxool or some implementation
- */
-public class ConnectionPoolImpl implements ConnectionPool
-
-{
-
-    public static final String WAIT_TIME_FOR_RESOURCE= "jbedsp.pool.wait.time"; //$NON-NLS-1$
-    public static final String MAXIMUM_RESOURCE_POOL_SIZE = "jbedsp.pool.maximum.size"; //$NON-NLS-1$
-    public static final String RESOURCE_TEST_INTERVAL = "jbedsp.pool.test.interval"; //$NON-NLS-1$
-    
-	private final class ConnectionProxy implements InvocationHandler {
-		private Connection c;
-		private long lastTest = System.currentTimeMillis();
-		private Boolean valid = Boolean.TRUE;
-		
-		public ConnectionProxy(Connection c) {
-			this.c = c;
-		}
-
-		public Object invoke(Object proxy, Method method, Object[] args)
-				throws Throwable {
-			try {
-				if (method.getName().equals("close")) { //$NON-NLS-1$
-					boolean isShutdown = shutdown;
-					boolean success = false;
-					try {
-						if (!isShutdown) {
-							connections.add((Connection)proxy);
-							success = true;
-						}
-					} finally {
-						connectionLock.release();
-						if (!success) {
-							c.close();
-							return null;
-						}
-					}
-					if (success) {
-						return null;
-					}
-				} else if (method.getName().equals("isValid")) { //$NON-NLS-1$
-					long now = System.currentTimeMillis();
-					if (lastTest + testInterval > now) {
-						return c.isValid();
-					} 
-					lastTest = now;
-					try {
-						valid = c.isAlive();						
-					} catch (AbstractMethodError e) {
-						valid = c.isValid();
-					} 
-					return valid;
-				}
-				return method.invoke(c, args);
-			} catch (InvocationTargetException e) {
-				valid = false;
-				throw e.getCause();
-			}
-		}
-	}
-	
-   /**
-     * The default connection factory if one is not specified in the environment
-     */
-     static final String CONNECTION_FACTORY_DEFAULT=ConnectionFactory.CONNECTION_FACTORY_DEFAULT;  //$NON-NLS-1$
-	
-	
-	private Semaphore connectionLock;
-	private ConcurrentLinkedQueue<Connection> connections = new ConcurrentLinkedQueue<Connection>();
-	private Properties p;
-	private int timeout;
-	private int testInterval;
-	private volatile boolean shutdown;
-    private ConnectionFactory factory = null;
-    
-    private ClassLoader loader = null;
-			
-	public void close(Connection connection) {
-
-		
-	}
-
-	
-
-	@Override
-	public int getAvailableConnectionCount() {
-		// TODO Auto-generated method stub
-		return 0;
-	}
-
-
-
-	@Override
-	public int getConnectionsInUseCount() {
-		// TODO Auto-generated method stub
-		return 0;
-	}
-
-
-
-	public ClassLoader getClassLoader() {
-		return this.loader;
-	}
-
-
-	public String getKey() {
-		return EmbeddedConnectionConstants.SYSTEM_KEY;
-	}
-
-
-
-	public void initialize(Properties env, ClassLoader cl) throws ConnectionException {
-		this.p = env;
-		this.loader = cl;
-		this.timeout = getIntProperty(p, WAIT_TIME_FOR_RESOURCE, 30000);
-		this.testInterval = getIntProperty(p, RESOURCE_TEST_INTERVAL, 30000);
-		this.connectionLock = new Semaphore(getIntProperty(p, MAXIMUM_RESOURCE_POOL_SIZE, 15));
-		
-//        liveAndUnusedTime = getIntProperty(LIVE_AND_UNUSED_TIME, DEFAULT_LIVE_AND_UNUSED_TIME);
-//        cleaningInterval = getIntProperty(CLEANING_INTERVAL, DEFAULT_CLEANING_INTERVAL);
-
-		
-        createFactory();
-	}
-
-
-
-	public Connection getConnection() throws ConnectionException {
-		if (shutdown) {
-			throw new ConnectionException("pool shutdown"); //$NON-NLS-1$
-		}
-		try {
-			if (!connectionLock.tryAcquire(timeout, TimeUnit.MILLISECONDS)) {
-				throw new ConnectionException("Timeout waiting for connection"); //$NON-NLS-1$
-			}
-		} catch (InterruptedException e) {
-			throw new ConnectionException(e);
-		}
-		boolean releaseLock = true;
-		try {
-			boolean valid = false;
-			Connection c = connections.poll();
-			if (c != null) {
-
-				valid  = c.isValid();
-				if (!valid) {
-					try {
-						factory.closeConnection(c);
-					} catch (Exception e) {
-						
-					}
-					c = null;
-				}
-			}
-			if (c == null) {
-				if (shutdown) {
-					throw new ConnectionException("pool shutdown"); //$NON-NLS-1$
-				}
-				c = factory.createConnection();
-				c = (Connection) Proxy.newProxyInstance(this.loader, new Class[] {Connection.class}, new ConnectionProxy(c));
-				connections.add(c);
-			}
-
-			releaseLock = false;
-			return c;
-		} catch (ConnectionException ce) {
-			throw ce;
-		} finally {
-			if (releaseLock) {
-				connectionLock.release();
-			}
-		}
-	}
-	
-	public void shutdown() {
-		this.shutdown = true;
-		Connection c = connections.poll();
-		while (c != null) {
-			try {
-				c.close();
-			} catch (Exception e) {
-				
-			}
-			c = connections.poll();
-		}		
-		
-	}
-
-
-    private void createFactory() throws ConnectionException {
-        
-        String factoryclass = p.getProperty(ConnectionPool.CONNECTION_FACTORY, CONNECTION_FACTORY_DEFAULT);
-  
-            try {
-            	Class<?> c = Class.forName(factoryclass, true, this.loader);
-                factory = (ConnectionFactory)c.newInstance();
-            } catch (Exception err) {
-                throw new ConnectionException(err.getMessage());
-            }
-            
-             // Initialize connector instance...
-            factory.initialize(p, this);
-      
-   }
-    
-    public static int getIntProperty(Properties props, String propName, int defaultValue) throws ConnectionException {
-        int val = defaultValue;
-        String stringVal = props.getProperty(propName);
-        if(stringVal != null && stringVal.trim().length() > 0) {
-        	try {
-        		val = Integer.parseInt(stringVal);
-        	} catch (NumberFormatException nfe) {
-        		throw new ConnectionException(nfe.getMessage());
-        	}
-        }
-        return val;
-    }
-    
-
-    
-}
-
-

Deleted: branches/JCA/console/src/main/java/org/teiid/rhq/enterprise/EnterpriseConnectionMgr.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/enterprise/EnterpriseConnectionMgr.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/enterprise/EnterpriseConnectionMgr.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -1,154 +0,0 @@
-package org.teiid.rhq.enterprise;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-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.pluginapi.inventory.InvalidPluginConfigurationException;
-import org.teiid.rhq.admin.ConnectionMgr;
-import org.teiid.rhq.comm.Connection;
-import org.teiid.rhq.comm.ConnectionConstants;
-import org.teiid.rhq.comm.ConnectionException;
-import org.teiid.rhq.comm.ConnectionPool;
-import org.teiid.rhq.enterprise.pool.ConnectionPoolImpl;
-
-
-public class EnterpriseConnectionMgr implements ConnectionMgr {
-	private static final Log log = LogFactory.getLog(EnterpriseConnectionMgr.class);
-	
-	
-	public static final String INSTALL_SERVER_PROP="mmservers";  //$NON-NLS-1$
-
-	private static Map poolMap =  Collections.synchronizedMap( new HashMap(5) );
-	
-
-	private Properties props = null;
-
-
-	public Connection getConnection(String key) throws ConnectionException {
-        Connection connection = null;
-        
-        log.info("Get Connection for  " + key); //$NON-NLS-1$
-        
-        ConnectionPool pool = (ConnectionPool) poolMap.get(key);
-        connection = pool.getConnection();
-                
-        return connection;
-	}
-	
-
-	public Set getInstallationSystemKeys() {
-		// TODO Auto-generated method stub
-		return poolMap.keySet();
-	}
-
-
-	public boolean hasServersDefined() {
-        
-        if (poolMap != null && poolMap.size() > 0) {
-            return true;
-        }
-        return false;
-        
-    }	
-
-	public Map getServerInstallations() {
-        Map connectionList = new HashMap();
-        Iterator installationIter = poolMap.keySet().iterator();
-
-         while (installationIter.hasNext()) {
-            String installDir = (String) installationIter.next();
-            try {
-                if (poolMap.get(installDir) != null) {
-                    ConnectionPool pool = (ConnectionPool) poolMap.get(installDir);
-                
-                    Connection connection = pool.getConnection(); 
-                    connectionList.put(installDir, connection);
-                } else {
-                    // this shouldn't happen
-                    connectionList.put(installDir, null);
-                }
-            } catch (Exception e) {
-                connectionList.put(installDir, null);
-            }
-        }
-        
-
-		return connectionList;
-	}
-
-
-	public void shutdown() {
-        Iterator installationIter = poolMap.keySet().iterator();
-        
-        while (installationIter.hasNext()) {
-           String installDir = (String) installationIter.next();
-               ConnectionPool pool = (ConnectionPool) poolMap.get(installDir);
-       		try {
-    			pool.shutdown();
-    		} catch (ConnectionException e) {
-    			// TODO Auto-generated catch block
-    			log.error("Error shutting down connection pool " + pool.getKey(), e);
-    			e.printStackTrace();
-    		}
-        }
-         
-        poolMap.clear();
-    }
-	  public void initialize(Properties props, ClassLoader cl) {
-			this.props = props;
-
-	        String servers = this.props.getProperty(INSTALL_SERVER_PROP);
-
-	        /**
-	         * split the server installation properties by the delimiter
-	         * to determine the number of servers installed on the local machine
-	         */
-	         Collection installationList = AdminUtil.getTokens(servers, ";");  //$NON-NLS-1$
-	        Iterator installationIter = installationList.iterator();
-
-	        while (installationIter.hasNext()) {
-	            String serverInfoValues = (String) installationIter.next();
-	            Collection serverInfoValuesList = new LinkedList();
-	            serverInfoValuesList = AdminUtil.getTokens(serverInfoValues, ",");  //$NON-NLS-1$
-	            Object[] serverInfoArray = serverInfoValuesList.toArray();
-	            String installDir = (String) serverInfoArray[0];
-	            String url = (String) serverInfoArray[1];
-	            String username = (String) serverInfoArray[2];
-	            String password = (String) serverInfoArray[3];
-
-	            props.setProperty(ConnectionConstants.PASSWORD, password);
-	            props.setProperty(ConnectionConstants.USERNAME, username);
-	            props.setProperty(ConnectionConstants.URL, url);                             
-	                        
-	            // allow override of the factory class
-	            // this was put in to allow testing to set the factory
-	            String factoryclass = System.getProperty(ConnectionPool.CONNECTION_FACTORY);
-	            if (factoryclass != null) {
-	                props.setProperty(ConnectionPool.CONNECTION_FACTORY, factoryclass);
-	            }
-	            
-	            try {	            
-	                 
-	                 Class clzz = Class.forName(ConnectionPoolImpl.class.getName(), true, cl);
-	                ConnectionPool pool = (ConnectionPool) clzz.newInstance();
-	                pool.initialize(props, cl); 
-	                          
-	                poolMap.put(pool.getKey(), pool);
-	           
-	                log.info("ConnectionPool created for key " + pool.getKey() + " at url " + url); //$NON-NLS-1$ //$NON-NLS-2$
-	            } catch (Throwable t) {
-	                throw new InvalidPluginConfigurationException(t);
-	            }
-	        }
-	    }	
-	
-
-}

Deleted: branches/JCA/console/src/main/java/org/teiid/rhq/enterprise/pool/ConnectionPoolImpl.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/enterprise/pool/ConnectionPoolImpl.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/enterprise/pool/ConnectionPoolImpl.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -1,424 +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.enterprise.pool;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.teiid.rhq.comm.Connection;
-import org.teiid.rhq.comm.ConnectionException;
-import org.teiid.rhq.comm.ConnectionFactory;
-import org.teiid.rhq.comm.ConnectionPool;
-
-
-
-
-/** 
- *  This is the connection pool used to manage connections to the MetaMatrix server.
- */
-public class ConnectionPoolImpl implements ConnectionPool {
-    private final Log LOG = LogFactory.getLog(ConnectionPoolImpl.class);
-    
-    /**
-     * The default connection factory if one is not specified in the environment
-     */
-    private static final String CONNECTION_FACTORY_DEFAULT=ConnectionFactory.CONNECTION_FACTORY_DEFAULT;  //$NON-NLS-1$
-    
-    public static final String WAIT_TIME_FOR_RESOURCE= "teiid.pool.wait.time"; //$NON-NLS-1$
-    public static final String MAXIMUM_RESOURCE_POOL_SIZE = "teiid.pool.maximum.size"; //$NON-NLS-1$
-    public static final String RESOURCE_TEST_INTERVAL = "teiid.pool.test.interval"; //$NON-NLS-1$
-
-
-     private static final int DEFAULT_LIVE_AND_UNUSED_TIME = 60;
-     private static final int DEFAULT_CLEANING_INTERVAL = 60;
-     private static final boolean DEFAULT_ENABLE_SHRINKING = true; 
-
-     
-     private int liveAndUnusedTime = DEFAULT_LIVE_AND_UNUSED_TIME;
-     private int cleaningInterval = DEFAULT_CLEANING_INTERVAL;
-     private boolean enableShrinking = DEFAULT_ENABLE_SHRINKING;
-     
- 	 private int timeout;
-	 private int testInterval;
-
-     
-    
-	private Set<ConnectionWrapper>  availConnections          = Collections.synchronizedSet( new HashSet(10) );
-    private Set<Connection>  inuseConnections   = Collections.synchronizedSet( new HashSet(10) );
-    
-	private Semaphore connectionLock;
-    
-    private ConnectionFactory factory = null;
-//    private String installDir = null;
-    private Properties envProps = null;
-    
-    private volatile boolean shuttingDownPool;
-    
-    private CleanUpThread cleaningThread;   
-    
-    private ClassLoader clzzloader;
-    
-    
- //   private Object lock = new Object();
-    
-    public ConnectionPoolImpl() {
-        
-        LOG.info("Creating Connection Pool");  //$NON-NLS-1$ 
-    }
-    
-
-    /** 
-     * @see org.teiid.rhq.comm.ConnectionPool#getClassLoader()
-     *  
-     */
-    public ClassLoader getClassLoader() {
-        return clzzloader;
-    }
-    
-    
-
-
-    @Override
-	public int getAvailableConnectionCount() {
-		return availConnections.size();
-	}
-    
-    
-
-
-	@Override
-	public int getConnectionsInUseCount() {
-		return inuseConnections.size();
-	}
-
-
-	public String getKey() {
-		// TODO Auto-generated method stub
-		return factory.getURL();
-	}
-
-
-	/** 
-     * @see com.metamatrix.rhq.admin.pool.ConnectionPool#close(org.teiid.rhq.comm.Connection)
-     *  
-     */
-    public void close(Connection connection) throws ConnectionException {
-        if (this.shuttingDownPool) {
-             return;
-        }        
-		try {
-			if (!connectionLock.tryAcquire(timeout, TimeUnit.MILLISECONDS)) {
-				throw new ConnectionException("Timeout waiting for lock"); //$NON-NLS-1$
-			}
-		} catch (InterruptedException e) {
-			throw new ConnectionException(e);
-		}
-		try {
-            inuseConnections.remove(connection);
-            if (connection.isValid()) {
-                ConnectionWrapper cw = new ConnectionWrapper(connection);
-                availConnections.add(cw);
-                LOG.debug("Connection checked in for system "); //$NON-NLS-1$
-            } else {
-               this.closeConnection(connection);  
-               LOG.debug("Connection returned and closed for system "); //$NON-NLS-1$                
-
-            }
-
-
-
-		} finally {
-			connectionLock.release();
-		}
-
-    }
-      
-
-    /** 
-     * @see com.metamatrix.rhq.admin.pool.ConnectionPool#getConnection()
-     *  
-     */
-    public Connection getConnection() throws ConnectionException {
-        
-        if (this.shuttingDownPool) {
-            return null;
-        }
-
-		try {
-			if (!connectionLock.tryAcquire(timeout, TimeUnit.MILLISECONDS)) {
-				throw new ConnectionException("Timeout waiting for lock trying to get connection"); //$NON-NLS-1$
-			}
-		} catch (InterruptedException e) {
-			throw new ConnectionException(e);
-		}
-		
-		try {
-            if (availConnections.isEmpty()) {
-                Connection conn = createConnection();                    
-                inuseConnections.add(conn);
-                return conn;
-            }                
-            
-        
-            for (Iterator it=availConnections.iterator(); it.hasNext();) {
-                ConnectionWrapper conn = (ConnectionWrapper) it.next();
-                it.remove();
-                if (conn.originalConnection.isValid()) {
-                    inuseConnections.add(conn.originalConnection);
-                    LOG.debug("Existing connection obtained for system "); //$NON-NLS-1$
-                    return conn.originalConnection;
-                } 
-                this.closeConnection(conn.originalConnection);                               
-                                       
-            }  
-            
-            Connection conn = createConnection();
-            inuseConnections.add(conn);
-            return conn;                
-
-		} finally {
-			connectionLock.release();
-		}
-       
-    }
-    
-    /** 
-     * @see com.metamatrix.rhq.admin.pool.ConnectionPool#initialize(java.lang.String, java.util.Properties)
-     *  
-     */
-    public void initialize(Properties env, ClassLoader cl) throws ConnectionException {
-        this.envProps = env;
- //       this.installDir = env.getProperty(EnterpriseConnectionConstants.INSTALL_DIR);
-               
-        this.clzzloader = cl; 
- 		this.connectionLock = new Semaphore(getIntProperty(MAXIMUM_RESOURCE_POOL_SIZE, 15));
-		
-		this.timeout = getIntProperty( WAIT_TIME_FOR_RESOURCE, 30000);
-		this.testInterval = getIntProperty( RESOURCE_TEST_INTERVAL, 30000);
-		this.connectionLock = new Semaphore(getIntProperty( MAXIMUM_RESOURCE_POOL_SIZE, 15));
-
-
-        initializeProps();        
-        createFactory();
-    }
-
-    /** 
-     * @see com.metamatrix.rhq.admin.pool.ConnectionPool#shutdown()
-     *  
-     */
-    public void shutdown()  throws ConnectionException {
-        shuttingDownPool = true;
-        
-		try {
-			if (!connectionLock.tryAcquire(timeout, TimeUnit.MILLISECONDS)) {
-				throw new ConnectionException("Timeout waiting for lock trying to get connection"); //$NON-NLS-1$
-			}
-		} catch (InterruptedException e) {
-			throw new ConnectionException(e);
-		}
-        
-		try {
-	        //close cleaning thread
-	        if (this.cleaningThread != null) {
-	            this.cleaningThread.stopCleanup();
-	            this.cleaningThread.interrupt();
-	        }        
-	        
-	        // cleanup, passing true, will close all available connections
-	        this.cleanUp(true);
-	        	
-	        
-	        for (Iterator i = inuseConnections.iterator(); i.hasNext();) {
-	            Connection conn = (Connection)i.next();
-	            this.closeConnection(conn);
-	        }
-	        inuseConnections.clear();
-	        
-	
-	        
-	        envProps.clear();
-	        factory = null;
-		} finally {
-			connectionLock.release();
-		}
-        
-        
-    }
-    
-    
-    private void createFactory() throws ConnectionException {
-        
-        String factoryclass = envProps.getProperty(ConnectionPool.CONNECTION_FACTORY, CONNECTION_FACTORY_DEFAULT);       
-        
-        Thread currentThread = Thread.currentThread();
-        ClassLoader threadContextLoader = currentThread.getContextClassLoader();
-        try {
-            currentThread.setContextClassLoader(this.clzzloader);
-            try {
-                Class c = Class.forName(factoryclass, true, this.clzzloader);
-                factory = (ConnectionFactory)c.newInstance();
-            } catch (Exception err) {
-                throw new ConnectionException(err.getMessage());
-            }
-            
-             // Initialize connector instance...
-            factory.initialize(this.envProps, this);
-
- 
-        } finally {
-            currentThread.setContextClassLoader(threadContextLoader);
-        }
-        
-   }
-    
-    private void initializeProps() throws ConnectionException {
-            liveAndUnusedTime = getIntProperty(LIVE_AND_UNUSED_TIME, DEFAULT_LIVE_AND_UNUSED_TIME);
-            cleaningInterval = getIntProperty(CLEANING_INTERVAL, DEFAULT_CLEANING_INTERVAL);
-
-            
-            if (!this.shuttingDownPool) {
-                this.cleaningThread = new CleanUpThread(cleaningInterval * 1000);
-                this.cleaningThread.setDaemon(true);
-                this.cleaningThread.start();
-            }
-            
-            String value = envProps.getProperty(ENABLE_SHRINKING);
-            if ( value != null ) {
-                enableShrinking = Boolean.valueOf(value).booleanValue();
-            }            
-               
-    }    
-
-    private int getIntProperty(String propertyName, int defaultValue) throws ConnectionException {
-        String value = this.envProps.getProperty(propertyName );
-        if (value == null || value.trim().length() == 0) {
-            return defaultValue;
-        }
-        return Integer.parseInt(value); 
-        
-    }
-        
-    
-    private Connection createConnection() throws ConnectionException {
-        Thread currentThread = Thread.currentThread();
-        ClassLoader threadContextLoader = currentThread.getContextClassLoader();
-        try {
-            currentThread.setContextClassLoader(this.clzzloader);
-            
-            // Initialize connector instance...
-            return factory.createConnection();
-
- 
-        } finally {
-            currentThread.setContextClassLoader(threadContextLoader);
-        }
-        
-        
-
-    }
-    
-    private void closeConnection(Connection conn) {
-        Thread currentThread = Thread.currentThread();
-        ClassLoader threadContextLoader = currentThread.getContextClassLoader();
-        try {
-            currentThread.setContextClassLoader(this.clzzloader);
-            // Initialize connector instance...
-            factory.closeConnection(conn);
-
- 
-        } finally {
-            currentThread.setContextClassLoader(threadContextLoader);
-        }
-        
-    }
-    
-    protected void cleanUp(boolean forceClose) {        
-        Set values = new HashSet(this.availConnections);
-
-            for (Iterator i = values.iterator(); i.hasNext();) {
-                ConnectionWrapper conn = (ConnectionWrapper)i.next();
-                
-                    if (forceClose || (enableShrinking && conn.getIdelTime() >= this.liveAndUnusedTime)
-                                    || !conn.originalConnection.isAlive()) {
-                       availConnections.remove(conn);
-                       this.closeConnection(conn.originalConnection);   
- 
-                    }
-            }
-
-    }    
-    
-    /**
-     * ConnectionWrapper is used to store the connection in the availableConnections and
-     * will provide the amount of idletime a connection has been unused so that
-     * it can be determined if the pool can be shrunk 
-     * 
-     */
-    class ConnectionWrapper {
-        Connection originalConnection;
-        private long timeReturnedToPool;
-
-        ConnectionWrapper(Connection originalConn) {
-            originalConnection = originalConn;
-            timeReturnedToPool = System.currentTimeMillis();
-        }
-
-        int getIdelTime() {
-            return (int) (System.currentTimeMillis() - timeReturnedToPool) / 1000;
-        }
-    }        
-    
-    class CleanUpThread extends Thread {
-        private long sleepTime;
-        private boolean continueChecks = true;
-
-        CleanUpThread(long sleepTime) {
-            super("MMConnectionPoolCleanUpThread");  //$NON-NLS-1$
-            this.sleepTime = sleepTime;
-        }
-
-        public void stopCleanup() {
-            this.continueChecks = false;
-        }
-
-        public void run() {
-            while ( this.continueChecks ) {
-                try {
-                    sleep(sleepTime);
-                } catch (InterruptedException e) {
-                    // ignore it
-                }
-                ConnectionPoolImpl.this.cleanUp(false);
-            }
-        }
-    }  
-        
-    
-
-}

Modified: branches/JCA/console/src/main/java/org/teiid/rhq/plugin/Facet.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/plugin/Facet.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/plugin/Facet.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -21,21 +21,13 @@
  */
 package org.teiid.rhq.plugin;
 
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
 import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
 import java.io.InputStream;
-import java.io.OutputStream;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.commons.io.FileUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.jboss.deployers.spi.management.deploy.DeploymentManager;
@@ -45,8 +37,6 @@
 import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
 import org.rhq.core.domain.content.PackageDetailsKey;
 import org.rhq.core.domain.content.PackageType;
-import org.rhq.core.domain.content.transfer.ContentResponseResult;
-import org.rhq.core.domain.content.transfer.DeployIndividualPackageResponse;
 import org.rhq.core.domain.content.transfer.DeployPackageStep;
 import org.rhq.core.domain.content.transfer.DeployPackagesResponse;
 import org.rhq.core.domain.content.transfer.RemovePackagesResponse;
@@ -55,12 +45,10 @@
 import org.rhq.core.domain.measurement.MeasurementReport;
 import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
 import org.rhq.core.domain.resource.CreateResourceStatus;
-import org.rhq.core.domain.resource.ResourceType;
 import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
 import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
 import org.rhq.core.pluginapi.content.ContentFacet;
 import org.rhq.core.pluginapi.content.ContentServices;
-import org.rhq.core.pluginapi.content.version.PackageVersions;
 import org.rhq.core.pluginapi.inventory.CreateChildResourceFacet;
 import org.rhq.core.pluginapi.inventory.CreateResourceReport;
 import org.rhq.core.pluginapi.inventory.DeleteResourceFacet;
@@ -70,11 +58,6 @@
 import org.rhq.core.pluginapi.measurement.MeasurementFacet;
 import org.rhq.core.pluginapi.operation.OperationFacet;
 import org.rhq.core.pluginapi.operation.OperationResult;
-import org.rhq.core.util.ZipUtil;
-import org.rhq.core.util.exception.ThrowableUtil;
-import org.teiid.rhq.admin.utils.SingletonConnectionManager;
-import org.teiid.rhq.comm.Connection;
-import org.teiid.rhq.comm.ConnectionException;
 import org.teiid.rhq.comm.ExecutedResult;
 import org.teiid.rhq.plugin.objects.ExecutedOperationResultImpl;
 import org.teiid.rhq.plugin.util.DeploymentUtils;
@@ -88,9 +71,6 @@
 		OperationFacet, ConfigurationFacet, ContentFacet, DeleteResourceFacet,
 		CreateChildResourceFacet {
 
-	protected static SingletonConnectionManager connMgr = SingletonConnectionManager
-			.getInstance();
-
 	protected final Log LOG = LogFactory.getLog(Facet.class);
 
 	/**
@@ -111,45 +91,21 @@
 
 	private String identifier;
 
+	protected String componentType;
+	
 	// may be null when the component is not a host or vm
 	private String port = null;
 
 	protected boolean isAvailable = false;
 
-	/**
-	 * Name of the backing package type that will be used when discovering
-	 * packages. This corresponds to the name of the package type defined in the
-	 * plugin descriptor.
-	 */
-	private static final String PKG_TYPE_FILE = "vdb";
-
-	/**
-	 * Architecture string used in describing discovered packages.
-	 */
-	private static final String ARCHITECTURE = "noarch";
-
-	private static final String BACKUP_FILE_EXTENSION = ".rej";
-
 	private final Log log = LogFactory.getLog(this.getClass());
 
-	private PackageVersions versions;
-
 	/**
 	 * The name of the ManagedDeployment (e.g.:
-	 * vfszip:/C:/opt/jboss-5.0.0.GA/server/default/deploy/foo.vdb).
+	 * C:/opt/jboss-5.0.0.GA/server/default/deploy/foo.vdb).
 	 */
 	protected String deploymentName;
 
-	/**
-	 * The type of the ManagedDeployment.
-	 */
-	// protected KnownDeploymentTypes deploymentType;
-	/**
-	 * The absolute path of the deployment file (e.g.:
-	 * C:/opt/jboss-5.0.0.GA/server/default/deploy/foo.vdb).
-	 */
-	protected File deploymentFile;
-
 	abstract String getComponentType();
 
 	/**
@@ -161,6 +117,7 @@
 	 */
 	public void start(ResourceContext context) {
 		resourceContext = context;
+		deploymentName=context.getResourceKey();
 	}
 
 	/**
@@ -214,7 +171,7 @@
 	}
 
 	protected void setOperationArguments(String name,
-			Configuration configuration, Map argumentMap) {
+			Configuration configuration, Map<String, Object> argumentMap) {
 		// moved this logic up to the associated implemented class
 		throw new InvalidPluginConfigurationException(
 				"Not implemented on component type " + this.getComponentType()
@@ -223,44 +180,12 @@
 	}
 
 	protected void execute(final ExecutedResult result, final Map valueMap) {
-		Connection conn = null;
-		try {
-			conn = getConnection();
-
-			if (!conn.isValid()) {
-				return;
-			}
-			conn.executeOperation(result, valueMap);
-
-		} catch (Exception e) {
-			final String msg = "Error invoking operation [" + name + "]. Cause: " + e; //$NON-NLS-1$ //$NON-NLS-2$
-			LOG.error(msg);
-			throw new RuntimeException(msg);
-		} finally {
-			conn.close();
-		}
+//		DQPManagementView dqp = new DQPManagementView();
+//			
+//		dqp.executeOperation(result, valueMap);
+		
 	}
-
-	/**
-	 * The connection will be returned when it is available. If it is not, then
-	 * null will be returned. Resource methods will not throw exceptions as a
-	 * MetaMatrix System goes up and down. That state will be indicated by it's
-	 * availability state.
-	 * 
-	 * @return
-	 */
-
-	public Connection getConnection() throws ConnectionException {
-		Connection conn = connMgr.getConnection(getSystemKey());
-		if (conn.isValid()) {
-			this.isAvailable = true;
-		} else {
-			this.isAvailable = false;
-		}
-
-		return conn;
-	}
-
+	
 	/*
 	 * (non-Javadoc) This method is called by JON to check the availability of
 	 * the inventoried component on a time scheduled basis
@@ -281,7 +206,7 @@
 	 * @return true if the resource is available
 	 */
 	protected boolean isAvailable() {
-		return this.isAvailable;
+		return true;
 	}
 
 	/**
@@ -306,8 +231,7 @@
 	public OperationResult invokeOperation(String name,
 			Configuration configuration) {
 		Map valueMap = new HashMap();
-		Connection conn = null;
-
+	
 		Set operationDefinitionSet = this.resourceContext.getResourceType()
 				.getOperationDefinitions();
 
@@ -364,359 +288,54 @@
 		report.setStatus(ConfigurationUpdateStatus.SUCCESS);
 	}
 
-	@Override
 	public void deleteResource() throws Exception {
-		// TODO Auto-generated method stub
+		
+		DeploymentManager deploymentManager = ProfileServiceUtil.getDeploymentManager();
+		
+        log.debug("Stopping deployment [" + this.deploymentName + "]...");
+        DeploymentProgress progress = deploymentManager.stop(this.deploymentName);
+        DeploymentStatus stopStatus = DeploymentUtils.run(progress);
+        if (stopStatus.isFailed()) {
+            log.error("Failed to stop deployment '" + this.deploymentName + "'.", stopStatus.getFailure());
+            throw new Exception("Failed to stop deployment '" + this.deploymentName + "' - cause: "
+                    + stopStatus.getFailure());
+        }
+        log.debug("Removing deployment [" + this.deploymentName + "]...");
+        progress = deploymentManager.remove(this.deploymentName);
+        DeploymentStatus removeStatus = DeploymentUtils.run(progress);
+        if (removeStatus.isFailed()) {
+            log.error("Failed to remove deployment '" + this.deploymentName + "'.", removeStatus.getFailure());
+            throw new Exception("Failed to remove deployment '" + this.deploymentName + "' - cause: "
+                    + removeStatus.getFailure());
+        }
 
 	}
 
-	@Override
+	//@Override
 	public DeployPackagesResponse deployPackages(
 			Set<ResourcePackageDetails> packages,
 			ContentServices contentServices) {
-		String resourceTypeName = this.resourceContext.getResourceType()
-				.getName();
-
-		// You can only update the one application file referenced by this
-		// resource, so punch out if multiple are
-		// specified.
-		if (packages.size() != 1) {
-			log.warn("Request to update " + resourceTypeName
-					+ " file contained multiple packages: " + packages);
-			DeployPackagesResponse response = new DeployPackagesResponse(
-					ContentResponseResult.FAILURE);
-			response.setOverallRequestErrorMessage("Only one "
-					+ resourceTypeName + " can be updated at a time.");
-			return response;
-		}
-
-		ResourcePackageDetails packageDetails = packages.iterator().next();
-
-		log.debug("Updating VDB file '" + this.deploymentFile + "' using ["
-				+ packageDetails + "]...");
-		// Find location of existing application.
-		if (!this.deploymentFile.exists()) {
-			return failApplicationDeployment(
-					"Could not find application to update at location: "
-							+ this.deploymentFile, packageDetails);
-		}
-
-		log.debug("Writing new EAR/WAR bits to temporary file...");
-		File tempFile;
-		try {
-			tempFile = writeNewAppBitsToTempFile(contentServices,
-					packageDetails);
-		} catch (Exception e) {
-			return failApplicationDeployment(
-					"Error writing new application bits to temporary file - cause: "
-							+ e, packageDetails);
-		}
-		log.debug("Wrote new EAR/WAR bits to temporary file '" + tempFile
-				+ "'.");
-
-		boolean deployExploded = this.deploymentFile.isDirectory();
-
-		// Backup the original app file/dir.
-		File tempDir = resourceContext.getTemporaryDirectory();
-		File backupDir = new File(tempDir, "deployBackup");
-		File backupOfOriginalFile = new File(backupDir, this.deploymentFile
-				.getName());
-		log.debug("Backing up existing EAR/WAR '" + this.deploymentFile
-				+ "' to '" + backupOfOriginalFile + "'...");
-		try {
-			if (backupOfOriginalFile.exists()) {
-				FileUtils.forceDelete(backupOfOriginalFile);
-			}
-			if (this.deploymentFile.isDirectory()) {
-				FileUtils.copyDirectory(this.deploymentFile,
-						backupOfOriginalFile, true);
-			} else {
-				FileUtils.copyFile(this.deploymentFile, backupOfOriginalFile,
-						true);
-			}
-		} catch (Exception e) {
-			throw new RuntimeException("Failed to backup existing "
-					+ resourceTypeName + "'" + this.deploymentFile + "' to '"
-					+ backupOfOriginalFile + "'.");
-		}
-
-		// Now stop the original app.
-		try {
-			DeploymentManager deploymentManager = ProfileServiceUtil
-					.getDeploymentManager();
-			DeploymentProgress progress = deploymentManager
-					.stop(this.deploymentName);
-			DeploymentUtils.run(progress);
-		} catch (Exception e) {
-			throw new RuntimeException("Failed to stop deployment ["
-					+ this.deploymentName + "].", e);
-		}
-
-		// And then remove it (this will delete the physical file/dir from the
-		// deploy dir).
-		try {
-			DeploymentManager deploymentManager = ProfileServiceUtil
-					.getDeploymentManager();
-			DeploymentProgress progress = deploymentManager
-					.remove(this.deploymentName);
-			DeploymentUtils.run(progress);
-		} catch (Exception e) {
-			throw new RuntimeException("Failed to remove deployment ["
-					+ this.deploymentName + "].", e);
-		}
-
-		// Deploy away!
-		log.debug("Deploying '" + tempFile + "'...");
-		DeploymentManager deploymentManager = null;
-		try {
-			deploymentManager = ProfileServiceUtil.getDeploymentManager();
-			DeploymentUtils.deployArchive(deploymentManager, tempFile,
-					deployExploded);
-		} catch (Exception e) {
-			// Deploy failed - rollback to the original app file...
-			log.debug("Redeploy failed - rolling back to original archive...",
-					e);
-			String errorMessage = ThrowableUtil.getAllMessages(e);
-			try {
-				// Try to delete the new app file, which failed to deploy, if it
-				// still exists.
-				if (this.deploymentFile.exists()) {
-					try {
-						FileUtils.forceDelete(this.deploymentFile);
-					} catch (IOException e1) {
-						log.debug("Failed to delete application file '"
-								+ this.deploymentFile
-								+ "' that failed to deploy.", e1);
-					}
-				}
-				// Now redeploy the original file - this generally should
-				// succeed.
-				DeploymentUtils.deployArchive(deploymentManager,
-						backupOfOriginalFile, deployExploded);
-				errorMessage += " ***** ROLLED BACK TO ORIGINAL APPLICATION FILE. *****";
-			} catch (Exception e1) {
-				log.debug("Rollback failed!", e1);
-				errorMessage += " ***** FAILED TO ROLLBACK TO ORIGINAL APPLICATION FILE. *****: "
-						+ ThrowableUtil.getAllMessages(e1);
-			}
-			log
-					.info("Failed to update " + resourceTypeName + " file '"
-							+ this.deploymentFile + "' using ["
-							+ packageDetails + "].");
-			return failApplicationDeployment(errorMessage, packageDetails);
-		}
-
-		// Deploy was successful!
-		deleteBackupOfOriginalFile(backupOfOriginalFile);
-		persistApplicationVersion(packageDetails, this.deploymentFile);
-
-		DeployPackagesResponse response = new DeployPackagesResponse(
-				ContentResponseResult.SUCCESS);
-		DeployIndividualPackageResponse packageResponse = new DeployIndividualPackageResponse(
-				packageDetails.getKey(), ContentResponseResult.SUCCESS);
-		response.addPackageResponse(packageResponse);
-
-		log.debug("Updated " + resourceTypeName + " file '"
-				+ this.deploymentFile + "' successfully - returning response ["
-				+ response + "]...");
-
-		return response;
+		return null;
 	}
 
-	@Override
 	public Set<ResourcePackageDetails> discoverDeployedPackages(PackageType arg0) {
-		if (!this.deploymentFile.exists())
-			throw new IllegalStateException("Deployment file '"
-					+ this.deploymentFile + "' for " + "VDB Archive"
-					+ " does not exist.");
-
-		String fileName = this.deploymentFile.getName();
-		PackageVersions packageVersions = loadPackageVersions();
-		String version = packageVersions.getVersion(fileName);
-		if (version == null) {
-			// This is either the first time we've discovered this VDB, or
-			// someone purged the PC's data dir.
-			version = "1.0";
-			packageVersions.putVersion(fileName, version);
-			packageVersions.saveToDisk();
-		}
-
-		// Package name is the deployment's file name (e.g. foo.ear).
-		PackageDetailsKey key = new PackageDetailsKey(fileName, version,
-				PKG_TYPE_FILE, ARCHITECTURE);
-		ResourcePackageDetails packageDetails = new ResourcePackageDetails(key);
-		packageDetails.setFileName(fileName);
-		packageDetails.setLocation(this.deploymentFile.getPath());
-		if (!this.deploymentFile.isDirectory())
-			packageDetails.setFileSize(this.deploymentFile.length());
-		packageDetails.setFileCreatedDate(null); // TODO: get created date via
-		// SIGAR
-		Set<ResourcePackageDetails> packages = new HashSet<ResourcePackageDetails>();
-		packages.add(packageDetails);
-
-		return packages;
+		return null;
 	}
 
-	@Override
 	public List<DeployPackageStep> generateInstallationSteps(
 			ResourcePackageDetails arg0) {
 		return null;
 	}
 
 	public RemovePackagesResponse removePackages(
-			Set<ResourcePackageDetails> packages) {
-		throw new UnsupportedOperationException(
-				"Cannot remove the package backing an VDB resource.");
+			Set<ResourcePackageDetails> arg0) {
+		return null;
 	}
 
-	@Override
 	public InputStream retrievePackageBits(ResourcePackageDetails packageDetails) {
-		File packageFile = new File(packageDetails.getName());
-		File fileToSend;
-		try {
-			if (packageFile.isDirectory()) {
-				fileToSend = File.createTempFile("rhq", ".zip");
-				ZipUtil.zipFileOrDirectory(packageFile, fileToSend);
-			} else
-				fileToSend = packageFile;
-			return new BufferedInputStream(new FileInputStream(fileToSend));
-		} catch (IOException e) {
-			throw new RuntimeException("Failed to retrieve package bits for "
-					+ packageDetails, e);
-		}
+		return null;
 	}
 
-	/**
-	 * Returns an instantiated and loaded versions store access point.
-	 * 
-	 * @return will not be <code>null</code>
-	 */
-	private PackageVersions loadPackageVersions() {
-		if (this.versions == null) {
-			ResourceType resourceType = this.resourceContext.getResourceType();
-			String pluginName = resourceType.getPlugin();
-			File dataDirectoryFile = this.resourceContext.getDataDirectory();
-			dataDirectoryFile.mkdirs();
-			String dataDirectory = dataDirectoryFile.getAbsolutePath();
-			log.trace("Creating application versions store with plugin name ["
-					+ pluginName + "] and data directory [" + dataDirectory
-					+ "]");
-			this.versions = new PackageVersions(pluginName, dataDirectory);
-			this.versions.loadFromDisk();
-		}
-
-		return this.versions;
-	}
-
-	/**
-	 * Creates the necessary transfer objects to report a failed application
-	 * deployment (update).
-	 * 
-	 * @param errorMessage
-	 *            reason the deploy failed
-	 * @param packageDetails
-	 *            describes the update being made
-	 * 
-	 * @return response populated to reflect a failure
-	 */
-	private DeployPackagesResponse failApplicationDeployment(
-			String errorMessage, ResourcePackageDetails packageDetails) {
-		DeployPackagesResponse response = new DeployPackagesResponse(
-				ContentResponseResult.FAILURE);
-
-		DeployIndividualPackageResponse packageResponse = new DeployIndividualPackageResponse(
-				packageDetails.getKey(), ContentResponseResult.FAILURE);
-		packageResponse.setErrorMessage(errorMessage);
-
-		response.addPackageResponse(packageResponse);
-
-		return response;
-	}
-
-	private File writeNewAppBitsToTempFile(ContentServices contentServices,
-			ResourcePackageDetails packageDetails) throws Exception {
-		File tempDir = resourceContext.getTemporaryDirectory();
-		File tempFile = new File(tempDir, this.deploymentFile.getName());
-
-		OutputStream tempOutputStream = null;
-		try {
-			tempOutputStream = new BufferedOutputStream(new FileOutputStream(
-					tempFile));
-			long bytesWritten = contentServices.downloadPackageBits(
-					resourceContext.getContentContext(), packageDetails
-							.getKey(), tempOutputStream, true);
-			log
-					.debug("Wrote " + bytesWritten + " bytes to '" + tempFile
-							+ "'.");
-		} catch (IOException e) {
-			log.error(
-					"Error writing updated application bits to temporary location: "
-							+ tempFile, e);
-			throw e;
-		} finally {
-			if (tempOutputStream != null) {
-				try {
-					tempOutputStream.close();
-				} catch (IOException e) {
-					log.error("Error closing temporary output stream", e);
-				}
-			}
-		}
-		if (!tempFile.exists()) {
-			log.error("Temporary file for application update not written to: "
-					+ tempFile);
-			throw new Exception();
-		}
-		return tempFile;
-	}
-
-	private void persistApplicationVersion(
-			ResourcePackageDetails packageDetails, File appFile) {
-		String packageName = appFile.getName();
-		PackageVersions versions = loadApplicationVersions();
-		versions.putVersion(packageName, packageDetails.getVersion());
-	}
-
-	private void deleteBackupOfOriginalFile(File backupOfOriginalFile) {
-		try {
-			FileUtils.forceDelete(backupOfOriginalFile);
-		} catch (Exception e) {
-			// not critical.
-			log.warn("Failed to delete backup of original file: "
-					+ backupOfOriginalFile);
-		}
-	}
-
-	/**
-	 * Returns an instantiated and loaded versions store access point.
-	 * 
-	 * @return will not be <code>null</code>
-	 */
-	private PackageVersions loadApplicationVersions() {
-		if (versions == null) {
-			ResourceType resourceType = resourceContext.getResourceType();
-			String pluginName = resourceType.getPlugin();
-
-			File dataDirectoryFile = resourceContext.getDataDirectory();
-
-			if (!dataDirectoryFile.exists()) {
-				dataDirectoryFile.mkdir();
-			}
-
-			String dataDirectory = dataDirectoryFile.getAbsolutePath();
-
-			log.debug("Creating application versions store with plugin name ["
-					+ pluginName + "] and data directory [" + dataDirectory
-					+ "]");
-
-			versions = new PackageVersions(pluginName, dataDirectory);
-			versions.loadFromDisk();
-		}
-
-		return versions;
-	}
-
-	@Override
 	public CreateResourceReport createResource(CreateResourceReport createResourceReport) {
 		ResourcePackageDetails details = createResourceReport
 				.getPackageDetails();
@@ -736,15 +355,10 @@
 				return createResourceReport;
 			}
 
-			Configuration deployTimeConfig = details
-					.getDeploymentTimeConfiguration();
-			@SuppressWarnings( { "ConstantConditions" })
-		//	boolean deployExploded = deployTimeConfig.getSimple(
-		//			"deployExploded").getBooleanValue();
-
 			DeploymentManager deploymentManager = ProfileServiceUtil.getDeploymentManager();
 			DeploymentUtils.deployArchive(deploymentManager, archiveFile, false);
 
+			deploymentName = archivePath;
 			createResourceReport.setResourceName(archivePath);
 			createResourceReport.setResourceKey(archivePath);
 			createResourceReport.setStatus(CreateResourceStatus.SUCCESS);

Deleted: branches/JCA/console/src/main/java/org/teiid/rhq/plugin/NodeChildrenDiscoveryComponent.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/plugin/NodeChildrenDiscoveryComponent.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/plugin/NodeChildrenDiscoveryComponent.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -1,122 +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 java.util.Iterator;
-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.resource.ResourceType;
-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.comm.Component;
-import org.teiid.rhq.comm.Connection;
-import org.teiid.rhq.comm.ConnectionException;
-
-
-/**
- * Discovery component used to discover the monitored connector bindings
- * 
- */
-public abstract class NodeChildrenDiscoveryComponent extends NodeDiscoveryComponent {
-
-
-	private final Log LOG = LogFactory.getLog(NodeChildrenDiscoveryComponent.class);
-
-	/**
-	 * @see ResourceDiscoveryComponent#discoverResources(ResourceDiscoveryContext)
-	 */
-
-	@Override
-	protected void addResources(Set<DiscoveredResourceDetails> found, ResourceType resourceType, Facet parent)
-		throws InvalidPluginConfigurationException {
-		Connection conn = null;
-		   try {
-		        conn = getConnection();
-		        if (!conn.isValid()) {
-		            return;
-		        }
-		        Collection<Component> components =  getComponents(conn, parent);
-		        
-		        if (components == null || components.size() == 0) {
-		            LOG.info("No components were found to be configured for parent "+ parent.getComponentIdentifier()); //$NON-NLS-1$
-		            return;
-		        }
-		         
-		        Iterator<Component> comIter = components.iterator();
-		        
-		        while (comIter.hasNext()) {
-		          Component comp =  comIter.next();           
-		          LOG.info("Processing component "+ comp.getName()); //$NON-NLS-1$
-		          
-		          DiscoveredResourceDetails resource = this.createResource(resourceType, comp);
-           
-		          found.add(resource);      
-		        }
-	       } catch (InvalidPluginConfigurationException ipe) {
-	            throw ipe;
-	        } catch (Throwable t) {
-	            throw new InvalidPluginConfigurationException(t);            
-	            
-	        } finally {
-	            if (conn != null) {
-	                conn.close();
-	            }
-	        } 
-
-		
-	}
-	
-	protected DiscoveredResourceDetails createResource(ResourceType resourceType, Component component)
-	throws InvalidPluginConfigurationException {
-		
-		DiscoveredResourceDetails resource = createResource(resourceType, 
-      		  systemkey + "|" + component.getIdentifier(), 
-      		component.getName(), 
-      		(component.getDescription()!=null?component.getDescription():""));
-
-  	                   
-	    Configuration configuration = resource.getPluginConfiguration();
-	    configuration.put(new PropertySimple(Component.NAME, component.getName()));
-	    configuration.put(new PropertySimple(Component.IDENTIFIER, component.getIdentifier()));
-	    configuration.put(new PropertySimple(Component.SYSTEM_KEY, systemkey));
-	    
-	    addAdditionalProperties(configuration, component);
-	    
-	    return resource;
-	
-	}
-	
-	protected void addAdditionalProperties(Configuration configuration, Component component) throws InvalidPluginConfigurationException {
-		
-	}
-	
-	abstract Collection<Component> getComponents(Connection conn, Facet parent) throws ConnectionException;
-	
-
-}
\ No newline at end of file

Deleted: branches/JCA/console/src/main/java/org/teiid/rhq/plugin/NodeDiscoveryComponent.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/plugin/NodeDiscoveryComponent.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/plugin/NodeDiscoveryComponent.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -1,131 +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.Collections;
-import java.util.HashSet;
-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.resource.ResourceType;
-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.admin.utils.SingletonConnectionManager;
-import org.teiid.rhq.comm.Component;
-import org.teiid.rhq.comm.Connection;
-import org.teiid.rhq.comm.ConnectionConstants;
-
-
-/**
- * Discovery component used to discover the monitored services
- *
- */
-public class NodeDiscoveryComponent implements
-		ResourceDiscoveryComponent {
-	private static final Log LOG = LogFactory
-			.getLog(NodeDiscoveryComponent.class);
-    
-    private static SingletonConnectionManager connMgr  = SingletonConnectionManager.getInstance();
-
-    protected String systemkey = null;
-    
-
-	public Set<DiscoveredResourceDetails> discoverResources(
-			ResourceDiscoveryContext discoveryContext) throws InvalidPluginConfigurationException, Exception {
-		
-        
-        String name = discoveryContext.getResourceType().getName();
-  
-        LOG.info("Discovering " + name); //$NON-NLS-1$
-
-        // if no servers have been defined, do not discover resources
-        if (!connMgr.hasServersDefined()) {
-            LOG.info("Unable to discover " + name + ", no JBEDSP Platforms defined"); //$NON-NLS-1$
-            return Collections.EMPTY_SET;
-        }
-
-        Facet parent = (Facet) discoveryContext.getParentResourceComponent();
-         
-        String parentName = parent.getComponentName(); 
-        systemkey = parent.getSystemKey();
-        
-        LOG.info("Discovering JBEDSP " + name + " for " + (parentName!=null?parentName:"PARENTNAMENOTFOUND")); //$NON-NLS-1$ //$NON-NLS-2$
-        
-		Set<DiscoveredResourceDetails> found = new HashSet<DiscoveredResourceDetails>();           
-              
-        addResources(found, discoveryContext.getResourceType(), parent);
-        
-       return found;
-	}
-	
-	protected void addResources(Set<DiscoveredResourceDetails> found, ResourceType resourceType, Facet parent)
-		throws InvalidPluginConfigurationException {
-		 String identifier = parent.getComponentIdentifier()+ "|" + resourceType.getName();
-        DiscoveredResourceDetails resource = createResource(resourceType, identifier,  resourceType.getName(), resourceType.getDescription());
-           
-        found.add(resource);           	  
-		
-	}
-		
-	protected DiscoveredResourceDetails createResource(ResourceType resourceType, String identifier, String name, String description)
-		throws InvalidPluginConfigurationException {
-
-        DiscoveredResourceDetails resource = new DiscoveredResourceDetails(resourceType,
-      		  identifier, name,
-      		  ConnectionConstants.VERSION, 
-      		  (description!=null?description:""), 
-      		  null, 
-      		  null);
-      	                   
-        Configuration configuration = resource.getPluginConfiguration();
-        configuration.put(new PropertySimple(Component.NAME, name));
-        configuration.put(new PropertySimple(Component.IDENTIFIER, identifier));
-        configuration.put(new PropertySimple(Component.SYSTEM_KEY, systemkey));
-        
-        addAdditionalProperties(configuration);
-        
-        return resource;
-		
-	}
-	
-
-	
-	protected void addAdditionalProperties(Configuration configuration) throws InvalidPluginConfigurationException {
-		
-	}
-	
-	protected Connection getConnection() throws InvalidPluginConfigurationException{
-		try {
-			return connMgr.getConnection(this.systemkey);
-
-		} catch (Throwable t) {
-          throw new InvalidPluginConfigurationException(t);            
-          
-      } 
-	}
-	
-}
\ No newline at end of file

Modified: branches/JCA/console/src/main/java/org/teiid/rhq/plugin/PlatformComponent.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/plugin/PlatformComponent.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/plugin/PlatformComponent.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -21,7 +21,6 @@
  */
 package org.teiid.rhq.plugin;
 
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Properties;
@@ -31,80 +30,131 @@
 
 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.RunState;
 import org.rhq.core.domain.configuration.Configuration;
 import org.rhq.core.domain.configuration.PropertySimple;
 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.ConfigurationUpdateReport;
-import org.teiid.rhq.admin.utils.SingletonConnectionManager;
-import org.teiid.rhq.comm.Connection;
-import org.teiid.rhq.comm.ConnectionConstants;
-//import org.teiid.rhq.comm.ConnectionConstants;
-//import org.teiid.rhq.comm.Connection;
-//import org.teiid.rhq.comm.ConnectionConstants;
-//import org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.System.Metrics;
 import org.teiid.rhq.plugin.util.PluginConstants;
 import org.teiid.rhq.plugin.util.ProfileServiceUtil;
-import org.teiid.rhq.plugin.util.PluginConstants.Operation;
-import org.teiid.rhq.plugin.util.PluginConstants.ComponentType.Runtime.Metrics;
+import org.teiid.rhq.plugin.util.PluginConstants.ComponentType.Platform;
 
-
 /**
  * 
  */
-public class PlatformComponent extends Facet {
+public class PlatformComponent extends Facet implements PluginConstants {
 	private final Log LOG = LogFactory.getLog(PlatformComponent.class);
 
+	
 	/**
 	 * @see org.teiid.rhq.plugin.Facet#getComponentType()
 	 * @since 4.3
 	 */
 	@Override
 	String getComponentType() {
-		return null;
+		return PluginConstants.ComponentType.Platform.NAME;
 	}
-	
+
 	@Override
 	public AvailabilityType getAvailability() {
 		RunState runState = null;
 		ManagedComponent mc;
 		try {
-			mc = ProfileServiceUtil.getManagedComponent(
-					new ComponentType(PluginConstants.ComponentType.Runtime.TYPE,
-							PluginConstants.ComponentType.Runtime.SUBTYPE),
-					PluginConstants.ComponentType.Runtime.TEIID_RUNTIME_ENGINE);
+			mc =  ProfileServiceUtil.getManagedComponent(new org.jboss.managed.api.ComponentType(
+					ComponentType.Platform.TYPE,
+					ComponentType.Platform.SUBTYPE),
+					ComponentType.Platform.TEIID_RUNTIME_ENGINE);
 			runState = mc.getRunState();
 		} catch (NamingException e) {
-			LOG.error("Naming exception getting: " + PluginConstants.ComponentType.Runtime.TEIID_RUNTIME_ENGINE);
-	        return AvailabilityType.DOWN;
+			LOG
+					.error("Naming exception getting: "
+							+ PluginConstants.ComponentType.Platform.TEIID_RUNTIME_ENGINE);
+			return AvailabilityType.DOWN;
 		} catch (Exception e) {
-			LOG.error("Exception getting: " + PluginConstants.ComponentType.Runtime.TEIID_RUNTIME_ENGINE);
+			LOG
+					.error("Exception getting: "
+							+ PluginConstants.ComponentType.Platform.TEIID_RUNTIME_ENGINE);
 			return AvailabilityType.DOWN;
 		}
-		
-		return (runState == RunState.RUNNING) ? AvailabilityType.UP : AvailabilityType.DOWN;
-		
+
+		return (runState == RunState.RUNNING) ? AvailabilityType.UP
+				: AvailabilityType.DOWN;
+
 	}
 
-	
-	protected void setOperationArguments(String name, Configuration configuration,
-			Map valueMap) {
- 		
-	}	
+	@Override
+	protected void setOperationArguments(String name,
+			Configuration configuration, Map<String, Object> valueMap) {
+		// Parameter logic for System Operations
+		if (name.equals(Platform.Operations.GET_QUERIES) ||
+			name.equals(Platform.Operations.GET_LONGRUNNINGQUERIES)) {
+			Integer long_running_value = getResourceConfiguration().getSimple(Operation.Value.LONG_RUNNING_QUERY_LIMIT).getIntegerValue();
+			valueMap.put(Operation.Value.LONG_RUNNING_QUERY_LIMIT, long_running_value);				
+		} else if (name.equals(Platform.Operations.KILL_REQUEST)) {
+			String key = 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 {
+		
+//		DQPManagementView view = new DQPManagementView();
+//
+//		Map<String, Object> valueMap = new HashMap<String, Object>();
+//
+//		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(PluginConstants.ComponentType.Platform.Metrics.LONG_RUNNING_QUERIES)) {
+//				Integer value = getResourceConfiguration()
+//						.getSimple(
+//								PluginConstants.Operation.Value.LONG_RUNNING_QUERY_LIMIT)
+//						.getIntegerValue();
+//				valueMap.put(PluginConstants.Operation.Value.LONG_RUNNING_QUERY_LIMIT, value);
+//			}
+//
+//			Object metricReturnObject = view.getMetric(getComponentType(), this
+//					.getComponentIdentifier(), name, valueMap);
+//
+//			try {
+//				if (request.getName().equals(PluginConstants.ComponentType.Platform.Metrics.QUERY_COUNT)) {
+//					report.addData(new MeasurementDataNumeric(request,
+//							(Double) metricReturnObject));
+//				} else {
+//					if (request.getName().equals(PluginConstants.ComponentType.Platform.Metrics.SESSION_COUNT)) {
+//						report.addData(new MeasurementDataNumeric(request,
+//								(Double) metricReturnObject));
+//					} else {
+//						if (request.getName().equals(
+//								PluginConstants.ComponentType.Platform.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);
+//			}
+//		}
+
 	}
-	
-	
-	
+
 	@Override
 	public void stop() {
 		// TODO Auto-generated method stub
@@ -113,19 +163,20 @@
 
 	@Override
 	public void updateResourceConfiguration(ConfigurationUpdateReport report) {
-		
+
 		Properties props = System.getProperties();
-		
-		Iterator<PropertySimple> pluginPropIter = report.getConfiguration().getSimpleProperties().values().iterator();
-		
-		while (pluginPropIter.hasNext()){
+
+		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);
+
+		//SingletonConnectionManager.getInstance().initialize(props);
 		super.updateResourceConfiguration(report);
-		
-	}	
 
+	}
+
 }
\ No newline at end of file

Modified: branches/JCA/console/src/main/java/org/teiid/rhq/plugin/PlatformDiscoveryComponent.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/plugin/PlatformDiscoveryComponent.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/plugin/PlatformDiscoveryComponent.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -58,9 +58,9 @@
 		Set<DiscoveredResourceDetails> discoveredResources = new HashSet<DiscoveredResourceDetails>();
 
 		ManagedComponent mc = ProfileServiceUtil.getManagedComponent(
-				new ComponentType(PluginConstants.ComponentType.Runtime.TYPE,
-						PluginConstants.ComponentType.Runtime.SUBTYPE),
-				PluginConstants.ComponentType.Runtime.TEIID_RUNTIME_ENGINE);
+				new ComponentType(PluginConstants.ComponentType.Platform.TYPE,
+						PluginConstants.ComponentType.Platform.SUBTYPE),
+				PluginConstants.ComponentType.Platform.TEIID_RUNTIME_ENGINE);
 
 		Configuration c = new Configuration(); 
 		String managerName = mc.getName();
@@ -74,9 +74,9 @@
 		DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
 				discoveryContext.getResourceType(), // ResourceType
 				managerName, // Resource Key
-				PluginConstants.ComponentType.Runtime.TEIID_ENGINE_RESOURCE_NAME, // Resource Name
+				PluginConstants.ComponentType.Platform.TEIID_ENGINE_RESOURCE_NAME, // Resource Name
 				null, // Version TODO can we get that from discovery ?
-				PluginConstants.ComponentType.Runtime.TEIID_ENGINE_RESOURCE_DESCRIPTION, // Description
+				PluginConstants.ComponentType.Platform.TEIID_ENGINE_RESOURCE_DESCRIPTION, // Description
 				c, // Plugin Config
 				null // Process info from a process scan
 		);

Modified: branches/JCA/console/src/main/java/org/teiid/rhq/plugin/VDBComponent.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/plugin/VDBComponent.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/plugin/VDBComponent.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -32,6 +32,7 @@
 import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
 import org.rhq.core.pluginapi.measurement.MeasurementFacet;
 import org.teiid.rhq.comm.ConnectionConstants;
+import org.teiid.rhq.plugin.util.PluginConstants;
 
 
 /**
@@ -42,6 +43,15 @@
 	private final Log LOG = LogFactory
 			.getLog(VDBComponent.class);
 
+	
+	/* (non-Javadoc)
+	 * @see org.teiid.rhq.plugin.Facet#getComponentName()
+	 */
+	@Override
+	public String getComponentName() {
+		return PluginConstants.ComponentType.VDB.NAME;
+	}
+
 	/**
 	 * The plugin container will call this method when your resource component
 	 * has been scheduled to collect some measurements now. It is within this

Modified: branches/JCA/console/src/main/java/org/teiid/rhq/plugin/VDBDiscoveryComponent.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/plugin/VDBDiscoveryComponent.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/plugin/VDBDiscoveryComponent.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -67,22 +67,9 @@
 
 		for (ManagedComponent mcVdb : vdbs) {
 
+			String vdbKey = mcVdb.getDeployment().getName();
 			String vdbName = ((SimpleValueSupport) mcVdb.getProperty("name")
 					.getValue()).getValue().toString();
-//			ManagementView managementView = ProfileServiceUtil
-//			.getManagementView(ProfileServiceUtil.getProfileService(),
-//					false);
-			//ManagedDeployment managedDeployment = managementView.getDeploymentNamesForType(arg0)(vdbName);
-			//Set deploymentNames = null;
-			
-//			try
-//	        {
-//	            deploymentNames = managementView.getDeploymentNames();
-//	        }
-//	        catch (Exception e)
-//	        {
-//	            log.error("Unable to get deployment for type " , e);
-//	        }
 			String vdbVersion = ((SimpleValueSupport) mcVdb.getProperty(
 					"version").getValue()).getValue().toString();
 			// TODO: Correct this after deploying proper VDB/Metadata
@@ -97,7 +84,7 @@
 			 */
 			DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
 					discoveryContext.getResourceType(), // ResourceType
-					vdbName, // Resource Key
+					vdbKey, // Resource Key
 					vdbName, // Resource Name
 					vdbVersion, // Version
 					PluginConstants.ComponentType.VDB.DESCRIPTION, // Description

Deleted: branches/JCA/console/src/main/java/org/teiid/rhq/plugin/log/JBEDSPErrorLogEntryProcessor.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/plugin/log/JBEDSPErrorLogEntryProcessor.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/plugin/log/JBEDSPErrorLogEntryProcessor.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -1,96 +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.log;
-
-import java.io.File;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.rhq.core.domain.event.EventSeverity;
-import org.rhq.core.pluginapi.event.log.MultiLineLogEntryProcessor;
-
-
-/** 
- * @since 4.3
- */
-public class JBEDSPErrorLogEntryProcessor extends MultiLineLogEntryProcessor {
-
-    
-    /**
-     * The regex for the primary log line: '['date']' '['severityLevel']' '['clientIP']' message
-     * e.g.: [Wed Oct 11 14:32:52 2008] [error] [client 127.0.0.1] client denied by server configuration
-     * NOTE: The message portion may contain multiple lines.
-     */
-    private static final String REGEX = "(.*) (.*) (INFO|WARNING|ERROR|DEBUG) (.*)"; //$NON-NLS-1$
-    private static final Pattern PATTERN = Pattern.compile(REGEX);
-
-    private static final String DATE_PATTERN = "MMM dd, yyyy kk:mm:ss.SSS"; // e.g.:  Aug 26, 2008 13:10:11.371  //$NON-NLS-1$
-    private static final DateFormat DATE_FORMAT = new SimpleDateFormat(DATE_PATTERN);
-
-    private static final Map<SeverityLevel, EventSeverity> LEVEL_TO_SEVERITY_MAP = new LinkedHashMap();
-    static {
-        LEVEL_TO_SEVERITY_MAP.put(SeverityLevel.DEBUG, EventSeverity.DEBUG);
-        LEVEL_TO_SEVERITY_MAP.put(SeverityLevel.INFO, EventSeverity.INFO);
-        LEVEL_TO_SEVERITY_MAP.put(SeverityLevel.WARNING, EventSeverity.WARN);
-        LEVEL_TO_SEVERITY_MAP.put(SeverityLevel.ERROR, EventSeverity.ERROR);        
-    }
-
-    public JBEDSPErrorLogEntryProcessor(String eventType, File logFile) {
-        super(eventType, logFile);
-    }
-
-    protected Pattern getPattern() {
-        return PATTERN;
-    }
-
-    protected DateFormat getDefaultDateFormat() {
-        return DATE_FORMAT;
-    }
-
-    protected LogEntry processPrimaryLine(Matcher matcher) throws ParseException {
-        String dateString = matcher.group(1);
-        Date  timestamp = parseDateString(dateString);
-        String severityLevelString = matcher.group(3);
-        SeverityLevel severityLevel;
-        try {
-            severityLevel = SeverityLevel.valueOf(severityLevelString.toUpperCase());
-        }
-        catch (IllegalArgumentException e) {
-            throw new ParseException("Unknown severity level: " + severityLevelString); //$NON-NLS-1$
-        }
-        EventSeverity severity = LEVEL_TO_SEVERITY_MAP.get(severityLevel);
-        String detail = matcher.group(4);
-        return new LogEntry(timestamp, severity, detail);
-    }
-
-    private enum SeverityLevel {
-        DEBUG,
-        INFO,
-        WARNING,
-        ERROR
-    }
-}

Modified: branches/JCA/console/src/main/java/org/teiid/rhq/plugin/objects/ExecutedOperationResultImpl.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/plugin/objects/ExecutedOperationResultImpl.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/plugin/objects/ExecutedOperationResultImpl.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -21,6 +21,7 @@
  */
 package org.teiid.rhq.plugin.objects;
 
+import java.util.Collection;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
@@ -98,7 +99,7 @@
 		while (resultIter.hasNext()) {
 			Map reportRowMap = (Map) resultIter.next();
 			Iterator reportRowKeySetIter = reportRowMap.keySet().iterator();
-			pm = new PropertyMap("userMap"); //$NON-NLS-1$			
+			pm = new PropertyMap(MAPNAME); //$NON-NLS-1$			
 
 			while (reportRowKeySetIter.hasNext()) {
 				String key = (String) reportRowKeySetIter.next();
@@ -110,7 +111,7 @@
 		operationResult.getComplexResults().put(list);
 	}
 
-	public void setContent(List content) {
+	public void setContent(Collection content) {
 		this.content = content;
 		setComplexResult();
 	}

Modified: branches/JCA/console/src/main/java/org/teiid/rhq/plugin/objects/ExecutedResourceConfigurationResultImpl.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/plugin/objects/ExecutedResourceConfigurationResultImpl.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/plugin/objects/ExecutedResourceConfigurationResultImpl.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -21,6 +21,7 @@
  */
 package org.teiid.rhq.plugin.objects;
 
+import java.util.Collection;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
@@ -108,7 +109,7 @@
 	}
 	
 
-	public void setContent(List content) {
+	public void setContent(Collection content) {
 		this.content = content;
 		setComplexResult();
 	}

Modified: branches/JCA/console/src/main/java/org/teiid/rhq/plugin/util/DeploymentUtils.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/plugin/util/DeploymentUtils.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/plugin/util/DeploymentUtils.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -76,7 +76,7 @@
         DeploymentStatus distributeStatus;
         Exception distributeFailure = null;
         try {
-            progress = deploymentManager.distribute(archiveFileName, contentURL, false);
+            progress = deploymentManager.distribute(archiveFileName, contentURL, true);
             distributeStatus = run(progress);
             if (distributeStatus.isFailed()) {
                 distributeFailure = (distributeStatus.getFailure() != null) ? distributeStatus.getFailure() :

Modified: branches/JCA/console/src/main/java/org/teiid/rhq/plugin/util/PluginConstants.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/plugin/util/PluginConstants.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/plugin/util/PluginConstants.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -57,8 +57,9 @@
 	 */
 	public interface ComponentType {
 		
-		public interface Runtime {
+		public interface Platform {
 
+			public final static String NAME = "Platform"; //$NON-NLS-1$
 			public final static String TYPE = "ConnectionFactory"; //$NON-NLS-1$
 			public final static String SUBTYPE = "NoTx"; //$NON-NLS-1$
 			public final static String TEIID_RUNTIME_ENGINE = "teiid/runtime-engine"; //$NON-NLS-1$
@@ -68,9 +69,13 @@
 
 			public static interface Operations {
 
-				public final static String BOUNCE_SYSTEM = "bounceSystem"; //$NON-NLS-1$					
+				public final static String GET_QUERIES = "listQueries"; //$NON-NLS-1$					
 				public final static String GET_LONGRUNNINGQUERIES = "listLongRunningQueries"; //$NON-NLS-1$
-
+				public final static String KILL_REQUEST = "killRequest"; //$NON-NLS-1$
+				public final static String GET_PROPERTIES = "getProperties"; //$NON-NLS-1$
+				public final static String GET_REQUESTS = "getRequests"; //$NON-NLS-1$
+				public final static String GET_SESSIONS = "getActiveSessions"; //$NON-NLS-1$
+				
 			}
 
 			public static interface Metrics {
@@ -154,10 +159,6 @@
 
 	}
 
-	public interface Security {
-
-	}
-
 	/**
 	 * Use these metric names when calling getValues() on the connection
 	 * interface.
@@ -178,9 +179,10 @@
 	public static interface Operation {
 		public final static String KILL_REQUEST = "killRequest"; //$NON-NLS-1$
 		public final static String GET_VDBS = "listVDBs"; //$NON-NLS-1$
-
 		public final static String GET_PROPERTIES = "getProperties"; //$NON-NLS-1$
-
+		public final static String GET_REQUESTS = "getRequests"; //$NON-NLS-1$
+		public final static String GET_SESSIONS = "getActiveSessions"; //$NON-NLS-1$
+		
 		/**
 		 * Use these value names when calling executeOperation() on the
 		 * connection interface. These will correlate with parameters used in

Modified: branches/JCA/console/src/main/java/org/teiid/rhq/plugin/util/ProfileServiceUtil.java
===================================================================
--- branches/JCA/console/src/main/java/org/teiid/rhq/plugin/util/ProfileServiceUtil.java	2010-02-19 20:19:45 UTC (rev 1858)
+++ branches/JCA/console/src/main/java/org/teiid/rhq/plugin/util/ProfileServiceUtil.java	2010-02-19 20:41:28 UTC (rev 1859)
@@ -21,7 +21,10 @@
 public class ProfileServiceUtil {
 
 	protected final Log LOG = LogFactory.getLog(ProfileServiceUtil.class);
+	private static ComponentType DQPTYPE = new ComponentType("teiid", "dqp");
+	private static String DQPNAME = "org.teiid.dqp.internal.process.DQPManagementView";
 
+
 	/**
 	 * Get the passed in {@link ManagedComponent}
 	 * 
@@ -131,5 +134,10 @@
 		File deployDir = warFile.getParentFile();
 		return deployDir;
 	}
+	
+	public static ManagedComponent getDQPManagementView() throws NamingException, Exception {
+		
+		return getManagedComponent(DQPTYPE, DQPNAME);
+	}
 
 }



More information about the teiid-commits mailing list