[teiid-commits] teiid SVN: r2016 - in trunk/console/src/main: java/org/teiid/rhq/plugin and 1 other directories.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Thu Apr 1 11:35:55 EDT 2010


Author: tejones
Date: 2010-04-01 11:35:54 -0400 (Thu, 01 Apr 2010)
New Revision: 2016

Modified:
   trunk/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java
   trunk/console/src/main/java/org/teiid/rhq/plugin/Facet.java
   trunk/console/src/main/java/org/teiid/rhq/plugin/PlatformComponent.java
   trunk/console/src/main/java/org/teiid/rhq/plugin/PlatformDiscoveryComponent.java
   trunk/console/src/main/java/org/teiid/rhq/plugin/VDBComponent.java
   trunk/console/src/main/resources/META-INF/rhq-plugin.xml
Log:
Added Runtime Engine properties plus some general housekeeping

Modified: trunk/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java	2010-04-01 02:11:49 UTC (rev 2015)
+++ trunk/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java	2010-04-01 15:35:54 UTC (rev 2016)
@@ -262,7 +262,7 @@
 
 	}
 	
-	public String getVDBStatus(String vdbName, int version) {
+	public static String getVDBStatus(String vdbName, int version) {
 		
 		ManagedComponent mcVdb = null;
 		try {
@@ -271,11 +271,11 @@
 					PluginConstants.ComponentType.VDB.TYPE,
 					PluginConstants.ComponentType.VDB.SUBTYPE), vdbName);
 		} catch (NamingException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
+			final String msg = "NamingException in getVDBStatus(): " + e.getExplanation(); //$NON-NLS-1$
+			LOG.error(msg, e);
 		} catch (Exception e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
+			final String msg = "Exception in getVDBStatus(): " + e.getMessage(); //$NON-NLS-1$
+			LOG.error(msg, e);
 		}
 
 		return ProfileServiceUtil.getSimpleValue(mcVdb,

Modified: trunk/console/src/main/java/org/teiid/rhq/plugin/Facet.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/Facet.java	2010-04-01 02:11:49 UTC (rev 2015)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/Facet.java	2010-04-01 15:35:54 UTC (rev 2016)
@@ -86,17 +86,12 @@
 	 */
 	protected ResourceContext<?> resourceContext;
 
-	private String systemKey;
+	protected String name;
 
-	private String name;
-
 	private String identifier;
 
 	protected String componentType;
 	
-	// may be null when the component is not a host or vm
-	private String port = null;
-
 	protected boolean isAvailable = false;
 
 	private final Log log = LogFactory.getLog(this.getClass());
@@ -147,10 +142,6 @@
 		this.resourceConfiguration = resourceConfiguration;
 	}
 
-	public String getSystemKey() {
-		return systemKey;
-	}
-
 	public String getComponentName() {
 		return name;
 	}
@@ -159,10 +150,6 @@
 		this.name = componentName;
 	}
 
-	public String getPort() {
-		return port;
-	}
-
 	public String getComponentIdentifier() {
 		return identifier;
 	}

Modified: trunk/console/src/main/java/org/teiid/rhq/plugin/PlatformComponent.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/PlatformComponent.java	2010-04-01 02:11:49 UTC (rev 2015)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/PlatformComponent.java	2010-04-01 15:35:54 UTC (rev 2016)
@@ -22,15 +22,15 @@
 package org.teiid.rhq.plugin;
 
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
-import java.util.Properties;
 import java.util.Set;
 
 import javax.naming.NamingException;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.jboss.managed.api.ManagedComponent;
+import org.jboss.managed.api.ManagedProperty;
 import org.jboss.managed.api.RunState;
 import org.rhq.core.domain.configuration.Configuration;
 import org.rhq.core.domain.configuration.PropertySimple;
@@ -99,10 +99,7 @@
 		} else if (name.equals(Platform.Operations.KILL_SESSION)) {
 			valueMap.put(Operation.Value.SESSION_ID, configuration.getSimple(
 					Operation.Value.SESSION_ID).getLongValue());
-		} else if (name.equals(Platform.Operations.GET_PROPERTIES)) {
-			// String key = ConnectionConstants.IDENTIFIER;
-			// valueMap.put(key, getComponentIdentifier());
-		}
+		} 
 
 	}
 
@@ -166,7 +163,7 @@
 			} catch (Exception e) {
 				LOG.error("Failed to obtain measurement [" + name //$NON-NLS-1$
 						+ "]. Cause: " + e); //$NON-NLS-1$
-				// throw(e);
+				throw(e);
 			}
 		}
 
@@ -178,22 +175,5 @@
 		super.stop();
 	}
 
