teiid SVN: r2008 - trunk/engine/src/main/java/org/teiid/dqp/internal/process.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-03-28 23:06:28 -0400 (Sun, 28 Mar 2010)
New Revision: 2008
Modified:
trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
Log:
TEIID-1015 ensuring that suspend is called when the thread exits
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2010-03-29 03:04:36 UTC (rev 2007)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2010-03-29 03:06:28 UTC (rev 2008)
@@ -224,7 +224,8 @@
this.processingException = new IllegalStateException("Request is already closed"); //$NON-NLS-1$
}
sendError();
- }
+ }
+ suspend();
}
}
@@ -329,8 +330,6 @@
} catch (XATransactionException e1) {
LogManager.logWarning(LogConstants.CTX_DQP, e1, DQPPlugin.Util.getString("ProcessWorker.failed_rollback")); //$NON-NLS-1$
}
- } else {
- suspend();
}
}
14 years, 9 months
teiid SVN: r2007 - in trunk: client/src/main/resources and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-03-28 23:04:36 -0400 (Sun, 28 Mar 2010)
New Revision: 2007
Modified:
trunk/adminshell/src/main/resources/connector.xsl
trunk/client/src/main/resources/vdb-deployer.xsd
Log:
TEIID-833 adding a migration tool to quickly modifiy older vdbs
Modified: trunk/adminshell/src/main/resources/connector.xsl
===================================================================
--- trunk/adminshell/src/main/resources/connector.xsl 2010-03-27 20:40:15 UTC (rev 2006)
+++ trunk/adminshell/src/main/resources/connector.xsl 2010-03-29 03:04:36 UTC (rev 2007)
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="version">7.0</xsl:param>
- <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
+ <xsl:output method="xml" indent="yes"/>
<xsl:strip-space elements="*"/>
- <xsl:template match="Header"/>
- <xsl:template match="VDB/ConnectorBindings/Connector">
+ <xsl:template match="VDB">
+ <xsl:if test="ConnectorBindings">
+ <connection-factories>
+ <xsl:for-each select="ConnectorBindings/Connector">
<no-tx-connection-factory>
<jndi-name><xsl:value-of select="translate(@Name, ' ', '_')" /></jndi-name>
<xsl:choose>
@@ -45,19 +47,21 @@
<xsl:choose>
<xsl:when test="@Name='ConnectorMaxConnections' or @Name='UsePostDelegation'
or @Name='ConnectorThreadTTL' or @Name='DeployedName'
- or @Name='ConnectorMaxThreads'
+ or @Name='ConnectorMaxThreads' or @Name='SetCriteriaBatchSize'
or @Name='ConnectorClassPath' or @Name='SourceConnectionTestInterval'
or @Name='metamatrix.service.essentialservice' or @Name='ServiceMonitoringEnabled'
or @Name='ConnectorClass' or @Name='ServiceClassName'
or @Name='SynchWorkers' or @Name='UseCredentialMap'
or @Name='ConnectionPoolEnabled' or @Name='AdminConnectionsAllowed'
- or @Name='com.metamatrix.data.pool.max_connections_for_each_id' or @Name='com.metamatrix.data.pool.live_and_unused_time'
- or @Name='com.metamatrix.data.pool.wait_for_source_time' or @Name='com.metamatrix.data.pool.cleaning_interval'
- or @Name='com.metamatrix.data.pool.enable_shrinking' or starts-with(@Name, 'getMax')
+ or starts-with(@Name,'com.metamatrix.data.pool') or starts-with(@Name, 'getMax')
or starts-with(@Name, 'supports') or starts-with(@Name, 'getSupported')
or @Name='requiresCriteria' or @Name='useAnsiJoin'
or @Name='URL' or @Name='ConnectionSource'
- or @Name='User' or @Name='Password'"/>
+ or @Name='User' or @Name='Password' or starts-with(@Name, 'ResultSetCache')
+ or starts-with(@Name, 'Extension') or @Name='Driver'
+ or @Name='MaxSQLLength'">
+ <xsl:comment><config-property name="<xsl:value-of select="@Name"/>"><xsl:value-of select="text()"/></config-property></xsl:comment>
+ </xsl:when>
<xsl:when test="@Name='MaxResultRows' and text()='0'">
<config-property>
<xsl:attribute name="name">
@@ -83,6 +87,7 @@
or starts-with(@ComponentType,'HSQLDB ') or starts-with(@ComponentType,'Sybase ')
">
<config-property name="SourceJNDIName">java:<xsl:value-of select="translate(@Name, ' ', '_')" />DS</config-property>
+ <xsl:message>For connector binding "<xsl:value-of select="@Name" />" of legacy type "<xsl:value-of select="@ComponentType" />", you will need to create a -ds.xml JDBC DataSource with JNDI name <xsl:value-of select="translate(@Name, ' ', '_')" />DS</xsl:message>
<xsl:choose>
<xsl:when test="starts-with(@ComponentType,'Apache ')">
<config-property name="ExtensionTranslationClassName">org.teiid.connector.jdbc.derby.DerbySQLTranslator</config-property>
@@ -122,9 +127,12 @@
<xsl:if test="contains(@ComponentType,'XA')">
<config-property name="IsXA">true</config-property>
</xsl:if>
- <xsl:if test="Properties/Property[@Name='ConnectorMaxConnections']">
- <max-pool-size><xsl:value-of select="Properties/Property[@Name='ConnectorMaxConnections']/text()"/></max-pool-size>
+ <xsl:if test="Properties/Property[@Name='ConnectorMaxConnections' or @Name='com.metamatrix.data.pool.max_connections']">
+ <max-pool-size><xsl:value-of select="Properties/Property[@Name='ConnectorMaxConnections' or @Name='com.metamatrix.data.pool.max_connections']/text()"/></max-pool-size>
</xsl:if>
</no-tx-connection-factory>
+ </xsl:for-each>
+ </connection-factories>
+ </xsl:if>
</xsl:template>
</xsl:stylesheet>
Modified: trunk/client/src/main/resources/vdb-deployer.xsd
===================================================================
--- trunk/client/src/main/resources/vdb-deployer.xsd 2010-03-27 20:40:15 UTC (rev 2006)
+++ trunk/client/src/main/resources/vdb-deployer.xsd 2010-03-29 03:04:36 UTC (rev 2007)
@@ -36,19 +36,7 @@
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="type" default="PHYSICAL">
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="PHYSICAL"/>
- <xs:enumeration value="VIRTUAL"/>
- <xs:enumeration value="FUNCTION"/>
- <xs:enumeration value="TYPE"/>
- <xs:enumeration value="EXTENSION"/>
- <xs:enumeration value="LOGICAL"/>
- <xs:enumeration value="MATERIALIZATION"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute name="type" type="xs:string" default="PHYSICAL"/>
<xs:attribute name="visible" type="xs:boolean" default="true"/>
<xs:attribute name="path" type="xs:string"/>
</xs:complexType>
14 years, 9 months
teiid SVN: r2006 - in trunk: build/assembly/jboss-container and 7 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-03-27 16:40:15 -0400 (Sat, 27 Mar 2010)
New Revision: 2006
Removed:
trunk/build/assembly/runtime/
Modified:
trunk/build/assembly/jboss-container/dist.xml
trunk/build/kit-jboss-container/deployers/teiid.deployer/teiid-deployer-jboss-beans.xml
trunk/client/src/main/java/org/teiid/adminapi/impl/ModelMetaData.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManagerRepository.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/ConnectorBindingDeployer.java
trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties
Log:
TEIID-838: The VDB status is automatically managed as the connector bindings deployed and un-deployed. If the required binding is down VDB will be inactive and if all the bindins are there then vdb will be active.
Modified: trunk/build/assembly/jboss-container/dist.xml
===================================================================
--- trunk/build/assembly/jboss-container/dist.xml 2010-03-27 20:35:57 UTC (rev 2005)
+++ trunk/build/assembly/jboss-container/dist.xml 2010-03-27 20:40:15 UTC (rev 2006)
@@ -76,8 +76,8 @@
<include>org.jboss.teiid.connectors:connector-ldap:rar</include>
<include>org.jboss.teiid.connectors:connector-salesforce:rar</include>
<include>org.jboss.teiid.connectors:connector-xml-http:rar</include>
- <include>org.jboss.teiid.connectors:connector-xmlsource-file:rar</include>
- <include>org.jboss.teiid.connectors:connector-xmlsource-soap:rar</include>
+ <include>org.jboss.teiid.connectors:connector-xml-file:rar</include>
+ <include>org.jboss.teiid.connectors:connector-xml-soap:rar</include>
</includes>
<binaries>
Modified: trunk/build/kit-jboss-container/deployers/teiid.deployer/teiid-deployer-jboss-beans.xml
===================================================================
--- trunk/build/kit-jboss-container/deployers/teiid.deployer/teiid-deployer-jboss-beans.xml 2010-03-27 20:35:57 UTC (rev 2005)
+++ trunk/build/kit-jboss-container/deployers/teiid.deployer/teiid-deployer-jboss-beans.xml 2010-03-27 20:40:15 UTC (rev 2006)
@@ -58,6 +58,7 @@
<property name="securityHelper"><inject bean="SecurityHelper"/></property>
<property name="connectorManagerRepository"><inject bean="ConnectorManagerRepository"/></property>
<property name="managedObjectFactory"><inject bean="ManagedObjectFactory"/></property>
+ <property name="VDBRepository"><inject bean="VDBRepository"/></property>
</bean>
<!-- Persistence class for the VDB deployment file -->
Modified: trunk/client/src/main/java/org/teiid/adminapi/impl/ModelMetaData.java
===================================================================
--- trunk/client/src/main/java/org/teiid/adminapi/impl/ModelMetaData.java 2010-03-27 20:35:57 UTC (rev 2005)
+++ trunk/client/src/main/java/org/teiid/adminapi/impl/ModelMetaData.java 2010-03-27 20:40:15 UTC (rev 2006)
@@ -24,6 +24,7 @@
import java.io.Serializable;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.Properties;
@@ -180,6 +181,9 @@
@ManagementProperty(description = "Model Validity Errors", readOnly=true, managed=true)
public List<ValidationError> getErrors(){
+ if (this.errors == null) {
+ return Collections.emptyList();
+ }
return this.errors;
}
@@ -188,7 +192,11 @@
this.errors = new ArrayList<ValidationError>();
}
this.errors.add(new ValidationError(severity, message));
- }
+ }
+
+ public void clearErrors() {
+ this.errors.clear();
+ }
@XmlAccessorType(XmlAccessType.NONE)
@XmlType(name = "", propOrder = {
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2010-03-27 20:35:57 UTC (rev 2005)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2010-03-27 20:40:15 UTC (rev 2006)
@@ -202,7 +202,7 @@
}
this.state = ConnectorStatus.INIT_FAILED;
- LogManager.logInfo(LogConstants.CTX_CONNECTOR, DQPPlugin.Util.getString("ConnectorManagerImpl.Initializing_connector", connectorName)); //$NON-NLS-1$
+ LogManager.logDetail(LogConstants.CTX_CONNECTOR, DQPPlugin.Util.getString("ConnectorManagerImpl.Initializing_connector", connectorName)); //$NON-NLS-1$
this.state = ConnectorStatus.OPEN;
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManagerRepository.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManagerRepository.java 2010-03-27 20:35:57 UTC (rev 2005)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManagerRepository.java 2010-03-27 20:40:15 UTC (rev 2006)
@@ -23,6 +23,8 @@
package org.teiid.dqp.internal.datamgr.impl;
import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -40,6 +42,11 @@
return this.repo.get(connectorName);
}
+ public List<ConnectorManager> getConnectorManagers() {
+ return new ArrayList(this.repo.values());
+ }
+
+
public ConnectorManager removeConnectorManager(String connectorName) {
return this.repo.remove(connectorName);
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/ConnectorBindingDeployer.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/ConnectorBindingDeployer.java 2010-03-27 20:35:57 UTC (rev 2005)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/ConnectorBindingDeployer.java 2010-03-27 20:40:15 UTC (rev 2006)
@@ -25,26 +25,37 @@
import java.util.Map;
import java.util.Set;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
import org.jboss.deployers.spi.deployer.managed.ManagedObjectCreator;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.logging.Logger;
import org.jboss.managed.api.ManagedObject;
import org.jboss.managed.api.factory.ManagedObjectFactory;
import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup;
import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
+import org.teiid.adminapi.Model;
+import org.teiid.adminapi.VDB;
+import org.teiid.adminapi.impl.ModelMetaData;
+import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.connector.api.Connector;
+import org.teiid.deployers.VDBRepository;
import org.teiid.dqp.internal.datamgr.impl.ConnectorManager;
import org.teiid.dqp.internal.datamgr.impl.ConnectorManagerRepository;
+import org.teiid.jboss.IntegrationPlugin;
import org.teiid.security.SecurityHelper;
+import com.metamatrix.common.log.LogConstants;
+import com.metamatrix.common.log.LogManager;
+
public class ConnectorBindingDeployer extends AbstractSimpleRealDeployer<ManagedConnectionFactoryDeploymentGroup> implements ManagedObjectCreator {
- protected Logger log = Logger.getLogger(getClass());
private ManagedObjectFactory mof;
private SecurityHelper securityHelper;
private ConnectorManagerRepository connectorManagerRepository;
+ private VDBRepository vdbRepository;
public ConnectorBindingDeployer() {
super(ManagedConnectionFactoryDeploymentGroup.class);
@@ -60,17 +71,21 @@
for (ManagedConnectionFactoryDeploymentMetaData data : deployments) {
String connectorDefinition = data.getConnectionDefinition();
if (connectorDefinition.equals(Connector.class.getName())) {
- String connectorName = data.getJndiName();
+ String connectorName = "java:"+data.getJndiName(); //$NON-NLS-1$
- ConnectorManager cm = createConnectorManger("java:"+connectorName, data.getMaxSize()); //$NON-NLS-1$
+ ConnectorManager cm = createConnectorManger(connectorName, data.getMaxSize());
cm.start();
cmGroup.addConnectorManager(cm);
// Add the references to the mgr as loaded.
- this.connectorManagerRepository.addConnectorManager("java:"+connectorName, cm); //$NON-NLS-1$
+ this.connectorManagerRepository.addConnectorManager(connectorName, cm);
- log.info("Teiid Connector Started = " + connectorName); //$NON-NLS-1$
+ connectorAdded(connectorName);
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("connector_started", connectorName)); //$NON-NLS-1$
}
+ else {
+ // check if data source is down
+ }
}
if (!cmGroup.getConnectorManagers().isEmpty()) {
@@ -96,14 +111,15 @@
for (ManagedConnectionFactoryDeploymentMetaData data : deployments) {
String connectorDefinition = data.getConnectionDefinition();
if (connectorDefinition.equals(Connector.class.getName())) {
- String connectorName = data.getJndiName();
+ String connectorName = "java:"+data.getJndiName(); //$NON-NLS-1$
if (this.connectorManagerRepository != null) {
- ConnectorManager cm = this.connectorManagerRepository.removeConnectorManager("java:"+connectorName); //$NON-NLS-1$
+ ConnectorManager cm = this.connectorManagerRepository.removeConnectorManager(connectorName);
if (cm != null) {
cm.stop();
}
}
- log.info("Teiid Connector Stopped = " + connectorName); //$NON-NLS-1$
+ connectorRemoved(connectorName);
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("connector_stopped", connectorName)); //$NON-NLS-1$
}
}
}
@@ -131,4 +147,78 @@
public void setSecurityHelper(SecurityHelper securityHelper) {
this.securityHelper = securityHelper;
}
+
+ public void setVDBRepository(VDBRepository repo) {
+ this.vdbRepository = repo;
+ }
+
+ public void connectorAdded(String connectorName) {
+ for (VDBMetaData vdb:this.vdbRepository.getVDBs()) {
+ if (vdb.getStatus() == VDB.Status.ACTIVE) {
+ continue;
+ }
+ for (Model m:vdb.getModels()) {
+ ModelMetaData model = (ModelMetaData)m;
+ if (model.getErrors().isEmpty()) {
+ continue;
+ }
+
+ boolean inUse = false;
+ for (String sourceName:model.getSourceNames()) {
+ if (connectorName.equals(model.getSourceJndiName(sourceName))) {
+ inUse = true;
+ }
+ }
+
+ if (inUse) {
+ model.clearErrors();
+ for (String sourceName:model.getSourceNames()) {
+ if (!connectorName.equals(model.getSourceJndiName(sourceName))) {
+ try {
+ InitialContext ic = new InitialContext();
+ ic.lookup(model.getSourceJndiName(sourceName));
+ } catch (NamingException e) {
+ String msg = IntegrationPlugin.Util.getString("jndi_not_found", vdb.getName(), vdb.getVersion(), model.getSourceJndiName(sourceName), sourceName); //$NON-NLS-1$
+ model.addError(ModelMetaData.ValidationError.Severity.ERROR.name(), msg);
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, msg);
+ }
+ }
+ }
+ }
+ }
+
+ boolean valid = true;
+ for (Model m:vdb.getModels()) {
+ ModelMetaData model = (ModelMetaData)m;
+ if (!model.getErrors().isEmpty()) {
+ valid = false;
+ break;
+ }
+ }
+
+ if (valid) {
+ vdb.setStatus(VDB.Status.ACTIVE);
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("vdb_activated",vdb.getName(), vdb.getVersion())); //$NON-NLS-1$
+ }
+
+ }
+ }
+
+ public void connectorRemoved(String connectorName) {
+ for (VDBMetaData vdb:this.vdbRepository.getVDBs()) {
+ for (Model m:vdb.getModels()) {
+ ModelMetaData model = (ModelMetaData)m;
+ for (String sourceName:model.getSourceNames()) {
+ if (connectorName.equals(model.getSourceJndiName(sourceName))) {
+ vdb.setStatus(VDB.Status.INACTIVE);
+ String msg = IntegrationPlugin.Util.getString("jndi_not_found", vdb.getName(), vdb.getVersion(), model.getSourceJndiName(sourceName), sourceName); //$NON-NLS-1$
+ model.addError(ModelMetaData.ValidationError.Severity.ERROR.name(), msg);
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, msg);
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("vdb_inactivated",vdb.getName(), vdb.getVersion())); //$NON-NLS-1$
+ }
+ }
+ }
+ }
+ }
+
}
Modified: trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
===================================================================
--- trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2010-03-27 20:35:57 UTC (rev 2005)
+++ trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2010-03-27 20:40:15 UTC (rev 2006)
@@ -35,4 +35,9 @@
connector_type_not_found=Connector Type template "{0}" not found in the configuration.
vdb_not_found=VDB with name "{0}" version "{1}" not found in configuration
model_not_found=Model name "{0}" not found in the VDB with name "{1}" version "{2}"
-sourcename_not_found=No source name {0} found in the model: {1}.{2}.{3}
\ No newline at end of file
+sourcename_not_found=No source name {0} found in the model: {1}.{2}.{3}
+connector_started= Teiid connector {0} started
+connector_stopped=Teiid connector {0} stopped
+vdb_activated={0}.{1} status has been changed to active
+vdb_inactivated={0}.{1} status has been changed to inactive. Check the connector mappings!
+jndi_not_found=For {0}.{1} VDB, JNDI resource "{2}" not found for Source Name "{3}"
\ No newline at end of file
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java 2010-03-27 20:35:57 UTC (rev 2005)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java 2010-03-27 20:40:15 UTC (rev 2006)
@@ -137,8 +137,10 @@
// Check if the VDB is fully configured.
if (valid) {
deployment.setStatus(VDB.Status.ACTIVE);
+ } else {
+ deployment.setStatus(VDB.Status.INACTIVE);
}
- LogManager.logInfo(LogConstants.CTX_RUNTIME, RuntimePlugin.Util.getString("vdb_deployed",deployment)); //$NON-NLS-1$
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, RuntimePlugin.Util.getString("vdb_deployed",deployment, valid?"active":"inactive")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
private boolean validateSources(VDBMetaData deployment) {
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2010-03-27 20:35:57 UTC (rev 2005)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2010-03-27 20:40:15 UTC (rev 2006)
@@ -22,9 +22,11 @@
package org.teiid.deployers;
import java.io.Serializable;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -33,12 +35,9 @@
import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.connector.metadata.runtime.Datatype;
import org.teiid.connector.metadata.runtime.MetadataStore;
-import org.teiid.metadata.CompositeMetadataStore;
import org.teiid.metadata.TransformationMetadata;
import org.teiid.runtime.RuntimePlugin;
-import com.metamatrix.common.log.LogConstants;
-import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.types.DataTypeManager;
import com.metamatrix.core.CoreConstants;
import com.metamatrix.vdb.runtime.VDBKey;
@@ -64,6 +63,10 @@
public VDBMetaData getVDB(String name, int version) {
return this.vdbRepo.get(new VDBKey(name, version));
}
+
+ public List<VDBMetaData> getVDBs(){
+ return new ArrayList(this.vdbRepo.values());
+ }
protected VDBKey vdbId(VDBMetaData vdb) {
return new VDBKey(vdb.getName(), vdb.getVersion());
@@ -93,44 +96,7 @@
throw new VirtualDatabaseException(RuntimePlugin.Util.getString("VDBService.VDB_does_not_exist._2", vdbName, latestVersion)); //$NON-NLS-1$
}
- public void changeVDBStatus(String vdbName, int vdbVersion, VDB.Status status) throws VirtualDatabaseException {
- VDBMetaData vdb = getVDB(vdbName, vdbVersion);
-
- VDB.Status currentStatus = vdb.getStatus();
-
- if (status != currentStatus) {
- // Change the VDB's status
- if (status == VDB.Status.ACTIVE || status == VDB.Status.ACTIVE_DEFAULT) {
- if (!vdb.isValid()) {
- throw new VirtualDatabaseException(RuntimePlugin.Util.getString("EmbeddedConfigurationService.invalid_vdb", vdb.getName())); //$NON-NLS-1$
- }
- if (status == VDB.Status.ACTIVE_DEFAULT) {
- // only 1 can be set as active default
- VDBMetaData latestActive = getActiveVDB(vdbName);
- if (latestActive.getStatus() == VDB.Status.ACTIVE_DEFAULT) {
- latestActive.setStatus(VDB.Status.ACTIVE);
- saveVDB(latestActive);
- }
- }
- }
- vdb.setStatus(status);
-
- // make sure we got what we asked for
- if (status != vdb.getStatus()) {
- throw new VirtualDatabaseException(RuntimePlugin.Util.getString("VDBService.vdb_change_status_failed", new Object[] { vdbName, vdbVersion, status })); //$NON-NLS-1$
- }
-
- // now save the change in the configuration.
- saveVDB(vdb);
- LogManager.logInfo(LogConstants.CTX_RUNTIME, RuntimePlugin.Util.getString("VDBService.vdb_change_status", new Object[] { vdbName, vdbVersion, status})); //$NON-NLS-1$
- }
- }
-
- private void saveVDB(VDBMetaData vdb) {
- System.out.println("FIXME:VDB can not persisted to disk, changes temporary");
- }
-
public TransformationMetadata getMetadata(String vdbName, int vdbVersion) {
return this.vdbToQueryMetadata.get(new VDBKey(vdbName, vdbVersion));
}
@@ -138,15 +104,6 @@
public void addMetadata(VDBMetaData vdb, TransformationMetadata metadata) {
this.vdbToQueryMetadata.put(vdbId(vdb), metadata);
}
-
- public void updateCostMetadata(String vdbName, int vdbVersion, String modelName) {
- CompositeMetadataStore store = getMetadata(vdbName, vdbVersion).getMetadataStore();
- System.out.println("FIXME:Metadata can not persisted to disk, changes temporary");
- }
-
- public void updateCostMetadata(String vdbName, String vdbVersion, String objectName, String propertyName, String value) {
- System.out.println("FIXME:Metadata can not persisted to disk, changes temporary");
- }
public void addMetadataStore(VDBMetaData vdb, MetadataStore store) {
this.metadataStoreRepo.put(vdbId(vdb), store);
@@ -163,8 +120,6 @@
this.vdbToQueryMetadata.remove(key);
}
-
-
public Map<String, Datatype> getBuiltinDatatypes() {
Collection<Datatype> datatypes = getMetadataStore(CoreConstants.SYSTEM_VDB, 1).getDatatypes();
Map<String, Datatype> datatypeMap = new HashMap<String, Datatype>();
@@ -177,5 +132,5 @@
}
}
return datatypeMap;
- }
+ }
}
Modified: trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties
===================================================================
--- trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties 2010-03-27 20:35:57 UTC (rev 2005)
+++ trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties 2010-03-27 20:40:15 UTC (rev 2006)
@@ -281,7 +281,7 @@
validity_errors_in_vdb=VDB has validaity errors; failed to deploy - {0}
vdb_save_failed=Failed to save metadata for VDB {0}
vdb_delete_failed=Failed to delete the cached metadata files due to:
-vdb_deployed=VDB "{0}" deployed.
+vdb_deployed=VDB "{0}" deployed in {1} state.
vdb_undeployed=VDB "{0}" undeployed.
jndi_not_found=For {0}.{1} VDB, JNDI resource "{2}" not found for Source Name "{3}"
system_vdb_load_error=System.vdb needs to be loaded before any other VDBs.
14 years, 9 months
teiid SVN: r2005 - in trunk/console: src/main and 3 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-03-27 16:35:57 -0400 (Sat, 27 Mar 2010)
New Revision: 2005
Added:
trunk/console/src/main/resources/
trunk/console/src/main/resources/META-INF/
trunk/console/src/main/resources/META-INF/rhq-plugin.xml
Removed:
trunk/console/src/resources/embedded/
Modified:
trunk/console/pom.xml
Log:
TEIID-807: fixing the console build so that plugin is correctly deployed through build
Modified: trunk/console/pom.xml
===================================================================
--- trunk/console/pom.xml 2010-03-26 14:26:05 UTC (rev 2004)
+++ trunk/console/pom.xml 2010-03-27 20:35:57 UTC (rev 2005)
@@ -11,8 +11,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-console</artifactId>
<name>Console</name>
- <description>This project is for the RHQ plugin that supports the
- TEIID Console </description>
+ <description>This project is for the RHQ plugin that supports the TEIID Console </description>
<properties>
<!--
@@ -20,104 +19,11 @@
-->
<org.jboss.jopr.as5.version>1.2.0.GA</org.jboss.jopr.as5.version>
<org.rhq.version>1.3.0.GA</org.rhq.version>
-
<org.jboss.jopr.version>1.2.0.GA</org.jboss.jopr.version>
-
<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
- -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <!-- Specify the compiler options and settings -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- <showDeprecation>false</showDeprecation>
- <showWarnings>false</showWarnings>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-2</version>
- <configuration>
- <descriptors>
- <descriptor>src/assembly/binaries.xml</descriptor>
- </descriptors>
- <outputDirectory>target/distribution</outputDirectory>
- <workDirectory>target/assembly/work</workDirectory>
- </configuration>
- <executions>
- <execution>
- <id>make-assembly</id>
- <phase>package</phase>
- <goals>
- <goal>attached</goal>
- </goals>
- </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.artifactId}" />
- <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-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- <version>${apache.ant.version}</version>
- </dependency>
- </dependencies>
- </plugin>
-
- </plugins>
- </build>
-
<dependencies>
<!--
Below are the core modules that are required dependencies of all
Copied: trunk/console/src/main/resources/META-INF/rhq-plugin.xml (from rev 2001, trunk/console/src/resources/embedded/META-INF/rhq-plugin.xml)
===================================================================
--- trunk/console/src/main/resources/META-INF/rhq-plugin.xml (rev 0)
+++ trunk/console/src/main/resources/META-INF/rhq-plugin.xml 2010-03-27 20:35:57 UTC (rev 2005)
@@ -0,0 +1,358 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+ <!--
+ * JBoss, Home of Professional Open Source. * See the COPYRIGHT.txt
+ file distributed with this work for information * regarding copyright
+ ownership. Some portions may be licensed * to Red Hat, Inc. under one
+ or more contributor license agreements. * * This library is free
+ software; you can redistribute it and/or * modify it under the terms
+ of the GNU Lesser General Public * License as published by the Free
+ Software Foundation; either * version 2.1 of the License, or (at your
+ option) any later version. * * This library is distributed in the hope
+ that it will be useful, * but WITHOUT ANY WARRANTY; without even the
+ implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the GNU * Lesser General Public License for more details.
+ * * You should have received a copy of the GNU Lesser General Public *
+ License along with this library; if not, write to the Free Software *
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
+ 02110-1301 USA. */
+ -->
+
+<plugin name="TeiidPlugin" displayName="Teiid Plugin" package="org.teiid.rhq.plugin"
+ version="2.0.0" description="Supports management and monitoring of JBoss Teiid"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <depends plugin="JMX" />
+ <depends plugin="JBossAS5" useClasses="true" />
+
+ <server name="Data Services" description="JBoss Enterprise Data Services"
+ class="PlatformComponent" discovery="PlatformDiscoveryComponent"
+ singleton="true">
+
+ <runs-inside>
+ <parent-resource-type name="JBossAS Server"
+ plugin="JBossAS5" />
+ </runs-inside>
+
+ <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">
+ <results>
+ <c:list-property name="list">
+ <c:map-property name="map">
+ <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="SQL String"
+ name="getCommand" type="string" description="The SQL string for this query" />
+ <c:simple-property displayName="Source Request"
+ name="sourceRequest" type="string"
+ description="If false,this is the top level query. If true, this a physical source query." />
+ <c:simple-property displayName="Execution ID"
+ name="getExecutionId" type="string"
+ description="The execution id for this request (if this is a physical source query)" />
+ <c:simple-property displayName="Start Time"
+ name="getCreatedTime" type="string" description="The time this query began" />
+ <c:simple-property displayName="Start Time"
+ name="getProcessingTime" type="string" description="Processing time for this request" />
+ <c:simple-property displayName="Transaction ID"
+ name="getTransactionId" type="string"
+ description="The transaction XID if there is a transaction involved" />
+ <c:simple-property displayName="Node ID" name="getNodeId"
+ type="string" description="The node ID of this query" />
+ </c:map-property>
+ </c:list-property>
+ </results>
+ </operation>
+
+ <operation name="getSessions" displayName="View current sessions"
+ description="Get current sessions connected to the Teiid instance">
+ <results>
+
+ <c:list-property name="list" displayName="Current Sessions"
+ description="Sessions currently connected to the Teiid system"
+ required="false">
+ <c:map-property name="map">
+ <c:simple-property displayName="Session ID"
+ name="getSessionId" type="string" description="The identifier for this session" />
+ <c:simple-property displayName="Application Name"
+ name="getApplicationName" type="string"
+ description="The application associated with Session" />
+ <c:simple-property displayName="Created Time"
+ name="getCreatedTime" type="string" description="When the session was created" />
+ <c:simple-property displayName="Client Host"
+ name="getClientHostName" type="string"
+ description="Host name from where the session created" />
+ <c:simple-property displayName="IP Address"
+ name="getIPAddress" type="string"
+ description="IP address from where this session was created" />
+ <c:simple-property displayName="Last ping time"
+ name="getLastPingTime" type="string" description="Last ping time" />
+ <c:simple-property displayName="User Name" name="getUserName"
+ type="string" description="User associated with this session" />
+ <c:simple-property displayName="VDB Name" name="getVDBName"
+ type="string" description="VDB associated with this session" />
+ <c:simple-property displayName="Security Domain"
+ name="getSecurityDomain" type="string"
+ description="Security Domain that session logged into" />
+ </c:map-property>
+ </c:list-property>
+ </results>
+ </operation>
+
+ <operation name="getRequests" displayName="View current requests"
+ description="Get current requests executing against this Teiid instance">
+ <results>
+
+ <c:list-property name="list" displayName="Current Request"
+ description="Requests currently executing against the Teiid system"
+ required="false">
+ <c:map-property name="map">
+ <c:simple-property displayName="Request ID"
+ name="getRequestId" type="string" description="The request identifier" />
+ <c:simple-property displayName="Session ID"
+ name="getSessionId" type="string" description="Session identifier" />
+ <c:simple-property displayName="Execution ID"
+ name="getExecutionId" type="string" description="Unique Identifier for Request" />
+ <c:simple-property displayName="Created Time"
+ name="getCreatedTime" type="string" description="Time when request submitted" />
+ <c:simple-property displayName="Processing Time"
+ name="getProcessingTime" type="string" description="Processing time for the request" />
+ <c:simple-property displayName="Last ping time"
+ name="getCommand" type="string" description="SQL Command" />
+ <c:simple-property displayName="Connector level request?"
+ name="sourceRequest" type="string"
+ description="True if this is a connector level request" />
+ <c:simple-property displayName="Node ID" name="getNodeId"
+ type="string" description="The node identifier" />
+ <c:simple-property displayName="Tansaction identifier"
+ name="getTransactionId" type="string"
+ description="Transaction XID if a transaction is involved" />
+ </c:map-property>
+ </c:list-property>
+ </results>
+ </operation>
+
+ <operation name="cancelRequest" displayName="Terminate request"
+ description="Terminate the processing of a query and its source queries">
+ <parameters>
+ <c:simple-property displayName="Session ID" name="sessionID"
+ type="long" required="true"
+ description="The ID of the session that the request to cancel is associated with" />
+ <c:simple-property displayName="Request ID" name="requestID"
+ type="long" required="true" description="The ID of the request to cancel" />
+ </parameters>
+ </operation>
+
+ <operation name="terminateSession" displayName="Terminate Session"
+ description="Terminate a specified session">
+ <parameters>
+ <c:simple-property displayName="SessionID" name="sessionID"
+ type="long" required="true" description="The ID of the session to terminate" />
+ </parameters>
+ </operation>
+
+ <metric displayName="Query Count" defaultOn="true" displayType="detail"
+ category="throughput" property="queryCount"
+ description="The number of queries for a given point in time" />
+
+ <metric displayName="Long Running Queries" defaultOn="true"
+ displayType="detail" category="performance" property="longRunningQueries"
+ description="The number of queries that have been running longer than the limit set for queries." />
+
+ <metric displayName="Session Count" defaultOn="true"
+ displayType="detail" 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" required="true" 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>
+
+ <service name="Virtual Database (VDB)s"
+ description="JBoss Enterprise Data Services Virtual Databases" class="VDBComponent"
+ discovery="VDBDiscoveryComponent" createDeletePolicy="both"
+ creationDataType="content">
+
+ <operation name="getSessions" displayName="View VDB Sessions"
+ description="Get current sessions currently connected to this VDB">
+ <results>
+
+ <c:list-property name="list" displayName="Current VDB Sessions"
+ description="Sessions currently connected to this VDB" required="false">
+ <c:map-property name="map">
+ <c:simple-property displayName="Session ID"
+ name="getSessionId" type="string" description="The identifier for this session" />
+ <c:simple-property displayName="Application Name"
+ name="getApplicationName" type="string"
+ description="The application associated with Session" />
+ <c:simple-property displayName="Created Time"
+ name="getCreatedTime" type="string" description="When the session was created" />
+ <c:simple-property displayName="Client Host"
+ name="getClientHostName" type="string"
+ description="Host name from where the session created" />
+ <c:simple-property displayName="IP Address"
+ name="getIPAddress" type="string"
+ description="IP address from where this session was created" />
+ <c:simple-property displayName="Last ping time"
+ name="getLastPingTime" type="string" description="Last ping time" />
+ <c:simple-property displayName="User Name"
+ name="getUserName" type="string" description="User associated with this session" />
+ <c:simple-property displayName="Security Domain"
+ name="getSecurityDomain" type="string"
+ description="Security Domain that session logged into" />
+ </c:map-property>
+ </c:list-property>
+ </results>
+ </operation>
+
+ <operation name="getRequests" displayName="View VDB requests"
+ description="Get current requests executing against this VDB">
+ <results>
+
+ <c:list-property name="list" displayName="Current Request"
+ description="Requests currently executing against the Teiid system"
+ required="false">
+ <c:map-property name="map">
+ <c:simple-property displayName="Request ID"
+ name="getRequestId" type="string" description="The request identifier" />
+ <c:simple-property displayName="Session ID"
+ name="getSessionId" type="string" description="Session identifier" />
+ <c:simple-property displayName="Execution ID"
+ name="getExecutionId" type="string" description="Unique Identifier for Request" />
+ <c:simple-property displayName="Created Time"
+ name="getCreatedTime" type="string" description="Time when request submitted" />
+ <c:simple-property displayName="Processing Time"
+ name="getProcessingTime" type="string" description="Processing time for the request" />
+ <c:simple-property displayName="Last ping time"
+ name="getCommand" type="string" description="SQL Command" />
+ <c:simple-property displayName="Connector level request?"
+ name="sourceRequest" type="string"
+ description="True if this is a connector level request" />
+ <c:simple-property displayName="Node ID" name="getNodeId"
+ type="string" description="The node identifier" />
+ <c:simple-property displayName="Tansaction identifier"
+ name="getTransactionId" type="string"
+ description="Transaction XID if a transaction is involved" />
+ </c:map-property>
+ </c:list-property>
+ </results>
+ </operation>
+
+ <metric displayName="Status" defaultOn="true" dataType="trait" displayType="summary"
+ category="availability" property="status"
+ 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"/>
+ <c:simple-property name="version" type="string"
+ description="The Virtual Database Version" required="false"/>
+ <c:simple-property name="description" type="string"
+ description="The Virtual Database Description" required="false"/>
+ <c:simple-property name="status" type="string"
+ 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:simple-property name="url" type="string"
+ 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: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"/>
+ <c:simple-property name="visibility"
+ 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>
+ </c:map-property>
+ </c:list-property>
+ <c:list-property name="logicalModels" 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" />
+ <c:simple-property name="type" displayName="Type"
+ 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>
+ </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:map-property name="errorMap" summary="true">
+ <c:simple-property name="severity" displayName="Severity"
+ description="Severity" readOnly="true" summary="true"/>
+ <c:simple-property name="message" displayName="Message"
+ 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>
+
+ </server>
+
+</plugin>
\ No newline at end of file
Property changes on: trunk/console/src/main/resources/META-INF/rhq-plugin.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 9 months
teiid SVN: r2004 - in trunk/build/kit-jboss-container: teiid-examples/sample-connector-bindings and 1 other directory.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-03-26 10:26:05 -0400 (Fri, 26 Mar 2010)
New Revision: 2004
Modified:
trunk/build/kit-jboss-container/conf/props/teiid-security-roles.properties
trunk/build/kit-jboss-container/conf/props/teiid-security-users.properties
trunk/build/kit-jboss-container/teiid-examples/sample-connector-bindings/oracle-connector-ds.xml
trunk/build/kit-jboss-container/teiid-examples/sample-connector-bindings/text-connector-ds.xml
Log:
TEIID-833: changes from testing
Modified: trunk/build/kit-jboss-container/conf/props/teiid-security-roles.properties
===================================================================
--- trunk/build/kit-jboss-container/conf/props/teiid-security-roles.properties 2010-03-25 22:08:37 UTC (rev 2003)
+++ trunk/build/kit-jboss-container/conf/props/teiid-security-roles.properties 2010-03-26 14:26:05 UTC (rev 2004)
@@ -2,4 +2,3 @@
# username=role1,role1.
# allowed teiid admin roles (Admin.SystemAdmin, Admin.ProductAdmin, Admin.ReadOnlyAdmin)
admin=Admin.SystemAdmin
-ramesh=Admin.SystemAdmin
Modified: trunk/build/kit-jboss-container/conf/props/teiid-security-users.properties
===================================================================
--- trunk/build/kit-jboss-container/conf/props/teiid-security-users.properties 2010-03-25 22:08:37 UTC (rev 2003)
+++ trunk/build/kit-jboss-container/conf/props/teiid-security-users.properties 2010-03-26 14:26:05 UTC (rev 2004)
@@ -1,4 +1,3 @@
# A users.properties file for use with the UsersRolesLoginModule
# username=password
admin=teiid
-ramesh=mm
Modified: trunk/build/kit-jboss-container/teiid-examples/sample-connector-bindings/oracle-connector-ds.xml
===================================================================
--- trunk/build/kit-jboss-container/teiid-examples/sample-connector-bindings/oracle-connector-ds.xml 2010-03-25 22:08:37 UTC (rev 2003)
+++ trunk/build/kit-jboss-container/teiid-examples/sample-connector-bindings/oracle-connector-ds.xml 2010-03-26 14:26:05 UTC (rev 2004)
@@ -3,7 +3,7 @@
<connection-factories>
<no-tx-connection-factory>
<jndi-name>oracle-connector</jndi-name>
- <rar-name>connector-jdbc-{project.version}.rar</rar-name>
+ <rar-name>connector-jdbc-${project.version}.rar</rar-name>
<connection-definition>org.teiid.connector.api.Connector</connection-definition>
<!--
Modified: trunk/build/kit-jboss-container/teiid-examples/sample-connector-bindings/text-connector-ds.xml
===================================================================
--- trunk/build/kit-jboss-container/teiid-examples/sample-connector-bindings/text-connector-ds.xml 2010-03-25 22:08:37 UTC (rev 2003)
+++ trunk/build/kit-jboss-container/teiid-examples/sample-connector-bindings/text-connector-ds.xml 2010-03-26 14:26:05 UTC (rev 2004)
@@ -4,7 +4,7 @@
<no-tx-connection-factory>
<jndi-name>text-connector</jndi-name>
- <rar-name>connector-text-{project.version}.rar</rar-name>
+ <rar-name>connector-text-${project.version}.rar</rar-name>
<connection-definition>org.teiid.connector.api.Connector</connection-definition>
<!--
@@ -12,6 +12,8 @@
file mentioned above.
-->
<config-property name="XaCapable" type="java.lang.Boolean">false</config-property>
+
+ <!-- Provide a fully qualified path to the text descriptor file -->
<config-property name="DescriptorFile" type="java.lang.String">${jboss.server.home.dir}/teiid-examples/portfolio/marketdata-def.txt</config-property>
</no-tx-connection-factory>
14 years, 9 months
teiid SVN: r2003 - trunk/documentation/quick-start-example/src/main/docbook/en-US/content.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-03-25 18:08:37 -0400 (Thu, 25 Mar 2010)
New Revision: 2003
Modified:
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/buildvdb.xml
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/connect-vdb.xml
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/deployment.xml
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/download.xml
Log:
TEIID-833: fixing the quick start for 7.0 changes
Modified: trunk/documentation/quick-start-example/src/main/docbook/en-US/content/buildvdb.xml
===================================================================
--- trunk/documentation/quick-start-example/src/main/docbook/en-US/content/buildvdb.xml 2010-03-25 20:13:40 UTC (rev 2002)
+++ trunk/documentation/quick-start-example/src/main/docbook/en-US/content/buildvdb.xml 2010-03-25 22:08:37 UTC (rev 2003)
@@ -24,8 +24,8 @@
<sect1 id="step-3">
<title>Building a VDB</title>
<para>Once you start the Designer, there are several steps you must perform to create a VDB. These steps are
- summarized in the following table. There is a video at the end of the
- list that will take you though all the steps involved.</para>
+ summarized in the following table. This is a <ulink url="../images/EmbeddedDesignerExampleVideo.swf">video</ulink>
+ will take you though all the steps involved. (please note this video is based on old version of Designer, a updated one coming soon..)</para>
<orderedlist>
<listitem>
<para>Switch to the Designer Perspective, by opening the "Window->Open Perspective.."</para>
@@ -61,16 +61,5 @@
<para>Export or copy the VDB for use in your application.</para>
</listitem>
</orderedlist>
- <!--
- <center>
- <OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="802" HEIGHT="687" CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0">
- <PARAM NAME=movie VALUE="EmbeddedDesignerExampleVideo.swf">
- <PARAM NAME=play VALUE=true>
- <PARAM NAME=loop VALUE=false>
- <PARAM NAME=quality VALUE=low>
- <EMBED SRC="../images/EmbeddedDesignerExampleVideo.swf" WIDTH=802 HEIGHT=687 quality=low loop=false TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=Sh..."></EMBED>
- </OBJECT>
- </center>
- -->
</sect1>
</chapter>
\ No newline at end of file
Modified: trunk/documentation/quick-start-example/src/main/docbook/en-US/content/connect-vdb.xml
===================================================================
--- trunk/documentation/quick-start-example/src/main/docbook/en-US/content/connect-vdb.xml 2010-03-25 20:13:40 UTC (rev 2002)
+++ trunk/documentation/quick-start-example/src/main/docbook/en-US/content/connect-vdb.xml 2010-03-25 22:08:37 UTC (rev 2003)
@@ -4,29 +4,26 @@
<title>Connecting to a VDB through JDBC</title>
<para>At this point you have deployed Teiid and your VDB. Now it's time to connect the sample application
to this VDB, issue SQL queries, and view the returned, integrated data. Note that
- this process is no different than connecting to any other JDBC source.</para>
+ this process is no different than connecting to any other JDBC source like Oracle.</para>
<sect1>
<title>Stand-alone Java Application Deployment</title>
<para>
For a Java application to connect to a JDBC source, it needs a URL, user-id, and password. To
connect to your VDB all you need is a URL and any additional optional properties that you would like to set.
- Teiid defaults to allowing the admin user with password teiid. Additional user accounts can be added through
- Teiid extensible MembershipDomain mechanism. A JDBC connection can be obtained through the Teiid driver
+ Teiid defaults to allowing the "admin" as user with password as "teiid". Additional user accounts can be added.
+ A JDBC connection can be obtained through the Teiid driver
<emphasis>"org.teiid.jdbc.TeiidDriver"</emphasis>
with the URL syntax of
</para>
<para>
- <emphasis>jdbc:teiid:<VDB-Name>@((mm|mms)://<host name>:<port>)|(<path to deploy.properties>)</emphasis>
+ <emphasis>jdbc:teiid:<VDB-Name>@(mm|mms)://<host name>:<port></emphasis>
</para>
- <para>When the path to deploy.properties is specified Teiid operates in
- embedded mode and runs in the same VM as the application.
- </para>
<para>
You can add optional properties at the end of the URL using a semi-colon(;) name=value
format. For example</para>
<para />
<para>
- <emphasis>jdbc:metamatrix:<VDB-Name>;dqp.logFile=/home/query.log</emphasis>
+ <emphasis>jdbc:teiid:<VDB-Name>@(mm|mms)://<host name>:<port>;autoCommitTxn=DETECT</emphasis>
</para>
<para />
<para>
@@ -87,7 +84,7 @@
To execute this demonstration, follow these steps:</para>
<orderedlist numeration="arabic">
<listitem><para>Ensure Derby is running</para></listitem>
- <listitem><para>Change to the /examples/portfolio directory within your Teiid installation</para></listitem>
+ <listitem><para>Change to the ${jboss-install}/server/profile/teiid-examples/portfolio directory</para></listitem>
<listitem><para>Execute the run script (either for Linux or Windows)</para></listitem>
</orderedlist>
<para>The sample query, "select * from CustomerAccount", queries the view model and, from that, queries the two underlying
@@ -101,6 +98,8 @@
<para>If your application is Web based, you can also deploy Teiid in an application server
and treat it as any other JDBC source by creating a connection pool with the
<emphasis>org.teiid.jdbc.TeiidDataSource</emphasis> and assigning it a JNDI name.
- Refer to <ulink url="https://www.jboss.org/community/docs/DOC-13183">deployment to application server</ulink> for more information.</para>
+ Refer to <ulink url="https://community.jboss.org/docs/DOC-13888">deployment to application server</ulink> for more information.
+ </para>
+ <note><para>"embedded" mode is only available in versions of Teiid up to 6.2</para></note>
</sect1>
</chapter>
\ No newline at end of file
Modified: trunk/documentation/quick-start-example/src/main/docbook/en-US/content/deployment.xml
===================================================================
--- trunk/documentation/quick-start-example/src/main/docbook/en-US/content/deployment.xml 2010-03-25 20:13:40 UTC (rev 2002)
+++ trunk/documentation/quick-start-example/src/main/docbook/en-US/content/deployment.xml 2010-03-25 22:08:37 UTC (rev 2003)
@@ -2,16 +2,7 @@
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="deployment">
<title>Deployment</title>
- <para> Having built the VDB, it must be deployed so it can be access through a JDBC connection.
- Note there are two steps involved in this deployment:</para>
- <orderedlist>
- <listitem>
- <para>Deploying Teiid</para>
- </listitem>
- <listitem>
- <para>Deploying a VDB</para>
- </listitem>
- </orderedlist>
+ <para> Having built the VDB, it must be deployed so it can be access through a JDBC connection.</para>
<para> Teiid is typically used in one of two manners:</para>
<itemizedlist>
<listitem>
@@ -33,11 +24,34 @@
<title>Stand-alone Application Deployment</title>
<orderedlist>
<listitem>
- <para>Add the "${teiid.home}/client/teiid-${version}-client.jar" to your application classpath</para>
+ <para>Add the "${jboss-install}/server/${profile}/lib/teiid-${version}-client.jar" to your application classpath</para>
</listitem>
<listitem>
- <para>Place your VDB in a the "${teiid.home}/deploy".
+ <para>
+ Before we can deploy the VDB to the server, we need to create and deploy the required Connector Bindings for Derby
+ and File sources. Connector bindings are JCA sources that provide the data then their data is integrated through Teiid. If you are
+ familiar with creating data sources or connection factories in JBoss AS, then this is exactly the same operation.
</para>
+
+ <para>For this example we need to create three (3) different data sources. You would first need to create a data source to Derby.
+ See ${teiid-examples}/portfolio/PortfolioModel/portfolio-ds.xml.
+ Then create Teiid specific connectors to Derby and File sources.
+ See ${teiid-examples}/portfolio/PortfolioModel/derby-connector-ds.xml
+ and ${teiid-examples}/portfolio/PortfolioModel/text-connector-ds.xml</para>
+
+ <para>The reason we created a data source and also a connector binding for Derby is, the data source provides a
+ JDBC connection to the portfolio database, and the connector binding provides a Teiid wrapper around
+ data source that understands execution and query translation defined by the Teiid runtime. The concerns about the
+ connection and Teiid access are separated into two different sources. So, the data source can be used by any other application
+ however the Teid connector is only used by the Teiid. This will be case for any JDBC
+ based sources. The same is not true for File source, because File Connector can access the resource directly itself.</para>
+ <para>To deploy these connector bindings copy the "-ds.xml" files into "${jboss-install}/server/{profile}/deploy" directory.
+ Make sure they are started correctly and you have supplied correct credentials for data source. </para>
+ </listitem>
+ <listitem>
+ <para>Place your VDB in a the "${jboss-install}/server/{profile}/deploy" directory. If the JBoss AS is not already
+ started, start by running the "${jboss-install}/bin/run.sh" or "${jboss-install}/bin/run.bat" scripts.
+ </para>
</listitem>
<listitem>
<para>
Modified: trunk/documentation/quick-start-example/src/main/docbook/en-US/content/download.xml
===================================================================
--- trunk/documentation/quick-start-example/src/main/docbook/en-US/content/download.xml 2010-03-25 20:13:40 UTC (rev 2002)
+++ trunk/documentation/quick-start-example/src/main/docbook/en-US/content/download.xml 2010-03-25 22:08:37 UTC (rev 2003)
@@ -20,26 +20,20 @@
</listitem>
</orderedlist>
<para>
- For this Quick Start, download the
- <emphasis>Teiid Kit</emphasis>
- and extract this tar/zip file to a directory you can access.
+ For this Quick Start, download and install <ulink url="http://www.jboss.org/jbossas/downloads.html">JBoss AS 5.1.0</ulink>.
+ Then download <emphasis>Teiid</emphasis> runtime and unzip the contents of the Teiid under any of one of the JBoss AS profiles
+ like "default" or "all". For example in "<jboss-install>/server/default". The Teiid runtime directory structure matches that
+ of the JBoss profile directly, so you can just overlay the needed classes.
</para>
- <para>In the expanded directory, you will find "client/teiid-${version}-client.jar", which is the main client binary jar
- file for Teiid, and the "lib" and "extension" directories containing binaries either directly or indirectly
- required to execute Teiid. Later sections describe installing these artifacts.</para>
+ <para>In the "<jboss-install>/server/<profile>/lib" directory, you will find "teiid-${version}-client.jar", which
+ is the main client binary jar file for Teiid. This jar file contains the Teiid's JDBC driver and data source classes. </para>
<note>
- <para>Teiid requires <ulink url="http://java.sun.com/javase/downloads">Java 6</ulink> to run.
+ <para>JBoss AS requires <ulink url="http://java.sun.com/javase/downloads">Java 6</ulink> to run.
</para>
<para>
Access to physical data sources such as Oracle, MS-SQL Server, DB2, and Sybase through Teiid relies upon
- the user supplying their own JDBC drivers in the deployment. Teiid
- has been tested extensively with
- <ulink url="http://www.datadirect.com">DataDirect</ulink>
- If you have access to these JDBC drivers, we recommend their use.
+ the user supplying their own JDBC drivers in the deployment. Copy the JDBC driver files into
+ "<jboss-install>/server/<profile>/lib" before you create any data sources.
</para>
- <!--
- <para>Free open source software JDBC drivers for MySQL, Postgres,and Derby are included in the "lib" folder as the LGPL
- license permits them to be included with the Teiid kit.</para>
- -->
</note>
</chapter>
\ No newline at end of file
14 years, 9 months