Author: tejones
Date: 2009-11-20 17:26:31 -0500 (Fri, 20 Nov 2009)
New Revision: 1582
Removed:
trunk/console/src/main/java/org/teiid/rhq/comm/impl/ConnectionImpl.java
trunk/console/src/main/java/org/teiid/rhq/comm/impl/ConnectionUtil.java
trunk/console/src/main/java/org/teiid/rhq/comm/impl/TeiidConnectionFactory.java
Modified:
trunk/console/pom.xml
trunk/console/src/resources/embedded/META-INF/rhq-plugin.xml
trunk/pom.xml
Log:
TEIID-807: Initial check-in of console changes to add to teiid build, and create a plugin
for embedded Jopr.
Modified: trunk/console/pom.xml
===================================================================
--- trunk/console/pom.xml 2009-11-20 20:30:31 UTC (rev 1581)
+++ trunk/console/pom.xml 2009-11-20 22:26:31 UTC (rev 1582)
@@ -1,19 +1,23 @@
<?xml version="1.0"?>
-<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <parent>
- <artifactId>teiid</artifactId>
- <groupId>org.jboss.teiid</groupId>
- <version>6.3.0-SNAPSHOT</version>
- </parent>
+<project
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <parent>
+ <artifactId>teiid</artifactId>
+ <groupId>org.jboss.teiid</groupId>
+ <version>6.3.0-SNAPSHOT</version>
+ </parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.teiid</groupId>
<artifactId>teiid-console</artifactId>
- <name>TEIID Console</name>
- <description>This project is for the RHQ plugin that supports the TEIID Console
</description>
+ <name>Console</name>
+ <description>This project is for the RHQ plugin that supports the
+ TEIID Console </description>
<properties>
- <org.jboss.jopr.as4.version>1.2.0.GA</org.jboss.jopr.as4.version>
+ <!--
+ <org.jboss.jopr.as4.version>1.2.0.GA</org.jboss.jopr.as4.version>
+ -->
<org.jboss.jopr.as5.version>1.2.0.GA</org.jboss.jopr.as5.version>
<org.jboss.jopr.version>1.2.0.GA</org.jboss.jopr.version>
@@ -21,11 +25,14 @@
<apache.ant.version>1.7.0</apache.ant.version>
</properties>
-
+
<build>
<pluginManagement>
<plugins>
- <!-- Fixes how test resources of a project can be used in projects dependent on it
-->
+ <!--
+ Fixes how test resources of a project can be used in projects
+ dependent on it
+ -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
@@ -34,7 +41,7 @@
</plugins>
</pluginManagement>
<plugins>
- <!-- Specify the compiler options and settings -->
+ <!-- Specify the compiler options and settings -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
@@ -55,7 +62,10 @@
</includes>
<excludes>
<exclude>**/Abstract*TestCase.java</exclude>
- <!-- hack to prevent anonymous inner classes in Tests from being run as tests
-->
+ <!--
+ hack to prevent anonymous inner classes in Tests from being run
+ as tests
+ -->
<include>**/Test*$*.java</include>
</excludes>
<systemProperties>
@@ -70,7 +80,7 @@
</systemProperties>
</configuration>
</plugin>
-
+
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-2</version>
@@ -91,74 +101,7 @@
</execution>
</executions>
</plugin>
-
- <!--
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- <version>${apache.ant.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>assemble-artifacts</id>
- <phase>package</phase>
- <configuration>
- <tasks>
- <property name="product.version"
value="${project.version}" />
- <property name="product.name" value="${project.name}"
/>
- <ant antfile="src/assembly/assemble-artifacts.xml" />
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- -->
-
- <!--
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dist-wars</id>
- <phase>process-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <outputDirectory>${basedir}/target/</outputDirectory>
- <artifactItems>
- <artifactItem>
- <groupId>org.jboss.jopr</groupId>
-
<artifactId>jopr-embedded-jbas4</artifactId>
-
<version>${org.jboss.jopr.as4.version}</version>
- <type>war</type>
- <overWrite>true</overWrite>
- </artifactItem>
- <artifactItem>
- <groupId>org.jboss.jopr</groupId>
-
<artifactId>jopr-embedded-jbas5</artifactId>
-
<version>${org.jboss.jopr.as5.version}</version>
- <type>war</type>
- <overWrite>true</overWrite>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- -->
-<!--
-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
@@ -171,64 +114,92 @@
</dependencies>
<executions>
<execution>
- <id>assembly-kit-jboss-as4</id>
+ <id>assemble-artifacts</id>
<phase>package</phase>
<configuration>
<tasks>
- <mkdir dir="target/jboss-as4-war"/>
- <unzip
src="target/jopr-embedded-jbas4-${org.jboss.jopr.as4.version}.war"
dest="target/jboss-as4-war"/>
-
- <mkdir dir="target/plugin-classes"/>
-
-
- <unzip
src="../jbedsp-plugin/target/distribution/jbedsp-plugin-${project.version}-binaries.jar"
dest="target/jboss-as4-war/WEB-INF/lib"/>
-
- <unzip
src="../jbedsp-plugin/target/distribution/jbedsp-embedded-plugin-${project.version}.jar"
dest="target/plugin-classes"/>
- <unzip src="target/${project.name}-${project.version}.jar"
dest="target/plugin-classes"/>
- <jar
destfile="target/jboss-as4-war/plugins/jbedsp-jopr-plugin-${project.version}.jar"
basedir="target/plugin-classes"/>
-
- <zip destfile="target/jopr-teiid-embedded-jbas4.war"
basedir="target/jboss-as4-war" />
-
+ <property name="product.version"
value="${project.version}" />
+ <property name="product.name" value="${project.name}"
/>
+ <ant antfile="src/assembly/assemble-artifacts.xml" />
</tasks>
-
</configuration>
-
<goals>
<goal>run</goal>
- </goals>
+ </goals>
</execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
<execution>
- <id>assembly-kit-jboss-as5</id>
- <phase>package</phase>
+ <id>copy-dist-wars</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
<configuration>
- <tasks>
- <mkdir dir="target/jboss-as5-war"/>
- <unzip
src="target/jopr-embedded-jbas5-${org.jboss.jopr.as5.version}.war"
dest="target/jboss-as5-war"/>
+ <outputDirectory>${basedir}/target/</outputDirectory>
- <mkdir dir="target/plugin-classes"/>
+ <artifactItems>
+ <!--
+ <artifactItem> <groupId>org.jboss.jopr</groupId>
+ <artifactId>jopr-embedded-jbas4</artifactId>
+ <version>${org.jboss.jopr.as4.version}</version>
+ <type>war</type> <overWrite>true</overWrite>
</artifactItem>
+ -->
+ <artifactItem>
+ <groupId>org.jboss.jopr</groupId>
+ <artifactId>jopr-embedded-jbas5</artifactId>
+ <version>${org.jboss.jopr.as5.version}</version>
+ <type>war</type>
+ <overWrite>true</overWrite>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
- <unzip
src="../jbedsp-plugin/target/distribution/jbedsp-plugin-${project.version}-binaries.jar"
dest="target/jboss-as5-war/WEB-INF/lib"/>
- <unzip
src="../jbedsp-plugin/target/distribution/jbedsp-embedded-plugin-${project.version}.jar"
dest="target/plugin-classes"/>
- <unzip src="target/${project.name}-${project.version}.jar"
dest="target/plugin-classes"/>
- <jar
destfile="target/jboss-as5-war/plugins/jbedsp-jopr-plugin-${project.version}.jar"
basedir="target/plugin-classes"/>
-
- <zip destfile="target/jopr-teiid-embedded-jbas5.war"
basedir="target/jboss-as5-war" />
- </tasks>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>${apache.ant.version}</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <!--
+ <execution> <id>assembly-kit-jboss-as4</id>
<phase>package</phase>
+ <configuration> <tasks> <mkdir
dir="target/jboss-as4-war"/> <unzip
+ src="target/jopr-embedded-jbas4-${org.jboss.jopr.as4.version}.war"
+ dest="target/jboss-as4-war"/> <mkdir
dir="target/plugin-classes"/>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
+ <unzip
+ src="../jbedsp-plugin/target/distribution/jbedsp-plugin-${project.version}-binaries.jar"
+ dest="target/jboss-as4-war/WEB-INF/lib"/> <unzip
+ src="../jbedsp-plugin/target/distribution/jbedsp-embedded-plugin-${project.version}.jar"
+ dest="target/plugin-classes"/> <unzip
+ src="target/${project.name}-${project.version}.jar"
+ dest="target/plugin-classes"/> <jar
+ destfile="target/jboss-as4-war/plugins/jbedsp-jopr-plugin-${project.version}.jar"
+ basedir="target/plugin-classes"/> <zip
+ destfile="target/jopr-teiid-embedded-jbas4.war"
+ basedir="target/jboss-as4-war" /> </tasks>
</configuration>
+ <goals> <goal>run</goal> </goals> </execution>
+ -->
+
</executions>
</plugin>
--->
-
-
</plugins>
</build>
@@ -262,6 +233,18 @@
<scope>provided</scope> <!-- provided by the agent/plugin-container
-->
</dependency>
+ <dependency>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-jmx-plugin</artifactId>
+ <version>${org.jboss.jopr.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>mc4j</groupId>
+ <artifactId>org-mc4j-ems</artifactId>
+ <version>1.2.6</version>
+ </dependency>
+
<!--
TODO: This is a fix for the Javac bug requiring annotations to be
available when compiling dependent classes. It is fixed in JDK 6.
@@ -292,56 +275,62 @@
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-client</artifactId>
- </dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-client</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-client</artifactId>
<type>test-jar</type>
</dependency>
-
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-client-jdbc</artifactId>
- </dependency>
+
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-client-jdbc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-client-jdbc</artifactId>
<type>test-jar</type>
</dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-common-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-common-core</artifactId>
- <type>test-jar</type>
- </dependency>
-
<dependency>
- <groupId>org.jboss.jopr</groupId>
- <artifactId>jopr-embedded-jbas4</artifactId>
- <type>war</type>
- <version>${org.jboss.jopr.as4.version}</version>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-common-core</artifactId>
</dependency>
<dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-common-core</artifactId>
+ <type>test-jar</type>
+ </dependency>
+
+ <!--
+ <dependency> <groupId>org.jboss.jopr</groupId>
+ <artifactId>jopr-embedded-jbas4</artifactId> <type>war</type>
+ <version>${org.jboss.jopr.as4.version}</version> </dependency>
+ -->
+ <dependency>
<groupId>org.jboss.jopr</groupId>
<artifactId>jopr-embedded-jbas5</artifactId>
<type>war</type>
<version>${org.jboss.jopr.as5.version}</version>
</dependency>
-
+
<dependency>
+ <groupId>org.jboss.integration</groupId>
+ <artifactId>jboss-profileservice-spi</artifactId>
+ <version>5.1.0.CR2</version>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
</dependency>
+
</dependencies>
-</project>
+</project>
\ No newline at end of file
Deleted: trunk/console/src/main/java/org/teiid/rhq/comm/impl/ConnectionImpl.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/comm/impl/ConnectionImpl.java 2009-11-20
20:30:31 UTC (rev 1581)
+++ trunk/console/src/main/java/org/teiid/rhq/comm/impl/ConnectionImpl.java 2009-11-20
22:26:31 UTC (rev 1582)
@@ -1,1340 +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.lang.reflect.Method;
-import java.net.UnknownHostException;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-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.adminapi.Admin;
-import org.teiid.adminapi.AdminException;
-import org.teiid.adminapi.AdminObject;
-import org.teiid.adminapi.ConnectorBinding;
-import org.teiid.adminapi.Host;
-import org.teiid.adminapi.ProcessObject;
-import org.teiid.adminapi.QueueWorkerPool;
-import org.teiid.adminapi.Request;
-import org.teiid.adminapi.Session;
-import org.teiid.adminapi.SystemObject;
-import org.teiid.rhq.comm.Component;
-import org.teiid.rhq.comm.Connection;
-import org.teiid.rhq.comm.ConnectionConstants;
-import org.teiid.rhq.comm.ConnectionException;
-import org.teiid.rhq.comm.ConnectionPool;
-import org.teiid.rhq.comm.ExecutedResult;
-import org.teiid.rhq.comm.ConnectionConstants.ComponentType;
-import org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime;
-import org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.Queries.Query;
-import org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.System.Metrics;
-import org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.System.Operations;
-import org.teiid.rhq.plugin.HostComponent;
-
-import com.metamatrix.jdbc.MMConnection;
-import com.metamatrix.platform.security.api.MetaMatrixSessionState;
-
-public class ConnectionImpl implements Connection, TeiidConnectionConstants {
-
- // TODO:
- // 1. Change from using LogManager. This writes to the MM Server, the
- // messages should be
- // written to the agent log
- // 2. Need to support connecting via ssl
- // 3. Need to understand the life cycle of a connection
- // a. during discovery
- // b. during monitoring, operations, etc.
- // 4. add post processing for calculated fields in operation results
-
-
- private static final Log log = LogFactory.getLog(ConnectionImpl.class);
-
- public String key = "";
-
- private Properties environmentProps = null;
-
- private Admin adminApi = null;
- private MMConnection mmconn = null;
-
- private ConnectionPool connectionPool = null;
-
- // set when an exception is thrown by the admin api
- // and indicates when close is called, to tell the pool
- // to remove the connection;
- private boolean invalidConnection = false;
-
- protected ConnectionImpl (final String key,
- final Properties envProps,
- final ConnectionPool pool,
- final MMConnection connection) throws SQLException {
- this.connectionPool = pool;
- this.mmconn = connection;
- this.adminApi = this.mmconn.getAdminAPI();
- this.key = key;
- this.environmentProps = envProps;
-
- }
-
- public boolean isValid() {
- return (! this.invalidConnection);
- }
- /**
- * @see org.teiid.rhq.comm.Connection#isAlive()
- */
- public boolean isAlive() {
- try {
- if (adminApi != null) {
- adminApi.getSystem();
- this.invalidConnection=false;
- return true;
- }
- } catch (Throwable e) {
- invalidConnection = true;
- log.error("Error: admin connection for " + key + " is not
alive", e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return false;
- }
-
- /**
- * @see org.teiid.rhq.comm.Connection#close()
- */
- 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$
- }
-
- invalidConnection = true;
-
- }
-
-
- /**
- * Called by the factory to close the source connection
- *
- */
-
- protected void closeSource() {
- try {
- if (mmconn != null) {
- mmconn.close();
- }
- } catch (Exception e) {
- log.error("Error closing the admin connection", e); //$NON-NLS-1$
- } finally {
- adminApi = null;
- mmconn = null;
- connectionPool = null;
- environmentProps.clear();
- environmentProps = null;
- this.invalidConnection = true;
-
- }
- }
-
-// public Properties getEnvironment() throws ConnectionException {
-// Properties systemProperties = new Properties();
-// try {
-// Collection processCollection = ConnectionUtil.getAllProcesses(
-// getConnection(), this.getHost().getIdentifier());
-//
-// Iterator processIter = processCollection.iterator();
-// String portList = null;
-//
-// boolean first = true;
-// while (processIter.hasNext()) {
-// ProcessObject process = (ProcessObject) processIter.next();
-// if (first) {
-// first = false;
-// portList = String.valueOf(process.getPort());
-// } else {
-// portList += PORT_DELIM + process.getPort(); //$NON-NLS-1$
-// }
-//
-// }
-//
-// systemProperties.setProperty(ConnectionConstants.USERNAME,
-// environmentProps.getProperty(ConnectionConstants.USERNAME));
-// systemProperties.setProperty(ConnectionConstants.PASSWORD,
-// environmentProps.getProperty(ConnectionConstants.PASSWORD));
-// systemProperties.setProperty(ConnectionConstants.PORTS, portList);
-// environmentProps = (Properties) systemProperties.clone();
-//
-// return systemProperties;
-// } catch (AdminException ae) {
-// invalidConnection = true;
-// throw new ConnectionException(ae.getMessage());
-// } finally {
-// this.resetConnection();
-// }
-// }
-
- public Collection<Component> discoverComponents(String componentType,
- String identifier) throws ConnectionException {
- if (componentType
- .equals(Runtime.Connector.TYPE)) {
- return getConnectors(identifier);
-
-// } else if (componentType
-// .equals(Runtime.Service.TYPE)) {
-// return getServices(identifier);
-
- } else if (componentType
- .equals(Runtime.Process.TYPE)) {
- return getVMs(identifier);
-
- } else if (componentType
- .equals(Runtime.Host.TYPE)) {
- return getAllHosts();
-
-// } else if (componentType
-// .equals(ComponentType.Resource.Service.TYPE)) {
-// return getServicesForConfig(identifier);
-//
-// } else if (componentType
-// .equals(ComponentType.Resource.Connector.TYPE)) {
-// return getConnectorsForConfig(identifier);
-
- }
-// else if (componentType
-// .equals(ComponentType.Runtime.Session.TYPE)) {
-// return getConnectorsForConfig(identifier);
-//
-// }
- return Collections.EMPTY_LIST;
- }
-
-
-
- public void executeOperation(ExecutedResult operationResult,
- final Map valueMap) throws ConnectionException {
-
- if (operationResult.getComponentType().equals(Runtime.Connector.TYPE)) {
- executeConnectorOperation(operationResult,
operationResult.getOperationName(), valueMap);
- } else if
(operationResult.getComponentType().equals(ConnectionConstants.ComponentType.Runtime.System.TYPE))
{
- executeSystemOperation(operationResult, operationResult.getOperationName(),
valueMap);
- } else if (operationResult.getComponentType().equals( Runtime.Process.TYPE)) {
- executeProcessOperation(operationResult, operationResult.getOperationName(),
valueMap);
- } else if
(operationResult.getComponentType().equals(org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.Host.TYPE))
{
- executeHostOperation(operationResult, operationResult.getOperationName(),
valueMap);
- } else if
(operationResult.getComponentType().equals(org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.Session.TYPE))
{
- executeSessionOperation(operationResult, operationResult.getOperationName(),
valueMap);
- } else if
(operationResult.getComponentType().equals(org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.Queries.TYPE))
{
- executeQueriesOperation(operationResult, operationResult.getOperationName(),
valueMap);
- }
- }
-
-
-
- private void executeSystemOperation(ExecutedResult operationResult, final String
operationName, final Map valueMap)
- throws ConnectionException {
- Object resultObject = new Object();
-
- if (operationName.equals(Operations.BOUNCE_SYSTEM)) {
- Boolean waitUntilFinished =
(Boolean)valueMap.get(ConnectionConstants.ComponentType.Operation.Value.WAIT_UNTIL_FINISHED);
- bounceSystem(waitUntilFinished);
- }else if (operationName.equals(Operations.GET_LONGRUNNINGQUERIES)) {
- Boolean includeSourceQueries =
(Boolean)valueMap.get(ConnectionConstants.ComponentType.Operation.Value.INCLUDE_SOURCE_QUERIES);
- Integer longRunningValue =
(Integer)valueMap.get(ConnectionConstants.ComponentType.Operation.Value.LONG_RUNNING_QUERY_LIMIT);
- List fieldNameList = operationResult.getFieldNameList();
- resultObject = getLongRunningQueries(includeSourceQueries, longRunningValue,
fieldNameList);
- operationResult.setContent((List)resultObject);
- }else if (operationName.equals(ComponentType.Operation.KILL_REQUEST)) {
- String requestID =
(String)valueMap.get(ConnectionConstants.ComponentType.Operation.Value.REQUEST_ID);
- cancelRequest(requestID);
- }else if (operationName.equals(ComponentType.Operation.GET_VDBS)) {
- List fieldNameList = operationResult.getFieldNameList();
- resultObject = getVDBs(fieldNameList);
- operationResult.setContent((List)resultObject);
- }else if (operationName.equals(ComponentType.Operation.GET_PROPERTIES)) {
- String identifier = (String)valueMap.get(ConnectionConstants.IDENTIFIER);
- Properties props =
getProperties(ConnectionConstants.ComponentType.Runtime.System.TYPE, identifier);
- resultObject = createReportResultList(props);
- operationResult.setContent((List)resultObject);
- }
-
- }
-
- private void executeProcessOperation(ExecutedResult operationResult, final String
operationName, final Map valueMap)
- throws ConnectionException {
- Object resultObject = new Object();
-
- if (operationName.equals(ComponentType.Operation.GET_PROPERTIES)) {
- String identifier = (String)valueMap.get(ConnectionConstants.IDENTIFIER);
- Properties props = getProperties(Runtime.Process.TYPE, identifier);
- resultObject = createReportResultList(props);
- operationResult.setContent((List)resultObject);
- }
- }
-
- private void executeHostOperation(ExecutedResult operationResult, final String
operationName, final Map valueMap)
- throws ConnectionException {
- Object resultObject = new Object();
-
- if
(operationName.equals(org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.Host.Operations.GET_HOSTS))
{
- String identifier = (String)valueMap.get(ConnectionConstants.IDENTIFIER);
- Properties props =
getProperties(org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.Host.TYPE,
identifier);
- resultObject = createReportResultList(props);
- operationResult.setContent((List)resultObject);
- }
- }
-
- private void executeConnectorOperation(ExecutedResult operationResult, final String
operationName, final Map valueMap)
- throws ConnectionException {
- Object resultObject = new Object();
- String identifier = (String)valueMap.get(ConnectionConstants.IDENTIFIER);
-
- if (operationName.equals(Runtime.Connector.Operations.RESTART_CONNECTOR)) {
- startConnector(identifier);
- }else if (operationName.equals(Runtime.Connector.Operations.STOP_CONNECTOR)) {
- Boolean stopNow =
(Boolean)valueMap.get(ConnectionConstants.ComponentType.Operation.Value.STOP_NOW);
- stopConnector(identifier, stopNow);
- }else if (operationName.equals(ComponentType.Operation.GET_PROPERTIES)) {
- Properties props = getProperties(Runtime.Connector.TYPE, identifier);
- resultObject = createReportResultList(props);
- operationResult.setContent((List)resultObject);
- }
- }
-
- private void executeSessionOperation(ExecutedResult operationResult, final String
operationName, final Map valueMap)
- throws ConnectionException {
- if
(operationName.equals(org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.Session.Query.GET_SESSIONS))
{
- Object resultObject = new Object();
-
- List fieldNameList = operationResult.getFieldNameList();
- resultObject = getSessions(false, fieldNameList);
- operationResult.setContent((List)resultObject);
- }
-
-
- }
-
- private void executeQueriesOperation(ExecutedResult operationResult, final String
operationName, final Map valueMap)
- throws ConnectionException {
-
- if (operationName.equals(Query.GET_QUERIES)) {
- Object resultObject = new Object();
-
- // Boolean includeSourceQueries =
(Boolean)valueMap.get(ConnectionConstants.ComponentType.Operation.Value.INCLUDE_SOURCE_QUERIES);
- List fieldNameList = operationResult.getFieldNameList();
- resultObject = getRequests(false, fieldNameList);
- operationResult.setContent((List)resultObject);
- }
- }
-
-
- public Object getMetric(String componentType, String identifier, String metric, Map
valueMap)
- throws ConnectionException {
- Object resultObject = new Object();
-
- if (componentType.equals(ComponentType.Runtime.System.TYPE)){
- resultObject = getSystemMetric(componentType, metric, valueMap);
- }else if (componentType.equals(Runtime.Process.TYPE)){
- resultObject = getProcessMetric(componentType, identifier, metric,
valueMap);
- }
-
-
- return resultObject;
- }
-
- private Object getSystemMetric(String componentType, String metric,
- Map valueMap) throws ConnectionException {
-
- Object resultObject = new Object();
-
- if (metric.equals(Metrics.QUERY_COUNT)) {
- resultObject = new Double(getQueryCount().doubleValue());
- } else {
- if (metric.equals(Metrics.SESSION_COUNT)) {
- resultObject = new Double(getSessionCount().doubleValue());
- } else {
- if (metric.equals(Metrics.LONG_RUNNING_QUERIES)) {
- Integer longRunningQueryLimit =
(Integer)valueMap.get(ConnectionConstants.ComponentType.Operation.Value.LONG_RUNNING_QUERY_LIMIT);
- Collection<Request> longRunningQueries =
getLongRunningQueries(false, longRunningQueryLimit, null);
- resultObject = new Double(longRunningQueries.size());
- }
- }
- }
-
- return resultObject;
- }
-
-
- private Object getProcessMetric(String componentType, String identifier, String
metric,
- Map valueMap) throws ConnectionException {
-
- Object resultObject = new Object();
-
- if (metric.equals(ComponentType.Metric.HIGH_WATER_MARK)) {
- resultObject = new Double(getHighWatermark(identifier));
- }
-
- return resultObject;
- }
-
- public Boolean isAvailable(String componentType, String identifier)
- throws ConnectionException {
-
- try {
-
- Admin conn = this.getConnection();
- if (componentType
- .equalsIgnoreCase(Runtime.Connector.TYPE)) {
- ConnectorBinding cb = ConnectionUtil.getConnector(conn, identifier);
- if (cb.getState() == ConnectorBinding.STATE_OPEN) {
- return true;
- }
-// } else if (componentType
-// .equalsIgnoreCase(Runtime.Service.TYPE)) {
-// Service svc = ConnectionUtil.getService(conn, identifier);
-// if (svc.getState() == Service.STATE_OPEN) {
-// return true;
-// }
-
- } else if (componentType
- .equalsIgnoreCase(Runtime.Process.TYPE)) {
- ProcessObject vm = ConnectionUtil.getProcess(conn, identifier);
- if (vm.isRunning()) {
- return true;
- }
- } else if (componentType
- .equalsIgnoreCase(Runtime.Host.TYPE)) {
- Host host=ConnectionUtil.getHost(identifier, conn);
- if (host.isRunning()) {
- return true;
- }
- } else if (componentType
- .equalsIgnoreCase(Runtime.System.TYPE)) {
- if (conn.getSystem() != null) {
- return true;
- }
- }
- } catch (AdminException ae) {
- invalidConnection = true;
-
- log.error(ae.getMessage());
- }
-
-
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
com.metamatrix.admin.api.rhq.connection.Connection#getProperty(java.lang.String,
- * java.lang.String)
- */
- public String getProperty(final String identifier, final String property)
- throws ConnectionException {
-
- String propertyValue = null;
-
-
-// if (identifier.equals(ConnectionConstants.SYSTEM_NAME_IDENTIFIER)) {
-// Resource mmResource = (Resource) getResource(identifier,
-// getConnection());
-// propertyValue = mmResource.getPropertyValue(property);
-// }
-
- return propertyValue;
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.metamatrix.admin.api.rhq.connection.Connection#getInstallationDirectory()
- */
- public String getKey() {
- return key;
- }
-
- /**
- * @see org.teiid.rhq.comm.Connection#getHost()
- */
- public Component getHost(String identifier) throws ConnectionException {
-
- try {
-
- return mapHost( ConnectionUtil.getHost(identifier, getConnection()) );
- } catch (AdminException e) {
- invalidConnection = true;
- throw new ConnectionException(e.getMessage());
- }
-
- }
-
- public Collection getAllHosts() throws ConnectionException {
- Collection<Component> hostObjs = null;
-// try {
-// Collection<Host> hosts = getConnection().getHosts("*");
-// hostObjs = new ArrayList(hosts.size());
-//
-// for (Iterator<Host>it=hosts.iterator(); it.hasNext();) {
-// Host h = it.next();
-//
-// ComponentImpl chost = mapHost(h);
-//
-// hostObjs.add(chost);
-// }
-// } catch (AdminException e) {
-// invalidConnection = true;
-// throw new ConnectionException(e.getMessage());
-// }
-
- return hostObjs;
- }
-
- private ComponentImpl mapHost(Host h) throws ConnectionException {
- ComponentImpl chost = createComponent(h);
-
- chost.addProperty(HostComponent.INSTALL_DIR, h.getPropertyValue(Host.HOST_DIRECTORY));
- return chost;
-
- }
-
-
- /**
- * @see org.teiid.rhq.comm.Connection#getHost()
- */
-// public Collection<Component> getServices(String vmIdentifier) throws
ConnectionException {
-//
-// try {
-//
-// Collection<Service> servicesCollection =
getConnection().getServices(vmIdentifier +"|*");
-//
-// Iterator<Service> iterSvc = servicesCollection.iterator();
-//
-// Collection<Component> svccomponents = new
ArrayList<Component>(servicesCollection.size());
-// while (iterSvc.hasNext()) {
-// Service svc = iterSvc.next();
-//
-// Component comp = mapService(svc);
-//
-// svccomponents.add(comp);
-// }
-// return svccomponents;
-//
-// } catch (AdminException e) {
-// invalidConnection = true;
-// throw new ConnectionException(e.getMessage());
-// }
-//
-// }
-//
-
-// public Collection<Component> getServicesForConfig(String identifier)
-// throws ConnectionException {
-// try {
-//
-// Collection<Service> servicesCollection =
getConnection().getServicesToConfigure(identifier);
-//
-// Iterator<Service> iterSvc = servicesCollection.iterator();
-//
-// Collection<Component> svccomponents = new
ArrayList<Component>(servicesCollection.size());
-// while (iterSvc.hasNext()) {
-// Service svc = iterSvc.next();
-//
-// Component comp = mapService(svc);
-//
-// svccomponents.add(comp);
-// }
-// return svccomponents;
-//
-// } catch (AdminException e) {
-// invalidConnection = true;
-// throw new ConnectionException(e.getMessage());
-// }
-//
-// }
-
- public Collection<Component> getVMs(String hostIdentifier) throws
ConnectionException {
-
- try {
-
- Collection processes = getConnection().getProcesses(hostIdentifier +
"|*");
-
- Iterator<ProcessObject> iterVMs = processes.iterator();
- log.info("Processing processes..."); //$NON-NLS-1$
-
- Collection vmcomponents = new ArrayList(processes.size());
- while (iterVMs.hasNext()) {
- // ProcessObject processObject = iterHostProcesses.next();
- ProcessObject vm = iterVMs.next();
-
- Component comp = mapProcess(vm);
-
- vmcomponents.add(comp);
- }
-
- return vmcomponents;
- } catch (AdminException ae) {
- invalidConnection = true;
- throw new ConnectionException(ae.getMessage());
-
- }
- }
-
- private Component mapProcess(ProcessObject vm) throws ConnectionException {
- if (vm == null) return null;
-
- ComponentImpl comp = createComponent(vm);
- comp.setPort(vm.getPropertyValue(ProcessObject.SERVER_PORT));
-
- return comp;
-
- }
-
- /**
- * @see com.metamatrix.rhq.comm.Connection#getVMs()
- */
-// public Collection<Component> getVMs() throws ConnectionException {
-//
-// return getVMs(this.getHost().getIdentifier());
-//
-// }
-
- /**
- * Returns a collection of all VDBs in the system.
- * @param fieldNameList - operaration result fields if required. May be null.
- *
- * @return Collection
- */
- public Collection getVDBs(List fieldNameList)
- throws ConnectionException {
-
- Collection vdbCollection = Collections.EMPTY_LIST;
-
- try {
-
- vdbCollection = getConnection().getVDBs("*");
- } catch (AdminException ae) {
- invalidConnection = true;
- throw new ConnectionException(ae.getMessage());
-
- }
-
- if (fieldNameList != null) {
- Collection reportResultCollection = createReportResultList(
- fieldNameList, vdbCollection.iterator());
- return reportResultCollection;
- } else {
- return vdbCollection;
- }
- }
-
-
-
-// public Collection<Component> getConnectorsForConfig(String identifier)
-// throws ConnectionException {
-//
-// Collection<Component> connectors = Collections.EMPTY_LIST;
-//
-// try {
-// Collection connectorsCollection =
getConnection().getConnectorBindingsToConfigure(identifier);
-//
-// Iterator<ConnectorBinding> iterConnectors = connectorsCollection.iterator();
-// log.info("Getting connector bindings for configuration...");//$NON-NLS-1$
-//
-// while (iterConnectors.hasNext()) {
-// // ProcessObject processObject = iterHostProcesses.next();
-// ConnectorBinding connectorBinding = iterConnectors.next();
-//
-// log.debug("Found connector binding " +
connectorBinding.getName());//$NON-NLS-1$
-//
-// Component comp = mapConnector(connectorBinding);
-//
-// connectors.add(comp);
-// }
-// return connectors;
-// } catch (AdminException e) {
-// invalidConnection = true;
-// throw new ConnectionException(e.getMessage());
-// }
-//
-// }
-
- public Collection<Component> getConnectors(String vmIdentifier) throws
ConnectionException {
-
- Collection<Component> connectors = Collections.EMPTY_LIST;
- try {
-
- Collection mmConnectors = getConnection().getConnectorBindings(vmIdentifier
+"|*");
-
- connectors = new ArrayList(mmConnectors != null ? mmConnectors
- .size() : 0);
-
- Iterator<ConnectorBinding> iterConnectors = mmConnectors.iterator();
- log.info("Processing connector bindings...");//$NON-NLS-1$
-
- while (iterConnectors.hasNext()) {
- // ProcessObject processObject = iterHostProcesses.next();
- ConnectorBinding connectorBinding = iterConnectors.next();
-
- log
- .info("Found connector binding " +
connectorBinding.getName());//$NON-NLS-1$
-
- Component comp = mapConnector(connectorBinding);
-
- connectors.add(comp);
- }
- } catch (AdminException ae) {
- invalidConnection = true;
- throw new ConnectionException(ae.getMessage());
- }
- return connectors;
- }
-
- private Component getConnector(String connectorIdentifier) throws ConnectionException {
-
-
- try {
- ConnectorBinding connectorBinding = ConnectionUtil.getConnector(getConnection(),
connectorIdentifier);
- return mapConnector(connectorBinding);
-
- } catch (AdminException ae) {
- invalidConnection = true;
- throw new ConnectionException(ae.getMessage());
- }
- }
-
-// private Component getService(String svcIdentifier) throws ConnectionException {
-//
-//
-// try {
-// Service svc = ConnectionUtil.getService(getConnection(), svcIdentifier);
-// return mapService(svc);
-//
-// } catch (AdminException ae) {
-// invalidConnection = true;
-// throw new ConnectionException(ae.getMessage());
-// }
-//}
-
- private Component mapConnector(ConnectorBinding connectorBinding) throws
ConnectionException {
- ComponentImpl comp = createComponent(connectorBinding);
-
- comp.setDescription(connectorBinding.getDescription());
-
- return comp;
-
- }
-
-// private Component mapService(Service service) throws ConnectionException {
-// ComponentImpl comp = createComponent(service);
-//
-// comp.setDescription(service.getDescription());
-//
-// return comp;
-//
-// }
-
- private Component mapSession(Session session) throws ConnectionException {
- ComponentImpl comp = null;
-
- try {
- Class clzz = Class.forName(ComponentImpl.class.getName(), true,
this.connectionPool.getClassLoader());
- comp = (ComponentImpl) clzz.newInstance();
-
- comp.setIdentifier(session.getIdentifier());
- comp.setName(session.getSessionID());
- comp.setSystemKey(getKey());
- comp.setVersion("1.0"); //$NON-NLS-1$
-
- comp.setProperties(session.getProperties());
-
-
- } catch (ClassNotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- throw new ConnectionException(e.getMessage());
- } catch (InstantiationException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- throw new ConnectionException(e.getMessage());
- } catch (IllegalAccessException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- throw new ConnectionException(e.getMessage());
- }
- return comp;
-
-
- }
-
- // *******************
- // Support Methods
- // *******************
-
- public Boolean isSystemAvailable() throws ConnectionException {
-
- return this.isAlive();
-
- }
-
- private String getSystemName(final Admin adminApi) throws ConnectionException {
- return "NoSystemName";
-// Resource mmJGroups = (Resource) getResource("JGroups", adminApi);
//$NON-NLS-1$
-// return mmJGroups.getPropertyValue(SYSTEM_NAME_PROPERTY);
- }
-
-
- /**
- * @throws Exception
- */
- // static
-// private Integer getQueuedThreadCount(Admin adminApi) throws Exception {
-//
-// ProcessObject process = ConnectionUtil.getProcess(getConnection(),
processIdentifier);
-//
-// return process.getQueueWorkerPool().getQueued();
-//
-// }
-
- /**
- * @throws Exception
- */
- private void startConnector(final String connectorBindingIdentifier) throws
ConnectionException {
- try {
- (getConnection())
- .startConnectorBinding(connectorBindingIdentifier);
- } catch (AdminException ae) {
- invalidConnection = true;
- throw new ConnectionException(ae.getMessage());
-
- }
- }
-
- /**
- * @throws Exception
- */
- private void bounceSystem(final boolean waitUntilFinished) throws ConnectionException
{
- try {
- getConnection().restart();
- } catch (AdminException err) {
- throw new ConnectionException(err.getMessage());
- }
- }
-
- /**
- * @throws Exception
- */
- private void stopConnector(String connectorBindingIdentifier, boolean hardStop)
- throws ConnectionException {
- try {
- getConnection().stopConnectorBinding(
- connectorBindingIdentifier, hardStop);
- } catch (AdminException ae) {
- invalidConnection = true;
- throw new ConnectionException(ae.getMessage());
-
- }
- }
-
- /**
- * @throws Exception
- */
- private static boolean isReachable(final String host, int port)
- throws UnknownHostException {
- return NetUtils.getInstance().isPortAvailable(host, port);
- }
-
- /**
- * @throws Exception
- */
- // static
-// private Integer getThreadPoolThreadCount(final Admin adminApi)
-// throws ConnectionException {
-// Integer threadCount = new Integer(0);
-//
-// ProcessObject process = ConnectionUtil.getProcess(getConnection(),
processIdentifier);
-//
-// QueueWorkerPool pool = null;
-// pool = process.getQueueWorkerPool();
-// threadCount = pool.getThreads();
-// return threadCount;
-// }
-
- private Integer getQueryCount() throws ConnectionException {
-
- Integer count = new Integer(0);
-
- Collection<Request> requestsCollection = null;
- requestsCollection = getRequests(false, null);
-
- if (requestsCollection != null && !requestsCollection.isEmpty()) {
- count = requestsCollection.size();
- }
-
- return count;
- }
-
- protected Collection<Request> getRequests(boolean includeSourceQueries, List
fieldNameList) throws ConnectionException {
-
- Collection<Request> requestsCollection = null;;
-
- try {
- Admin conn = getConnection();
- requestsCollection = conn.getRequests(WILDCARD);
- if (includeSourceQueries){
- Collection<Request> sourceRequestsCollection = Collections.EMPTY_LIST;
- sourceRequestsCollection = conn.getSourceRequests(WILDCARD);
- requestsCollection.addAll(sourceRequestsCollection);
- }
- } catch (AdminException ae) {
- invalidConnection = true;
- throw new ConnectionException(ae.getMessage());
-
- } catch (Exception e) {
- final String msg = "Exception getting the AdminApi in getRequests: ";
//$NON-NLS-1$
- log.error(msg, e);
- throw new ConnectionException(msg);
- }
-
- if (fieldNameList!=null){
- Collection reportResultCollection = createReportResultList(fieldNameList,
requestsCollection.iterator());
- return reportResultCollection;
- }else{
- return requestsCollection;
- }
-
- }
-
- protected void cancelRequest(String requestID) throws ConnectionException {
-
- try {
- getConnection().cancelRequest(requestID);
- } catch (AdminException ae) {
- invalidConnection = true;
- throw new ConnectionException(ae.getMessage());
-
- } catch (Exception e) {
- final String msg = "Exception getting the AdminApi in getRequests: ";
//$NON-NLS-1$
- log.error(msg, e);
- throw new ConnectionException(msg);
- }
-
- }
-
-// public Collection<Request> postProcessing(String operationName, Collection
reportResultCollection) throws ConnectionException {
-//
-// if (operationName.equals(ConnectionConstants.ComponentType.Operation.GET_QUERIES)){
-// Iterator resultIter = reportResultCollection.iterator();
-// while (resultIter.hasNext()){
-// Map row = (Map)resultIter.next();
-// String createDateString = row.get("Createdate");
-// Date createDate = new Date(createDateString);
-//
-// Date current = new Date(System.nanoTime());
-// GregorianCalendar cal = new GregorianCalendar();
-// cal.add()
-// Date elapsedTime = Calendar.getInstance().add( createDate)
-// }
-// String createDateString = reportResultList.
-// }
-// return reportResultList;
-// }
-
- protected Collection<Request> getLongRunningQueries(boolean includeSourceQueries,
int longRunningValue, List fieldNameList) throws ConnectionException {
-
- Collection<Request> requestsCollection = null;
-
- double longRunningQueryTimeDouble = new Double(longRunningValue);
-
- try {
- requestsCollection = getRequests(includeSourceQueries, null);
- } catch (Exception e) {
- final String msg = "AdminException getting the AdminApi in getLongRunningQueries:
"; //$NON-NLS-1$
- log.error(msg, e);
- throw new ConnectionException(msg);
- }
-
- Iterator<Request> requestsIter = requestsCollection.iterator();
- while (requestsIter.hasNext()) {
- Request request = requestsIter.next();
- Date startTime = request.getProcessingDate();
- // Get msec from each, and subtract.
- long runningTime = Calendar.getInstance().getTimeInMillis() - startTime.getTime();
-
- if (runningTime < longRunningQueryTimeDouble) {
- requestsIter.remove();
- }
- }
-
- if (fieldNameList!=null){
- Collection reportResultCollection = createReportResultList(fieldNameList,
requestsCollection.iterator());
- return reportResultCollection;
- }else{
- return requestsCollection;
- }
- }
-
- private Integer getSessionCount() throws ConnectionException {
-
- Collection<Session> activeSessionsCollection = Collections.EMPTY_LIST;
- try {
- activeSessionsCollection = getActiveSessions();
- } catch (AdminException ae) {
- invalidConnection = true;
- throw new ConnectionException(ae.getMessage());
-
- } catch (Exception e) {
- final String msg = "AdminException getting the AdminApi in getSessionCount:
"; //$NON-NLS-1$
- log.error(msg, e);
- throw new ConnectionException(e.getMessage());
- }
-
- return activeSessionsCollection.size();
- }
-
- private Collection<Session> getActiveSessions(String identifier) throws
AdminException {
- Collection allSessionsCollection = getConnection().getSessions(identifier);
- Collection activeSessionsCollection = new ArrayList();
-
- Iterator<Session> allSessionsIter = allSessionsCollection
- .iterator();
- while (allSessionsIter.hasNext()) {
- Session session = allSessionsIter.next();
- if (session.getState() == MetaMatrixSessionState.ACTIVE) {
- activeSessionsCollection.add(session);
- }
- }
-
- return activeSessionsCollection;
- }
-
- private Collection<Session> getActiveSessions() throws AdminException {
- Collection allSessionsCollection = getConnection().getSessions(WILDCARD);
- Collection activeSessionsCollection = new ArrayList();
-
- Iterator<Session> allSessionsIter = allSessionsCollection
- .iterator();
- while (allSessionsIter.hasNext()) {
- Session session = allSessionsIter.next();
- if (session.getState() == MetaMatrixSessionState.ACTIVE) {
- activeSessionsCollection.add(session);
- }
- }
-
- return activeSessionsCollection;
- }
-
- public Collection getSessions(boolean activeOnly, List fieldNameList) throws
ConnectionException {
-
- Collection sessionsCollection = Collections.EMPTY_LIST;
- try {
- if (activeOnly){
- sessionsCollection = getActiveSessions();
- }else{
- sessionsCollection = getConnection().getSessions(WILDCARD);
- }
- } catch (AdminException ae) {
- invalidConnection = true;
- throw new ConnectionException(ae.getMessage());
-
- } catch (Exception e) {
- final String msg = "AdminException getting the AdminApi in getSessions: ";
//$NON-NLS-1$
- log.error(msg, e);
- throw new ConnectionException(e.getMessage());
- }
-
- if (sessionsCollection != null && sessionsCollection.size() > 0) {
- Iterator sessionsIter = sessionsCollection.iterator();
-
- return createReportResultList(fieldNameList, sessionsIter);
- }
-
- return Collections.EMPTY_LIST;
- }
-
- private Collection createReportResultList(Properties props) {
- Collection reportResultList = new ArrayList();
-
- //Create list from properties and sort
- Enumeration<Object> keys = props.keys();
- List<String> elementList = new ArrayList();
- while (keys.hasMoreElements()) {
- elementList.add((String) keys.nextElement());
- }
-
- Collections.sort(elementList);
-
- Iterator propsKeySetIter = elementList.iterator();
-
- while (propsKeySetIter.hasNext()) {
- Map reportValueMap = new HashMap();
- String name = (String)propsKeySetIter.next();
- Object value = props.get(name);
- reportValueMap.put(ConnectionConstants.ComponentType.Operation.Value.NAME, name);
- reportValueMap.put(ConnectionConstants.ComponentType.Operation.Value.VALUE, value);
- reportResultList.add(reportValueMap);
- }
- return reportResultList;
- }
-
- private Collection createReportResultList(List fieldNameList, Iterator sessionsIter) {
- Collection reportResultList = new ArrayList();
-
- while (sessionsIter.hasNext()) {
- Object object = sessionsIter.next();
-
- Class cls = null;
- try {
- cls = object.getClass();
- Iterator methodIter = fieldNameList.iterator();
- Map reportValueMap = new HashMap();
- while (methodIter.hasNext()) {
- String fieldName = (String) methodIter.next();
- String methodName = fieldName;
- Method meth = cls.getMethod(methodName, (Class[]) null);
- Object retObj = meth.invoke(object, (Object[]) null);
- reportValueMap.put(fieldName, retObj);
- }
- reportResultList.add(reportValueMap);
- } catch (Throwable e) {
- System.err.println(e);
- }
- }
- return reportResultList;
- }
-
- private Integer getHighWatermark(String processIdentifier) throws ConnectionException {
-
- try {
-
- ProcessObject process = ConnectionUtil.getProcess(getConnection(),
processIdentifier);
- QueueWorkerPool pool = null;
- pool = process.getQueueWorkerPool();
- return pool.getTotalHighwaterMark();
-
- } catch (AdminException e) {
- // TODO Auto-generated catch block
- throw new ConnectionException(e.getMessage());
-
- }
-
- }
-
- /**
- * @param resourcePrefix
- * @return
- */
-// private Object getResource(final String resourceIdentifier,
-// final Admin adminApi) throws ConnectionException {
-//
-// Object resource = null;
-// try {
-//
-// Collection<Object> resourceCollection = getConnection()adminApi
-// .getResources(resourceIdentifier);
-// // Collection<Object> processCollection = ((ServerMonitoringAdmin)
-// // adminApi)
-// // .getProcesses(AdminObject.WILDCARD);
-// Iterator<Object> resourceIter = resourceCollection.iterator();
-//
-// while (resourceIter.hasNext()) {
-// resource = resourceIter.next();
-// }
-// } catch (AdminException ae) {
-// invalidConnection = true;
-// throw new ConnectionException(ae.getMessage());
-//
-//
-// } catch (Exception e) {
-// final String msg = "LogonException getting the AdminApi in getResource: ";
//$NON-NLS-1$
-// log.error(msg, e);
-// }
-//
-// return resource;
-// }
-
-
- /**
- * @param resourcePrefix
- * @return
- */
- private Component getProcess(final String processIdentifier) throws ConnectionException
{
-
- ProcessObject process = null;
- try {
-
- process = ConnectionUtil.getProcess(getConnection(), processIdentifier);
-
- return mapProcess(process);
-
- } catch (Exception e) {
- final String msg = "AdminException in getProcess: "; //$NON-NLS-1$
- log.error(msg, e);
- throw new ConnectionException(e.getMessage());
- }
-
- }
-
- /**
- * Return the properties for component of a specified resource type
- * @param resourceType
- * @param identifier
- * @return
- * @throws ConnectionException
- * @since 5.5.3
- */
-
- public Properties getProperties(String resourceType, String identifier)
- throws ConnectionException {
- String className = null;
- Component ao = null;
- if
(resourceType.equalsIgnoreCase(org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.Host.TYPE)
) {
- className = Host.class.getName();
- ao = this.getHost(identifier);
-
- } else if
(resourceType.equalsIgnoreCase(ConnectionConstants.ComponentType.Runtime.System.TYPE) ) {
- className = SystemObject.class.getName();
-
-
- } else if (resourceType.equalsIgnoreCase(Runtime.Process.TYPE) ) {
- className = ProcessObject.class.getName();
-
- ao = this.getProcess(identifier);
-
- } else if (resourceType.equalsIgnoreCase(Runtime.Connector.TYPE) ) {
- className = ConnectorBinding.class.getName();
-
- ao = this.getConnector(identifier);
-// } else if (resourceType.equalsIgnoreCase(Runtime.Service.TYPE) ) {
-// className = Service.class.getName();
-//
-// ao = this.getService(identifier);
- }
-
- if (ao == null) {
- throw new ConnectionException("Unable to get properties for invalid
resource " + identifier + " of resource type " + resourceType);
//$NON-NLS-1$
- }
-
- Properties props = null;
- try {
- Map defaults = ConnectionUtil.getPropertiesDefinitions(getConnection(),
resourceType, className, identifier);
-
- props = new Properties();
- props.putAll(defaults);
-
- // overlay the defined properties for the component object over the defaults
- props.putAll(ao.getProperties());
- } catch (AdminException ae) {
- invalidConnection = true;
- throw new ConnectionException(ae.getMessage());
-
- }
-
- return props;
-
- }
- /*
-
- /**
- * Returns the system name for the current connection
- *
- * @param componentName
- * @param operationName
- * @param parameters
- * @return systemName
- */
-// private String getProperty() throws Exception {
-//
-// String systemName = "NoSystemName";
-
-
-// Resource mmJGroups = (Resource) getResource("JGroups",
getConnection()); //$NON-NLS-1$
-// systemName = mmJGroups.getPropertyValue("metamatrix.cluster.name");
//$NON-NLS-1$
-//
-// return systemName;
-//
-// }
-
- private Admin getConnection() {
- return adminApi;
-
-
- }
-
- private ComponentImpl createComponent(AdminObject object) throws ConnectionException
{
- if (object != null) {
- return createComponent(object.getIdentifier(), object.getName(),
object.getProperties());
- }
- return createComponent("NOTSET", "NAMENOTSET", null);
-
-
-
- }
-
-
- private ComponentImpl createComponent(String identifier, String name, Properties
props) throws ConnectionException {
-
- ComponentImpl comp = null;
- try {
- Class clzz = Class.forName(ComponentImpl.class.getName(), true,
this.connectionPool.getClassLoader());
- comp = (ComponentImpl) clzz.newInstance();
-
- comp.setIdentifier(identifier);
- comp.setName(name);
- comp.setSystemKey(getKey());
- comp.setVersion("1.0"); //$NON-NLS-1$
-
- if (props != null) {
- comp.setProperties(props);
- }
-
-
- } catch (ClassNotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- throw new ConnectionException(e.getMessage());
- } catch (InstantiationException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- throw new ConnectionException(e.getMessage());
- } catch (IllegalAccessException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- throw new ConnectionException(e.getMessage());
- }
- return comp;
-
- }
-
-
-}
Deleted: trunk/console/src/main/java/org/teiid/rhq/comm/impl/ConnectionUtil.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/comm/impl/ConnectionUtil.java 2009-11-20
20:30:31 UTC (rev 1581)
+++ trunk/console/src/main/java/org/teiid/rhq/comm/impl/ConnectionUtil.java 2009-11-20
22:26:31 UTC (rev 1582)
@@ -1,341 +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.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.StringTokenizer;
-
-import org.teiid.adminapi.Admin;
-import org.teiid.adminapi.AdminException;
-import org.teiid.adminapi.ConnectorBinding;
-import org.teiid.adminapi.Host;
-import org.teiid.adminapi.ProcessObject;
-import org.teiid.adminapi.PropertyDefinition;
-import org.teiid.adminapi.Service;
-import org.teiid.rhq.comm.ConnectionException;
-import org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.Process;
-
-
-/**
- * @since 4.3
- */
-public class ConnectionUtil implements TeiidConnectionConstants {
-
- private static Map<String, Map<String, Object>> defCache = new
HashMap<String, Map<String, Object>>();
-
- /**
- * Call to find a host. The hostName passed in can be any of the
- * the following:
- * <li>The fully qualified host name</li>
- * <li>The short name of the fully qualified host name</li>
- * <li>The IP address of box</li>
- * <li>The bind address defined in the host properties</li>
- * <li>The general reference of localhost</li>
- *
- * The order of resolution will be as follows:
- * 1. Try to match the IPAddress resolved host names to what is configured.
- * <li>hostName matches to configured host name</li>
- * <li>resolve hostName to an InetAddress and use its' full host name to
match configured host(s)</li>
- * <li>resolve hostName to an InetAddress and use its' short host name to
match configured host(s)</li>
- * <li>In cases where the <code>hostName</code> represents the
short name and will not resolve to a longer name,
- * convert the <code>Host</code> full name to the short name to try
to match.</li>
- * <li>match hostname to the physical address for a configurated
host</li>
- * <li>match hostname to the bindaddress for a configurated host</li>
- * 2. Reverse the match, try matching what's configurated to host name passed
- * <li>try using the short name of configured host to match</li>
- * <li>try using the physical address of the configurated host
match</li>
- * <li>try using the bind address of the configured host to match</li>
- *
- * NOTE: This logic is duplicated from the CurrentConfiguration.findHost(). That
method could not
- * be used due to the different <code>Host</code> object types that are
used.
- *
- * @param hostName
- * @return Host
- * @throws Exception
- * @since 5.5
- */
-// public static Host findHost(String hostName, ServerAdmin adminapi) throws
AdminException {
-//
-// Host h = null;
-//
-// try {
-// // first try to match the name pas host by what was passed before
-// // substituting something else
-// h = getHost(hostName, adminapi);
-// if (h != null) {
-// return h;
-// }
-//
-// h = getHost(InetAddress.getLocalHost().getHostName(), adminapi);
-// if (h != null) {
-// return h;
-// }
-//
-//
-// // the hostName could be an IP address that we'll use to try to
-// // resolve back to the actuall host name
-// InetAddress inetAddress = InetAddress.getByName(hostName);
-//
-// // try using the fully qualified host name
-//
-// h = getHost(inetAddress.getCanonicalHostName(), adminapi);
-// if (h != null) {
-// return h;
-// }
-//
-// h = getHost(inetAddress.getHostName(), adminapi);
-// if (h != null) {
-// return h;
-// }
-//
-// // try the address
-// h = getHost(inetAddress.getHostAddress(), adminapi);
-//
-// if (h != null) {
-// return h;
-// }
-// } catch (AdminException ae) {
-// throw ae;
-// } catch (Exception e) {
-// // do nothing
-// }
-//
-//
-//
-// // 2nd try to match
-// try {
-// Collection hosts = getAllHosts(adminapi);
-// // if the host name passed in is the short name,
-// // then try to match to the Host short name
-//
-// Iterator hi = hosts.iterator();
-//
-// while (hi.hasNext()) {
-//
-// String hostAddress = h.getPropertyValue(Host.HOST_PHYSICAL_ADDRESS);
-//
-// if (hostAddress != null &&
hostAddress.equalsIgnoreCase(hostName)) {
-// return h;
-// }
-// String hostBindAddress = h.getPropertyValue(Host.HOST_BIND_ADDRESS);
-//
-// if (hostBindAddress.equalsIgnoreCase(hostName)) {
-// return h;
-// }
-//
-//
-// }
-//
-// } catch (AdminException ae) {
-// throw ae;
-// } catch (Exception e) {
-// // do nothing
-// }
-//
-//
-// return null;
-//
-// }
-
- /**
- * Called to return only 1 host
- * @param hostName
- * @param adminapi
- * @return
- * @throws AdminException
- * @since 4.3
- */
- public static Host getHost(String hostIdentifier, Admin adminapi) throws
AdminException {
- // Configuring and monitoring will no longer be done thru a single connection.
- // each host will be managed seperately
-
-
-// Collection hosts = adminapi.getHosts(hostIdentifier);
-//
-// if (hosts != null && hosts.size() == 1) {
-// // return the unique host by the hostName
-// return (Host) hosts.iterator().next();
-// }
- // return null if no hosts were found or
- // multiple hosts were found by that name.
- return null;
- }
-
- /**
- * Called to return all the currently defined hosts
- * @param adminapi
- * @return
- * @throws AdminException
- * @since 4.3
- */
-// public static Collection getAllHosts(Admin adminapi) throws AdminException {
-//
-// return adminapi.getHosts("*"); //$NON-NLS-1$
-// }
-
-
- /**
- * @param adminApi is the connection to the MM Server
- * @return Collection of MMProcesses
- */
-// public static Collection getAllProcesses(final Admin adminApi, String identifier)
throws AdminException {
-//
-// Collection processCollection = Collections.EMPTY_LIST;
-//
-// processCollection = adminApi.getProcesses(identifier + "|*");
//$NON-NLS-1$
-//
-// return processCollection;
-// }
-
- public static ProcessObject getProcess(final Admin adminApi, String
processIdentifier) throws AdminException {
-
- Collection processCollection = adminApi.getProcesses(processIdentifier);
-
- if (processCollection != null && processCollection.size() == 1) {
- // return the unique connector binding
- return (ProcessObject) processCollection.iterator().next();
- }
-
- return null;
- }
-
- /**
- * @param adminApi is the connection to the MM Server
- * @return Collection of MMProcesses
- */
-// public static Collection getAllConnectors(final Admin adminApi, String
vmIdentifier) throws AdminException {
-//
-// Collection connectorCollection = Collections.EMPTY_LIST;
-//
-// connectorCollection = adminApi.getConnectorBindings(vmIdentifier
+"|*");
-//
-//
-// return connectorCollection;
-// }
-
- public static ConnectorBinding getConnector(final Admin adminApi, String
cbIdentifier) throws AdminException {
-
- Collection connectorCollection = adminApi.getConnectorBindings(cbIdentifier);
-
- if (connectorCollection != null && connectorCollection.size() == 1) {
- // return the unique connector binding
- return (ConnectorBinding) connectorCollection.iterator().next();
- }
-
- return null;
- }
-
- public static Service getService(final Admin adminApi, String svcIdentifier) throws
AdminException {
-
-// Collection svcCollection = adminApi.getServices(svcIdentifier);
-//
-// if (svcCollection != null && svcCollection.size() == 1) {
-// // return the unique connector binding
-// return (Service) svcCollection.iterator().next();
-// }
-
- return null;
- }
-
-
- /**
- * @param adminApi is the connection to the MM Server
- *
- * @return Collection of VDBs
- */
-// public static Collection getAllVDBs(final Admin adminApi) throws AdminException {
-//
-// Collection connectorCollection = Collections.EMPTY_LIST;
-//
-// connectorCollection = adminApi.getVDBs("*"); //$NON-NLS-1$
-//
-// return connectorCollection;
-// }
-
- /*
- * Return the tokens in a string in a list. This is particularly
- * helpful if the tokens need to be processed in reverse order. In that case,
- * a list iterator can be acquired from the list for reverse order traversal.
- *
- * @param str String to be tokenized
- * @param delimiter Characters which are delimit tokens
- * @return List of string tokens contained in the tokenized string
- */
- public static List getTokens(String str, String delimiter) {
- ArrayList l = new ArrayList();
- StringTokenizer tokens = new StringTokenizer(str, delimiter);
- while(tokens.hasMoreTokens()) {
- l.add(tokens.nextToken());
- }
- return l;
- }
-
-
- public static synchronized Map getPropertiesDefinitions(final Admin adminApi, String
resourceType, String className, String identifier) throws AdminException,
ConnectionException {
- Properties result = new Properties();
-
- boolean cache = false;
- if (
resourceType.equalsIgnoreCase(org.teiid.rhq.comm.ConnectionConstants.ComponentType.Runtime.Host.TYPE)
||
- resourceType.equalsIgnoreCase(Process.TYPE) ) {
- cache = true;
-
- if (defCache.containsKey(className)) {
- return defCache.get(className);
- }
- }
-
-
- Collection pdefs = adminApi.getPropertyDefinitions(identifier, className);
-
- Map<String, Object> defMap = new HashMap<String, Object>();
-
- for (Iterator it=pdefs.iterator(); it.hasNext();) {
- PropertyDefinition pdef = (PropertyDefinition)it.next();
- Object value = pdef.getValue() != null ? pdef.getValue() :
pdef.getDefaultValue();
- defMap.put(pdef.getName(), (value != null ? value : ""));
//$NON-NLS-1$
-
- }
-
- if (cache) {
- defCache.put(className, defMap);
- }
-
-
- return defMap;
- }
-
- static class InvalidAdminException extends Throwable {
-
- public InvalidAdminException(String msg) {
- super(msg);
- }
-
- }
-
-
-}
Deleted: trunk/console/src/main/java/org/teiid/rhq/comm/impl/TeiidConnectionFactory.java
===================================================================
---
trunk/console/src/main/java/org/teiid/rhq/comm/impl/TeiidConnectionFactory.java 2009-11-20
20:30:31 UTC (rev 1581)
+++
trunk/console/src/main/java/org/teiid/rhq/comm/impl/TeiidConnectionFactory.java 2009-11-20
22:26:31 UTC (rev 1582)
@@ -1,248 +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;
-
-/*
- * The connection factory implementation is located here so that a new version
- * of MetaMatrix that has different connection requirements can be dealt
- * with on a per MM Version.
- */
-
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-import java.util.StringTokenizer;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.teiid.adminapi.Admin;
-import org.teiid.jdbc.TeiidDriver;
-import org.teiid.rhq.comm.Connection;
-import org.teiid.rhq.comm.ConnectionConstants;
-import org.teiid.rhq.comm.ConnectionException;
-import org.teiid.rhq.comm.ConnectionFactory;
-import org.teiid.rhq.comm.ConnectionPool;
-
-import com.metamatrix.common.comm.platform.client.ServerAdminFactory;
-import com.metamatrix.common.jdbc.JDBCUtil;
-import com.metamatrix.jdbc.MMConnection;
-
-
-
-public class TeiidConnectionFactory implements
- ConnectionFactory {
- private static final Log LOG = LogFactory.getLog(TeiidConnectionFactory.class);
-
- private Properties connEnv;
- private ConnectionPool pool;
- private String username = null;
- private String password = null;
- private String url = null;
-
- public TeiidConnectionFactory() {
-
- }
-
- public String getURL() {
- return url;
- }
-
- public Connection createConnection() throws ConnectionException {
-
- Thread currentThread = Thread.currentThread();
- ClassLoader threadContextLoader = currentThread.getContextClassLoader();
- try {
- currentThread.setContextClassLoader(pool.getClassLoader());
-
- MMConnection mmconn = getConnection();
-
- if (mmconn != null) {
- ConnectionImpl conn = new ConnectionImpl(url, connEnv, pool, mmconn);
- if (conn.isAlive()) {
- return conn;
- }
-
- conn.closeSource();
- }
-
- return new InvalidConnectionImpl(url, connEnv, pool);
- } catch (SQLException e) {
- // TODO Auto-generated catch block
- throw new ConnectionException(e);
- } finally {
- currentThread.setContextClassLoader(threadContextLoader);
- }
-
-
- }
-
-
- public void initialize( final Properties env, final ConnectionPool connectionPool)
throws ConnectionException {
- this.connEnv = (Properties) env.clone();
- this.pool = connectionPool;
-
-
- if (pool == null || connEnv == null || connEnv.isEmpty()) {
- throw new ConnectionException("ConnectionFactory has not been
initialized properly"); //$NON-NLS-1$
- }
-
-
- url = connEnv.getProperty(ConnectionConstants.URL);
- username = connEnv
- .getProperty(ConnectionConstants.USERNAME);
- password = connEnv
- .getProperty(ConnectionConstants.PASSWORD);
-
-
- if (url == null ) {
- throw new ConnectionException("URL is not set"); //$NON-NLS-1$
-
- }
- if (username == null ) {
- throw new ConnectionException("USERNAME is not set");
//$NON-NLS-1$
-
- }
- if (password == null ) {
- throw new ConnectionException("PASSWORD is not set");
//$NON-NLS-1$
-
- }
- }
-
-
- /**
- * @see
org.teiid.rhq.comm.ConnectionFactory#closeConnection(org.teiid.rhq.comm.Connection)
- */
- public void closeConnection(Connection connection) {
- if (connection instanceof ConnectionImpl) {
- ConnectionImpl conn = (ConnectionImpl) connection;
- conn.closeSource();
- } else {
-
- connection.close();
- }
- }
-
- private MMConnection getConnection() {
- MMConnection conn = null;
- Throwable firstexception = null;
-
- try {
- Properties props = new Properties();
- props.setProperty(JDBCUtil.DATABASE, url);
- props.setProperty(JDBCUtil.DRIVER, TeiidDriver.class.getName());
- props.setProperty(JDBCUtil.USERNAME, username);
- props.setProperty(JDBCUtil.PASSWORD, password);
-
- conn = (MMConnection) JDBCUtil.createJDBCConnection(props);
-
-
- return conn;
- } catch (Throwable ce) {
- if (firstexception == null) {
- firstexception = ce;
- }
- }
-
- if (firstexception != null) {
- firstexception.printStackTrace();
- LOG.error("Unable to connect to JBEDSP System: " +
firstexception.getMessage()); //$NON-NLS-1$
- }
-
- return null;
- }
-
- /**
- * @param userName
- * @param password
- * @param servers
- * @return Admin
- * @throws Exception,
- * AdminException
- * @since 5.5.3
- */
-// private Admin getAdminAPI(String pusername, String ppassword, String purl)
-// throws Exception {
-//
-// String servers = null;
-//
-// com.metamatrix.common.comm.platform.client.ServerAdminFactory factory = null;
-//
-// Admin serverAdmin = null;
-//
-// try {
-// factory = ServerAdminFactory.getInstance();
-//
-// serverAdmin = factory.createAdmin(pusername, ppassword.toCharArray(),
-// purl, "RHQ"); //$NON-NLS-1$
-//
-// } catch (Throwable ae) {
-// if (ae instanceof MetaMatrixRuntimeException) {
-// Throwable child = ((MetaMatrixRuntimeException) ae).getChild();
-// if (child.getMessage().indexOf("Read timed out") > 0)
{ //$NON-NLS-1$
-// try {
-//
-//
System.setProperty("com.metamatrix.ssl.trustStore", key +
"/client/metamatrix.truststore"); //$NON-NLS-1$ //$NON-NLS-2$
-// servers = MMConnectionConstants.SSL_PROTOCOL +
iNetAddress.getHostName() + ":" + pport; //$NON-NLS-1$
-// serverAdmin = factory.createAdmin(pusername,
ppassword.toCharArray(),
-// servers,
"RHQ");//$NON-NLS-1$
-// } catch (Exception ae2) {
-// throw ae;
-// }
-// } else {
-// throw ae;
-// }
-// } else {
-// throw new Exception(ae.getMessage());
-// }
-
-// }
-// LOG.info("Connected to JBEDSP Server using " + servers);
//$NON-NLS-1$
-//
-// this.url = purl;
-//
-// return serverAdmin;
-// }
-
-
-
- /*
- * Return the tokens in a string in a list. This is particularly
- * helpful if the tokens need to be processed in reverse order. In that case,
- * a list iterator can be acquired from the list for reverse order traversal.
- *
- * @param str String to be tokenized
- * @param delimiter Characters which are delimit tokens
- * @return List of string tokens contained in the tokenized string
- */
- private static List getTokens(String str, String delimiter) {
- ArrayList l = new ArrayList();
- StringTokenizer tokens = new StringTokenizer(str, delimiter);
- while(tokens.hasMoreTokens()) {
- l.add(tokens.nextToken());
- }
- return l;
- }
-
-
-
-}
Modified: trunk/console/src/resources/embedded/META-INF/rhq-plugin.xml
===================================================================
--- trunk/console/src/resources/embedded/META-INF/rhq-plugin.xml 2009-11-20 20:30:31 UTC
(rev 1581)
+++ trunk/console/src/resources/embedded/META-INF/rhq-plugin.xml 2009-11-20 22:26:31 UTC
(rev 1582)
@@ -22,614 +22,17 @@
* 02110-1301 USA.
*/-->
-<plugin name="TeiidPlugin" displayName="Teiid Plugin"
- package="org.teiid.rhq.plugin" version="2.0.0"
- description="Supports management and monitoring of JBoss Teiid"
+<plugin name="TeiidPlugin" displayName="Teiid Plugin"
package="org.teiid.rhq.plugin"
+ version="2.0.0" description="Supports management and monitoring of JBoss
Teiid"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:xmlns:rhq-plugin"
xmlns:c="urn:xmlns:rhq-configuration">
- <server name="Teiid Data Services"
- discovery="PlatformDiscoveryComponent"
- class="PlatformComponent"
- description="JBoss Teiid DataServices"
- supportsManualAdd="true"
- singleton="true">
+ <depends plugin="JMX" useClasses="true"/>
- <subcategories>
- <subcategory name="Runtime"/>
- <subcategory name="Resources"/>
- </subcategories>
+ <server name="Teiid Data Services" description="Teiid
Datasources" class="PlatformComponent"
+ discovery="PlatformDiscoveryComponent"
createDeletePolicy="both">
+ </server>
- <resource-configuration>
- <c:group name="connection" displayName="Connection
Info">
- <c:description>Connection</c:description>
- <c:simple-property name="url" displayName="Teiid
URL"
- description="The URL with which to connect to the Teiid
Data Service instance (e.g. mm://localhost:31000)."
- default="mm://localhost:31000"/>
- <c:simple-property name="username" required="true"
description="The name of the administrative principal (i.e. user) to
authenticate."/>
- <c:simple-property name="password" type="password"
required="true"
- description="The credentials (i.e. password) that should
be used to authenticate the administrative principal."/>
- </c:group>
- </resource-configuration>
-
-
- <server name="Sessions"
- subCategory="Runtime"
- discovery="NodeDiscoveryComponent"
- description="Active / Inactive sessions connected to the Teidd Server"
- class="SessionComponent"
- singleton="true">
-
-<!--
- group name = operation name or query name
-
- simple-property name = the method name on the object to get the value
--->
- <resource-configuration>
- <c:group name="getSessions" displayName="Sessions">
-
- <c:list-property name="list"
- displayName="Current Sessions"
- description="Sessions currently connected to
the Teiid"
- required="false">
- <c:map-property name="map">
- <c:simple-property displayName="Session ID"
- name="getSessionID" type="string" readOnly="true"
- description="The id for this session" />
- <c:simple-property displayName="User Name"
- name="getUserName" type="string" readOnly="true"
- description="The username for the user of this session" />
- <c:simple-property
- displayName="Application Name" name="getApplicationName"
- type="string" readOnly="true"
- description="The name of the application this user is accessing Teiid
through" />
- <c:simple-property displayName="VDB Name"
- name="getVDBName" type="string" readOnly="true"
- description="The name of the VDB the user is connected to" />
- <c:simple-property displayName="VDB Version"
- name="getVDBVersion" type="string"
readOnly="true"
- description="The version of the VDB the user is connected to" />
-
- <c:simple-property displayName="State"
- name="getStateAsString" type="string"
readOnly="true"
- description="The current state of this session" />
-
- <c:simple-property displayName="IP Address"
- name="getIPAddress" type="string" readOnly="true"
- description="The IP Address for this user's connection" />
- <c:simple-property displayName="Host Name"
- name="getHostName" type="string" readOnly="true"
- description="The host machine from which this user connected" />
- </c:map-property>
- </c:list-property>
-
- </c:group>
- </resource-configuration>
-
- </server>
-
- <server name="Queries"
- subCategory="Runtime"
- discovery="NodeDiscoveryComponent"
- description="Current queries executing against the Teiid Server"
- class="QueriesComponent"
- singleton="true">
-
-<!--
- group name = operation name or query name
-
- simple-property name = the method name on the object to get the value
--->
- <resource-configuration>
- <c:group name="listQueries" displayName="Executing
Queries">
-
- <c:list-property name="list"
- displayName="Executing Queries"
- description="Current queries executing in the
Teiid system"
- required="false">
- <c:map-property name="map">
- <c:simple-property displayName="User Name"
- name="getUserName" type="string"
- description="The username for the user that submitted this query"
/>
- <c:simple-property displayName="Session ID"
- name="getSessionID" type="string"
- description="The id for the session" />
- <c:simple-property displayName="Request ID"
- name="getRequestID" type="string"
- description="The id for the request" />
- <c:simple-property displayName="Start Time"
- name="getCreated" type="string"
- description="The time this query has been running" />
- <c:simple-property displayName="Transaction ID"
- name="getTransactionID" type="string"
- description="The version of the VDB the user is connected to" />
- <c:simple-property displayName="SQL String"
- name="getSqlCommand" type="string"
- description="The SQL string for this query" />
- <c:simple-property
- displayName="Connector Binding Name"
- name="getConnectorBindingName" type="string"
- description="The IP Address for this user's connection" />
- <c:simple-property displayName="Node ID"
- name="getNodeID" type="string"
- description="The node ID of this query" />
- <c:simple-property displayName="Source Request"
- name="isSource" type="string"
- description="If false this is the top level query. If true this a physical
source query." />
- </c:map-property>
- </c:list-property>
-
- </c:group>
- </resource-configuration>
-
- </server>
-
-
-
-
-
- <server name="System"
- subCategory="Runtime"
- discovery="NodeDiscoveryComponent"
- class="SystemComponent"
- description="Operational System"
- supportsManualAdd="true"
- singleton="true">
-
-
- <operation name="bounceSystem"
- displayName="Bounce System"
- description="Stop and restart the system">
- <parameters>
- <c:simple-property name="waitUntilFinished"
- type="boolean" default="false"
- description="If true, this method waits until the operation is finished before
returning. This may take a long time to complete. If false, this method returns
immediately, even though the operation may not be finished." />
- </parameters>
- </operation>
-<!--
- <operation name="listUsers"
- displayName="View current user sessions"
- description="List current user sessions connected to this Teiid System">
- <results>
- <c:list-property name="list">
- <c:map-property name="map">
- <c:simple-property displayName="User Name"
- name="getUserName" type="string"
- description="The username for the user of this session" />
- <c:simple-property
- displayName="Application Name" name="getApplicationName"
- type="string"
- description="The name of the application this user is accessing Teiid
through" />
- <c:simple-property displayName="Session ID"
- name="getSessionID" type="string"
- description="The id for this session" />
- <c:simple-property displayName="VDB Name"
- name="getVDBName" type="string"
- description="The name of the VDB the user is connected to" />
- <c:simple-property displayName="VDB Version"
- name="getVDBVersion" type="string"
- description="The version of the VDB the user is connected to" />
- <c:simple-property displayName="Product Name"
- name="getProductName" type="string"
- description="The product name" />
- <c:simple-property displayName="IP Address"
- name="getIPAddress" type="string"
- description="The IP Address for this user's connection" />
- <c:simple-property displayName="Host Name"
- name="getHostName" type="string"
- description="The host name for this user's connection" />
- <c:simple-property displayName="Last Ping Time"
- name="getLastPingTime" type="string"
- description="The last time this client was ping'd" />
- <c:simple-property displayName="State"
- name="getStateAsString" type="string"
- description="The current state of this session" />
- </c:map-property>
- </c:list-property>
- </results>
- </operation>
--->
-
-<!--
- <operation name="listQueries" displayName="View current
queries"
- description="List current queries executing against the Teiid System">
- <parameters>
- <c:simple-property name="includeSourceQueries"
- type="boolean" default="true"
- description="If true, source queries will be included in the results. If
false, only top-level queries will be included in the results." />
- </parameters>
- <results>
- <c:list-property name="list">
- <c:map-property name="map">
- <c:simple-property displayName="User Name"
- name="getUserName" type="string"
- description="The username for the user that submitted this query" />
- <c:simple-property displayName="Session ID"
- name="getSessionID" type="string"
- description="The id for the session" />
- <c:simple-property displayName="Request ID"
- name="getRequestID" type="string"
- description="The id for the request" />
- <c:simple-property displayName="Start Time"
- name="getCreated" type="string"
- description="The time this query has been running" />
- <c:simple-property displayName="Transaction ID"
- name="getTransactionID" type="string"
- description="The version of the VDB the user is connected to" />
- <c:simple-property displayName="SQL String"
- name="getSqlCommand" type="string"
- description="The SQL string for this query" />
- <c:simple-property
- displayName="Connector Binding Name"
- name="getConnectorBindingName" type="string"
- description="The IP Address for this user's connection" />
- <c:simple-property displayName="Node ID"
- name="getNodeID" type="string"
- description="The node ID of this query" />
- <c:simple-property displayName="Source Request"
- name="isSource" type="string"
- description="If false this is the top level query. If true this a physical
source query." />
- </c:map-property>
- </c:list-property>
- </results>
- </operation>
--->
- <operation name="listLongRunningQueries"
- displayName="View current long running queries"
- description="List current queries executing against the Teiid System that have
surpassed the long running query threshhold">
- <parameters>
- <c:simple-property name="includeSourceQueries"
- type="boolean" default="true"
- description="If true, source queries will be included in the results. If
false, only top-level queries will be included in the results." />
- </parameters>
- <results>
- <c:list-property name="list">
- <c:map-property name="map">
- <c:simple-property displayName="User Name"
- name="getUserName" type="string"
- description="The username for the user that submitted this query" />
- <c:simple-property displayName="Session ID"
- name="getSessionID" type="string"
- description="The name of the resource whose availability is being
reported" />
- <c:simple-property displayName="Request ID"
- name="getRequestID" type="string"
- description="The id for the request" />
- <c:simple-property displayName="Start Time"
- name="getCreated" type="string"
- description="The time this query has been running" />
- <c:simple-property displayName="Transaction ID"
- name="getTransactionID" type="string"
- description="The version of the VDB the user is connected to" />
- <c:simple-property displayName="SQL String"
- name="getSqlCommand" type="string"
- description="The SQL string for this query" />
- <c:simple-property
- displayName="Connector Binding Name"
- name="getConnectorBindingName" type="string"
- description="The IP Address for this user's connection" />
- <c:simple-property displayName="Node ID"
- name="getNodeID" type="string"
- description="The node ID of this query" />
- <c:simple-property displayName="Source Request"
- name="isSource" type="string"
- description="If false this is the top level query. If true this a physical
source query." />
- </c:map-property>
- </c:list-property>
- </results>
- </operation>
-
- <operation name="killRequest" displayName="Terminate query"
- description="Terminate the processing of a query and it's source
queries">
- <parameters>
- <c:simple-property displayName="SessionID|RequestID"
- name="requestID" type="string" required="true"
- description="The IDs of the session|request to terminate (use format =
sessionID|requestID)" />
- </parameters>
- </operation>
-
-
- <metric displayName="Query Count" defaultOn="true"
- displayType="summary" category="throughput"
property="queryCount"
- description="The number of queries for a given point in time" />
-
- <metric displayName="Long Running Queries" defaultOn="true"
- displayType="summary" category="performance"
- property="longRunningQueries"
- description="The number of queries that have been running longer than the limit
set for queries. The default is 60 minutes, but this may be overridden by the
'longRunningQueryTime' system variable." />
-
- <metric displayName="Session Count" defaultOn="true"
- displayType="summary" category="throughput"
property="sessionCount"
- description="The number of user connections for a given point in time"
/>
-
- <resource-configuration>
- <c:group name="general" displayName="General"
hiddenByDefault="false">
- <c:description>Query Configuration</c:description>
- <c:simple-property name="longRunningQueryLimit"
type="integer" activationPolicy="immediate" units="seconds"
default="600" displayName="Long Running Query limit"
description="The value (in seconds) to use to determine if a query is to be
considered 'long running'.">
- <c:constraint>
- <c:integer-constraint minimum="0" maximum="999999"
/>
- </c:constraint>
- </c:simple-property>
- </c:group>
- </resource-configuration>
-
-
- <server name="Host"
- discovery="HostDiscoveryComponent"
- class="HostComponent"
- description="Teiid Host"
- createDeletePolicy="delete-only">
-
- <resource-configuration>
- <c:group name="hostinfo" displayName="Host Info">
- <c:description>Host configuration information</c:description>
-
- <c:simple-property name="metamatrix.installationDir"
readOnly="true" required="false" displayName="Installation
Directory"
- description="The physical location of the Teiid
server installation"/>
- <c:simple-property name="metamatrix.log.dir"
readOnly="true" required="false" displayName="Log Directory"
- description="The physical location of the Host
log files"/>
- <c:simple-property name="metamatrix.data.dir"
readOnly="true" required="false" displayName="Data
Directory"
- description="The physical location of the
internal Teiid dynamic data"/>
- <c:simple-property name="metamatrix.host.dir"
readOnly="true" required="false" displayName="Host
Directory"
- description="The Host directory is where host
specific files are located."/>
- <c:simple-property name="metamatrix.host.bind.address"
readOnly="true" required="false" displayName="Bind Address"
- description="The bind address determines what
interfaces the host machine will be bound to."/>
- <c:simple-property name="metamatrix.host.physical.address"
readOnly="true" required="false" displayName="Physical
Address"
- description="The physical address indicates
what address a client application will use to connect."/>
- </c:group>
- </resource-configuration>
-
-
- <service name="Process"
- discovery="ProcessDiscoveryComponent"
- class="ProcessComponent"
- description="Teiid Process instance"
- createDeletePolicy="both">
-
- <plugin-configuration>
- <c:group name="event" displayName="Process Log
Tracking">
- <c:simple-property name="enabled"
type="boolean" summary="true" default="true"
required="true"
- description="A flag indicating whether of
not this log Event source is currently
- enabled (i.e. whether the associated
log file should be tailed for
- new entries)."/>
- <c:simple-property name="minimumSeverity"
required="true" default="ERROR"
- description="The minimum severity of Events
that should be collected for this
- source. The default is
ERROR.">
- <c:property-options>
- <c:option name="DEBUG"
value="DEBUG"/>
- <c:option name="INFO"
value="INFO"/>
- <c:option name="WARNING"
value="WARNING"/>
- <c:option name="ERROR" value="ERROR"
default="true"/>
- </c:property-options>
- </c:simple-property>
- </c:group>
- </plugin-configuration>
-
- <operation name="restartProcess"
- displayName="Re-start Process"
- description="Start/re-start this process" />
- <operation name="stopProcess"
- displayName="Stop Process"
- description="Stop this process">
- <parameters>
- <c:simple-property name="stopNow" type="boolean"
- default="true"
- description="If true, stop the process forcefully. If false, wait until any
pending work is completed." />
- </parameters>
- </operation>
-
-
- <metric displayName="Query High Water Mark" defaultOn="true"
- displayType="summary" category="utilization"
- property="highWatermark"
- description="High water mark for queries in the Socket Worker Queue" />
-
- <event name="errorLogEntry" description="an entry in a log
file"/>
- <!-- Ted Jones - 06/19/08
- Commenting out current threads metric until
http://jira.jboss.org/jira/browse/JBEDSP-426 is resolved. -->
- <!-- <metric displayName="Current Threads"
- defaultOn="true"
- displayType="summary"
- category="utilization"
- property="threadCount"
- description="The number of active threads in the Socket Worker Queue"/>
-->
-
- <resource-configuration>
- <c:group name="processinfo" displayName="Process
Info">
- <c:description>Process configuration information</c:description>
- <c:simple-property name="vm.enabled"
type="boolean" displayName="Start Enabled Flag"
- description="The enabled flag allows for
disabling the VM from starting without have to remove it from deployment."/>
- <c:simple-property name="vm.socketPort"
type="integer" displayName="Socket Port"
- description="The port number for the process
when socket communications are being used"/>
-
- <c:simple-property name="vm.starter.cmd.java_opts"
displayName="Java Options"
- description="These are the java options passed
in before the main class"/>
- <c:simple-property name="vm.starter.minHeapSize"
displayName="Minimum Heap Size (MB)" required="false"
- description="The bind address, when specified
determines what address the vm will be bound to."/>
- <c:simple-property name="vm.starter.maxHeapSize"
type="integer" displayName="Maximum Heap Size (MB)"
required="false"
- description="The maximum heap size, in
megabytes, to be used for this VM. If no value is provided for this property, the default
property value from the configuration is used; if no value is specified anywhere, no
maximum heap size will be set."/>
- <c:simple-property name="vm.bind.address"
type="string" displayName="VM Bind Address"
required="false"
- description="The bind address, when specified
determines what address the vm will be bound to."/>
- <c:simple-property name="vm.unicast.port"
type="integer" displayName="Cluster Port for Unicast"
- description="The port number for the process
when unicast based clustering is used."/>
- <c:simple-property name="vm.minPort"
type="integer" displayName="Min Port Number"
- description="Min port number"/>
-
- </c:group>
- <c:group name="tuning" displayName="Tuning">
-
- <c:simple-property name="vm.timetolive"
type="integer" displayName="Socket Worker Thread Time-To-Live (ms)"
- description="Time-to-live (in milliseconds) for
threads used to do work on client requests."/>
- <c:simple-property name="vm.maxThreads"
type="integer" displayName="Max Threads" required="false"
- description="Maximum socket listener
threads.">
- <c:defaultValueDescription>If nothing is specified, the default of 64 will
be used.
- </c:defaultValueDescription>
- </c:simple-property>
- <c:simple-property name="vm.inputBufferSize"
type="integer" displayName="Socket Input BufferSize"
- description="The size of socket buffer used
when reading."/>
- <c:simple-property name="vm.forced.shutdown.time"
type="integer" displayName="VM Forced Shutdown Time (secs)"
- description="The the number of seconds the VM
will wait until it will perform a force shutdown."/>
- <c:simple-property name="vm.outputBufferSize"
type="integer" displayName="Socket Output BufferSize"
- description="The size of the socket buffer used
when writing."/>
-
- </c:group>
- </resource-configuration>
-
-
- <service name="Connectors"
- discovery="ConnectorDiscoveryComponent"
- class="ConnectorComponent">
-
- <resource-configuration>
- <c:group name="advanced" displayName="Advanced">
-
- <c:list-property name="config-property"
- displayName="Config Property"
- description="Configuration Properties"
- required="false">
- <c:map-property name="property-values">
- <c:simple-property name="config-property-name"
- displayName="Name"
- description="Name of the
Configuration Property"
- required="true"/>
- <c:simple-property name="config-property-type"
- displayName="Type"
- description="Type of the
Configuration Property"
- required="true"/>
- <c:simple-property
name="config-property-value"
- displayName="Value"
- description="Value of the
Configuration Property"
- required="true"/>
- </c:map-property>
- </c:list-property>
-
- </c:group>
- </resource-configuration>
-
- <operation name="restartConnector"
- displayName="Re-start Connector"
- description="Start/re-start this connector binding" />
- <operation name="stopConnector"
- displayName="Stop Connector"
- description="Stop this connector binding">
- <parameters>
- <c:simple-property name="stopNow" type="boolean"
- default="true"
- description="If true, stop the connector binding forcefully. If false, wait
until any pending work is completed." />
- </parameters>
- </operation>
- </service>
-
- <service name="Services"
- discovery="ServiceDiscoveryComponent"
- class="ServiceComponent">
-
- <resource-configuration>
- <c:group name="advanced" displayName="Advanced">
-
- <c:list-property name="config-property"
- displayName="Config Property"
- description="Configuration Properties"
- required="false">
- <c:map-property name="property-values">
- <c:simple-property name="config-property-name"
- displayName="Name"
- description="Name of the
Configuration Property"
- required="true"/>
- <c:simple-property name="config-property-type"
- displayName="Type"
- description="Type of the
Configuration Property"
- required="true"/>
- <c:simple-property
name="config-property-value"
- displayName="Value"
- description="Value of the
Configuration Property"
- required="true"/>
- </c:map-property>
- </c:list-property>
-
- </c:group>
- </resource-configuration>
-
- <operation name="restart"
- displayName="Re-start Service"
- description="Start/re-start this service" />
- <operation name="stop"
- displayName="Stop Service"
- description="Stop this service">
- <parameters>
- <c:simple-property name="stopNow" type="boolean"
- default="true"
- description="If true, stop the servie forcefully. If false, wait until any
pending work is completed." />
- </parameters>
- </operation>
- </service>
-
- </service> <!-- end of VM -->
-
- </server> <!-- end of Host -->
-
- </server> <!-- end of System -->
-
- <server name="Security"
- discovery="NodeDiscoveryComponent"
- description="Security"
- class="SecurityComponent"
- singleton="true">
-
- <resource-configuration>
- <c:group name="configuration"
displayName="Configuration">
- <c:simple-property name="enabled"
type="boolean" summary="true" default="false"
required="true"
- description="A flag indicating whether or
not security is enabled for this system."/>
- <c:simple-property name="username"
required="false" description="The name of the administrative principal
(i.e. user) to authenticate."/>
- <c:simple-property name="password" type="password"
required="false"
- description="The credentials (i.e. password) that should
be used to authenticate the administrative principal."/>
- </c:group>
- </resource-configuration>
- </server> <!-- End of security -->
-
- </server> <!-- end of Platform -->
-
-
-
-<!--
-
-
- <service name="Connector Types"
- subCategory="Resources"
- discovery="ResourceDiscoveryComponent"
- class="ResourceComponent"
- description="Connector Types"
- createDeletePolicy="both"
- creationDataType="content">
-
- <operation name="getProperties"
- displayName="View properties"
- description="List the properties">
- <results>
- <c:list-property name="list">
- <c:map-property name="map">
- <c:simple-property name="Name" type="string"
- description="The name of this property" />
- <c:simple-property name="Connector Type" type="string"
- description="The type of connector that defines this data source"
/>
- <c:simple-property name="Default" type="string"
- description="The default value when not defined by the user" />
- <c:simple-property name="Masked" type="boolean"
- description="Indicates if the property value requires masking after being
entered. A password would be a good example of a value needing masking." />
- <c:simple-property name="Descritpion" type="string"
- description="The property description" />
- </c:map-property>
- </c:list-property>
- </results>
- </operation>
-
- <content name="file" displayName="CDK File"
category="deployable" isCreationType="true">
- <configuration>
- </configuration>
- </content>
- </service>
--->
-
</plugin>
\ No newline at end of file
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-11-20 20:30:31 UTC (rev 1581)
+++ trunk/pom.xml 2009-11-20 22:26:31 UTC (rev 1582)
@@ -268,6 +268,18 @@
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-console</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-console</artifactId>
+ <type>test-jar</type>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.teiid</groupId>
<artifactId>teiid-client</artifactId>
<version>${project.version}</version>
</dependency>
@@ -447,6 +459,7 @@
<module>client-jdbc</module>
<module>engine</module>
<module>connectors</module>
+ <module>console</module>
<module>metadata</module>
<module>txn-jbossts</module>
<module>connector-sdk</module>