-	@Override
-	public void updateResourceConfiguration(ConfigurationUpdateReport report) {
 
-		Properties props = System.getProperties();
-
-		Iterator<PropertySimple> pluginPropIter = report.getConfiguration()
-				.getSimpleProperties().values().iterator();
-
-		while (pluginPropIter.hasNext()) {
-			PropertySimple pluginProp = pluginPropIter.next();
-			props.put(pluginProp.getName(), pluginProp.getStringValue());
-		}
-
-		// SingletonConnectionManager.getInstance().initialize(props);
-		super.updateResourceConfiguration(report);
-
-	}
-
 }
\ No newline at end of file

Modified: trunk/console/src/main/java/org/teiid/rhq/plugin/PlatformDiscoveryComponent.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/PlatformDiscoveryComponent.java	2010-04-01 02:11:49 UTC (rev 2015)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/PlatformDiscoveryComponent.java	2010-04-01 15:35:54 UTC (rev 2016)
@@ -21,14 +21,33 @@
  */
 package org.teiid.rhq.plugin;
 
+import java.util.ArrayList;
+import java.util.Collection;
 import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
+import javax.naming.NamingException;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.jboss.managed.api.ComponentType;
 import org.jboss.managed.api.ManagedComponent;
+import org.jboss.managed.api.ManagedObject;
+import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.plugins.ManagedComponentImpl;
+import org.jboss.managed.plugins.ManagedObjectImpl;
+import org.jboss.metatype.api.values.CollectionValueSupport;
+import org.jboss.metatype.api.values.EnumValueSupport;
+import org.jboss.metatype.api.values.GenericValueSupport;
+import org.jboss.metatype.api.values.MetaValue;
+import org.jboss.metatype.api.values.SimpleValue;
+import org.jboss.metatype.api.values.SimpleValueSupport;
 import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.Property;
+import org.rhq.core.domain.configuration.PropertyList;
+import org.rhq.core.domain.configuration.PropertyMap;
 import org.rhq.core.domain.configuration.PropertySimple;
 import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
 import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
@@ -40,7 +59,7 @@
 /**
  * This is the parent node for a Teiid system
  */
-public class PlatformDiscoveryComponent implements ResourceDiscoveryComponent {
+public class PlatformDiscoveryComponent implements ResourceDiscoveryComponent  {
 
 	private final Log log = LogFactory.getLog(this.getClass());
 
@@ -58,14 +77,10 @@
 		Set<DiscoveredResourceDetails> discoveredResources = new HashSet<DiscoveredResourceDetails>();
 
 		ManagedComponent mc = ProfileServiceUtil.getManagedComponent(
-				new ComponentType("teiid",
-						"dqp"),
+				new ComponentType("teiid", "dqp"),
 				PluginConstants.ComponentType.Platform.TEIID_RUNTIME_ENGINE);
 
-		Configuration c = new Configuration(); 
-		String managerName = mc.getName();
-
-		c.put(new PropertySimple("objectName", managerName));
+		Configuration c = new Configuration();
 		/**
 		 * 
 		 * A discovered resource must have a unique key, that must stay the same
@@ -73,18 +88,100 @@
 		 */
 		DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
 				discoveryContext.getResourceType(), // ResourceType
-				managerName, // Resource Key
-				PluginConstants.ComponentType.Platform.TEIID_ENGINE_RESOURCE_NAME, // Resource Name
+				mc.getName(), // Resource Key
+				PluginConstants.ComponentType.Platform.TEIID_ENGINE_RESOURCE_NAME, // Resource
+				// Name
 				null, // Version TODO can we get that from discovery ?
 				PluginConstants.ComponentType.Platform.TEIID_ENGINE_RESOURCE_DESCRIPTION, // Description
-				c, // Plugin Config
+				discoveryContext.getDefaultPluginConfiguration(), // Plugin
+				// Config
 				null // Process info from a process scan
 		);
+		
+		Configuration configuration = detail.getPluginConfiguration();
+		
+		getProperties(configuration);
 
 		// Add to return values
 		discoveredResources.add(detail);
-		log.info("Discovered Teiid instance: " + managerName);
+		log.info("Discovered Teiid instance: " + mc.getName());
+		detail.setPluginConfiguration(configuration);
 		return discoveredResources;
 
 	}
