teiid SVN: r2518 - in branches/7.1.x: runtime/src/main/java/org/teiid/transport and 1 other directory.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-09-01 17:46:44 -0400 (Wed, 01 Sep 2010)
New Revision: 2518
Modified:
branches/7.1.x/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml
branches/7.1.x/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java
Log:
TEIID-1235: Fixed the address binding issue with 0.0.0.0, also made the configuration open such that user can add the host address separate from the JBoss AS configuration. by default it chooses same bind address defined for JBoss AS
Modified: branches/7.1.x/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml
===================================================================
--- branches/7.1.x/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml 2010-09-01 20:28:35 UTC (rev 2517)
+++ branches/7.1.x/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml 2010-09-01 21:46:44 UTC (rev 2518)
@@ -111,7 +111,7 @@
<!-- JDBC Socket connection properties (SSL see below) -->
<bean name="JdbcSocketConfiguration" class="org.teiid.transport.SocketConfiguration">
<property name="enabled">true</property>
- <!-- property name="bindAddress">localhost</property-->
+ <property name="bindAddress">${jboss.bind.address}</property>
<property name="portNumber">31000</property>
<!-- Max number of threads dedicated to initial request processing (default 15) -->
<property name="maxSocketThreads">15</property>
@@ -139,7 +139,7 @@
<!-- Admin Socket connection settings (SSL see below) -->
<bean name="AdminSocketConfiguration" class="org.teiid.transport.SocketConfiguration">
<property name="enabled">true</property>
- <!-- property name="bindAddress">localhost</property-->
+ <property name="bindAddress">${jboss.bind.address}</property>
<property name="portNumber">31443</property>
<!-- Max number of threads dedicated to Admin and initial request processing (default 4) -->
<property name="maxSocketThreads">4</property>
@@ -167,7 +167,7 @@
<!-- JDBC Socket connection properties (SSL see below) -->
<bean name="OdbcSocketConfiguration" class="org.teiid.transport.SocketConfiguration">
<property name="enabled">true</property>
- <!-- property name="bindAddress">localhost</property-->
+ <property name="bindAddress">${jboss.bind.address}</property>
<property name="portNumber">35432</property>
<!-- Max number of threads dedicated to initial request processing (default 15) -->
<property name="maxSocketThreads">15</property>
Modified: branches/7.1.x/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java
===================================================================
--- branches/7.1.x/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java 2010-09-01 20:28:35 UTC (rev 2517)
+++ branches/7.1.x/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java 2010-09-01 21:46:44 UTC (rev 2518)
@@ -33,8 +33,6 @@
@ManagementObject(componentType=@ManagementComponent(type="teiid",subtype="dqp"), properties=ManagementProperties.EXPLICIT)
public class SocketConfiguration {
- private static final String ANY = "0.0.0.0"; //$NON-NLS-1$
- private static final String JBOSS_SERVER_BIND_ADDRESS = "jboss.bind.address";
private int outputBufferSize;
private int inputBufferSize;
@@ -72,13 +70,8 @@
private void resolveHostName() {
try {
- // if host name not specified try to get it from the JBoss configuration
- if (this.hostName == null) {
- this.hostName = System.getProperty(JBOSS_SERVER_BIND_ADDRESS);
- }
-
// if not defined then see if can bind to local address; if supplied resolve it by name
- if (this.hostName == null || ANY.equals(this.hostName)) {
+ if (this.hostName == null) {
this.hostName = InetAddress.getLocalHost().getHostName();
}
} catch (UnknownHostException e) {
@@ -117,6 +110,7 @@
public InetAddress getHostAddress() {
resolveHostName();
+
if (this.hostAddress != null) {
return hostAddress;
}
14 years, 3 months
teiid SVN: r2517 - in branches/7.1.x/documentation/admin-guide/src/main/docbook/en-US: content and 1 other directory.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-09-01 16:28:35 -0400 (Wed, 01 Sep 2010)
New Revision: 2517
Added:
branches/7.1.x/documentation/admin-guide/src/main/docbook/en-US/content/clustering.xml
Modified:
branches/7.1.x/documentation/admin-guide/src/main/docbook/en-US/admin_guide.xml
Log:
TEIID-1104: adding documentation about clustering in Teiid.
Modified: branches/7.1.x/documentation/admin-guide/src/main/docbook/en-US/admin_guide.xml
===================================================================
--- branches/7.1.x/documentation/admin-guide/src/main/docbook/en-US/admin_guide.xml 2010-09-01 17:53:53 UTC (rev 2516)
+++ branches/7.1.x/documentation/admin-guide/src/main/docbook/en-US/admin_guide.xml 2010-09-01 20:28:35 UTC (rev 2517)
@@ -49,6 +49,7 @@
<xi:include href="content/vdb-deployment.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/security.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/logging.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="content/clustering.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/admin-console.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/adminshell.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/appendix-a.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
Added: branches/7.1.x/documentation/admin-guide/src/main/docbook/en-US/content/clustering.xml
===================================================================
--- branches/7.1.x/documentation/admin-guide/src/main/docbook/en-US/content/clustering.xml (rev 0)
+++ branches/7.1.x/documentation/admin-guide/src/main/docbook/en-US/content/clustering.xml 2010-09-01 20:28:35 UTC (rev 2517)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<chapter id="clustering">
+ <title>Clustering in Teiid</title>
+ <para>Since Teiid is installed in JBoss AS, there is no separate configuration needed on the part of the user to cluster the Teiid instances.
+ To cluster JBoss AS instances use these <ulink url="http://www.jboss.org/jbossas/docs/5-x.html">instructions</ulink> then Teiid instances
+ are clustered as well. Just make sure that you installed Teiid in every JBoss AS node before starting the cluster.
+ There is one specific configuration that needs to be done for enabling the replicated (distributed) cache in Teiid.
+ To enable distributed cache rename "<jboss-as>/server/<profile>/deploy/teiid/teiid-cache-manager-jboss-beans-rename-me.xml" file
+ to "<jboss-as>/server/<profile>/deploy/teiid/teiid-cache-manager-jboss-beans.xml".
+ </para>
+
+ <para>
+ Typically users create clusters to improve the performance of the system through
+ <orderedlist>
+ <listitem> <para>Load Balancing: Take look at the Client developers guide on how to use load balancing between multiple nodes.</para> </listitem>
+ <listitem> <para>Fail Over: Take look at the Client developers guide on how to use fail over between multiple nodes.</para> </listitem>
+ <listitem> <para>Distributed Caching: This is automatically done for you once you configure it as specified above. </para> </listitem>
+ </orderedlist>
+ </para>
+
+ <para>If would like a clustered deployment of the VDB and data-source artifacts, i.e. deploy artifacts to a central
+ location and let the system propagate deployments every where, then look into
+ <ulink url="http://community.jboss.org/wiki/JBossFarmDeployment">JBoss Farm Deployment</ulink>. Note that this only supports hot deployments.
+ Take look at some commonly asked questions <ulink url="http://community.jboss.org/wiki/JoinTheClusterBeforeUpdatingTheFarmDirectory">here</ulink>.
+ If you need more fine grained control, you can use script based deployment, where you control the deployment of artifacts into each node, or
+ JBoss AS "deploy" folder can be configured as a <emphasis>shared</emphasis> folder among all the clustered JBoss AS nodes to achieve farming.</para>
+
+</chapter>
\ No newline at end of file
Property changes on: branches/7.1.x/documentation/admin-guide/src/main/docbook/en-US/content/clustering.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 3 months
teiid SVN: r2516 - in branches/7.1.x/client/src/main/java/org/teiid: client/util and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-09-01 13:53:53 -0400 (Wed, 01 Sep 2010)
New Revision: 2516
Modified:
branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java
branches/7.1.x/client/src/main/java/org/teiid/client/util/ExceptionHolder.java
Log:
updating exception holder to ignore all errors when attempting to load from bytes
Modified: branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java
===================================================================
--- branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java 2010-09-01 17:26:12 UTC (rev 2515)
+++ branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java 2010-09-01 17:53:53 UTC (rev 2516)
@@ -45,7 +45,6 @@
import org.teiid.adminapi.Translator;
import org.teiid.adminapi.VDB;
import org.teiid.adminapi.impl.ModelMetaData.ValidationError;
-import org.teiid.core.util.FileUtils;
import org.teiid.core.util.StringUtil;
Modified: branches/7.1.x/client/src/main/java/org/teiid/client/util/ExceptionHolder.java
===================================================================
--- branches/7.1.x/client/src/main/java/org/teiid/client/util/ExceptionHolder.java 2010-09-01 17:26:12 UTC (rev 2515)
+++ branches/7.1.x/client/src/main/java/org/teiid/client/util/ExceptionHolder.java 2010-09-01 17:53:53 UTC (rev 2516)
@@ -173,14 +173,14 @@
}
}
- private Throwable readFromByteArray(byte[] contents) throws IOException {
+ private Throwable readFromByteArray(byte[] contents) {
// only for top level we would have the contents as not null.
if (contents != null) {
ByteArrayInputStream bais = new ByteArrayInputStream(contents);
- ObjectInputStream ois = new ObjectInputStreamWithClassloader(bais, ExceptionHolder.class.getClassLoader());
try {
+ ObjectInputStream ois = new ObjectInputStreamWithClassloader(bais, ExceptionHolder.class.getClassLoader());
return (Throwable)ois.readObject();
- } catch (ClassNotFoundException e) {
+ } catch (Exception e) {
//
}
}
14 years, 3 months
teiid SVN: r2515 - in branches/7.1.x: runtime/src/test/java/org/teiid/deployers and 1 other directory.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-09-01 13:26:12 -0400 (Wed, 01 Sep 2010)
New Revision: 2515
Modified:
branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/VDBTranslatorMetaData.java
branches/7.1.x/runtime/src/test/java/org/teiid/deployers/TestTranslatorMetadata.java
Log:
TEIID-1214: Adding facility to add description field through the XML file. We can add to the template file too, but we currently do not allow uses to create translators thru admi api, so this is not needed.
Modified: branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/VDBTranslatorMetaData.java
===================================================================
--- branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/VDBTranslatorMetaData.java 2010-09-01 17:02:49 UTC (rev 2514)
+++ branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/VDBTranslatorMetaData.java 2010-09-01 17:26:12 UTC (rev 2515)
@@ -93,6 +93,7 @@
return this.description;
}
+ @XmlAttribute(name = "description", required = true)
public void setDescription(String desc) {
this.description = desc;
}
Modified: branches/7.1.x/runtime/src/test/java/org/teiid/deployers/TestTranslatorMetadata.java
===================================================================
--- branches/7.1.x/runtime/src/test/java/org/teiid/deployers/TestTranslatorMetadata.java 2010-09-01 17:02:49 UTC (rev 2514)
+++ branches/7.1.x/runtime/src/test/java/org/teiid/deployers/TestTranslatorMetadata.java 2010-09-01 17:26:12 UTC (rev 2515)
@@ -48,6 +48,7 @@
tm.setExecutionFactoryClass(ExecutionFactory.class);
tm.setName("Oracle");
+ tm.setDescription("desc");
tm.addProperty("ExtensionTranslationClassName", "org.teiid.translator.jdbc.oracle.OracleSQLTranslator");
JAXBContext jc = JAXBContext.newInstance(new Class<?>[] {TranslatorMetaDataGroup.class});
@@ -65,6 +66,7 @@
tm = group.getTranslators().get(0);
assertEquals("Oracle", tm.getName());
+ assertEquals("desc", tm.getDescription());
assertEquals(ExecutionFactory.class.getName(), tm.getPropertyValue(Translator.EXECUTION_FACTORY_CLASS));
assertEquals("org.teiid.translator.jdbc.oracle.OracleSQLTranslator", tm.getPropertyValue("ExtensionTranslationClassName"));
14 years, 3 months
teiid SVN: r2514 - in branches/7.1.x: client/src/main/java/org/teiid/adminapi/impl and 26 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-09-01 13:02:49 -0400 (Wed, 01 Sep 2010)
New Revision: 2514
Modified:
branches/7.1.x/api/src/main/java/org/teiid/translator/Translator.java
branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/VDBTranslatorMetaData.java
branches/7.1.x/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooExecutionFactory.java
branches/7.1.x/connectors/translator-file/src/main/java/org/teiid/translator/file/FileExecutionFactory.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionFactory.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SimpleJDBCExecutionFactory.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/access/AccessExecutionFactory.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/DB2ExecutionFactory.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/derby/DerbyExecutionFactory.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/h2/H2ExecutionFactory.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/hsql/HsqlExecutionFactory.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/informix/InformixExecutionFactory.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mm/MetaMatrixExecutionFactory.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeExecutionFactory.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5ExecutionFactory.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQLExecutionFactory.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLExecutionFactory.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerExecutionFactory.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sybase/SybaseExecutionFactory.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teiid/TeiidExecutionFactory.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teradata/TeradataExecutionFactory.java
branches/7.1.x/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPExecutionFactory.java
branches/7.1.x/connectors/translator-loopback/src/main/java/org/teiid/translator/loopback/LoopbackExecutionFactory.java
branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/SalesForceExecutionFactory.java
branches/7.1.x/connectors/translator-ws/src/main/java/org/teiid/translator/ws/WSExecutionFactory.java
branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/TranslatorComponent.java
branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/TranslatorDiscoveryComponent.java
branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/util/PluginConstants.java
branches/7.1.x/console/src/main/resources/META-INF/rhq-plugin.xml
branches/7.1.x/runtime/src/main/java/org/teiid/deployers/TranslatorAnnotationScanningDeployer.java
Log:
TEIID-1214: Adding description field to every translator. Also made sure this description is shown in the JOPR tool.
Modified: branches/7.1.x/api/src/main/java/org/teiid/translator/Translator.java
===================================================================
--- branches/7.1.x/api/src/main/java/org/teiid/translator/Translator.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/api/src/main/java/org/teiid/translator/Translator.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -37,4 +37,5 @@
*/
public @interface Translator {
String name();
+ String description() default "";
}
Modified: branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/VDBTranslatorMetaData.java
===================================================================
--- branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/VDBTranslatorMetaData.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/VDBTranslatorMetaData.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -42,6 +42,7 @@
private static final long serialVersionUID = -3454161477587996138L;
private String type;
private Class executionClass;
+ private String description;
@Override
@ManagementProperty(description="Name of the Translator", mandatory = true)
@@ -85,5 +86,14 @@
public void setExecutionFactoryClass(Class clazz) {
this.executionClass = clazz;
addProperty(EXECUTION_FACTORY_CLASS, clazz.getName());
- }
+ }
+
+ @ManagementProperty(description="Translator Description")
+ public String getDescription() {
+ return this.description;
+ }
+
+ public void setDescription(String desc) {
+ this.description = desc;
+ }
}
Modified: branches/7.1.x/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -37,7 +37,7 @@
import org.teiid.translator.ResultSetExecution;
import org.teiid.translator.Translator;
import org.teiid.translator.TranslatorException;
-@Translator(name="yahoo")
+@Translator(name="yahoo", description="A translator for testing to obtain stock quotes from Yahoo web site")
public class YahooExecutionFactory extends ExecutionFactory<Object, Object> {
public static final int YAHOO_MAX_SET_SIZE = 100;
Modified: branches/7.1.x/connectors/translator-file/src/main/java/org/teiid/translator/file/FileExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-file/src/main/java/org/teiid/translator/file/FileExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-file/src/main/java/org/teiid/translator/file/FileExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -61,7 +61,7 @@
import org.teiid.translator.TranslatorProperty;
import org.teiid.translator.TypeFacility;
-@Translator(name="file")
+@Translator(name="file", description="File Translator, reads contents of files or writes to them")
public class FileExecutionFactory extends ExecutionFactory<ConnectionFactory, FileConnection> {
private final class FileProcedureExecution implements ProcedureExecution {
Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -77,7 +77,7 @@
/**
* JDBC implementation of Connector interface.
*/
-@Translator(name="jdbc-ansi")
+@Translator(name="jdbc-ansi", description="JDBC ANSI translator, can used with any ANSI compatible JDBC Driver")
public class JDBCExecutionFactory extends ExecutionFactory<DataSource, Connection> {
public static final int DEFAULT_MAX_IN_CRITERIA = 1000;
Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SimpleJDBCExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SimpleJDBCExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SimpleJDBCExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -33,7 +33,7 @@
* This capabilities class may come in handy for testing and for
* sources that support JDBC but don't support extended JDBC capabilities.
*/
-@Translator(name="jdbc-simple")
+@Translator(name="jdbc-simple", description="An extended JDBC ANSI translator with some simple capabilities")
public class SimpleJDBCExecutionFactory extends JDBCExecutionFactory {
public SimpleJDBCExecutionFactory() {
Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/access/AccessExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/access/AccessExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/access/AccessExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -33,7 +33,7 @@
import org.teiid.translator.jdbc.JDBCExecutionFactory;
import org.teiid.translator.jdbc.sybase.SybaseExecutionFactory;
-@Translator(name="access")
+@Translator(name="access", description="A translator for Microsoft Access Database")
public class AccessExecutionFactory extends SybaseExecutionFactory {
public AccessExecutionFactory() {
Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/DB2ExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/DB2ExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/DB2ExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -47,7 +47,7 @@
import org.teiid.translator.jdbc.LocateFunctionModifier;
import org.teiid.translator.jdbc.ModFunctionModifier;
-@Translator(name="db2")
+@Translator(name="db2", description="A translator for IBM DB2 Database")
public class DB2ExecutionFactory extends JDBCExecutionFactory {
private final class NullHandlingFormatModifier extends
Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/derby/DerbyExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/derby/DerbyExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/derby/DerbyExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -35,7 +35,7 @@
/**
* @since 4.3
*/
-@Translator(name="derby")
+@Translator(name="derby", description="A translator for Apache Derby Database")
public class DerbyExecutionFactory extends DB2ExecutionFactory {
public static final String TEN_1 = "10.1"; //$NON-NLS-1$
Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/h2/H2ExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/h2/H2ExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/h2/H2ExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -39,7 +39,7 @@
import org.teiid.translator.jdbc.hsql.AddDiffModifier;
import org.teiid.translator.jdbc.oracle.ConcatFunctionModifier;
-@Translator(name="h2")
+@Translator(name="h2", description="A translator for open source H2 Database")
public class H2ExecutionFactory extends JDBCExecutionFactory {
@Override
Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/hsql/HsqlExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/hsql/HsqlExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/hsql/HsqlExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -35,7 +35,7 @@
import org.teiid.translator.jdbc.FunctionModifier;
import org.teiid.translator.jdbc.JDBCExecutionFactory;
-@Translator(name="hsql")
+@Translator(name="hsql", description="A translator for open source HSQL Database")
public class HsqlExecutionFactory extends JDBCExecutionFactory {
@Override
Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/informix/InformixExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/informix/InformixExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/informix/InformixExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -34,7 +34,7 @@
import org.teiid.translator.jdbc.JDBCExecutionFactory;
-@Translator(name="informix")
+@Translator(name="informix", description="A translator for Informix Database")
public class InformixExecutionFactory extends JDBCExecutionFactory {
@Override
Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mm/MetaMatrixExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mm/MetaMatrixExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mm/MetaMatrixExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -14,7 +14,7 @@
/**
* Capabilities compatible with MM 5.5.x
*/
-@Translator(name="metamatrix")
+@Translator(name="metamatrix", description="A translator for MetaMatrix Virtual Database")
public class MetaMatrixExecutionFactory extends JDBCExecutionFactory {
public List<String> getSupportedFunctions() {
Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -47,7 +47,7 @@
/**
* Translator class for accessing the ModeShape JCR repository.
*/
-@Translator(name="modeshape")
+@Translator(name="modeshape", description="A translator for open source Modeshape JCA repository")
public class ModeShapeExecutionFactory extends JDBCExecutionFactory {
public ModeShapeExecutionFactory() {
Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5ExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5ExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5ExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -32,7 +32,7 @@
import org.teiid.translator.SourceSystemFunctions;
import org.teiid.translator.jdbc.FunctionModifier;
-@Translator(name="mysql5")
+@Translator(name="mysql5", description="A translator for open source MySQL5 Database")
public class MySQL5ExecutionFactory extends MySQLExecutionFactory {
@Override
Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQLExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQLExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQLExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -43,7 +43,7 @@
/**
* @since 4.3
*/
-@Translator(name="mysql")
+@Translator(name="mysql", description="A translator for open source MySQL Database, used with any version lower than 5")
public class MySQLExecutionFactory extends JDBCExecutionFactory {
public MySQLExecutionFactory() {
Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -62,7 +62,7 @@
import org.teiid.translator.jdbc.LocateFunctionModifier;
-@Translator(name="oracle")
+@Translator(name="oracle", description="A translator for Oracle Database")
public class OracleExecutionFactory extends JDBCExecutionFactory {
private static final String TIME_FORMAT = "HH24:MI:SS"; //$NON-NLS-1$
Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -57,7 +57,7 @@
* Translator class for PostgreSQL. Updated to expect a 8.0+ jdbc client
* @since 4.3
*/
-@Translator(name="postgresql")
+@Translator(name="postgresql", description="A translator for postgreSQL Database")
public class PostgreSQLExecutionFactory extends JDBCExecutionFactory {
public static final String EIGHT_0 = "8.0"; //$NON-NLS-1$
Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -41,7 +41,7 @@
/**
* Updated to assume the use of the DataDirect, 2005 driver, or later.
*/
-@Translator(name="sqlserver")
+@Translator(name="sqlserver", description="A translator for Microsoft SQL Server Database")
public class SQLServerExecutionFactory extends SybaseExecutionFactory {
public static final String V_2005 = "2005"; //$NON-NLS-1$
Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sybase/SybaseExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sybase/SybaseExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sybase/SybaseExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -51,7 +51,7 @@
import org.teiid.translator.jdbc.oracle.ConcatFunctionModifier;
-@Translator(name="sybase")
+@Translator(name="sybase", description="A translator for Sybase Database")
public class SybaseExecutionFactory extends JDBCExecutionFactory {
public static final String TWELVE_5 = "12.5"; //$NON-NLS-1$
Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teiid/TeiidExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teiid/TeiidExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teiid/TeiidExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -35,7 +35,7 @@
/**
* @since 4.3
*/
-@Translator(name="teiid")
+@Translator(name="teiid", description="A translator for Teiid Virtual Database")
public class TeiidExecutionFactory extends JDBCExecutionFactory {
public static final String SEVEN_0 = "7.0"; //$NON-NLS-1$
Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teradata/TeradataExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teradata/TeradataExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teradata/TeradataExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -33,7 +33,7 @@
/**
* for Teradata database Release V2R5.1
*/
-@Translator(name="teradata")
+@Translator(name="teradata", description="A translator for Teradata Database")
public class TeradataExecutionFactory extends JDBCExecutionFactory {
public TeradataExecutionFactory() {
Modified: branches/7.1.x/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -41,7 +41,7 @@
* LDAP translator. This is responsible for initializing
* a connection factory, and obtaining connections to LDAP.
*/
-@Translator(name="ldap")
+@Translator(name="ldap", description="A translator for LDAP directory")
public class LDAPExecutionFactory extends ExecutionFactory<ConnectionFactory, LdapContext> {
public enum SearchDefaultScope {
Modified: branches/7.1.x/connectors/translator-loopback/src/main/java/org/teiid/translator/loopback/LoopbackExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-loopback/src/main/java/org/teiid/translator/loopback/LoopbackExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-loopback/src/main/java/org/teiid/translator/loopback/LoopbackExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -37,7 +37,7 @@
/**
* Loopback translator.
*/
-@Translator(name="loopback")
+@Translator(name="loopback", description="A translator for testing, that returns mock data")
public class LoopbackExecutionFactory extends ExecutionFactory<Object, Object> {
private int waitTime = 0;
Modified: branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/SalesForceExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/SalesForceExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/SalesForceExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -48,7 +48,7 @@
import org.teiid.translator.salesforce.execution.QueryExecutionImpl;
import org.teiid.translator.salesforce.execution.UpdateExecutionImpl;
-@Translator(name="salesforce")
+@Translator(name="salesforce", description="A translator for Salesforce")
public class SalesForceExecutionFactory extends ExecutionFactory<ConnectionFactory, SalesforceConnection> {
private String connectorStateClass;
Modified: branches/7.1.x/connectors/translator-ws/src/main/java/org/teiid/translator/ws/WSExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-ws/src/main/java/org/teiid/translator/ws/WSExecutionFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/connectors/translator-ws/src/main/java/org/teiid/translator/ws/WSExecutionFactory.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -49,7 +49,7 @@
import org.teiid.translator.TypeFacility;
import org.teiid.translator.WSConnection;
-@Translator(name="ws")
+@Translator(name="ws", description="A translator for making Web Service calls")
public class WSExecutionFactory extends ExecutionFactory<ConnectionFactory, WSConnection> {
public enum Binding {
Modified: branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/TranslatorComponent.java
===================================================================
--- branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/TranslatorComponent.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/TranslatorComponent.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -63,16 +63,9 @@
String RESOURCE_NAME = "resourceName";
}
- /*
- * (non-Javadoc)
- *
- * @seeorg.teiid.rhq.plugin.Facet#start(org.rhq.core.pluginapi.inventory.
- * ResourceContext)
- */
@Override
public void start(ResourceContext context) {
- this.setComponentName(context.getPluginConfiguration().getSimpleValue(
- "name", null));
+ this.setComponentName(context.getPluginConfiguration().getSimpleValue( "name", null));
this.resourceConfiguration=context.getPluginConfiguration();
super.start(context);
}
@@ -94,8 +87,7 @@
*
* @see MeasurementFacet#getValues(MeasurementReport, Set)
*/
- public void getValues(MeasurementReport report,
- Set<MeasurementScheduleRequest> requests) {
+ public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) {
for (MeasurementScheduleRequest request : requests) {
String name = request.getName();
@@ -107,11 +99,9 @@
Number value = new Integer(1); // dummy measurement value -
// this should come from the
// managed resource
- report.addData(new MeasurementDataNumeric(request, value
- .doubleValue()));
+ report.addData(new MeasurementDataNumeric(request, value.doubleValue()));
} catch (Exception e) {
- LOG.error("Failed to obtain measurement [" + name //$NON-NLS-1$
- + "]. Cause: " + e); //$NON-NLS-1$
+ LOG.error("Failed to obtain measurement [" + name + "]. Cause: " + e); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -121,12 +111,8 @@
protected void setOperationArguments(String name,
Configuration configuration, Map argumentMap) {
//No operations for translators
-
}
- /* (non-Javadoc)
- * @see org.teiid.rhq.plugin.Facet#loadResourceConfiguration()
- */
@Override
public Configuration loadResourceConfiguration() {
@@ -144,8 +130,8 @@
LOG.error(msg, e);
}
- String translatorName = ProfileServiceUtil.getSimpleValue(
- translator, "name", String.class);
+ String translatorName = ProfileServiceUtil.getSimpleValue( translator, "name", String.class);
+ String description = ProfileServiceUtil.getSimpleValue( translator, "description", String.class);
Configuration c = resourceConfiguration;
PropertyList list = new PropertyList("translatorList");
@@ -153,12 +139,12 @@
c.put(list);
// First get translator specific properties
- ManagedProperty translatorProps = translator
- .getProperty("property");
+ ManagedProperty translatorProps = translator.getProperty("property");
getTranslatorValues(translatorProps.getValue(), propMap, list);
// Now get common properties
c.put(new PropertySimple("name", translatorName));
+ c.put(new PropertySimple("description", description));
return c;
@@ -169,8 +155,7 @@
MetaType metaType = pValue.getMetaType();
Map<String, T> unwrappedvalue = null;
if (metaType.isComposite()) {
- unwrappedvalue = (Map<String, T>) MetaValueFactory
- .getInstance().unwrap(pValue);
+ unwrappedvalue = (Map<String, T>) MetaValueFactory .getInstance().unwrap(pValue);
for (String key : unwrappedvalue.keySet()) {
map = new PropertyMap("property");
Modified: branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/TranslatorDiscoveryComponent.java
===================================================================
--- branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/TranslatorDiscoveryComponent.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/TranslatorDiscoveryComponent.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -41,8 +41,8 @@
import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
-import org.rhq.plugins.jbossas5.ApplicationServerComponent;
import org.rhq.plugins.jbossas5.connection.ProfileServiceConnection;
+import org.teiid.core.util.ApplicationInfo;
import org.teiid.rhq.plugin.util.PluginConstants;
import org.teiid.rhq.plugin.util.ProfileServiceUtil;
@@ -69,8 +69,9 @@
for (ManagedComponent translator : translators) {
String translatorKey = translator.getName();
- String translatorName = ProfileServiceUtil.getSimpleValue(
- translator, "name", String.class);
+ String translatorName = ProfileServiceUtil.getSimpleValue(translator, "name", String.class); //$NON-NLS-1$
+ String description = ProfileServiceUtil.getSimpleValue(translator, "description", String.class); //$NON-NLS-1$
+
/**
*
* A discovered resource must have a unique key, that must stay the
@@ -80,8 +81,8 @@
discoveryContext.getResourceType(), // ResourceType
translatorKey, // Resource Key
translatorName, // Resource Name
- null, // Version
- PluginConstants.ComponentType.Translator.DESCRIPTION, // Description
+ ApplicationInfo.getInstance().getReleaseNumber(), // Version
+ description, // Description
discoveryContext.getDefaultPluginConfiguration(), // Plugin config
null // Process info from a process scan
);
@@ -89,19 +90,19 @@
// Get plugin config map for models
Configuration configuration = detail.getPluginConfiguration();
- configuration.put(new PropertySimple("name", translatorName));
+ configuration.put(new PropertySimple("name", translatorName));//$NON-NLS-1$
detail.setPluginConfiguration(configuration);
// Add to return values
// First get translator specific properties
- ManagedProperty translatorProps = translator.getProperty("property");
- PropertyList list = new PropertyList("translatorList");
+ ManagedProperty translatorProps = translator.getProperty("property");//$NON-NLS-1$
+ PropertyList list = new PropertyList("translatorList");//$NON-NLS-1$
PropertyMap propMap = null;
getTranslatorValues(translatorProps.getValue(), propMap, list);
// Now get common properties
- configuration.put(new PropertySimple("name", translatorName));
- configuration.put(new PropertySimple("type",ProfileServiceUtil.getSimpleValue(translator,"type", String.class)));
+ configuration.put(new PropertySimple("name", translatorName));//$NON-NLS-1$
+ configuration.put(new PropertySimple("type",ProfileServiceUtil.getSimpleValue(translator,"type", String.class)));//$NON-NLS-1$ //$NON-NLS-2$
detail.setPluginConfiguration(configuration);
// Add to return values
@@ -121,9 +122,9 @@
unwrappedvalue = (Map<String, T>) MetaValueFactory.getInstance().unwrap(pValue);
for (String key : unwrappedvalue.keySet()) {
- map = new PropertyMap("properties");
- map.put(new PropertySimple("name", key));
- map.put(new PropertySimple("value", unwrappedvalue.get(key)));
+ map = new PropertyMap("properties");//$NON-NLS-1$
+ map.put(new PropertySimple("name", key));//$NON-NLS-1$
+ map.put(new PropertySimple("value", unwrappedvalue.get(key)));//$NON-NLS-1$
//map.put(new PropertySimple("description", "Custom property"));
list.add(map);
}
Modified: branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/util/PluginConstants.java
===================================================================
--- branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/util/PluginConstants.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/util/PluginConstants.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -124,7 +124,6 @@
public final static String TYPE = "teiid"; //$NON-NLS-1$
public final static String SUBTYPE = "translator"; //$NON-NLS-1$
public final static String NAME = "Translator"; //$NON-NLS-1$
- public final static String DESCRIPTION = "Teiid Translator"; //$NON-NLS-1$
public static interface Operations {
Modified: branches/7.1.x/console/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- branches/7.1.x/console/src/main/resources/META-INF/rhq-plugin.xml 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/console/src/main/resources/META-INF/rhq-plugin.xml 2010-09-01 17:02:49 UTC (rev 2514)
@@ -605,8 +605,9 @@
createDeletePolicy="both" creationDataType="configuration">
<resource-configuration>
- <c:simple-property name="name" displayName="Name"
- description="Name of the translator" readOnly="true" required="false" />
+ <c:simple-property name="name" displayName="Name" description="Name of the translator" readOnly="true" required="false" />
+ <c:simple-property name="description" displayName="Description" description="Description the translator" readOnly="true" required="false" />
+
<c:list-property name="translatorList" readOnly="true"
required="false" displayName="Properties" description="Translator properties">
<c:map-property name="properties" readOnly="true">
Modified: branches/7.1.x/runtime/src/main/java/org/teiid/deployers/TranslatorAnnotationScanningDeployer.java
===================================================================
--- branches/7.1.x/runtime/src/main/java/org/teiid/deployers/TranslatorAnnotationScanningDeployer.java 2010-09-01 15:38:19 UTC (rev 2513)
+++ branches/7.1.x/runtime/src/main/java/org/teiid/deployers/TranslatorAnnotationScanningDeployer.java 2010-09-01 17:02:49 UTC (rev 2514)
@@ -75,6 +75,7 @@
TranslatorMetaData data = new TranslatorMetaData();
data.setName(bean.name());
data.setExecutionFactoryClass(clazz);
+ data.setDescription(bean.description());
return data;
}
14 years, 3 months
teiid SVN: r2513 - in branches/7.1.x/engine/src: test/java/org/teiid/query/resolver and 1 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-09-01 11:38:19 -0400 (Wed, 01 Sep 2010)
New Revision: 2513
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/StoredProcedure.java
branches/7.1.x/engine/src/test/java/org/teiid/query/resolver/TestResolver.java
branches/7.1.x/engine/src/test/java/org/teiid/query/unittest/FakeMetadataFactory.java
branches/7.1.x/engine/src/test/java/org/teiid/query/unittest/RealMetadataFactory.java
Log:
TEIID-1234 fixing parameter order
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/StoredProcedure.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/StoredProcedure.java 2010-08-31 22:50:54 UTC (rev 2512)
+++ branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/StoredProcedure.java 2010-09-01 15:38:19 UTC (rev 2513)
@@ -258,7 +258,7 @@
* @return Ordered list of SingleElementSymbol
*/
public List getProjectedSymbols(){
- List result = new ArrayList();
+ List<ElementSymbol> result = new ArrayList<ElementSymbol>();
//add result set columns
List rsColumns = getResultSetColumns();
result.addAll(rsColumns);
@@ -266,24 +266,15 @@
return result;
}
//add out/inout parameter symbols
- Iterator iter = mapOfParameters.values().iterator();
- while(iter.hasNext()){
- SPParameter parameter = (SPParameter)iter.next();
- if(parameter.getParameterType() == ParameterInfo.INOUT || parameter.getParameterType() == ParameterInfo.OUT){
+ for (SPParameter parameter : mapOfParameters.values()) {
+ if(parameter.getParameterType() == ParameterInfo.RETURN_VALUE){
ElementSymbol symbol = parameter.getParameterSymbol();
symbol.setGroupSymbol(getGroup());
- result.add(symbol);
- }
- }
- //add return parameter
- iter = mapOfParameters.values().iterator();
- while(iter.hasNext()){
- SPParameter parameter = (SPParameter)iter.next();
- if(parameter.getParameterType() == ParameterInfo.RETURN_VALUE){
+ result.add(0, symbol);
+ } else if(parameter.getParameterType() == ParameterInfo.INOUT || parameter.getParameterType() == ParameterInfo.OUT){
ElementSymbol symbol = parameter.getParameterSymbol();
symbol.setGroupSymbol(getGroup());
- result.add(symbol);
- break;
+ result.add(symbol);
}
}
return result;
Modified: branches/7.1.x/engine/src/test/java/org/teiid/query/resolver/TestResolver.java
===================================================================
--- branches/7.1.x/engine/src/test/java/org/teiid/query/resolver/TestResolver.java 2010-08-31 22:50:54 UTC (rev 2512)
+++ branches/7.1.x/engine/src/test/java/org/teiid/query/resolver/TestResolver.java 2010-09-01 15:38:19 UTC (rev 2513)
@@ -96,6 +96,7 @@
import org.teiid.query.unittest.FakeMetadataFactory;
import org.teiid.query.unittest.FakeMetadataObject;
import org.teiid.query.unittest.FakeMetadataStore;
+import org.teiid.query.unittest.RealMetadataFactory;
import org.teiid.query.unittest.TimestampUtil;
import org.teiid.query.util.ErrorMessageKeys;
@@ -3023,4 +3024,11 @@
helpResolveUpdateProcedure(procedure, userUpdateStr);
}
+ //return should be first, then out
+ @Test public void testParamOrder() {
+ Query resolvedQuery = (Query)helpResolve("SELECT * FROM (exec pm4.spRetOut()) as a", RealMetadataFactory.exampleBQTCached(), null); //$NON-NLS-1$
+
+ assertEquals("A.ret", resolvedQuery.getProjectedSymbols().get(0).getName());
+ }
+
}
\ No newline at end of file
Modified: branches/7.1.x/engine/src/test/java/org/teiid/query/unittest/FakeMetadataFactory.java
===================================================================
--- branches/7.1.x/engine/src/test/java/org/teiid/query/unittest/FakeMetadataFactory.java 2010-08-31 22:50:54 UTC (rev 2512)
+++ branches/7.1.x/engine/src/test/java/org/teiid/query/unittest/FakeMetadataFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
@@ -2661,119 +2661,6 @@
return facade;
}
- public static VDBMetaData exampleXQueryTransformationsVDB() {
- VDBMetaData vdb = new VDBMetaData();
- vdb.setName("exampleXQueryTransformations");
- vdb.setVersion(1);
- vdb.addModel(createModel("m", true));
- return vdb;
- }
-
- public static FakeMetadataFacade exampleXQueryTransformations() {
- FakeMetadataObject model = FakeMetadataFactory.createPhysicalModel("m");//$NON-NLS-1$
-
- // Simple xquery view - no inputs, calls out to source docs
- FakeMetadataObject xmlrs = FakeMetadataFactory.createResultSet("m.xprocrs", model, new String[] { "xml" }, new String[] { DataTypeManager.DefaultDataTypes.XML }); //$NON-NLS-1$ //$NON-NLS-2$
- FakeMetadataObject xml1out = FakeMetadataFactory.createParameter("rs", 1, ParameterInfo.RESULT_SET, null, xmlrs); //$NON-NLS-1$
- QueryNode xproct1 = new QueryNode("m.xproc1", "<test></test>"); //$NON-NLS-1$ //$NON-NLS-2$
- FakeMetadataObject xproc1 = FakeMetadataFactory.createVirtualProcedure("m.xproc1", model, Arrays.asList(new FakeMetadataObject[] { xml1out }), xproct1); //$NON-NLS-1$
-
- // XQuery view: call out to proc returning xml
- QueryNode xproct2 = new QueryNode("m.xproc2", "doc(\"EXEC m.xproc1()\")"); //$NON-NLS-1$ //$NON-NLS-2$
- FakeMetadataObject xproc2 = FakeMetadataFactory.createVirtualProcedure("m.xproc2", model, Arrays.asList(new FakeMetadataObject[] { xml1out }), xproct2); //$NON-NLS-1$
-
- // XQuery view with xml input arg
- FakeMetadataObject xml3in = FakeMetadataFactory.createParameter("input", 2, ParameterInfo.IN, DataTypeManager.DefaultDataTypes.XML, null); //$NON-NLS-1$
- QueryNode xproct3 = new QueryNode("m.xproc3", //$NON-NLS-1$
- "declare variable $INPUT as node() external; " + //$NON-NLS-1$
- "<wrap>{ $INPUT }</wrap>"); //$NON-NLS-1$
- FakeMetadataObject xproc3 = FakeMetadataFactory.createVirtualProcedure("m.xproc3", model, Arrays.asList(new FakeMetadataObject[] { xml1out, xml3in }), xproct3); //$NON-NLS-1$
-
- // XQuery view with scalar input args
- FakeMetadataObject xml4in = FakeMetadataFactory.createParameter("in1", 2, ParameterInfo.IN, DataTypeManager.DefaultDataTypes.STRING, null); //$NON-NLS-1$
- FakeMetadataObject xml4in2 = FakeMetadataFactory.createParameter("in2", 3, ParameterInfo.IN, DataTypeManager.DefaultDataTypes.INTEGER, null); //$NON-NLS-1$
- QueryNode xproct4 = new QueryNode("m.xproc4", //$NON-NLS-1$
- "declare variable $in1 as xs:string external; " + //$NON-NLS-1$
- "declare variable $in2 as xs:int external; " + //$NON-NLS-1$
- "<wrap><a>{ $in1 }</a><b>{ $in2 }</b></wrap>"); //$NON-NLS-1$
- FakeMetadataObject xproc4 = FakeMetadataFactory.createVirtualProcedure("m.xproc4", model, Arrays.asList(new FakeMetadataObject[] { xml1out, xml4in, xml4in2 }), xproct4); //$NON-NLS-1$
-
- // XQuery view calling doc() function with non-literal
- FakeMetadataObject xml5in = FakeMetadataFactory.createParameter("procName", 2, ParameterInfo.IN, DataTypeManager.DefaultDataTypes.STRING, null); //$NON-NLS-1$
- QueryNode xproct5 = new QueryNode("m.xproc5", //$NON-NLS-1$
- "declare variable $procName as xs:string external; " + //$NON-NLS-1$
- "let $sql := concat('EXEC ', $procName, '()') " + //$NON-NLS-1$
- "return <wrap>{doc($sql)}</wrap>"); //$NON-NLS-1$
- FakeMetadataObject xproc5 = FakeMetadataFactory.createVirtualProcedure("m.xproc5", model, Arrays.asList(new FakeMetadataObject[] { xml1out, xml5in }), xproct5); //$NON-NLS-1$
-
- // XQuery view to create dynamic element
- FakeMetadataObject xml6in = FakeMetadataFactory.createParameter("tag", 2, ParameterInfo.IN, DataTypeManager.DefaultDataTypes.STRING, null); //$NON-NLS-1$
- FakeMetadataObject xml6in2 = FakeMetadataFactory.createParameter("value", 3, ParameterInfo.IN, DataTypeManager.DefaultDataTypes.STRING, null); //$NON-NLS-1$
- QueryNode xproct6 = new QueryNode("m.maketag", //$NON-NLS-1$
- "declare variable $tag as xs:string external; " + //$NON-NLS-1$
- "declare variable $value as xs:string external; " + //$NON-NLS-1$
- "element { $tag } { $value }"); //$NON-NLS-1$
- FakeMetadataObject xproc6 = FakeMetadataFactory.createVirtualProcedure("m.maketag", model, Arrays.asList(new FakeMetadataObject[] { xml1out, xml6in, xml6in2 }), xproct6); //$NON-NLS-1$
-
- // XQuery view calling multiple doc() functions with non-literal
- FakeMetadataObject xml7in = FakeMetadataFactory.createParameter("wrapperTag", 2, ParameterInfo.IN, DataTypeManager.DefaultDataTypes.STRING, null); //$NON-NLS-1$
- FakeMetadataObject xml7in2 = FakeMetadataFactory.createParameter("tag1", 3, ParameterInfo.IN, DataTypeManager.DefaultDataTypes.STRING, null); //$NON-NLS-1$
- FakeMetadataObject xml7in3 = FakeMetadataFactory.createParameter("val1", 4, ParameterInfo.IN, DataTypeManager.DefaultDataTypes.STRING, null); //$NON-NLS-1$
- FakeMetadataObject xml7in4 = FakeMetadataFactory.createParameter("tag2", 5, ParameterInfo.IN, DataTypeManager.DefaultDataTypes.STRING, null); //$NON-NLS-1$
- FakeMetadataObject xml7in5 = FakeMetadataFactory.createParameter("val2", 6, ParameterInfo.IN, DataTypeManager.DefaultDataTypes.STRING, null); //$NON-NLS-1$
- QueryNode xproct7 = new QueryNode("m.combinetags", //$NON-NLS-1$
- "declare variable $wrapperTag as xs:string external; " + //$NON-NLS-1$
- "declare variable $tag1 as xs:string external; " + //$NON-NLS-1$
- "declare variable $val1 as xs:string external; " + //$NON-NLS-1$
- "declare variable $tag2 as xs:string external; " + //$NON-NLS-1$
- "declare variable $val2 as xs:string external; " + //$NON-NLS-1$
- "let $t1 := concat(\"EXEC m.maketag('\", $tag1, \"','\", $val1, \"')\") " + //$NON-NLS-1$
- "let $t2 := concat(\"EXEC m.maketag('\", $tag2, \"','\", $val2, \"')\") " + //$NON-NLS-1$
- "return element { $wrapperTag } { doc($t1), doc($t2) }"); //$NON-NLS-1$
- FakeMetadataObject xproc7 = FakeMetadataFactory.createVirtualProcedure("m.combinetags", model, Arrays.asList(new FakeMetadataObject[] { xml1out, xml7in, xml7in2, xml7in3, xml7in4, xml7in5 }), xproct7); //$NON-NLS-1$
-
- // XQuery web service view: takes xml in, yields xml out
- // Expects doc like: <in><tag>tag</tag><value></value></in>
- FakeMetadataObject xml8in = FakeMetadataFactory.createParameter("in", 2, ParameterInfo.IN, DataTypeManager.DefaultDataTypes.XML, null); //$NON-NLS-1$
- QueryNode xproct8 = new QueryNode("m.svc8", //$NON-NLS-1$
- "declare variable $in as node() external; " + //$NON-NLS-1$
- "element { $in//tag/text() } { $in//value/text() }"); //$NON-NLS-1$
- FakeMetadataObject xproc8 = FakeMetadataFactory.createVirtualProcedure("m.svc8", model, Arrays.asList(new FakeMetadataObject[] { xml1out, xml8in }), xproct8); //$NON-NLS-1$
-
- // Chaining together XQuery web service views
- // Expects doc like: <in><tag>tag</tag><values><value>val1</value><value>val2</value>...</values></in>
- FakeMetadataObject xml9in = FakeMetadataFactory.createParameter("in", 2, ParameterInfo.IN, DataTypeManager.DefaultDataTypes.XML, null); //$NON-NLS-1$
- QueryNode xproct9 = new QueryNode("m.svc9", //$NON-NLS-1$
- "declare variable $in as node() external; " + //$NON-NLS-1$
- "<results> {" + //$NON-NLS-1$
- " for $value in $in//value " + //$NON-NLS-1$
- " let $tag := $in//tag " + //$NON-NLS-1$
- " return doc(" + //$NON-NLS-1$
- " concat(\"EXEC m.svc8('<in><tag>\", $tag, \"</tag><value>\", $value, \"</value></in>')\"))" + //$NON-NLS-1$
- "} </results>"); //$NON-NLS-1$
- FakeMetadataObject xproc9 = FakeMetadataFactory.createVirtualProcedure("m.svc9", model, Arrays.asList(new FakeMetadataObject[] { xml1out, xml9in }), xproct9); //$NON-NLS-1$
-
- // XQuery service with only a doc expression in it
- QueryNode xproct10 = new QueryNode("m.xproc10", //$NON-NLS-1$
- "doc('EXEC m.xproc1()')"); //$NON-NLS-1$
- FakeMetadataObject xproc10 = FakeMetadataFactory.createVirtualProcedure("m.xproc10", model, Arrays.asList(new FakeMetadataObject[] { xml1out }), xproct10); //$NON-NLS-1$
-
- // Add all objects to the store
- FakeMetadataStore store = new FakeMetadataStore();
- store.addObject(model);
- store.addObject(xproc1);
- store.addObject(xproc2);
- store.addObject(xproc3);
- store.addObject(xproc4);
- store.addObject(xproc5);
- store.addObject(xproc6);
- store.addObject(xproc7);
- store.addObject(xproc8);
- store.addObject(xproc9);
- store.addObject(xproc10);
-
- return new FakeMetadataFacade(store);
- }
/**
* Create a physical model with default settings.
* @param name Name of model
Modified: branches/7.1.x/engine/src/test/java/org/teiid/query/unittest/RealMetadataFactory.java
===================================================================
--- branches/7.1.x/engine/src/test/java/org/teiid/query/unittest/RealMetadataFactory.java 2010-08-31 22:50:54 UTC (rev 2512)
+++ branches/7.1.x/engine/src/test/java/org/teiid/query/unittest/RealMetadataFactory.java 2010-09-01 15:38:19 UTC (rev 2513)
@@ -253,6 +253,9 @@
QueryNode vspqn6 = new QueryNode("vsp6", "CREATE VIRTUAL PROCEDURE BEGIN SELECT p1 as StringKey; END"); //$NON-NLS-1$ //$NON-NLS-2$
Procedure vsp6 = createVirtualProcedure("MMSP6", mmspTest1, Arrays.asList(vsp6p1), vspqn6); //$NON-NLS-1$
vsp6.setResultSet(vsprs6);
+
+ createStoredProcedure("spRetOut", pm4, Arrays.asList(createParameter("ret", ParameterInfo.RETURN_VALUE, DataTypeManager.DefaultDataTypes.INTEGER),
+ createParameter("x", ParameterInfo.OUT, DataTypeManager.DefaultDataTypes.INTEGER)), "spRetOut"); //$NON-NLS-1$ //$NON-NLS-2$
return createTransformationMetadata(metadataStore, "bqt");
}
14 years, 3 months