+	
+	/**
+	 * @param mc
+	 * @param configuration
+	 * @throws Exception
+	 */
+	private void getProperties(Configuration configuration) {
+	
+		// Get all ManagedComponents of type Teiid and subtype dqp
+		Set<ManagedComponent> mcSet = null;
+		try {
+			mcSet = ProfileServiceUtil
+					.getManagedComponents(new org.jboss.managed.api.ComponentType(
+							PluginConstants.ComponentType.Platform.TEIID_TYPE,
+							PluginConstants.ComponentType.Platform.TEIID_SUB_TYPE));
+		} catch (NamingException e) {
+			log.error("NamingException getting components in PlatformDisocovery: " + e.getMessage());
+		} catch (Exception e) {
+			log.error("Exception getting components in PlatformDisocovery: " + e.getMessage());
+		}
+
+		for (ManagedComponent mc : mcSet) {
+			String componentName = (String) mc.getComponentName();
+			if (componentName
+					.equals("RuntimeEngineDeployer")) {
+				Map<String, ManagedProperty> mcMap = mc.getProperties();
+				PropertyMap teiidPropertyMap = new PropertyMap("teiidProperties");
+				configuration.put(teiidPropertyMap);
+				configuration.put(new PropertySimple(PluginConstants.Operation.Value.LONG_RUNNING_QUERY_LIMIT,600));
+				setProperties(mcMap, teiidPropertyMap);
+			} else if (componentName
+					.equals("BufferService")) {
+				Map<String, ManagedProperty> mcMap = mc.getProperties();
+				PropertyMap bufferServicePropertyMap = new PropertyMap("bufferServiceProperties");
+				configuration.put(bufferServicePropertyMap);
+				setProperties(mcMap, bufferServicePropertyMap);
+			} else if (componentName
+					.equals("SessionService")) {
+				Map<String, ManagedProperty> mcMap = mc.getProperties();
+				PropertyMap sessionServicePropertyMap = new PropertyMap("sessionServiceProperties");
+				configuration.put(sessionServicePropertyMap);
+				setProperties(mcMap, sessionServicePropertyMap);
+			} else if (componentName
+					.equals("AuthorizationService")) {
+				Map<String, ManagedProperty> mcMap = mc.getProperties();
+				PropertyMap authorizationServicePropertyMap = new PropertyMap("authorizationServiceProperties");
+				configuration.put(authorizationServicePropertyMap);
+				setProperties(mcMap, authorizationServicePropertyMap);
+			} else if (componentName
+					.equals("JdbcSocketConfiguration")) {
+				Map<String, ManagedProperty> mcMap = mc.getProperties();
+				PropertyMap socketConfigurationPropertyMap = new PropertyMap("jdbcSocketConfigurationProperties");
+				configuration.put(socketConfigurationPropertyMap);
+				setProperties(mcMap, socketConfigurationPropertyMap);
+			}
+		}
+	}
+
+	/**
+	 * @param mcMap
+	 * @param propertyMap
+	 */
+	private void setProperties(Map<String, ManagedProperty> mcMap,
+			PropertyMap propertyMap) {
+		for (ManagedProperty mProp : mcMap.values()) {
+			try {
+				String value = ProfileServiceUtil.stringValue(mProp.getValue());
+				PropertySimple prop = new PropertySimple(mProp.getName(), value);
+				propertyMap.put(prop);
+			} catch (Exception e) {
+				log.error("Exception setting properties in PlatformDiscovery: " + e.getMessage());
+			}
+		}
+	}
+	
 }
\ No newline at end of file

Modified: trunk/console/src/main/java/org/teiid/rhq/plugin/VDBComponent.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/VDBComponent.java	2010-04-01 02:11:49 UTC (rev 2015)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/VDBComponent.java	2010-04-01 15:35:54 UTC (rev 2016)
@@ -28,13 +28,16 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.measurement.AvailabilityType;
 import org.rhq.core.domain.measurement.MeasurementDataNumeric;
 import org.rhq.core.domain.measurement.MeasurementDataTrait;
 import org.rhq.core.domain.measurement.MeasurementReport;
 import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
 import org.teiid.rhq.admin.DQPManagementView;
 import org.teiid.rhq.comm.ConnectionConstants;
 import org.teiid.rhq.plugin.util.PluginConstants;
+import org.teiid.rhq.plugin.util.ProfileServiceUtil;
 import org.teiid.rhq.plugin.util.PluginConstants.Operation;
 import org.teiid.rhq.plugin.util.PluginConstants.ComponentType.Platform;
 import org.teiid.rhq.plugin.util.PluginConstants.ComponentType.VDB;
@@ -47,6 +50,17 @@
 public class VDBComponent extends Facet {
 	private final Log LOG = LogFactory.getLog(VDBComponent.class);
 
+	
+	
+	/* (non-Javadoc)
+	 * @see org.teiid.rhq.plugin.Facet#start(org.rhq.core.pluginapi.inventory.ResourceContext)
+	 */
+	@Override
+	public void start(ResourceContext context) {
+		this.setComponentName(context.getPluginConfiguration().getSimpleValue("name", null));
+		super.start(context);
+	}
+
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -54,7 +68,7 @@
 	 */
 	@Override
 	public String getComponentName() {
-		return PluginConstants.ComponentType.VDB.NAME;
+		return this.name;
 	}
 	
 	@Override
@@ -79,7 +93,21 @@
 
 	}
 	
+	/* (non-Javadoc)
+	 * @see org.teiid.rhq.plugin.Facet#getAvailability()
+	 */
 	@Override
+	public AvailabilityType getAvailability() {
+		//TODO Remove vdb version after no longer viable in Teiid
+		String status = DQPManagementView.getVDBStatus(this.getComponentName(), 1);
+		if (status.equals("ACTIVE")){
+			return AvailabilityType.UP;
+		}
+		
+		return AvailabilityType.DOWN;		
+	}
+
+	@Override
 	protected void setMetricArguments(String name,
 			Configuration configuration, Map<String, Object> valueMap) {
 		// Parameter logic for VDB Metrics
@@ -148,7 +176,7 @@
 	@Override
 	String getComponentType() {
 		return PluginConstants.ComponentType.VDB.NAME;
-	} 
+	}	
 	
 }
 

Modified: trunk/console/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- trunk/console/src/main/resources/META-INF/rhq-plugin.xml	2010-04-01 02:11:49 UTC (rev 2015)
+++ trunk/console/src/main/resources/META-INF/rhq-plugin.xml	2010-04-01 15:35:54 UTC (rev 2016)
@@ -18,6 +18,231 @@
 		02110-1301 USA. */
 	-->
 
+<!DOCTYPE plugin [
+<!ENTITY datasourceAndConnectionFactoryAdvancedResourceConfigProps '
+    <c:simple-property name="allocation-retry" type="integer" required="false"
+                       defaultValue="0">
+        <c:description>
+            The number of times that allocating a connection should be tried before throwing an exception. The default
+            is 0.
+        </c:description>
+    </c:simple-property>
+
+    <c:simple-property name="allocation-retry-wait-millis" type="long" required="false"  units="milliseconds"
+                       defaultValue="5000">
+        <c:description>
+            The time in milliseconds to wait between retrying to allocate a connection. The default is 5000 (5 seconds).
+        </c:description>
+    </c:simple-property>
+
+    <c:simple-property name="background-validation" type="boolean" required="false" defaultValue="false">
+        <c:description>
+            Specify if connections should be validated on a background thread versus being validated
+            prior to use. Background validation is meant to reduce the overall load on the RDBMS system when validating
+            a connection. The default is No.
+        </c:description>
+    </c:simple-property>
+
+    <c:simple-property name="background-validation-millis" type="long" required="false" units="milliseconds"
+                       defaultValue="0">
+        <c:description>
+            The interval, in milliseconds, at which the ConnectionValidator will run.  Set to 0 to disable background
+            validation. The default is 0.
+        </c:description>
+    </c:simple-property>
+
+    <c:simple-property name="blocking-timeout-millis" displayName="Blocking Timeout in Milliseconds"
+                       units="milliseconds" defaultValue="30000"
+                       type="integer" required="false">
+        <c:description>
+            Indicates the maximum time in milliseconds to block while waiting for a connection before throwing
+            an exception. Note that this blocks only while waiting for a permit for a connection, and will never
+            throw an exception if creating a new connection takes an inordinately long time. The default is 30000
+            (30 seconds).
+        </c:description>
+        <c:constraint>
+            <c:integer-constraint minimum="0"/>
+        </c:constraint>
+    </c:simple-property>
+
+    <c:simple-property name="idle-timeout-minutes" type="integer" activationPolicy="immediate"
+                       displayName="Idle Timeout" units="minutes" required="false" defaultValue="30">
+        <c:description>
+            The maximum time, in minutes, a connection may be idle before being closed. The default is 30.
+        </c:description>
+        <c:constraint>
+            <c:integer-constraint minimum="0"/>
+        </c:constraint>
+    </c:simple-property>
+
+    <c:simple-property name="isSameRM-override-value" type="boolean" required="false">
+        <c:description>
+            If set, unconditionally sets the boolean return value of javax.transaction.xa.XAResource.isSameRM(XAResource).
+        </c:description>
+    </c:simple-property>
+
+    <c:simple-property name="jmx-invoker-name" required="false">
+        <c:description>
+            The ObjectName of the JMX Invoker MBean associated with this datasource.
+        </c:description>
+    </c:simple-property>
+
+    <c:map-property name="metadata" required="false" description="Metadata properties.">
+        <c:simple-property required="false" name="typeMapping">
+            <c:description>
+                The name of the corresponding type-mapping in conf/standardjbosscmp-jdbc.xml.
+            </c:description>
+            <c:property-options>
+                <c:option name="Cloudscape" value="Cloudscape"/>
+                <c:option name="DB2" value="DB2"/>
+                <c:option name="DB2/400" value="DB2/400"/>
+                <c:option name="Derby" value="Derby"/>
+                <c:option name="Firebird" value="Firebird"/>
+                <c:option name="FirstSQL/J" value="FirstSQL/J"/>
+                <c:option name="Hypersonic SQL" value="Hypersonic SQL"/>
+                <c:option name="InformixDB" value="InformixDB"/>
+                <c:option name="Ingres" value="Ingres"/>
+                <c:option name="InterBase" value="InterBase"/>
+                <c:option name="MaxDB" value="MaxDB"/>
+                <c:option name="McKoi" value="McKoi"/>
+                <c:option name="Mimer SQL" value="Mimer SQL"/>
+                <c:option name="MS SQLSERVER" value="MS SQLSERVER"/>
+                <c:option name="MS SQLSERVER2000" value="MS SQLSERVER2000"/>
+                <c:option name="Oracle7" value="Oracle7"/>
+                <c:option name="Oracle8" value="Oracle8"/>
+                <c:option name="Oracle9i" value="Oracle9i"/>
+                <c:option name="PointBase" value="PointBase"/>
+                <c:option name="PostgreSQL" value="PostgreSQL"/>
+                <c:option name="PostgreSQL 7.2" value="PostgreSQL 7.2"/>
+                <c:option name="PostgreSQL 8.0" value="PostgreSQL 8.0"/>
+                <c:option name="SapDB" value="SapDB"/>
+                <c:option name="SOLID" value="SOLID"/>
+                <c:option name="Sybase" value="Sybase"/>
+            </c:property-options>
+        </c:simple-property>
+    </c:map-property>
+
+    <c:simple-property name="no-tx-separate-pools" type="boolean"
+                       displayName="No Tx Separate Pools" required="false">
+        <c:description>Whether or not to use separate pools. The default is Yes.</c:description>
+        <c:property-options>
+            <c:option name="True" value="true"/>
+            <c:option name="False" value="false"/>
+        </c:property-options>
+    </c:simple-property>
+
+    <c:simple-property name="prefill" type="boolean" required="false">
+        <c:description>
+            Whether to attempt to prefill the connection pool to the minimum number of connections. NOTE: Only
+            supporting pools (OnePool) support this feature. A warning can be found in the logs if the pool does not
+            support this. The default is No.
+        </c:description>
+    </c:simple-property>
+
+    <c:map-property name="security-domain" displayName="Security Settings" required="false">
+        <c:description>
+            Security settings for connections in the pool.
+        </c:description>
+
+        <c:simple-property name="securityDeploymentType" type="string"
+                           required="false" defaultValue="NONE">
+            <c:description>
+                Indicates whether Subject (from security domain), application-supplied parameters
+                (such as from getConnection(user, pw)), both Subject and app-supplied parameters,
+                or neither Subject nor app-supplied parameters are used to distinguish connections
+                in the pool. The default is "NONE".
+            </c:description>
+            <c:property-options>
+                <c:option name="None" value="NONE"/>
+                <c:option name="Application" value="APPLICATION"/>
+                <c:option name="Domain" value="DOMAIN"/>
+                <c:option name="Domain and Application" value="DOMAIN_AND_APPLICATION"/>
+            </c:property-options>
+        </c:simple-property>
+
+        <c:simple-property name="domain" type="string"
+                           required="false">
+            <c:description>
+                The name of the JAAS security manager that will handle authentication (only required if security
+                deployment type is DOMAIN or DOMAIN_AND_APPLICATION). This name correlates to the JAAS login-config.xml
+                descriptor application-policy/name attribute.
+            </c:description>
+        </c:simple-property>
+    </c:map-property>
+
+    <c:simple-property name="statistics-formatter" required="false">
+        <c:description>
+             The fully qualified class name of the class to use for formatting managed connection pool statistics for
+             this datasource. The class must implement the org.jboss.resource.statistic.formatter.StatisticsFormatter.
+             interface. The default is "org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter".
+        </c:description>
+    </c:simple-property>
+
+    <c:simple-property name="type-mapping" displayName="Type Mapping" required="false">
+        <c:description>
+            The name of the corresponding type-mapping in conf/standardjbosscmp-jdbc.xml.
+        </c:description>
+        <c:property-options>
+            <c:option name="Cloudscape" value="Cloudscape"/>
+            <c:option name="DB2" value="DB2"/>
+            <c:option name="DB2/400" value="DB2/400"/>
+            <c:option name="Derby" value="Derby"/>
+            <c:option name="Firebird" value="Firebird"/>
+            <c:option name="FirstSQL/J" value="FirstSQL/J"/>
+            <c:option name="Hypersonic SQL" value="Hypersonic SQL"/>
+            <c:option name="InformixDB" value="InformixDB"/>
+            <c:option name="Ingres" value="Ingres"/>
+            <c:option name="InterBase" value="InterBase"/>
+            <c:option name="MaxDB" value="MaxDB"/>
+            <c:option name="McKoi" value="McKoi"/>
+            <c:option name="Mimer SQL" value="Mimer SQL"/>
+            <c:option name="MS SQLSERVER" value="MS SQLSERVER"/>
+            <c:option name="MS SQLSERVER2000" value="MS SQLSERVER2000"/>
+            <c:option name="Oracle7" value="Oracle7"/>
+            <c:option name="Oracle8" value="Oracle8"/>
+            <c:option name="Oracle9i" value="Oracle9i"/>
+            <c:option name="PointBase" value="PointBase"/>
+            <c:option name="PostgreSQL" value="PostgreSQL"/>
+            <c:option name="PostgreSQL 7.2" value="PostgreSQL 7.2"/>
+            <c:option name="PostgreSQL 8.0" value="PostgreSQL 8.0"/>            
+            <c:option name="SapDB" value="SapDB"/>
+            <c:option name="SOLID" value="SOLID"/>
+            <c:option name="Sybase" value="Sybase"/>
+        </c:property-options>
+    </c:simple-property>
+
+    <c:simple-property name="use-java-context"
+                       displayName="Use Java Context"
+                       type="boolean" defaultValue="true"
+                       required="false">
+        <c:description>
+            Indicates whether the JNDI name should be bound under the "java" context,
+            which causes the DataSource to only be accessible from within the JBossAS VM.
+            The default is Yes.
+        </c:description>
+    </c:simple-property>
+
+    <c:simple-property name="use-strict-min" type="boolean" required="false">
+        <c:description>
+             Whether idle connections below the min-pool-size should be closed. The default is No.
+        </c:description>
+    </c:simple-property>
+
+    <c:simple-property name="validate-on-match" type="boolean" required="false" defaultValue="true">
+        <c:description>
+            The validate-on-match element indicates whether or not connection level validation should be done when a
+            connection factory attempts to match a managed connection for a given set. This is typically exclusive to
+            the use of background validation. The default is Yes.
+        </c:description>
+    </c:simple-property>
+'>
+
+]>
+
+<!--############################################# END OF XML ENTITIES ###############################################-->
+
+
+
 <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"
@@ -28,7 +253,7 @@
 
 	<server name="Data Services" description="JBoss Enterprise Data Services"
 		class="PlatformComponent" discovery="PlatformDiscoveryComponent"
-		singleton="true">
+		singleton="true" >
 
 		<runs-inside>
 			<parent-resource-type name="JBossAS Server"
@@ -179,6 +404,133 @@
 					</c:constraint>
 				</c:simple-property>
 			</c:group>
+			<c:group name="teiidProperties" displayName="Teiid Properties"
+				hiddenByDefault="false">
+				<c:map-property name="teiidProperties" displayName="Runtime Engine Properties"
+					description="Properties for use by the Teiid engine">
+					<c:simple-property name="state" displayName="State"
+						description="State of this Teiid instance" required="false"
+						readOnly="true" />
+					<c:simple-property name="resultSetCacheMaxEntries"
+						displayName="Result Set Cache Max Entries" description="The maximum number of result set cache entries. 0 indicates no limit. (default 1024)"
+						required="false" readOnly="true" />						
+					<c:simple-property name="maxRowsFetchSize"
+						displayName="Max Rows Fetch Size"
+						description="The maximum number of result set cache entries. 0 indicates no limit. (default 1024)"
+						required="false" readOnly="true" />
+					<c:simple-property name="codeTablesMaxRows"
+						displayName="Code Tables Max Rows"
+						description="Maximum number of records in all lookup tables (default 200000)"
+						required="false" readOnly="true" />
+					<c:simple-property name="processName"
+						displayName="Process Name" description="Name that uniquely identifies this process"
+						required="false" readOnly="true" />
+					<c:simple-property name="preparedPlanCacheMaxCount"
+						displayName="Prepared Plan Cache Max Count"
+						description="The maximum number of query plans that are cached. Note: this is a memory based cache. (default 250)"
+						required="false" readOnly="true" />
+					<c:simple-property name="maxThreads" displayName="Max Threads"
+						description="Process pool maximum thread count. (default 16) Increase this value if your load includes a large number of XQueries or if the system's available processors is larger than 8"
+						required="false" readOnly="true" />
+					<c:simple-property name="timeSliceInMilli"
+						displayName="Time Slice In Milli"
+						description="Query processor time slice, in milliseconds. (default 2000)"
+						required="false" readOnly="true" />
+					<c:simple-property name="processDebugAllowed"
+						displayName="Process Debug Allowed" description="True if process debug allowed"
+						required="false" readOnly="true" />
+					<c:simple-property name="lobChunkSizeInKB"
+						displayName="Lob Chunk Size In KB"
+						description="The max lob chunk size in KB transferred each time when processing blobs, clobs(100KB default)"
+						required="false" readOnly="true" />
+					<c:simple-property name="codeTablesMaxCount"
+						displayName="Code Tables Max Count"
+						description="The max lob chunk size in KB transferred each time when processing blobs, clobs(100KB default)"
+						required="false" readOnly="true" />
+					<c:simple-property name="resultSetCacheEnabled"
+						displayName="Result Set Cache Enabled"
+						description="Denotes whether or not result set caching is enabled. (default true)"
+						required="false" readOnly="true" type="boolean"/>
+					<c:simple-property name="codeTablesMaxRowsPerTable"
+						displayName="Code Tables Max Rows PerTable"
+						description="Maximum number of records in all lookup tables (default 200000)"
+						required="false" readOnly="true" />
+					<c:simple-property name="activeSessionsCount"
+						displayName="Active Session Count" description="Count of active sessions"
+						required="false" readOnly="true" />
+				</c:map-property>
+				<c:map-property name="bufferServiceProperties" displayName="Buffer Service Properties"
+					description="Properties for use by the Buffer Service">
+					<c:simple-property name="state" displayName="State"
+						description="State of this bean instance" required="false"
+						readOnly="true" />
+					<c:simple-property name="processorBatchSize"
+						displayName="Processor Batch Size" description="The max row count of a batch sent internally within the query processor. Should be &lt;= the connectorBatchSize. (default 256)"
+						required="false" readOnly="true" />
+					<c:simple-property name="connectorBatchSize"
+						displayName="Connector Batch Size"
+						description="The max row count of a batch from a connector. Should be even multiple of processorBatchSize. (default 512)"
+						required="false" readOnly="true" />
+					<c:simple-property name="maxProcessingBatchesColumns"
+						displayName="Max Processing Batches Columns"
+						description="The number of batch columns guarenteed to a processing operation.  Set this value lower if the workload typically processes larger numbers of concurrent queries with large intermediate results from operations such as sorting, grouping, etc. (default 128)"
+						required="false" readOnly="true" />
+					<c:simple-property name="maxFileSize"
+						displayName="Max File Size" description="Max file size for buffer files (default 2GB)"
+						required="false" readOnly="true" />
+					<c:simple-property name="maxReserveBatchColumns"
+						displayName="Max Reserve Batch Columns"
+						description="The number of batch columns to allow in memory (default 16384).  This value should be set lower or higher depending on the available memory to Teiid in the VM.  16384 is considered a good default for a dedicated 32-bit VM running Teiid with a 1 gig heap."
+						required="false" readOnly="true" />
+				</c:map-property>
+				<c:map-property name="authorizationServiceProperties" displayName="Authorization Service Properties"
+					description="Properties for use by the Authorization Service">
+					<c:simple-property name="state" displayName="State"
+						description="State of this bean instance" required="false"
+						readOnly="true" />
+				</c:map-property>
+				<c:map-property name="jdbcSocketConfigurationProperties" displayName="Jdbc Socket Configuration Properties"
+					description="Properties for use by the Jdbc Socket Configuration">
+					<c:simple-property name="state" displayName="State"
+						description="State of this bean instance" required="false"
+						readOnly="true" />
+					<c:simple-property name="portNumber"
+						displayName="Port Number" description="Port Number"
+						required="false" readOnly="true" />
+					<c:simple-property name="enabled" 
+						displayName=" SSL Enabled"
+						description="SSL enabled"
+						required="false" readOnly="true" type="boolean" default="true" />
+					<c:simple-property name="hostName"
+						displayName="Host Name"
+						description="Host Name"
+						required="false" readOnly="true" />
+					<c:simple-property name="maxSocketThreads"
+						displayName="Max Socket Threads" description="Max NIO threads"
+						required="false" readOnly="true" />
+					<c:simple-property name="inputBufferSize"
+						displayName="Input Buffer Size"
+						description="SO_RCVBUF size, 0 indicates that system default should be used (default 0)"
+						required="false" readOnly="true" />
+					<c:simple-property name="outputBufferSize"
+						displayName="Output Buffer Size"
+						description="SO_SNDBUF size, 0 indicates that system default should be used (default 0)"
+						required="false" readOnly="true" />	
+				</c:map-property>
+				<c:map-property name="sessionServiceProperties" displayName="Session Service Properties"
+					description="Properties for use by the Session Service">
+					<c:simple-property name="state" displayName="State"
+						description="State of this bean instance" required="false"
+						readOnly="true" />
+					<c:simple-property name="sessionExpirationTimeLimit"
+						displayName="Session Expiration Time Limit" description="Max allowed time before the session is terminated by the system, 0 indicates unlimited (default 0)"
+						required="false" readOnly="true" />
+					<c:simple-property name="sessionMaxLimit"
+						displayName="Session Max Limit"
+						description="Maximum number of sessions allowed by the system (default 5000)"
+						required="false" readOnly="true" />
+				</c:map-property>
+			</c:group>
 		</resource-configuration>
 
 		<service name="Virtual Database (VDB)s"
@@ -251,64 +603,62 @@
 				</results>
 			</operation>
 
-			<metric displayName="Status" defaultOn="true" dataType="trait" displayType="summary"
-			category="availability" property="status" 
-			description="The status of this VDB" />
-			
+			<metric displayName="Status" defaultOn="true" dataType="trait"
+				displayType="summary" category="availability" property="status"
+				description="The status of this VDB" />
+				
+			<metric displayName="Error" defaultOn="true" dataType="trait"
+				displayType="summary" category="availability" property="errormessages"
+				description="The status of this VDB" />	
+
 			<content name="vdb" displayName="VDB Archive" category="deployable"
 				isCreationType="true">
 			</content>
-			
+
 			<resource-configuration>
 				<c:group name="general" displayName="General"
 					hiddenByDefault="false">
 					<c:simple-property name="name" type="string"
-						description="The Virtual Database Name" required="false"/>
+						description="The Virtual Database Name" required="false" />
 					<c:simple-property name="version" type="string"
-						description="The Virtual Database Version" required="false"/>
+						description="The Virtual Database Version" required="false" />
 					<c:simple-property name="description" type="string"
-						description="The Virtual Database Description" required="false"/>
+						description="The Virtual Database Description" required="false" />
 					<c:simple-property name="status" type="string"
-						description="The Virtual Database Status" required="false" summary="true">
+						description="The Virtual Database Status" required="false"
+						summary="true">
 						<c:property-options>
-									<c:option value="ACTIVE" name="ACTIVE" />
-									<c:option value="INACTIVE" name="INACTIVE" default="true"/>
-						</c:property-options>					
-					</c:simple-property>	
+							<c:option value="ACTIVE" name="ACTIVE" />
+							<c:option value="INACTIVE" name="INACTIVE" default="true" />
+						</c:property-options>
+					</c:simple-property>
 					<c:simple-property name="url" type="string"
-						description="The Virtual Database URL" required="false"/>
+						description="The Virtual Database URL" required="false" />
 				</c:group>
-				<c:group name="Models" displayName="Models"
-					hiddenByDefault="false">
-					<c:list-property name="sourceModels" description="The source models for this VDB">
+				<c:group name="Models" displayName="Models" hiddenByDefault="false">
+					<c:list-property name="sourceModels" readOnly="true" 
+						description="The source models for this VDB">
 						<c:map-property name="model">
 							<c:simple-property name="name" displayName="Name"
-								description="Name of the model" required="true" readOnly="true"/>
-							<c:simple-property name="sourceName" displayName="Source Name"
-								description="Source name for this model" required="false" readOnly="true"/>
-							<c:simple-property name="jndiName" displayName="Connector Binding JNDI Name"
-								description="JNDI name for this connector binding" required="false"/>	
+								description="Name of the model" required="true" readOnly="true" />
+							<c:simple-property name="sourceName"
+								displayName="Source Name" description="Source name for this model"
+								required="false" readOnly="true" />
+							<c:simple-property name="jndiName"
+								displayName="Connector Binding JNDI Name" description="JNDI name for this connector binding"
+								required="false" />
 							<c:simple-property name="visibility"
-								displayName="Visible" description="Visibility of the model"
+								displayName="Visible" description="Visibility of the model" 
 								required="true">
-								<c:property-options>
-									<c:option value="true" name="true" />
-									<c:option value="false" name="false"
-										default="true" />
-								</c:property-options>
 							</c:simple-property>
 							<c:simple-property name="supportsMultiSource"
-								displayName="Supports Multi-source?" description="Determines if this model supports multi-source bindings"
-								required="true">
-								<c:property-options>
-									<c:option value="true" name="true" />
-									<c:option value="false" name="false"
-										default="true" />
-								</c:property-options>
-							</c:simple-property>
+								displayName="Supports Multi-source?"
+								description="Determines if this model supports multi-source bindings"
+								required="true" default="true" />
 						</c:map-property>
 					</c:list-property>
-					<c:list-property name="logicalModels" description="The logical models for this VDB">
+					<c:list-property name="logicalModels" readOnly="true"
+						description="The logical models for this VDB">
 						<c:map-property name="model">
 							<c:simple-property name="name" displayName="Name"
 								description="Name of the model" required="true" />
@@ -316,40 +666,22 @@
 								description="type of logical model" required="true" />
 							<c:simple-property name="visibility"
 								displayName="Visible" description="Visbility of the model"
-								required="true">
-								<c:property-options>
-									<c:option value="true" name="true" />
-									<c:option value="false" name="false"
-										default="true" />
-								</c:property-options>
-							</c:simple-property>
+								required="true" default="true" />
 						</c:map-property>
 					</c:list-property>
 				</c:group>
-				<c:group name="errors" displayName="Errors" 
-					hiddenByDefault="false" >
-					<c:list-property name="errorList" description="VDB Errors" summary="true">
+				<c:group name="errors" displayName="Errors" hiddenByDefault="false">
+					<c:list-property name="errorList" description="VDB Errors"
+						summary="true" readOnly="true">
 						<c:map-property name="errorMap" summary="true">
 							<c:simple-property name="severity" displayName="Severity"
-								description="Severity" readOnly="true" summary="true"/>
+								description="Severity" readOnly="true" summary="true" />
 							<c:simple-property name="message" displayName="Message"
-								description="Error message" readOnly="true" summary="true"/>								
+								description="Error message" readOnly="true" summary="true" />
 						</c:map-property>
 					</c:list-property>
 				</c:group>
 			</resource-configuration>
-			
-		
-			<!--
-				<operation name="getProperties" displayName="View VDB properties"
-				description="List the properties of this VDB"> <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="Value" type="string"
-				description="The value of this property" /> </c:map-property>
-				</c:list-property> </results> </operation>
-			-->
-		
 
 		</service>
 



More information about the teiid-commits mailing list