teiid SVN: r3721 - in trunk: build/kits/jboss-as7/bin/scripts and 25 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2011-12-07 10:46:45 -0500 (Wed, 07 Dec 2011)
New Revision: 3721
Added:
trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/
trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-ws-weather/
trunk/build/kits/jboss-as7/docs/teiid/examples/simpleclient/
trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html
trunk/connectors/connector-file/src/main/java/org/teiid/resource/adapter/file/FileResourceAdapter.java
trunk/connectors/connector-ldap/src/main/java/org/teiid/resource/adapter/ldap/LdapResourceAdapter.java
trunk/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceResourceAdapter.java
trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSResourceAdapter.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/EventDistributorFactoryService.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/ReferenceFactoryService.java
trunk/runtime/src/main/java/org/teiid/deployers/EventDistributorImpl.java
Removed:
trunk/build/kits/jboss-container/teiid-examples/dynamicvdb-portfolio/
trunk/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/
trunk/build/kits/jboss-container/teiid-examples/simpleclient/
trunk/build/kits/jboss-container/teiid-releasenotes.html
trunk/jboss-integration/src/main/java/org/teiid/jboss/CSRReferenceFactoryService.java
Modified:
trunk/api/src/main/java/org/teiid/resource/spi/BasicManagedConnectionFactory.java
trunk/build/kits/jboss-as7/bin/scripts/teiid-domain-mode-install.cli
trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml
trunk/build/kits/jboss-as7/domain/configuration/host-teiid.xml
trunk/connectors/connector-file/src/main/java/org/teiid/resource/adapter/file/FileManagedConnectionFactory.java
trunk/connectors/connector-file/src/main/rar/META-INF/ra.xml
trunk/connectors/connector-ldap/src/main/java/org/teiid/resource/adapter/ldap/LDAPManagedConnectionFactory.java
trunk/connectors/connector-ldap/src/main/rar/META-INF/ra.xml
trunk/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesForceManagedConnectionFactory.java
trunk/connectors/connector-salesforce/src/main/rar/META-INF/ra.xml
trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSConnectionImpl.java
trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSManagedConnectionFactory.java
trunk/connectors/connector-ws/src/main/rar/META-INF/ra.xml
trunk/documentation/admin-guide/src/main/docbook/en-US/content/appendix-a.xml
trunk/documentation/admin-guide/src/main/docbook/en-US/content/clustering.xml
trunk/documentation/admin-guide/src/main/docbook/en-US/content/installation.xml
trunk/documentation/admin-guide/src/main/docbook/en-US/content/vdb-deployment.xml
trunk/documentation/developer-guide/src/main/docbook/en-US/content/runtime-updates.xml
trunk/documentation/docbook/custom.dtd
trunk/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml
trunk/jboss-integration/src/main/java/org/teiid/jboss/Element.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidServiceNames.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/Transport.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
trunk/jboss-integration/src/main/resources/schema/jboss-teiid.xsd
trunk/jboss-integration/src/test/resources/teiid-model-config.txt
trunk/jboss-integration/src/test/resources/teiid-model-json.txt
trunk/jboss-integration/src/test/resources/teiid-sample-config.xml
trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java
trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties
Log:
TEIID-1720: 1) Added specific ResourceAdapters for all the connectors, because deployment validation was failing, JCA 1.6 seem to requires them by default. 2) Added capability to add external MetadataRepository for persistent metadata purposes (this was missed in earlier commits) 3) Added capability to add external event generator using the "EventDistributor" interface. This object will be available in JNDI at "teiid/event-distributor-factory".
Modified: trunk/api/src/main/java/org/teiid/resource/spi/BasicManagedConnectionFactory.java
===================================================================
--- trunk/api/src/main/java/org/teiid/resource/spi/BasicManagedConnectionFactory.java 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/api/src/main/java/org/teiid/resource/spi/BasicManagedConnectionFactory.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -129,4 +129,15 @@
}
return result;
}
+
+ protected static boolean checkEquals(Object left, Object right) {
+ if (left == null) {
+ if (right != null)
+ return false;
+ } else if (!left.equals(right)) {
+ return false;
+ }
+ return false;
+ }
+
}
Modified: trunk/build/kits/jboss-as7/bin/scripts/teiid-domain-mode-install.cli
===================================================================
--- trunk/build/kits/jboss-as7/bin/scripts/teiid-domain-mode-install.cli 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/build/kits/jboss-as7/bin/scripts/teiid-domain-mode-install.cli 2011-12-07 15:46:45 UTC (rev 3721)
@@ -0,0 +1,5 @@
+connect
+deploy --all-server-groups ../standalone/deployments/teiid-connector-file.rar
+deploy --all-server-groups ../standalone/deployments/teiid-connector-ldap.rar
+deploy --all-server-groups ../standalone/deployments/teiid-connector-salesforce.rar
+deploy --all-server-groups ../standalone/deployments/teiid-connector-ws.rar
Copied: trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html (from rev 3720, trunk/build/kits/jboss-container/teiid-releasenotes.html)
===================================================================
--- trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html (rev 0)
+++ trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html 2011-12-07 15:46:45 UTC (rev 3721)
@@ -0,0 +1,238 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
+ <TITLE>Teiid ${project.version} Release Notes</TITLE>
+ <META NAME="CHANGEDBY" CONTENT="Steve Hawkins">
+ </STYLE>
+</HEAD>
+<BODY LANG="en-US" DIR="LTR">
+<P><A HREF="http://www.teiid.org/"><IMG SRC="https://www.jboss.org/dms/teiid/images/teiid-banner.png" NAME="graphics1" ALT="Teiid" ALIGN=BOTTOM WIDTH=800></A>
+
+<H1>Teiid ${project.version} Release Notes</H1>
+<P>Teiid ${project.version} is the first Teiid release compatible with JBoss AS 7.x.
+
+<H2>Overview</H2>
+<UL>
+ <LI><A HREF="#Highlights">Highlights</A>
+ <LI><A HREF="#Compatibility">Compatibility Issues</A>
+ <LI><A HREF="#Configuration">Configuration Issues</A>
+ <LI><A HREF="#Other">Other Issues</A>
+ <LI><A HREF="#LibraryUpdates">Thirdparty Library Updates</A>
+ <LI><A HREF="#Details">Detailed Release Notes</A>
+ <LI><A HREF="#Documentation">Additional Docs and Help</A>
+ <LI><A HREF="#Licenses">Licenses</A>
+ <LI><A HREF="#About">About JBoss</A>
+</UL>
+<H2><A NAME="Highlights"></A>Highlights</H2>
+<UL>
+ <LI><B>CallableStatement Named Parameters</B> - you can now use CallableStatement named parameter get/set methods.
+ <LI><B>New Translator capabilities</B> - translators may indicate which convert functions they support and restrict non-join comparisons
+ to only literals.
+</UL>
+
+<h2><a name="Compatibility">Compatibility Issues</a></h2>
+<ul>
+ <li>Support for named parameter syntax using param=value has been deprecated, since it is ambiguous with a comparison predicate boolean value expression. param<b>=></b>value should be used instead.
+ <li>Support for using the FROM clause post item hints MAKEDEP/MAKENOTDEP has been deprecated. Use the pre item comment hint syntax instead, e.g. /*+ MAKEDEP */ tbl
+</ul>
+
+<h4>from 7.x</h4>
+<ul>
+ <li>TRANSLATE/HAS CRITERIA has been removed. INSTEAD OF trigger actions should be used instead. ROWS_UPDATED, INPUTS, and INPUT are no longer procedure reserved words.
+ <li>7.x or earlier VDBs with table cardinalities set the old unknown value 0 will now report that value as -1 via the metadata API or SYS.TABLES.
+ <li>Exact fixed point literals, e.g. 1.0, are now parsed as decimal/BigDecimal values as per the ANSI specification, rather than as double values.
+ Also the AVG aggregate function will return an exact numeric (BigDecimal) value for integral types rather than returning a double value.
+ Views that were projecting doubles from exact numeric literals or using AVG will need to be updated. There is also a new system property org.teiid.decimalAsDouble to
+ enable the pre-8.0 behavior. The BigDecimal form of the AVG function now uses the same precision and scale logic as the division system function, rather than using a
+ fixed scale of 9.
+ <li>BigDecimal division that returns a quotient that is equal to zero will have a scale of zero as well. Prior releases would typically return a zero value with a scale of 16.
+</ul>
+
+<h4>from 7.5</h4>
+<ul>
+ <li>Leave was added as a reserved word.
+ <li>Lob inlining is incompatible with clients older than 7.6. If a 7.6 server will have older clients that use lobs connect to it, then the BufferService property inline-lobs should be set to false in the teiid-jboss-beans.xml file.
+ <li>Oracle translators assume they are using Oracle supplied drivers. If that is not the case, set the Oracle translator execution property oracleSuppliedDriver to false.
+ <li>Unordered limits are handled strictly by default. They are longer pushed through conditions, dup removal, or UNION not all - and cannot have conditions pushed through them. Use the NON_STRICT hint to change the behavior to Teiid 7.1 handling.
+</ul>
+
+<h4>from 7.4</h4>
+<ul>
+ <li>OFFSET and LIKE_REGEX were added as reserved words.
+ <li>ColumnReference.getName will always return just the element name. Previously it inconsistently returned the qualified and unqualified form depending upon where the ColumnReference appeared.
+ <li>As per JDBC4, ResultSetMetadata.getColumnName will return the unaliased column name if available rather than return the alias. Set useJDBC4ColumnNameAndLabelSemantics to false to use the alias name as the column name.
+</ul>
+
+<h4>from 7.3</h4>
+<ul>
+ <li>SYS.PROPERTIES has a new column, ClobValue, to get values exceeding the max string length
+ <li>SYS.COLUMNS has two new columns to get statistical information: DistinctCount and NullCount
+ <li>ARRAY_AGG is now a reserved word</li>
+ <li>The use of an IN procedure parameter with the name "source_name" in a multi-source model, will now be treated the parameter that controls which source
+ the procedure will execute against.
+ <li>Dynamic VDB functions injected via ExecutionFactory.getPushdownFunctions are now scoped to the SYS schema and have a fully qualified name that includes their source type. For example, instead of oracle_model.relate - which was only valid against the oracle_model source, there is now the SYS.oracle_sdo.relate function that is valid for all Oracle sources. Any fully-qualified reference to these functions will need updated.
+</ul>
+
+<h4>from 7.2</h4>
+<ul>
+ <li>The default JDBC credentials are user/user - not admin/teiid
+ <li>Unordered limits are no longer pushed through conditions, dup removal, or UNION not all. This prevents the possibility of getting less results than the logical intent of the limit.
+</ul>
+
+<h4>from 7.1</h4>
+<ul>
+ <li>Subqueries are no longer allowed to be SELECT INTO.
+ <li>INSERT/UPDATE/DELETE cannot be used to create implicit return cursors in non-update virtual procedures. You can instead use "UPDATE ...; SELECT VARIABLES.ROWCOUNT;".
+ <li>The SYSADMIN schema was created to hold procedures and tables that should not be generally accessible. SYS and pg_catalog are now always accessible - permissions do not apply to these schemas. The SYS.getBinaryVDBResource, SYS.getCharacterVDBResource, and SYS.getVDBResourcePaths have been replaced with the
+ SYSADMIN.VDBResources table. The Matviews table and the refreshMatView/refreshMatViewRow procedures were also moved into SYSADMIN.
+ <li>Overwriting an existing VDB will cause old connections to be terminated. Production systems should rely on VDB versioning.
+ <li>The jdbc:metamatrix JDBC URL prefix is no longer accepted. Use jdbc:teiid instead.
+ <li>Model visibility no longer restricts access to tables and procedures. Setting visible to false will only hide entries from system tables. Data roles should be used to restrict data access.
+ <li>Admin API "getWorkManagerStats" methods renamed to "getWorkerPoolStats". Also, "setRuntimeProperty" and "getProcesses" methods were removed.
+ <li>By default the "ENV" system function is now turned off. To enable it, edit the teiid-jboss-beans.xml configuration file.
+ <li>The use of VARIABLES.ROWCOUNT is now reserved.
+ <li>Exec statements of the form "var = EXEC foo()" are only valid if the procedure foo has a return parameter.
+ <li>Cache hint now supports "scope" definition. For ex: /* cache(scope:user) */ select * from T1; This hint will override the computed scope based on the query.
+</ul>
+<h4>from 7.0</h4>
+<ul>
+ <li>The term data policy was replaced with data role. The AdminAPI methods for adding role mappings have changed from addRoleToDataPolicy and removeRoleFromDataPolicy to addDataRoleMapping and removeDataRoleMapping respectively.
+</ul>
+
+<h2><a name="Configuration">Configuration Issues</a></h2>
+
+See the <a href="teiid-docs/teiid_admin_guide.pdf">Admin Guide</a> for more on configuration and installation.
+
+<h4>from 7.4</h4>
+<ul>
+ <li>The configuration for the buffer service now defaults to 256/512 for processor and connector batch sizes respectively. The buffer service also has 4 new properties inline-lobs, memory-buffer-space, memory-buffer-off-heap, and max-storage-object-size.
+ If you were explicitly setting the value for 'max-reserve-kb', you should consider lowering that value to account for the memory buffer and/or explicitly set the memory-buffer-space.
+</ul>
+
+<h4>from 7.4</h4>
+<ul>
+ <LI>The configuration for authorization has been moved off of the RuntimeEngineDeployer bean and onto separate AuthorizationValidator and PolicyDecider beans.
+ <LI>The configuration for the buffer manager has been simplified to refer to memory sizes in KB, rather than batch columns.
+</ul>
+
+<h4>from 7.3</h4>
+<ul>
+ <LI>The default value for the JDBC dynamic vdb importer setting importer.useFullSchemaName is now true, which matches the expected behavior from the documentation.
+ <LI>The prepared plan cache is now configured via the PreparedPlanCacheConfig bean, rather than through properties on the RuntimeEngineDeployer
+ <LI>SocketConfiguration.maxSocketThreads will interpret a setting of 0 to mean use the system default of max available processors. Both the ODBC and JDBC transports now default to the 0 setting.
+ <LI>maxReserveBatchColumns and maxProcessingBatchesColumns will interpret a setting of -1 to mean auto-calculate acceptable values given the max heap and other information. See the admin guide for more.
+ <LI>The default for org.teiid.useValueCache has changed to false, since typical installations will not greatly benefit from the additional lookup cost.
+ <LI>The property RuntimeEngineDeployer.allowFunctionCallsByDefault was added so that Teiid 7.4 behavior is compatible with Teiid 7.3. Set this property to false to require permissions for function calls when data roles are enabled.
+</ul>
+
+<h4>from 7.2</h4>
+<ul>
+ <LI>Temporary tables can now be restricted by data roles. Use the data-role attribute allow-create-temporary-tables to explicitly enable or disable the usage of temporary tables.
+There is also a allowCreateTemporaryTablesByDefault property in the teiid-jboss-beans.xml to control whether usage is allowed by default. For compatibility with prior 7.x releases, the default is to allow
+temporary table access.
+</ul>
+
+<h4>from 7.1</h4>
+<ul>
+ <li>Teiid clients now allow the usage of anonymous SSL by default.
+ This changes allows the admin port (default 31443) to use anonymous SSL by default, rather than just securing login traffic.
+ Admin clients should therefore use the mms protocol instead of mm. This will encrypt all admin traffic and ensure that any passwords in configuration files will
+ be encrypted in transit. See the Admin Guide to upgrade from anonymous SSL to 1-way or 2-way authentication.
+ The config properties sslEnabled and clientEncryptionEnabled for SSLConfiguration beans have been combined to a single property mode, that can have the values disabled|login|enabled.
+ <li>Apache CXF is now expected to be used as the web services stack provider through JBossWS-CXF. See the Admin Guide for instructions on
+ installing CXF for use with Teiid's Salesforce and web service connectors. The WS Resource Adapter's -ds.xml files should no longer use
+ WSSecurityConfigURL and WSSecurityConfigName, rather they should be ConfigFile and ConfigName respectively. The property values should no longer
+ refer to jboss-wsse-client.xml, but instead they should reference a CXF Spring configuration file and particular port configuration. See the Admin Guide
+ for more on using CXF configuration files.
+ <li>The default for data role checking is now "true". However only VDBs with data roles will have roles enforced.
+ <li>The default prepared plan cache size was increased to 512, since it is targeted by internal plans as well.
+</ul>
+
+<h4>from 7.0</h4>
+<ul>
+ <li>The property to enable data roles in teiid-jboss-beans.xml has changed from useEntitlements to useDataRoles.
+ <li>Rar file names no longer contain version numbers. -ds.xml files should be updated from connector-XXX-version.rar to teiid-connector-XXX.rar
+ <li>Code table relate configuration properties have been removed. Code tables are now implemented as materialized views.
+</ul>
+
+<h2><a name="Other">Other Issues</a></h2>
+<ul>
+ <li>TEIID-1170 - correlated subqueries are not allowed in UPDATEs or DELETEs against internal Teiid tables (internal materialized views or temporary tables).
+ <li>TEIID-1281 - Negative start indexing is not supported by DB2 and Derby databases. Usage of the Teiid SUBSTRING against these sources should not use negative start values.
+ <li>TEIID-1008 - Most versions of Oracle and MySQL do not support deeply nested correlated references. There is currently no workaround for this issue.
+ <li>For compatibility with the 7.0 release if a stored procedure parameter list begins with identifier=, then it will be parsed as a named parameter invocation even if the intent was to use a comparison predicate
+ as the first parameter value. The workaround is to use nesting parens, e.g. call proc((identifier=value), ...), which clarifies that this is positional value. This workaround will not be needed in later releases.
+ <li><a url="https://issues.jboss.org/browse/TEIID-1511">TEIID-1511<a/> - When a VDB is deployed and undeployed a socket is left open, which may lead to "too manay open files". Check the defect comments for details.
+ <li>TEIID-1648 - Teradata lobs can only be consistently read from an embedded client (with the default option to use the calling thread) and in single threaded mode (transactional or thread-count-for-source-concurrency=1). Usage of Teradata lobs under any other configuration is unlikely to work.
+</ul>
+<h4>from 7.0</h4>
+<ul>
+ <li>Fixed xsd type handling for SQL/XML and XML document models. xsd:date, xsd:dateTime, and xsd:time types will now all be displayed using the GMT timezone (Z). SQL types, such as timestamp, used for an XMLTABLE column will now expect their values to be in the form of the corresponding xsd type.
+</ul>
+
+<h2><a name="LibraryUpdates">Thirdparty Library Updates</a></h2>
+
+The following components have been updated:
+
+<h4>From 7.4</h4>
+<ul>
+ <li>Saxon was upgraded to 9.2.1.5
+ <li>nux 1.6, and xom 1.2 were added.
+</ul>
+<h4>From 7.1</h4>
+<ul>
+ <li>json-simple 1.1 was added.
+ <li>Netty was upgraded to 3.2.1
+</ul>
+<h4>From 7.0</h4>
+<ul>
+ <li>Direct integration of JBossCache jars was removed.
+ <li>Netty was upgraded to 3.2.0
+ <li>JDOM was removed.
+</ul>
+
+<h2><a name="Details">Detailed Release Notes</a></h2>
+ Detailed Release Notes - Teiid - Version ${project.version}
+
+<h2><a name="Documentation">Documentation and Help</a></h2>
+
+The <a href="http://www.jboss.org/teiid/">Teiid community project</a> is hosted on jboss.org.
+Documentation and help may be obtained from the local distribution under <a href="teiid-docs">teiid-docs</a> or the following locations.
+<ul>
+
+<li><a href="http://www.jboss.org/teiid/docs">Online Documentation</a></li>
+<li><a href="https://community.jboss.org/wiki/TheTeiidProject">Wiki</a></li>
+<li><a href="http://jira.jboss.org/jira/browse/TEIID">JIRA</a></li>
+<li><a href="http://community.jboss.org/en/teiid?view=discussions">Forums</a></li>
+</ul>
+
+
+<h2><a name="Licenses">Licenses</a></h2>
+
+<p>Teiid is licensed under the <a href="LICENSE-lgpl-2.1.txt">LGPL</a>. The
+license texts for Teiid and the thirdparty components it uses may be found in the <a href="teiid-docs/licenses">teiid-docs/licenses</a>
+directory of the distribution.
+
+</p>
+
+<h2><a name="About">About JBoss, a
+division of Red Hat</a></h2>
+
+<p>JBoss, a division of <a href="http://www.redhat.com/jboss/">Red
+Hat</a>, is in the business of
+providing
+superior technical support to our customers. Our goal is to make
+Professional Open Source™ the <b>SAFE
+CHOICE</b>
+for you. We accomplish this by backing up our open source Java products
+with technical support services that are delivered by the core
+developers themselves. We can help you to train your staff and provide
+you with support at every stage of the application lifecycle - from
+development and integration through deployment and maintenance. Visit
+the <a href="http://www.jboss.com/services/index">JBoss
+Services</a> page for more
+information.</p>
+
+</BODY>
+</HTML>
\ No newline at end of file
Property changes on: trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml
===================================================================
--- trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml 2011-12-07 15:46:45 UTC (rev 3721)
@@ -488,23 +488,6 @@
</interfaces>
<socket-binding-groups>
- <socket-binding-group name="standard-sockets" default-interface="public">
- <socket-binding name="http" port="8080"/>
- <socket-binding name="https" port="8443"/>
- <socket-binding name="jacorb" port="3528"/>
- <socket-binding name="jacorb-ssl" port="3529"/>
- <socket-binding name="jmx-connector-registry" interface="management" port="1090"/>
- <socket-binding name="jmx-connector-server" interface="management" port="1091"/>
- <socket-binding name="messaging" port="5445"/>
- <socket-binding name="messaging-throughput" port="5455"/>
- <socket-binding name="osgi-http" interface="management" port="8090"/>
- <socket-binding name="remoting" port="4447"/>
- <socket-binding name="txn-recovery-environment" port="4712"/>
- <socket-binding name="txn-status-manager" port="4713"/>
- <outbound-socket-binding name="mail-smtp">
- <remote-destination host="localhost" port="25"/>
- </outbound-socket-binding>
- </socket-binding-group>
<socket-binding-group name="ha-sockets" default-interface="public">
<socket-binding name="http" port="8080"/>
<socket-binding name="https" port="8443"/>
@@ -536,7 +519,7 @@
<server-groups>
<server-group name="main-server-group" profile="ha">
<jvm name="default">
- <heap size="512m" max-size="1024m"/>
+ <heap size="1024m" max-size="2048m"/>
</jvm>
<socket-binding-group ref="ha-sockets"/>
</server-group>
Modified: trunk/build/kits/jboss-as7/domain/configuration/host-teiid.xml
===================================================================
--- trunk/build/kits/jboss-as7/domain/configuration/host-teiid.xml 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/build/kits/jboss-as7/domain/configuration/host-teiid.xml 2011-12-07 15:46:45 UTC (rev 3721)
@@ -43,7 +43,7 @@
<servers>
<server name="server-one" group="main-server-group">
- <!-- server-one inherits the default socket-group declared in the server-group -->
+ <socket-binding-group ref="ha-sockets" port-offset="0"/>
<jvm name="default">
<!-- Remote JPDA debugging for a specific server
<jvm-options>
@@ -52,18 +52,12 @@
-->
</jvm>
</server>
+
+ <!-- If additional servers needed on same host un-comment and configure -->
+ <!--
<server name="server-two" group="main-server-group" auto-start="true">
- <!-- server-two avoids port conflicts by incrementing the ports in
- the default socket-group declared in the server-group -->
<socket-binding-group ref="ha-sockets" port-offset="150"/>
- <jvm name="default">
- <heap size="64m" max-size="256m"/>
- </jvm>
</server>
- <server name="server-three" group="main-server-group" auto-start="false">
- <!-- server-three avoids port conflicts by incrementing the ports in
- the default socket-group declared in the server-group -->
- <socket-binding-group ref="ha-sockets" port-offset="250"/>
- </server>
+ -->
</servers>
</host>
Deleted: trunk/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-12-07 15:46:45 UTC (rev 3721)
@@ -1,238 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
- <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
- <TITLE>Teiid ${project.version} Release Notes</TITLE>
- <META NAME="CHANGEDBY" CONTENT="Steve Hawkins">
- </STYLE>
-</HEAD>
-<BODY LANG="en-US" DIR="LTR">
-<P><A HREF="http://www.teiid.org/"><IMG SRC="https://www.jboss.org/dms/teiid/images/teiid-banner.png" NAME="graphics1" ALT="Teiid" ALIGN=BOTTOM WIDTH=800></A>
-
-<H1>Teiid ${project.version} Release Notes</H1>
-<P>Teiid ${project.version} is the first Teiid release compatible with JBoss AS 7.x.
-
-<H2>Overview</H2>
-<UL>
- <LI><A HREF="#Highlights">Highlights</A>
- <LI><A HREF="#Compatibility">Compatibility Issues</A>
- <LI><A HREF="#Configuration">Configuration Issues</A>
- <LI><A HREF="#Other">Other Issues</A>
- <LI><A HREF="#LibraryUpdates">Thirdparty Library Updates</A>
- <LI><A HREF="#Details">Detailed Release Notes</A>
- <LI><A HREF="#Documentation">Additional Docs and Help</A>
- <LI><A HREF="#Licenses">Licenses</A>
- <LI><A HREF="#About">About JBoss</A>
-</UL>
-<H2><A NAME="Highlights"></A>Highlights</H2>
-<UL>
- <LI><B>CallableStatement Named Parameters</B> - you can now use CallableStatement named parameter get/set methods.
- <LI><B>New Translator capabilities</B> - translators may indicate which convert functions they support and restrict non-join comparisons
- to only literals.
-</UL>
-
-<h2><a name="Compatibility">Compatibility Issues</a></h2>
-<ul>
- <li>Support for named parameter syntax using param=value has been deprecated, since it is ambiguous with a comparison predicate boolean value expression. param<b>=></b>value should be used instead.
- <li>Support for using the FROM clause post item hints MAKEDEP/MAKENOTDEP has been deprecated. Use the pre item comment hint syntax instead, e.g. /*+ MAKEDEP */ tbl
-</ul>
-
-<h4>from 7.x</h4>
-<ul>
- <li>TRANSLATE/HAS CRITERIA has been removed. INSTEAD OF trigger actions should be used instead. ROWS_UPDATED, INPUTS, and INPUT are no longer procedure reserved words.
- <li>7.x or earlier VDBs with table cardinalities set the old unknown value 0 will now report that value as -1 via the metadata API or SYS.TABLES.
- <li>Exact fixed point literals, e.g. 1.0, are now parsed as decimal/BigDecimal values as per the ANSI specification, rather than as double values.
- Also the AVG aggregate function will return an exact numeric (BigDecimal) value for integral types rather than returning a double value.
- Views that were projecting doubles from exact numeric literals or using AVG will need to be updated. There is also a new system property org.teiid.decimalAsDouble to
- enable the pre-8.0 behavior. The BigDecimal form of the AVG function now uses the same precision and scale logic as the division system function, rather than using a
- fixed scale of 9.
- <li>BigDecimal division that returns a quotient that is equal to zero will have a scale of zero as well. Prior releases would typically return a zero value with a scale of 16.
-</ul>
-
-<h4>from 7.5</h4>
-<ul>
- <li>Leave was added as a reserved word.
- <li>Lob inlining is incompatible with clients older than 7.6. If a 7.6 server will have older clients that use lobs connect to it, then the BufferService property inline-lobs should be set to false in the teiid-jboss-beans.xml file.
- <li>Oracle translators assume they are using Oracle supplied drivers. If that is not the case, set the Oracle translator execution property oracleSuppliedDriver to false.
- <li>Unordered limits are handled strictly by default. They are longer pushed through conditions, dup removal, or UNION not all - and cannot have conditions pushed through them. Use the NON_STRICT hint to change the behavior to Teiid 7.1 handling.
-</ul>
-
-<h4>from 7.4</h4>
-<ul>
- <li>OFFSET and LIKE_REGEX were added as reserved words.
- <li>ColumnReference.getName will always return just the element name. Previously it inconsistently returned the qualified and unqualified form depending upon where the ColumnReference appeared.
- <li>As per JDBC4, ResultSetMetadata.getColumnName will return the unaliased column name if available rather than return the alias. Set useJDBC4ColumnNameAndLabelSemantics to false to use the alias name as the column name.
-</ul>
-
-<h4>from 7.3</h4>
-<ul>
- <li>SYS.PROPERTIES has a new column, ClobValue, to get values exceeding the max string length
- <li>SYS.COLUMNS has two new columns to get statistical information: DistinctCount and NullCount
- <li>ARRAY_AGG is now a reserved word</li>
- <li>The use of an IN procedure parameter with the name "source_name" in a multi-source model, will now be treated the parameter that controls which source
- the procedure will execute against.
- <li>Dynamic VDB functions injected via ExecutionFactory.getPushdownFunctions are now scoped to the SYS schema and have a fully qualified name that includes their source type. For example, instead of oracle_model.relate - which was only valid against the oracle_model source, there is now the SYS.oracle_sdo.relate function that is valid for all Oracle sources. Any fully-qualified reference to these functions will need updated.
-</ul>
-
-<h4>from 7.2</h4>
-<ul>
- <li>The default JDBC credentials are user/user - not admin/teiid
- <li>Unordered limits are no longer pushed through conditions, dup removal, or UNION not all. This prevents the possibility of getting less results than the logical intent of the limit.
-</ul>
-
-<h4>from 7.1</h4>
-<ul>
- <li>Subqueries are no longer allowed to be SELECT INTO.
- <li>INSERT/UPDATE/DELETE cannot be used to create implicit return cursors in non-update virtual procedures. You can instead use "UPDATE ...; SELECT VARIABLES.ROWCOUNT;".
- <li>The SYSADMIN schema was created to hold procedures and tables that should not be generally accessible. SYS and pg_catalog are now always accessible - permissions do not apply to these schemas. The SYS.getBinaryVDBResource, SYS.getCharacterVDBResource, and SYS.getVDBResourcePaths have been replaced with the
- SYSADMIN.VDBResources table. The Matviews table and the refreshMatView/refreshMatViewRow procedures were also moved into SYSADMIN.
- <li>Overwriting an existing VDB will cause old connections to be terminated. Production systems should rely on VDB versioning.
- <li>The jdbc:metamatrix JDBC URL prefix is no longer accepted. Use jdbc:teiid instead.
- <li>Model visibility no longer restricts access to tables and procedures. Setting visible to false will only hide entries from system tables. Data roles should be used to restrict data access.
- <li>Admin API "getWorkManagerStats" methods renamed to "getWorkerPoolStats". Also, "setRuntimeProperty" and "getProcesses" methods were removed.
- <li>By default the "ENV" system function is now turned off. To enable it, edit the teiid-jboss-beans.xml configuration file.
- <li>The use of VARIABLES.ROWCOUNT is now reserved.
- <li>Exec statements of the form "var = EXEC foo()" are only valid if the procedure foo has a return parameter.
- <li>Cache hint now supports "scope" definition. For ex: /* cache(scope:user) */ select * from T1; This hint will override the computed scope based on the query.
-</ul>
-<h4>from 7.0</h4>
-<ul>
- <li>The term data policy was replaced with data role. The AdminAPI methods for adding role mappings have changed from addRoleToDataPolicy and removeRoleFromDataPolicy to addDataRoleMapping and removeDataRoleMapping respectively.
-</ul>
-
-<h2><a name="Configuration">Configuration Issues</a></h2>
-
-See the <a href="teiid-docs/teiid_admin_guide.pdf">Admin Guide</a> for more on configuration and installation.
-
-<h4>from 7.4</h4>
-<ul>
- <li>The configuration for the buffer service now defaults to 256/512 for processor and connector batch sizes respectively. The buffer service also has 4 new properties inline-lobs, memory-buffer-space, memory-buffer-off-heap, and max-storage-object-size.
- If you were explicitly setting the value for 'max-reserve-kb', you should consider lowering that value to account for the memory buffer and/or explicitly set the memory-buffer-space.
-</ul>
-
-<h4>from 7.4</h4>
-<ul>
- <LI>The configuration for authorization has been moved off of the RuntimeEngineDeployer bean and onto separate AuthorizationValidator and PolicyDecider beans.
- <LI>The configuration for the buffer manager has been simplified to refer to memory sizes in KB, rather than batch columns.
-</ul>
-
-<h4>from 7.3</h4>
-<ul>
- <LI>The default value for the JDBC dynamic vdb importer setting importer.useFullSchemaName is now true, which matches the expected behavior from the documentation.
- <LI>The prepared plan cache is now configured via the PreparedPlanCacheConfig bean, rather than through properties on the RuntimeEngineDeployer
- <LI>SocketConfiguration.maxSocketThreads will interpret a setting of 0 to mean use the system default of max available processors. Both the ODBC and JDBC transports now default to the 0 setting.
- <LI>maxReserveBatchColumns and maxProcessingBatchesColumns will interpret a setting of -1 to mean auto-calculate acceptable values given the max heap and other information. See the admin guide for more.
- <LI>The default for org.teiid.useValueCache has changed to false, since typical installations will not greatly benefit from the additional lookup cost.
- <LI>The property RuntimeEngineDeployer.allowFunctionCallsByDefault was added so that Teiid 7.4 behavior is compatible with Teiid 7.3. Set this property to false to require permissions for function calls when data roles are enabled.
-</ul>
-
-<h4>from 7.2</h4>
-<ul>
- <LI>Temporary tables can now be restricted by data roles. Use the data-role attribute allow-create-temporary-tables to explicitly enable or disable the usage of temporary tables.
-There is also a allowCreateTemporaryTablesByDefault property in the teiid-jboss-beans.xml to control whether usage is allowed by default. For compatibility with prior 7.x releases, the default is to allow
-temporary table access.
-</ul>
-
-<h4>from 7.1</h4>
-<ul>
- <li>Teiid clients now allow the usage of anonymous SSL by default.
- This changes allows the admin port (default 31443) to use anonymous SSL by default, rather than just securing login traffic.
- Admin clients should therefore use the mms protocol instead of mm. This will encrypt all admin traffic and ensure that any passwords in configuration files will
- be encrypted in transit. See the Admin Guide to upgrade from anonymous SSL to 1-way or 2-way authentication.
- The config properties sslEnabled and clientEncryptionEnabled for SSLConfiguration beans have been combined to a single property mode, that can have the values disabled|login|enabled.
- <li>Apache CXF is now expected to be used as the web services stack provider through JBossWS-CXF. See the Admin Guide for instructions on
- installing CXF for use with Teiid's Salesforce and web service connectors. The WS Resource Adapter's -ds.xml files should no longer use
- WSSecurityConfigURL and WSSecurityConfigName, rather they should be ConfigFile and ConfigName respectively. The property values should no longer
- refer to jboss-wsse-client.xml, but instead they should reference a CXF Spring configuration file and particular port configuration. See the Admin Guide
- for more on using CXF configuration files.
- <li>The default for data role checking is now "true". However only VDBs with data roles will have roles enforced.
- <li>The default prepared plan cache size was increased to 512, since it is targeted by internal plans as well.
-</ul>
-
-<h4>from 7.0</h4>
-<ul>
- <li>The property to enable data roles in teiid-jboss-beans.xml has changed from useEntitlements to useDataRoles.
- <li>Rar file names no longer contain version numbers. -ds.xml files should be updated from connector-XXX-version.rar to teiid-connector-XXX.rar
- <li>Code table relate configuration properties have been removed. Code tables are now implemented as materialized views.
-</ul>
-
-<h2><a name="Other">Other Issues</a></h2>
-<ul>
- <li>TEIID-1170 - correlated subqueries are not allowed in UPDATEs or DELETEs against internal Teiid tables (internal materialized views or temporary tables).
- <li>TEIID-1281 - Negative start indexing is not supported by DB2 and Derby databases. Usage of the Teiid SUBSTRING against these sources should not use negative start values.
- <li>TEIID-1008 - Most versions of Oracle and MySQL do not support deeply nested correlated references. There is currently no workaround for this issue.
- <li>For compatibility with the 7.0 release if a stored procedure parameter list begins with identifier=, then it will be parsed as a named parameter invocation even if the intent was to use a comparison predicate
- as the first parameter value. The workaround is to use nesting parens, e.g. call proc((identifier=value), ...), which clarifies that this is positional value. This workaround will not be needed in later releases.
- <li><a url="https://issues.jboss.org/browse/TEIID-1511">TEIID-1511<a/> - When a VDB is deployed and undeployed a socket is left open, which may lead to "too manay open files". Check the defect comments for details.
- <li>TEIID-1648 - Teradata lobs can only be consistently read from an embedded client (with the default option to use the calling thread) and in single threaded mode (transactional or thread-count-for-source-concurrency=1). Usage of Teradata lobs under any other configuration is unlikely to work.
-</ul>
-<h4>from 7.0</h4>
-<ul>
- <li>Fixed xsd type handling for SQL/XML and XML document models. xsd:date, xsd:dateTime, and xsd:time types will now all be displayed using the GMT timezone (Z). SQL types, such as timestamp, used for an XMLTABLE column will now expect their values to be in the form of the corresponding xsd type.
-</ul>
-
-<h2><a name="LibraryUpdates">Thirdparty Library Updates</a></h2>
-
-The following components have been updated:
-
-<h4>From 7.4</h4>
-<ul>
- <li>Saxon was upgraded to 9.2.1.5
- <li>nux 1.6, and xom 1.2 were added.
-</ul>
-<h4>From 7.1</h4>
-<ul>
- <li>json-simple 1.1 was added.
- <li>Netty was upgraded to 3.2.1
-</ul>
-<h4>From 7.0</h4>
-<ul>
- <li>Direct integration of JBossCache jars was removed.
- <li>Netty was upgraded to 3.2.0
- <li>JDOM was removed.
-</ul>
-
-<h2><a name="Details">Detailed Release Notes</a></h2>
- Detailed Release Notes - Teiid - Version ${project.version}
-
-<h2><a name="Documentation">Documentation and Help</a></h2>
-
-The <a href="http://www.jboss.org/teiid/">Teiid community project</a> is hosted on jboss.org.
-Documentation and help may be obtained from the local distribution under <a href="teiid-docs">teiid-docs</a> or the following locations.
-<ul>
-
-<li><a href="http://www.jboss.org/teiid/docs">Online Documentation</a></li>
-<li><a href="https://community.jboss.org/wiki/TheTeiidProject">Wiki</a></li>
-<li><a href="http://jira.jboss.org/jira/browse/TEIID">JIRA</a></li>
-<li><a href="http://community.jboss.org/en/teiid?view=discussions">Forums</a></li>
-</ul>
-
-
-<h2><a name="Licenses">Licenses</a></h2>
-
-<p>Teiid is licensed under the <a href="LICENSE-lgpl-2.1.txt">LGPL</a>. The
-license texts for Teiid and the thirdparty components it uses may be found in the <a href="teiid-docs/licenses">teiid-docs/licenses</a>
-directory of the distribution.
-
-</p>
-
-<h2><a name="About">About JBoss, a
-division of Red Hat</a></h2>
-
-<p>JBoss, a division of <a href="http://www.redhat.com/jboss/">Red
-Hat</a>, is in the business of
-providing
-superior technical support to our customers. Our goal is to make
-Professional Open Source™ the <b>SAFE
-CHOICE</b>
-for you. We accomplish this by backing up our open source Java products
-with technical support services that are delivered by the core
-developers themselves. We can help you to train your staff and provide
-you with support at every stage of the application lifecycle - from
-development and integration through deployment and maintenance. Visit
-the <a href="http://www.jboss.com/services/index">JBoss
-Services</a> page for more
-information.</p>
-
-</BODY>
-</HTML>
\ No newline at end of file
Modified: trunk/connectors/connector-file/src/main/java/org/teiid/resource/adapter/file/FileManagedConnectionFactory.java
===================================================================
--- trunk/connectors/connector-file/src/main/java/org/teiid/resource/adapter/file/FileManagedConnectionFactory.java 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/connectors/connector-file/src/main/java/org/teiid/resource/adapter/file/FileManagedConnectionFactory.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -42,6 +42,7 @@
private boolean allowParentPaths = true;
@Override
+ @SuppressWarnings("serial")
public BasicConnectionFactory createConnectionFactory() throws ResourceException {
if (this.parentDirectory == null) {
throw new InvalidPropertyException(UTIL.getString("parentdirectory_not_set")); //$NON-NLS-1$
@@ -76,8 +77,35 @@
return allowParentPaths;
}
- public void setAllowParentPaths(boolean allowParentPaths) {
+ public void setAllowParentPaths(Boolean allowParentPaths) {
this.allowParentPaths = allowParentPaths;
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + (allowParentPaths ? 1231 : 1237);
+ result = prime * result + ((fileMapping == null) ? 0 : fileMapping.hashCode());
+ result = prime * result + ((parentDirectory == null) ? 0 : parentDirectory.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (obj == null) return false;
+ if (getClass() != obj.getClass()) return false;
+ FileManagedConnectionFactory other = (FileManagedConnectionFactory) obj;
+ if (allowParentPaths != other.allowParentPaths)
+ return false;
+ if (!checkEquals(this.fileMapping, other.fileMapping)) {
+ return false;
+ }
+ if (!checkEquals(this.parentDirectory, other.parentDirectory)) {
+ return false;
+ }
+ return true;
+ }
}
Added: trunk/connectors/connector-file/src/main/java/org/teiid/resource/adapter/file/FileResourceAdapter.java
===================================================================
--- trunk/connectors/connector-file/src/main/java/org/teiid/resource/adapter/file/FileResourceAdapter.java (rev 0)
+++ trunk/connectors/connector-file/src/main/java/org/teiid/resource/adapter/file/FileResourceAdapter.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+package org.teiid.resource.adapter.file;
+
+import org.teiid.resource.spi.BasicResourceAdapter;
+
+public class FileResourceAdapter extends BasicResourceAdapter {
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ return true;
+ }
+}
Property changes on: trunk/connectors/connector-file/src/main/java/org/teiid/resource/adapter/file/FileResourceAdapter.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/connectors/connector-file/src/main/rar/META-INF/ra.xml
===================================================================
--- trunk/connectors/connector-file/src/main/rar/META-INF/ra.xml 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/connectors/connector-file/src/main/rar/META-INF/ra.xml 2011-12-07 15:46:45 UTC (rev 3721)
@@ -30,7 +30,7 @@
<license-required>true</license-required>
</license>
<resourceadapter>
- <resourceadapter-class>org.teiid.resource.spi.BasicResourceAdapter</resourceadapter-class>
+ <resourceadapter-class>org.teiid.resource.adapter.file.FileResourceAdapter</resourceadapter-class>
<outbound-resourceadapter>
<connection-definition>
@@ -51,7 +51,7 @@
<config-property>
<description>{$display:"Allow Parent Paths"}</description>
<config-property-name>AllowParentPaths</config-property-name>
- <config-property-type>boolean</config-property-type>
+ <config-property-type>java.lang.Boolean</config-property-type>
<config-property-value>true</config-property-value>
</config-property>
Modified: trunk/connectors/connector-ldap/src/main/java/org/teiid/resource/adapter/ldap/LDAPManagedConnectionFactory.java
===================================================================
--- trunk/connectors/connector-ldap/src/main/java/org/teiid/resource/adapter/ldap/LDAPManagedConnectionFactory.java 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/connectors/connector-ldap/src/main/java/org/teiid/resource/adapter/ldap/LDAPManagedConnectionFactory.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -38,6 +38,7 @@
@Override
+ @SuppressWarnings("serial")
public BasicConnectionFactory createConnectionFactory() throws ResourceException {
return new BasicConnectionFactory() {
@Override
@@ -85,5 +86,45 @@
public void setLdapContextFactory(String ldapContextFactory) {
this.ldapContextFactory = ldapContextFactory;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((ldapAdminUserDN == null) ? 0 : ldapAdminUserDN.hashCode());
+ result = prime * result + ((ldapAdminUserPassword == null) ? 0 : ldapAdminUserPassword.hashCode());
+ result = prime * result + ((ldapContextFactory == null) ? 0 : ldapContextFactory.hashCode());
+ result = prime * result + (int) (ldapTxnTimeoutInMillis ^ (ldapTxnTimeoutInMillis >>> 32));
+ result = prime * result + ((ldapUrl == null) ? 0 : ldapUrl.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ LDAPManagedConnectionFactory other = (LDAPManagedConnectionFactory) obj;
+ if (!checkEquals(this.ldapAdminUserDN, other.ldapAdminUserDN)) {
+ return false;
+ }
+ if (!checkEquals(this.ldapAdminUserPassword, other.ldapAdminUserPassword)) {
+ return false;
+ }
+ if (!checkEquals(this.ldapContextFactory, other.ldapContextFactory)) {
+ return false;
+ }
+ if (!checkEquals(this.ldapTxnTimeoutInMillis, other.ldapTxnTimeoutInMillis)) {
+ return false;
+ }
+ if (!checkEquals(this.ldapUrl, other.ldapUrl)) {
+ return false;
+ }
+ return true;
}
+
}
Added: trunk/connectors/connector-ldap/src/main/java/org/teiid/resource/adapter/ldap/LdapResourceAdapter.java
===================================================================
--- trunk/connectors/connector-ldap/src/main/java/org/teiid/resource/adapter/ldap/LdapResourceAdapter.java (rev 0)
+++ trunk/connectors/connector-ldap/src/main/java/org/teiid/resource/adapter/ldap/LdapResourceAdapter.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+package org.teiid.resource.adapter.ldap;
+
+import org.teiid.resource.spi.BasicResourceAdapter;
+
+public class LdapResourceAdapter extends BasicResourceAdapter {
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ return true;
+ }
+}
Property changes on: trunk/connectors/connector-ldap/src/main/java/org/teiid/resource/adapter/ldap/LdapResourceAdapter.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/connectors/connector-ldap/src/main/rar/META-INF/ra.xml
===================================================================
--- trunk/connectors/connector-ldap/src/main/rar/META-INF/ra.xml 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/connectors/connector-ldap/src/main/rar/META-INF/ra.xml 2011-12-07 15:46:45 UTC (rev 3721)
@@ -34,7 +34,7 @@
<license-required>true</license-required>
</license>
<resourceadapter>
- <resourceadapter-class>org.teiid.resource.spi.BasicResourceAdapter</resourceadapter-class>
+ <resourceadapter-class>org.teiid.resource.adapter.ldap.LdapResourceAdapter</resourceadapter-class>
<outbound-resourceadapter>
<connection-definition>
Modified: trunk/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesForceManagedConnectionFactory.java
===================================================================
--- trunk/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesForceManagedConnectionFactory.java 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesForceManagedConnectionFactory.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -65,10 +65,14 @@
public void setPassword(String password) {
this.password = password;
}
- public URL getURL() {
+ public URL getAsURL() {
return this.URL;
}
+ public String getURL() {
+ return this.URL.toExternalForm();
+ }
+
public void setURL(String uRL) {
try {
this.URL = new URL(uRL);
@@ -102,7 +106,7 @@
@Override
public SalesforceConnectionImpl getConnection() throws ResourceException {
- return new SalesforceConnectionImpl(getUsername(), getPassword(), getURL(), SalesForceManagedConnectionFactory.this);
+ return new SalesforceConnectionImpl(getUsername(), getPassword(), getAsURL(), SalesForceManagedConnectionFactory.this);
}
};
}
@@ -110,4 +114,35 @@
public Bus getBus() {
return bus;
}
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((URL == null) ? 0 : URL.hashCode());
+ result = prime * result + ((password == null) ? 0 : password.hashCode());
+ result = prime * result + ((username == null) ? 0 : username.hashCode());
+ result = prime * result + ((configFile == null) ? 0 : configFile.hashCode());
+ return result;
+ }
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (obj == null) return false;
+ if (getClass() != obj.getClass()) return false;
+ SalesForceManagedConnectionFactory other = (SalesForceManagedConnectionFactory) obj;
+ if (!checkEquals(this.URL, other.URL)) {
+ return false;
+ }
+ if (!checkEquals(this.password, other.password)) {
+ return false;
+ }
+ if (!checkEquals(this.username, other.username)) {
+ return false;
+ }
+ if (!checkEquals(this.configFile, other.configFile)) {
+ return false;
+ }
+
+ return true;
+ }
}
Added: trunk/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceResourceAdapter.java
===================================================================
--- trunk/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceResourceAdapter.java (rev 0)
+++ trunk/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceResourceAdapter.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+package org.teiid.resource.adapter.salesforce;
+
+import org.teiid.resource.spi.BasicResourceAdapter;
+
+public class SalesforceResourceAdapter extends BasicResourceAdapter {
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ return true;
+ }
+}
Property changes on: trunk/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceResourceAdapter.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/connectors/connector-salesforce/src/main/rar/META-INF/ra.xml
===================================================================
--- trunk/connectors/connector-salesforce/src/main/rar/META-INF/ra.xml 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/connectors/connector-salesforce/src/main/rar/META-INF/ra.xml 2011-12-07 15:46:45 UTC (rev 3721)
@@ -34,7 +34,7 @@
<license-required>true</license-required>
</license>
<resourceadapter>
- <resourceadapter-class>org.teiid.resource.spi.BasicResourceAdapter</resourceadapter-class>
+ <resourceadapter-class>org.teiid.resource.adapter.salesforce.SalesforceResourceAdapter</resourceadapter-class>
<outbound-resourceadapter>
<connection-definition>
Modified: trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSConnectionImpl.java
===================================================================
--- trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSConnectionImpl.java 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSConnectionImpl.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -261,7 +261,7 @@
dispatch = svc.createDispatch(mcf.getPortQName(), type, mode);
- if (mcf.getSecurityType() == WSManagedConnectionFactory.SecurityType.WSSecurity
+ if (mcf.getAsSecurityType() == WSManagedConnectionFactory.SecurityType.WSSecurity
&& mcf.getOutInterceptors() != null) {
Client client = ((DispatchImpl)dispatch).getClient();
Endpoint ep = client.getEndpoint();
@@ -271,7 +271,7 @@
}
}
- if (mcf.getSecurityType() == WSManagedConnectionFactory.SecurityType.HTTPBasic){
+ if (mcf.getAsSecurityType() == WSManagedConnectionFactory.SecurityType.HTTPBasic){
dispatch.getRequestContext().put(Dispatch.USERNAME_PROPERTY, mcf.getAuthUserName());
dispatch.getRequestContext().put(Dispatch.PASSWORD_PROPERTY, mcf.getAuthPassword());
}
Modified: trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSManagedConnectionFactory.java
===================================================================
--- trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSManagedConnectionFactory.java 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSManagedConnectionFactory.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -55,6 +55,7 @@
private QName portQName;
private List<? extends Interceptor> outInterceptors;
+ @SuppressWarnings("serial")
@Override
public BasicConnectionFactory createConnectionFactory() throws ResourceException {
String configName = getConfigName();
@@ -103,10 +104,14 @@
this.endPoint = endPoint;
}
- public SecurityType getSecurityType() {
+ public SecurityType getAsSecurityType() {
return SecurityType.valueOf(this.securityType);
}
+ public String getSecurityType() {
+ return this.securityType;
+ }
+
public void setSecurityType(String securityType) {
this.securityType = securityType;
}
@@ -138,5 +143,45 @@
public List<? extends Interceptor> getOutInterceptors() {
return outInterceptors;
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((authPassword == null) ? 0 : authPassword.hashCode());
+ result = prime * result + ((authUserName == null) ? 0 : authUserName.hashCode());
+ result = prime * result + ((configFile == null) ? 0 : configFile.hashCode());
+ result = prime * result + ((configName == null) ? 0 : configName.hashCode());
+ result = prime * result + ((endPoint == null) ? 0 : endPoint.hashCode());
+ result = prime * result + ((securityType == null) ? 0 : securityType.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (obj == null) return false;
+ if (getClass() != obj.getClass()) return false;
+ WSManagedConnectionFactory other = (WSManagedConnectionFactory) obj;
+ if (!checkEquals(this.authPassword, other.authPassword)) {
+ return false;
+ }
+ if (!checkEquals(this.authUserName, other.authUserName)) {
+ return false;
+ }
+ if (!checkEquals(this.configFile, other.configFile)) {
+ return false;
+ }
+ if (!checkEquals(this.configName, other.configName)) {
+ return false;
+ }
+ if (!checkEquals(this.endPoint, other.endPoint)) {
+ return false;
+ }
+ if (!checkEquals(this.securityType, other.securityType)) {
+ return false;
+ }
+ return true;
+ }
}
Added: trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSResourceAdapter.java
===================================================================
--- trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSResourceAdapter.java (rev 0)
+++ trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSResourceAdapter.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+package org.teiid.resource.adapter.ws;
+
+import org.teiid.resource.spi.BasicResourceAdapter;
+
+public class WSResourceAdapter extends BasicResourceAdapter {
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ return true;
+ }
+}
Property changes on: trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSResourceAdapter.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/connectors/connector-ws/src/main/rar/META-INF/ra.xml
===================================================================
--- trunk/connectors/connector-ws/src/main/rar/META-INF/ra.xml 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/connectors/connector-ws/src/main/rar/META-INF/ra.xml 2011-12-07 15:46:45 UTC (rev 3721)
@@ -34,7 +34,7 @@
<license-required>true</license-required>
</license>
<resourceadapter>
- <resourceadapter-class>org.teiid.resource.spi.BasicResourceAdapter</resourceadapter-class>
+ <resourceadapter-class>org.teiid.resource.adapter.ws.WSResourceAdapter</resourceadapter-class>
<outbound-resourceadapter>
<connection-definition>
Modified: trunk/documentation/admin-guide/src/main/docbook/en-US/content/appendix-a.xml
===================================================================
--- trunk/documentation/admin-guide/src/main/docbook/en-US/content/appendix-a.xml 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/documentation/admin-guide/src/main/docbook/en-US/content/appendix-a.xml 2011-12-07 15:46:45 UTC (rev 3721)
@@ -10,18 +10,9 @@
<para>The Console environment does not understand Shell commands (load, help, adminhelp, etc.), since they are not directly supported by Groovy. In the Console you should use the equivalent functional form / Groovy, e.g. instead of adminhelp, adminHelp()</para>
</answer>
</qandaentry>
-
+
<qandaentry>
<question>
- <para>Are there any pre-built scripts available?</para>
- </question>
- <answer>
- <para>Currently no, but we will provide samples in subsequent releases.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
<para>I have written a very useful script to do XYZ, I would like this to be part of the distribution?</para>
</question>
<answer>
Modified: trunk/documentation/admin-guide/src/main/docbook/en-US/content/clustering.xml
===================================================================
--- trunk/documentation/admin-guide/src/main/docbook/en-US/content/clustering.xml 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/documentation/admin-guide/src/main/docbook/en-US/content/clustering.xml 2011-12-07 15:46:45 UTC (rev 3721)
@@ -3,9 +3,9 @@
<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="https://docs.jboss.org/author/display/AS7/Documentation">instructions</ulink> then Teiid instances
- are clustered as well. Just make sure that you installed Teiid in every JBoss AS node and started JBoss AS instances in the
+ the Teiid instances. Check the <link linkend="installation">installation</link> for quick instructions. See
+ detailed JBoss AS <ulink url="https://docs.jboss.org/author/display/AS7/Documentation">instructions</ulink> here.
+ Just make sure that you installed Teiid in every JBoss AS node and started JBoss AS instances in the
Domain mode before starting the cluster.
</para>
Modified: trunk/documentation/admin-guide/src/main/docbook/en-US/content/installation.xml
===================================================================
--- trunk/documentation/admin-guide/src/main/docbook/en-US/content/installation.xml 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/documentation/admin-guide/src/main/docbook/en-US/content/installation.xml 2011-12-07 15:46:45 UTC (rev 3721)
@@ -39,14 +39,30 @@
<programlisting><![CDATA[
<jboss-install>/bin/standalone.sh --server-config=standalone-teiid.xml
]]></programlisting>
- if you want to start the "standalone" profile. To start the server in "Domain" mode execute command
+ if you want to start the "standalone" profile. </para>
+
+ <para>
+ To start the server in "Domain" mode, install the JBoss AS 7.x and Teiid on all the servers in are going to be
+ part of the cluster. Select one of the server as the "master" domain controller, the rest of the
+ servers will be slaves that connect to the "master" domain controller for all the administrative operations.
+ Edit "host-teiid.xml" on all the slave servers in "jbossas/domain/configuration" directory, and make sure the
+ "domain-controller" element is configured with ip address of the "master" server. For example
<programlisting><![CDATA[
- <jboss-install>/bin/domain.sh --domain-config=domain-teiid.xml
+ <domain-controller>
+ <remote host="192.168.100.1" port="9999"/>
+ </domain-controller>
]]></programlisting>
- To complete the installion for the domain mode, after the server has been started run the following command. Note that
- this only needs to be run for once per whole domain install. Since in domain mode you can not statically deploy resources,
- this script deploys default resources required for Teiid once the server starts using the CLI interface.
+ the port number is for the management interface, make sure they match to that of what you have in the configuration.
+ If you want to change the "server-group" name or add unique server names to each server then modify the "servers" element.
+ Once all the configuration edits are done, then you can start JBoss AS in domain mode by executing the command
<programlisting><![CDATA[
+ <jboss-install>/bin/domain.sh --domain-config=domain-teiid.xml --host-config=host-teiid.xml
+ ]]></programlisting>
+ on all the servers. Once all the servers are up, to complete the installion for the domain mode,
+ run the following command on any one server. Note that this only needs to be run for once per whole domain install.
+ Since in domain mode you can not statically deploy resources, this script deploys default resources required
+ (file, ldap, salesforce and ws connectors) for Teiid once the server starts using the CLI interface.
+ <programlisting><![CDATA[
<jboss-install>/bin/jboss-admin.sh --file=scripts/teiid-domain-mode-install.cli
]]></programlisting>
</para>
Modified: trunk/documentation/admin-guide/src/main/docbook/en-US/content/vdb-deployment.xml
===================================================================
--- trunk/documentation/admin-guide/src/main/docbook/en-US/content/vdb-deployment.xml 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/documentation/admin-guide/src/main/docbook/en-US/content/vdb-deployment.xml 2011-12-07 15:46:45 UTC (rev 3721)
@@ -22,8 +22,9 @@
<section>
<title>Direct File Deployment</title>
- <para>Copy the VDB file into the "<jboss-install>/standalone/deployments" directory. Also, create file a
- empty marker file with same name as the VDB with extension ".dodeploy" in the same directory.
+ <para>Copy the VDB file into the "<jboss-install>/standalone/deployments" directory. The, create a
+ empty marker file with same name as the VDB with extension ".dodeploy" in the same directory. For eample, if your
+ vdb name is "enterprise.vdb", then marker file name must be "enterprise.vdb.dodeploy".
Make sure that there are no other VDB files with the same name. If a VDB already exists with
the same name, then this VDB will be replaced with the new VDB. This is the simplest way to deploy a VDB. This is mostly
designed for quick deployment during development, when the Teiid server is available locally on the developer machine.</para>
@@ -45,16 +46,18 @@
<title>CLI based Deployment</title>
<para>JBoss AS provides command line interface (CLI) for doing any kind of administrative task.
Execute "bin/jboss-admin.sh --connect" command and run
- <programlisting><![CDATA[deploy /path/to/my.vdb]]></programlisting>
- to deploy the VDB. Check out CLI documentation for more general usage of the CLI.</para>
+ <programlisting><![CDATA[deploy [--all-server-groups] /path/to/my.vdb]]></programlisting>
+ to deploy the VDB. Note that in domain mode, you need to either select a perticular "server-group" or all available
+ server groups are deployment options. Check out CLI documentation for more general usage of the CLI.</para>
</section>
<section>
<title>AdminShell Deployment</title>
<para>Teiid provides a groovy based AdminShell scripting tool, which can be used to deploy
- a VDB. Check out the "deployVDB" method. Consult the
- <link linkend="adminshell">AdminShell documentation</link> for more information. Note that using the AdminShell scripting, you can automate
- the deployment of artifacts in your environment.</para>
+ a VDB. Check out the "deploy" method. Consult the
+ <link linkend="adminshell">AdminShell documentation</link> for more information. Note that using the
+ AdminShell scripting, you can automate deployment of artifacts in your environment. When using AdminShell,
+ in domain mode, the VDB is deployed to all the servers.</para>
</section>
<section>
@@ -62,7 +65,8 @@
<para>The Admin API (look in org.teiid.adminpi.*) provides Java API methods that
lets a user connect to a Teiid runtime and deploy a VDB. If you need to programmatically
deploy a VDB use this method. This method is preferable for OEM users, who are trying to extend the
- Teiid's capabilities through their applications.</para>
+ Teiid's capabilities through their applications. When using Admin API,
+ in domain mode, the VDB is deployed to all the servers.</para>
</section>
</section>
@@ -71,8 +75,8 @@
<title>Deploying VDB Dependencies</title>
<para>Apart from deploying the VDB, the user is also responsible for providing all the necessary
dependent libraries, configuration for creating the data sources that are needed by the models (schemas)
- defined in "META-INF/vdb.xml" file inside your VDB. For example, if you are trying to integrate Oracle and File sources
- in your VDB, then you are responsible for
+ defined in "META-INF/vdb.xml" file inside your VDB. For example, if you are trying to integrate data from Oracle
+ RDBMS and File sources in your VDB, then you are responsible for
providing the JDBC driver for the Oracle source and any necessary documents and configuration that are needed by
the File Translator.</para>
@@ -80,10 +84,11 @@
as makes since for your deployments.
Consider sharing connections to sources that have heavy-weight and resource constrained connections.</para>
- <para>With the exception of JDBC sources, other supported data sources have a corresponding .rar (zip format) file
- in <jboss-install>/standalone/deployments directory.
- Either directly edit the standalone-teiid.xml or use CLI or Admin API to create the required data sources.
- You can consult the .rar files META-INF/ra.xml for a full description of how the RAR based source needs to be configured.
+ <para>With the exception of JDBC sources, other supported data sources have a corresponding JCA connector (.rar) files
+ in "<jboss-install>/standalone/deployments"" directory.
+ Either directly edit the standalone-teiid.xml or use CLI or Admin API to create the required data sources by the VDB.
+ Example configurations are provided for all the sources in "<jboss-install>/docs/teiid/datasources" directory.
+ Note that in the domain mode, you must either use CLI or admin-console or AdminShell to configure.
</para>
<para>Some data sources may contain passwords or other sensitive information.
@@ -122,10 +127,18 @@
<user-name>{user}</user-name>
<password>{password}</password>
</security>
- </datasource> ]]></programlisting>
+ </datasource> ]]></programlisting>
+ <para>Template files for different databases can found at {jboss-as}/docs/teiid/datasources directory</para>
</listitem>
+
+ <listitem> <para>If you like create using CLI, you can issue command like
+ <programlisting><![CDATA[
+/subsystem=datasources/data-source=oracel-ds:add(jndi-name=java:/OracleDS, pool-name=oracle-ds, driver-name=oracle, connection-url=jdbc:oracle:thin:{host}:1521:orcl,user-name={user}, password={password})
+/subsystem=datasources/data-source=oracel-ds:enable
+ ]]></programlisting>
+ </para> </listitem>
</orderedlist>
- <para>Template files for different databases can found at {jboss-as}/docs/teiid/datasources directory</para>
+
</section>
<section>
<title>File Data Sources</title>
@@ -163,7 +176,9 @@
</connection-definitions>
</resource-adapter>
</resource-adapters>
-</subsystem>]]></programlisting></example>
+</subsystem>]]></programlisting></example>
+ <para>You can use CLI to configure the same, however it is a multi-step process. For domain mode, you must use CLI, or
+ admin-console or AdminShell/Admin API</para>
</section>
<section id="ws-ds">
@@ -191,6 +206,9 @@
</resource-adapter>
</resource-adapters>
</subsystem>]]></programlisting></example>
+ <para>You can use CLI to configure the same, however it is a multi-step process. For domain mode, you must use CLI, or
+ admin-console or AdminShell/Admin API</para>
+
<section>
<title>CXF Configuration</title>
<para>Each web service data source may choose a particular CXF config file and port configuration.
@@ -383,6 +401,8 @@
</resource-adapter>
</resource-adapters>
</subsystem>]]></programlisting></example>
+ <para>You can use CLI to configure the same, however it is a multi-step process. For domain mode, you must use CLI, or
+ admin-console or AdminShell/Admin API</para>
<section>
<title>CXF Configuration</title>
@@ -430,6 +450,8 @@
</resource-adapter>
</resource-adapters>
</subsystem>]]></programlisting></example>
+ <para>You can use CLI to configure the same, however it is a multi-step process. For domain mode, you must use CLI, or
+ admin-console or AdminShell/Admin API</para>
</section>
</section>
@@ -483,9 +505,7 @@
<section>
<title>Migrating VDBs from 6.x</title>
<para>VDBs from prior release contain an older configuration file version that is no longer supported.
- You can use the migration utility (bin/migrate.sh or bin/migrate.bat) supplied with the
- <link linkend="adminshell">AdminShell</link> download
- to update these VDBs for use with Teiid 7. Note - XML and File based sources from previous releases have changed, and require manual changes to the VDB.</para>
+ Note - XML and File based sources from previous releases have changed, and require manual changes to the VDB.</para>
</section>
</chapter>
\ No newline at end of file
Modified: trunk/documentation/developer-guide/src/main/docbook/en-US/content/runtime-updates.xml
===================================================================
--- trunk/documentation/developer-guide/src/main/docbook/en-US/content/runtime-updates.xml 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/documentation/developer-guide/src/main/docbook/en-US/content/runtime-updates.xml 2011-12-07 15:46:45 UTC (rev 3721)
@@ -8,28 +8,28 @@
<para>Teiid supports several mechanisms for updating the runtime system.</para>
<section>
<title>Data Updates</title>
- <para>Data change events are used by Teiid to invalidate result set cache entries. Result set cache entires are tracked by the tables that contributed to their results.
+ <para>Data change events are used by Teiid to invalidate result set cache entries. Result set cache entries are tracked by the tables that contributed to their results.
By default Teiid will capture internal data events against physical sources and distribute them across the cluster.
This approach has several limitations. First updates are scoped only to their originating VDB/version. Second updates made out side of Teiid are not captured.
To increase data consistency external change data capture tools can be used to send events to Teiid. From within a Teiid cluster the <code>org.teiid.events.EventDistributorFactory</code>
- and <code>org.teiid.events.EventDistributor</code> can be used to distribute change events. The <code>EventDistributorFactory</code> is implemented by the
- <code>RuntimeEngineDeployer</code> bean and should be looked up by its name "teiid/engine-deployer". See the example below.</para>
+ and <code>org.teiid.events.EventDistributor</code> can be used to distribute change events. The <code>EventDistributorFactory</code>
+ can be looked up by its name "teiid/event-distributor-factory". See the example below.</para>
<example>
<title>Usage of the <code>EventDistributor</code></title>
<programlisting language="java">InitialContext ctx = new InitialContext();
-EventDistributorFactory edf = (EventDistributorFactory)ctx.lookup("teiid/engine-deployer");
+EventDistributorFactory edf = (EventDistributorFactory)ctx.lookup("teiid/event-distributor-factory");
EventDistributor ed = edf.getEventDistributor();
ed.dataModification(vdbName, vdbVersion, schema, tableName);</programlisting>
<para>This will distribute a change event for schema.tableName in vdb vdbName.vdbVersion.</para>
</example>
- <para>When externally capturing all update events, &jboss-beans; detect-change-events can be set to false, to not duplicate change events.</para>
+ <para>When externally capturing all update events, "detect-change-events" property in the teiid substem in &jboss-beans; can be set to false, to not duplicate change events.</para>
<para>The use of the other <code>EventDistributor</code> methods to manual distribute other events is not recommended.</para>
</section>
<section>
<title>Runtime Metadata Updates</title>
<para>Runtime updates via system procedures and DDL statements are by default ephemeral. They are effective across the cluster only for the currently running vdbs.
With the next vdb start the values will revert to whatever is stored in the vdb. Updates may be made persistent though by configuring a <code>org.teiid.metadata.MetadataRepository</code>.
- An instance of a <code>MetadataRepository</code> can be installed via the &teiid-deployer-beans; file in the <code>VDBRepository</code> bean.
+ An instance of a <code>MetadataRepository</code> can be installed via the &teiid-beans; file in the <code>teiid</code> subsystem using "metadata-repository-module" property.
The <code>MetadataRepository</code> repository instance may fully implement as many of the methods as needed and return null from any unneeded getter.</para>
<note><para>It is not recommended to directly manipulate <code>org.teiid.metadata.AbstractMetadataRecord</code> instances.
System procedures and DDL statements should be used instead since the effects will be distributed through the cluster and will not introduce inconsistencies.</para></note>
Modified: trunk/documentation/docbook/custom.dtd
===================================================================
--- trunk/documentation/docbook/custom.dtd 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/documentation/docbook/custom.dtd 2011-12-07 15:46:45 UTC (rev 3721)
@@ -5,6 +5,5 @@
<!ENTITY docUrl "&url;/docs.html">
<!ENTITY javaDocUrl "http://docs.jboss.org/teiid/&versionNumber;/apidocs">
<!ENTITY desDocUrl "http://www.jboss.org/teiiddesigner/docs.html">
-<!ENTITY jboss-beans "<code><jboss-install>/server/<profile>/deploy/teiid/teiid-jboss-beans.xml</code>">
-<!ENTITY teiid-deployer-beans "<code><jboss-install>/server/<profile>/deploy/deployers/teiid.deployer/teiid-deployer-jboss-beans.xml</code>">
+<!ENTITY jboss-beans "<code><jboss-install>/standalone/configuration/standalone-teiid.xml</code>">
<!ENTITY metadata-update-note "<note><para>A <code>MetadataRepository</code> must be configured to make a non-temporary metadata update persistent. See the Developers Guide Runtime Metadata Updates section for more.</para></note>">
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml 2011-12-07 15:46:45 UTC (rev 3721)
@@ -1877,7 +1877,7 @@
<para><synopsis>ENV(key)</synopsis></para>
<para>The only key specific to the current session is 'sessionid'.
However the preferred mechanism for getting the session id is with the session_id() function.
- To prevent untrusted access to system properties, this function is not enabled by default. The ENV function may be enabled via the allowEnvFunction property in the &teiid-deployer-beans; file.</para>
+ To prevent untrusted access to system properties, this function is not enabled by default. The ENV function may be enabled via the allowEnvFunction property in the &teiid-beans; file.</para>
<para>key, return value are strings</para>
</section>
<section>
Deleted: trunk/jboss-integration/src/main/java/org/teiid/jboss/CSRReferenceFactoryService.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/CSRReferenceFactoryService.java 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/CSRReferenceFactoryService.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -1,62 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This 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 software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.teiid.jboss;
-
-import org.jboss.as.naming.ManagedReference;
-import org.jboss.as.naming.ManagedReferenceFactory;
-import org.jboss.as.naming.ValueManagedReference;
-import org.jboss.msc.inject.Injector;
-import org.jboss.msc.service.Service;
-import org.jboss.msc.service.StartContext;
-import org.jboss.msc.service.StartException;
-import org.jboss.msc.service.StopContext;
-import org.jboss.msc.value.ImmediateValue;
-import org.jboss.msc.value.InjectedValue;
-import org.teiid.transport.ClientServiceRegistry;
-
-
-class CSRReferenceFactoryService implements Service<ManagedReferenceFactory>, ManagedReferenceFactory {
- private final InjectedValue<ClientServiceRegistry> csrInjector = new InjectedValue<ClientServiceRegistry>();
-
- private ManagedReference reference;
-
- public synchronized void start(StartContext startContext) throws StartException {
- reference = new ValueManagedReference(new ImmediateValue<Object>(csrInjector.getValue()));
- }
-
- public synchronized void stop(StopContext stopContext) {
- reference = null;
- }
-
- public synchronized ManagedReferenceFactory getValue() throws IllegalStateException, IllegalArgumentException {
- return this;
- }
-
- public synchronized ManagedReference getReference() {
- return reference;
- }
-
- public Injector<ClientServiceRegistry> getCSRInjector() {
- return csrInjector;
- }
-}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/Element.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/Element.java 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/Element.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -24,7 +24,6 @@
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DEFAULT;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIPTION;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MAX_OCCURS;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REQUIRED;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.TYPE;
@@ -59,11 +58,9 @@
QUERY_TIMEOUT("query-timeout", "query-timeout", ModelType.LONG, false, "0"),
WORKMANAGER("workmanager", "workmanager", ModelType.STRING, false, "default"),
- POLICY_DECIDER_ELEMENT("policy-decider"),
- POLICY_DECIDER_MODULE_ATTRIBUTE("module", "policy-decider-module", ModelType.STRING, false, null),
-
- AUTHORIZATION_VALIDATOR_ELEMENT("authorization-validator"),
- AUTHORIZATION_VALIDATOR_MODULE_ATTRIBUTE("module", "authorization-validator-module", ModelType.STRING, false, null),
+ POLICY_DECIDER_MODULE_ELEMENT("policy-decider-module", "policy-decider-module", ModelType.STRING, false, null),
+ AUTHORIZATION_VALIDATOR_MODULE_ELEMENT("authorization-validator-module", "authorization-validator-module", ModelType.STRING, false, null),
+ METADATA_REPO_MODULE_ELEMENT("metadata-repository-module", "metadata-repository-module", ModelType.STRING, false, null),
// buffer manager
BUFFER_SERVICE_ELEMENT("buffer-service"),
@@ -86,9 +83,9 @@
PPC_MAX_AGE_IN_SECS_ATTRIBUTE("max-age-in-seconds", "preparedplan-cache-max-age-in-seconds", ModelType.INT, false, "28800"),
// Object Replicator
- OBJECT_REPLICATOR_ELEMENT("object-replicator"),
- OR_STACK_ATTRIBUTE("stack", "object-replicator-stack", ModelType.STRING, false, null),
- OR_CLUSTER_NAME_ATTRIBUTE("cluster-name", "object-replicator-cluster-name", ModelType.STRING, false, null),
+ DISTRIBUTED_CACHE("distributed-cache"),
+ DC_STACK_ATTRIBUTE("jgroups-stack", "distributed-cache-jgroups-stack", ModelType.STRING, false, null),
+ DC_CHANNEL_NAME_ATTRIBUTE("channel", "distributed-cache-channel", ModelType.STRING, false, null),
// Result set cache
RESULTSET_CACHE_ELEMENT("resultset-cache"),
Added: trunk/jboss-integration/src/main/java/org/teiid/jboss/EventDistributorFactoryService.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/EventDistributorFactoryService.java (rev 0)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/EventDistributorFactoryService.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -0,0 +1,107 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.teiid.jboss;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
+import org.jboss.msc.service.Service;
+import org.jboss.msc.service.StartContext;
+import org.jboss.msc.service.StartException;
+import org.jboss.msc.service.StopContext;
+import org.jboss.msc.value.InjectedValue;
+import org.teiid.deployers.EventDistributorImpl;
+import org.teiid.deployers.VDBRepository;
+import org.teiid.events.EventDistributor;
+import org.teiid.events.EventDistributorFactory;
+import org.teiid.logging.LogConstants;
+import org.teiid.logging.LogManager;
+import org.teiid.query.ObjectReplicator;
+import org.teiid.transport.LocalServerConnection;
+
+public class EventDistributorFactoryService implements Service<EventDistributorFactory>, EventDistributorFactory {
+
+ InjectedValue<ObjectReplicator> objectReplicatorInjector = new InjectedValue<ObjectReplicator>();
+ InjectedValue<VDBRepository> vdbRepositoryInjector = new InjectedValue<VDBRepository>();
+ private EventDistributor replicatableEventDistributor;
+ private EventDistributor eventDistributorProxy;
+
+ @Override
+ public EventDistributorFactory getValue() throws IllegalStateException, IllegalArgumentException {
+ return new EventDistributorFactory() {
+ @Override
+ public EventDistributor getEventDistributor() {
+ return replicatableEventDistributor;
+ }
+ };
+ }
+
+ @Override
+ public void start(StartContext context) throws StartException {
+ final EventDistributor ed = new EventDistributorImpl() {
+ @Override
+ public VDBRepository getVdbRepository() {
+ return vdbRepositoryInjector.getValue();
+ }
+ };
+
+ // this instance is by use of teiid internally; only invokes the remote instances
+ if (objectReplicatorInjector.getValue() != null) {
+ try {
+ this.replicatableEventDistributor = objectReplicatorInjector.getValue().replicate(LocalServerConnection.TEIID_RUNTIME_CONTEXT, EventDistributor.class, ed, 0);
+ } catch (Exception e) {
+ LogManager.logError(LogConstants.CTX_RUNTIME, e, IntegrationPlugin.Util.getString("replication_failed", this)); //$NON-NLS-1$
+ }
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("distributed_cache_enabled")); //$NON-NLS-1$
+ }
+ else {
+ LogManager.logDetail(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("distributed_cache_not_enabled")); //$NON-NLS-1$
+ }
+
+ // for external client to call. invokes local instance and remote ones too.
+ this.eventDistributorProxy = (EventDistributor)Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[] {EventDistributor.class}, new InvocationHandler() {
+
+ @Override
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+ method.invoke(ed, args);
+ if (replicatableEventDistributor != null) {
+ method.invoke(replicatableEventDistributor, args);
+ }
+ return null;
+ }
+ });
+ }
+
+ @Override
+ public void stop(StopContext context) {
+ if (objectReplicatorInjector.getValue() != null && this.replicatableEventDistributor != null) {
+ objectReplicatorInjector.getValue().stop(this.replicatableEventDistributor);
+ this.replicatableEventDistributor = null;
+ }
+ }
+
+ @Override
+ public org.teiid.events.EventDistributor getEventDistributor() {
+ return eventDistributorProxy;
+ }
+}
Property changes on: trunk/jboss-integration/src/main/java/org/teiid/jboss/EventDistributorFactoryService.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/jboss-integration/src/main/java/org/teiid/jboss/ReferenceFactoryService.java (from rev 3717, trunk/jboss-integration/src/main/java/org/teiid/jboss/CSRReferenceFactoryService.java)
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/ReferenceFactoryService.java (rev 0)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/ReferenceFactoryService.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.teiid.jboss;
+
+import org.jboss.as.naming.ManagedReference;
+import org.jboss.as.naming.ManagedReferenceFactory;
+import org.jboss.as.naming.ValueManagedReference;
+import org.jboss.msc.inject.Injector;
+import org.jboss.msc.service.Service;
+import org.jboss.msc.service.StartContext;
+import org.jboss.msc.service.StartException;
+import org.jboss.msc.service.StopContext;
+import org.jboss.msc.value.ImmediateValue;
+import org.jboss.msc.value.InjectedValue;
+
+
+class ReferenceFactoryService<T> implements Service<ManagedReferenceFactory>, ManagedReferenceFactory {
+ private final InjectedValue<T> injector = new InjectedValue<T>();
+
+ private ManagedReference reference;
+
+ public synchronized void start(StartContext startContext) throws StartException {
+ reference = new ValueManagedReference(new ImmediateValue<Object>(injector.getValue()));
+ }
+
+ public synchronized void stop(StopContext stopContext) {
+ reference = null;
+ }
+
+ public synchronized ManagedReferenceFactory getValue() throws IllegalStateException, IllegalArgumentException {
+ return this;
+ }
+
+ public synchronized ManagedReference getReference() {
+ return reference;
+ }
+
+ public Injector<T> getInjector() {
+ return injector;
+ }
+}
Property changes on: trunk/jboss-integration/src/main/java/org/teiid/jboss/ReferenceFactoryService.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -43,6 +43,10 @@
import org.jboss.as.controller.OperationFailedException;
import org.jboss.as.controller.ServiceVerificationHandler;
import org.jboss.as.controller.descriptions.DescriptionProvider;
+import org.jboss.as.naming.ManagedReferenceFactory;
+import org.jboss.as.naming.ServiceBasedNamingStore;
+import org.jboss.as.naming.deployment.ContextNames;
+import org.jboss.as.naming.service.BinderService;
import org.jboss.as.server.AbstractDeploymentChainStep;
import org.jboss.as.server.DeploymentProcessorTarget;
import org.jboss.as.server.deployment.Phase;
@@ -76,7 +80,11 @@
import org.teiid.dqp.internal.process.PreparedPlan;
import org.teiid.dqp.internal.process.SessionAwareCache;
import org.teiid.dqp.service.BufferService;
+import org.teiid.events.EventDistributorFactory;
import org.teiid.jboss.deployers.RuntimeEngineDeployer;
+import org.teiid.logging.LogConstants;
+import org.teiid.logging.LogManager;
+import org.teiid.metadata.MetadataRepository;
import org.teiid.query.ObjectReplicator;
import org.teiid.query.function.SystemFunctionManager;
import org.teiid.replication.jboss.JGroupsObjectReplicator;
@@ -99,12 +107,13 @@
Element.DETECTING_CHANGE_EVENTS_ELEMENT,
Element.QUERY_TIMEOUT,
Element.WORKMANAGER,
- Element.AUTHORIZATION_VALIDATOR_MODULE_ATTRIBUTE,
- Element.POLICY_DECIDER_MODULE_ATTRIBUTE,
+ Element.AUTHORIZATION_VALIDATOR_MODULE_ELEMENT,
+ Element.POLICY_DECIDER_MODULE_ELEMENT,
+ Element.METADATA_REPO_MODULE_ELEMENT,
// object replicator
- Element.OR_STACK_ATTRIBUTE,
- Element.OR_CLUSTER_NAME_ATTRIBUTE,
+ Element.DC_STACK_ATTRIBUTE,
+ Element.DC_CHANNEL_NAME_ATTRIBUTE,
// Buffer Service
Element.USE_DISK_ATTRIBUTE,
@@ -210,6 +219,11 @@
// VDB repository
final VDBRepository vdbRepository = new VDBRepository();
vdbRepository.setSystemFunctionManager(systemFunctionManager);
+ if (Element.METADATA_REPO_MODULE_ELEMENT.isDefined(operation)) {
+ MetadataRepository repo = buildService(MetadataRepository.class, Element.METADATA_REPO_MODULE_ELEMENT.asString(operation));
+ vdbRepository.setMetadataRepository(repo);
+ }
+
VDBRepositoryService vdbRepositoryService = new VDBRepositoryService(vdbRepository);
newControllers.add(target.addService(TeiidServiceNames.VDB_REPO, vdbRepositoryService).install());
@@ -239,14 +253,16 @@
newControllers.add(objectSerializerService.install());
// Object Replicator
- if (Element.OR_STACK_ATTRIBUTE.isDefined(operation)) {
- String stack = Element.OR_STACK_ATTRIBUTE.asString(operation);
+ boolean replicatorAvailable = false;
+ if (Element.DC_STACK_ATTRIBUTE.isDefined(operation)) {
+ String stack = Element.DC_STACK_ATTRIBUTE.asString(operation);
String clusterName = "teiid-rep"; //$NON-NLS-1$
- if (Element.OR_CLUSTER_NAME_ATTRIBUTE.isDefined(operation)) {
- clusterName = Element.OR_CLUSTER_NAME_ATTRIBUTE.asString(operation);
+ if (Element.DC_CHANNEL_NAME_ATTRIBUTE.isDefined(operation)) {
+ clusterName = Element.DC_CHANNEL_NAME_ATTRIBUTE.asString(operation);
}
+ replicatorAvailable = true;
JGroupsObjectReplicatorService replicatorService = new JGroupsObjectReplicatorService(clusterName);
ServiceBuilder<JGroupsObjectReplicator> serviceBuilder = target.addService(TeiidServiceNames.OBJECT_REPLICATOR, replicatorService);
serviceBuilder.addDependency(ServiceName.JBOSS.append("jgroups", "stack", stack), ChannelFactory.class, replicatorService.channelFactoryInjector); //$NON-NLS-1$ //$NON-NLS-2$
@@ -258,12 +274,18 @@
BufferManagerService bufferService = new BufferManagerService(buildBufferManager(operation));
ServiceBuilder<BufferService> bufferServiceBuilder = target.addService(TeiidServiceNames.BUFFER_MGR, bufferService);
bufferServiceBuilder.addDependency(TeiidServiceNames.BUFFER_DIR, String.class, bufferService.pathInjector);
- bufferServiceBuilder.addDependency(DependencyType.OPTIONAL, TeiidServiceNames.OBJECT_REPLICATOR, ObjectReplicator.class, bufferService.replicatorInjector);
+ bufferServiceBuilder.addDependency(replicatorAvailable?DependencyType.REQUIRED:DependencyType.OPTIONAL, TeiidServiceNames.OBJECT_REPLICATOR, ObjectReplicator.class, bufferService.replicatorInjector);
newControllers.add(bufferServiceBuilder.install());
+ EventDistributorFactoryService edfs = new EventDistributorFactoryService();
+ ServiceBuilder<EventDistributorFactory> edfsServiceBuilder = target.addService(TeiidServiceNames.EVENT_DISTRIBUTOR_FACTORY, edfs);
+ edfsServiceBuilder.addDependency(TeiidServiceNames.VDB_REPO, VDBRepository.class, edfs.vdbRepositoryInjector);
+ edfsServiceBuilder.addDependency(replicatorAvailable?DependencyType.REQUIRED:DependencyType.OPTIONAL, TeiidServiceNames.OBJECT_REPLICATOR, ObjectReplicator.class, edfs.objectReplicatorInjector);
+ newControllers.add(edfsServiceBuilder.install());
+
PolicyDecider policyDecider;
- if (Element.POLICY_DECIDER_MODULE_ATTRIBUTE.isDefined(operation)) {
- policyDecider = buildService(PolicyDecider.class, Element.POLICY_DECIDER_MODULE_ATTRIBUTE.asString(operation));
+ if (Element.POLICY_DECIDER_MODULE_ELEMENT.isDefined(operation)) {
+ policyDecider = buildService(PolicyDecider.class, Element.POLICY_DECIDER_MODULE_ELEMENT.asString(operation));
}
else {
DataRolePolicyDecider drpd = new DataRolePolicyDecider();
@@ -273,8 +295,8 @@
}
final AuthorizationValidator authValidator;
- if (Element.AUTHORIZATION_VALIDATOR_MODULE_ATTRIBUTE.isDefined(operation)) {
- authValidator = buildService(AuthorizationValidator.class, Element.AUTHORIZATION_VALIDATOR_MODULE_ATTRIBUTE.asString(operation));
+ if (Element.AUTHORIZATION_VALIDATOR_MODULE_ELEMENT.isDefined(operation)) {
+ authValidator = buildService(AuthorizationValidator.class, Element.AUTHORIZATION_VALIDATOR_MODULE_ELEMENT.asString(operation));
authValidator.setEnabled(true);
}
else {
@@ -324,7 +346,7 @@
engineBuilder.addDependency(TeiidServiceNames.AUTHORIZATION_VALIDATOR, AuthorizationValidator.class, engine.getAuthorizationValidatorInjector());
engineBuilder.addDependency(TeiidServiceNames.CACHE_RESULTSET, SessionAwareCache.class, engine.getResultSetCacheInjector());
engineBuilder.addDependency(TeiidServiceNames.CACHE_PREPAREDPLAN, SessionAwareCache.class, engine.getPreparedPlanCacheInjector());
- engineBuilder.addDependency(DependencyType.OPTIONAL, TeiidServiceNames.OBJECT_REPLICATOR, ObjectReplicator.class, engine.getObjectReplicatorInjector());
+ engineBuilder.addDependency(TeiidServiceNames.EVENT_DISTRIBUTOR_FACTORY, EventDistributorFactory.class, engine.getEventDistributorFactoryInjector());
engineBuilder.setInitialMode(ServiceController.Mode.ACTIVE);
ServiceController<DQPCore> controller = engineBuilder.install();
@@ -332,7 +354,27 @@
ServiceContainer container = controller.getServiceContainer();
container.addTerminateListener(shutdownListener);
- // Register VDB deployer
+ // add JNDI for event distributor
+ final ReferenceFactoryService<EventDistributorFactory> referenceFactoryService = new ReferenceFactoryService<EventDistributorFactory>();
+ final ServiceName referenceFactoryServiceName = TeiidServiceNames.EVENT_DISTRIBUTOR_FACTORY.append("reference-factory"); //$NON-NLS-1$
+ final ServiceBuilder<?> referenceBuilder = target.addService(referenceFactoryServiceName, referenceFactoryService);
+ referenceBuilder.addDependency(TeiidServiceNames.EVENT_DISTRIBUTOR_FACTORY, EventDistributorFactory.class, referenceFactoryService.getInjector());
+ referenceBuilder.setInitialMode(ServiceController.Mode.ACTIVE);
+
+ String jndiName = "teiid/event-distributor-factory";//$NON-NLS-1$
+ final ContextNames.BindInfo bindInfo = ContextNames.bindInfoFor(jndiName);
+ final BinderService binderService = new BinderService(bindInfo.getBindName());
+ final ServiceBuilder<?> binderBuilder = target.addService(bindInfo.getBinderServiceName(), binderService);
+ binderBuilder.addDependency(referenceFactoryServiceName, ManagedReferenceFactory.class, binderService.getManagedObjectInjector());
+ binderBuilder.addDependency(bindInfo.getParentContextServiceName(), ServiceBasedNamingStore.class, binderService.getNamingStoreInjector());
+ binderBuilder.setInitialMode(ServiceController.Mode.ACTIVE);
+
+ newControllers.add(referenceBuilder.install());
+ newControllers.add(binderBuilder.install());
+
+ LogManager.logDetail(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("event_distributor_bound", jndiName)); //$NON-NLS-1$
+
+ // Register VDB deployer
context.addStep(new AbstractDeploymentChainStep() {
@Override
public void execute(DeploymentProcessorTarget processorTarget) {
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidServiceNames.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidServiceNames.java 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidServiceNames.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -42,6 +42,7 @@
public static ServiceName OBJECT_REPLICATOR = ServiceName.JBOSS.append("teiid", "object-replicator"); //$NON-NLS-1$ //$NON-NLS-2$
public static ServiceName VDB_STATUS_CHECKER = ServiceName.JBOSS.append("teiid", "vdb-status-checker"); //$NON-NLS-1$ //$NON-NLS-2$
public static ServiceName DS_LISTENER_BASE = ServiceName.JBOSS.append("teiid", "ds-listener"); //$NON-NLS-1$ //$NON-NLS-2$
+ public static ServiceName EVENT_DISTRIBUTOR_FACTORY = ServiceName.JBOSS.append("teiid", "event-distributor-factory");//$NON-NLS-1$ //$NON-NLS-2$
public static ServiceName translatorServiceName(String name) {
return ServiceName.of(TRANSLATOR_BASE, name);
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -74,20 +74,11 @@
writeElement(writer, Element.DETECTING_CHANGE_EVENTS_ELEMENT, node);
writeElement(writer, Element.QUERY_TIMEOUT, node);
writeElement(writer, Element.WORKMANAGER, node);
-
- if (like(node, Element.AUTHORIZATION_VALIDATOR_ELEMENT)) {
- writer.writeStartElement(Element.AUTHORIZATION_VALIDATOR_ELEMENT.getLocalName());
- writer.writeAttribute(Element.AUTHORIZATION_VALIDATOR_MODULE_ATTRIBUTE.getLocalName(), node.get(Element.AUTHORIZATION_VALIDATOR_MODULE_ATTRIBUTE.getModelName()).asString());
- writer.writeEndElement();
- }
-
- if (like(node, Element.POLICY_DECIDER_ELEMENT)) {
- writer.writeStartElement(Element.POLICY_DECIDER_ELEMENT.getLocalName());
- writer.writeAttribute(Element.POLICY_DECIDER_MODULE_ATTRIBUTE.getLocalName(), node.get(Element.POLICY_DECIDER_MODULE_ATTRIBUTE.getModelName()).asString());
- writer.writeEndElement();
- }
-
+ writeElement(writer, Element.AUTHORIZATION_VALIDATOR_MODULE_ELEMENT, node);
+ writeElement(writer, Element.POLICY_DECIDER_MODULE_ELEMENT, node);
+ writeElement(writer, Element.METADATA_REPO_MODULE_ELEMENT, node);
+
if (like(node, Element.RESULTSET_CACHE_ELEMENT)){
writer.writeStartElement(Element.RESULTSET_CACHE_ELEMENT.getLocalName());
writeResultsetCacheConfiguration(writer, node);
@@ -100,8 +91,8 @@
writer.writeEndElement();
}
- if (like(node, Element.OBJECT_REPLICATOR_ELEMENT)){
- writer.writeStartElement(Element.OBJECT_REPLICATOR_ELEMENT.getLocalName());
+ if (like(node, Element.DISTRIBUTED_CACHE)){
+ writer.writeStartElement(Element.DISTRIBUTED_CACHE.getLocalName());
writeObjectReplicatorConfiguration(writer, node);
writer.writeEndElement();
}
@@ -133,8 +124,8 @@
}
private void writeObjectReplicatorConfiguration(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
- writeAttribute(writer, Element.OR_STACK_ATTRIBUTE, node);
- writeAttribute(writer, Element.OR_CLUSTER_NAME_ATTRIBUTE, node);
+ writeAttribute(writer, Element.DC_STACK_ATTRIBUTE, node);
+ writeAttribute(writer, Element.DC_CHANNEL_NAME_ATTRIBUTE, node);
}
private void writeTranslator(XMLExtendedStreamWriter writer, ModelNode node, String translatorName) throws XMLStreamException {
@@ -284,6 +275,9 @@
bootServices.get(reader.getLocalName()).set(Boolean.parseBoolean(reader.getElementText()));
break;
+ case POLICY_DECIDER_MODULE_ELEMENT:
+ case AUTHORIZATION_VALIDATOR_MODULE_ELEMENT:
+ case METADATA_REPO_MODULE_ELEMENT:
case WORKMANAGER:
bootServices.get(reader.getLocalName()).set(reader.getElementText());
break;
@@ -300,20 +294,12 @@
bootServices.get(reader.getLocalName()).set(Integer.parseInt(reader.getElementText()));
break;
- case AUTHORIZATION_VALIDATOR_ELEMENT:
- parseAuthorizationValidator(reader, bootServices);
- break;
-
- case POLICY_DECIDER_ELEMENT:
- parsePolicyDecider(reader, bootServices);
- break;
-
case ASYNC_THREAD_POOL_ELEMENT:
bootServices.get(reader.getLocalName()).set(reader.getElementText());
break;
// complex types
- case OBJECT_REPLICATOR_ELEMENT:
+ case DISTRIBUTED_CACHE:
parseObjectReplicator(reader, bootServices);
break;
@@ -378,58 +364,18 @@
}
}
- private ModelNode parseAuthorizationValidator(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
- if (reader.getAttributeCount() > 0) {
- for(int i=0; i<reader.getAttributeCount(); i++) {
- String attrName = reader.getAttributeLocalName(i);
- String attrValue = reader.getAttributeValue(i);
-
- Element element = Element.forName(attrName, Element.AUTHORIZATION_VALIDATOR_ELEMENT);
- switch(element) {
- case AUTHORIZATION_VALIDATOR_MODULE_ATTRIBUTE:
- node.get(element.getModelName()).set(attrValue);
- break;
- default:
- throw ParseUtils.unexpectedAttribute(reader, i);
- }
- }
- }
- while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT));
- return node;
- }
-
- private ModelNode parsePolicyDecider(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
- if (reader.getAttributeCount() > 0) {
- for(int i=0; i<reader.getAttributeCount(); i++) {
- String attrName = reader.getAttributeLocalName(i);
- String attrValue = reader.getAttributeValue(i);
-
- Element element = Element.forName(attrName, Element.POLICY_DECIDER_ELEMENT);
- switch(element) {
- case POLICY_DECIDER_MODULE_ATTRIBUTE:
- node.get(element.getModelName()).set(attrValue);
- break;
- default:
- throw ParseUtils.unexpectedAttribute(reader, i);
- }
- }
- }
- while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT));
- return node;
- }
-
private ModelNode parseObjectReplicator(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
if (reader.getAttributeCount() > 0) {
for(int i=0; i<reader.getAttributeCount(); i++) {
String attrName = reader.getAttributeLocalName(i);
String attrValue = reader.getAttributeValue(i);
- Element element = Element.forName(attrName, Element.OBJECT_REPLICATOR_ELEMENT);
+ Element element = Element.forName(attrName, Element.DISTRIBUTED_CACHE);
switch(element) {
- case OR_STACK_ATTRIBUTE:
+ case DC_STACK_ATTRIBUTE:
node.get(element.getModelName()).set(attrValue);
break;
- case OR_CLUSTER_NAME_ATTRIBUTE:
+ case DC_CHANNEL_NAME_ATTRIBUTE:
node.get(element.getModelName()).set(attrValue);
break;
default:
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/Transport.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/Transport.java 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/Transport.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -131,13 +131,13 @@
}
if (protocol == Protocol.teiid) {
this.socketListener = new SocketListener(address, this.socketConfig, this.csr, getBufferServiceInjector().getValue().getBufferManager());
- LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("socket_enabled","Teiid JDBC = ",(sslEnabled?"mms://":"mm://")+address.getHostName()+":"+address.getPort())); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("socket_enabled", address.getHostName(), String.valueOf(address.getPort()), (sslEnabled?"ON":"OFF"), authenticationDomains)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
else if (protocol == Protocol.pg) {
getVdbRepository().odbcEnabled();
ODBCSocketListener odbc = new ODBCSocketListener(address, this.socketConfig, this.csr, getBufferServiceInjector().getValue().getBufferManager(), getMaxODBCLobSizeAllowed(), this.logon);
odbc.setAuthenticationType(this.sessionService.getAuthenticationType());
- LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("odbc_enabled","Teiid ODBC - SSL=", (sslEnabled?"ON":"OFF")+" Host = "+address.getHostName()+" Port = "+address.getPort())); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("odbc_enabled", address.getHostName(), String.valueOf(address.getPort()), (sslEnabled?"ON":"OFF"), authenticationDomains)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
else {
throw new StartException(IntegrationPlugin.Util.getString("wrong_protocol")); //$NON-NLS-1$
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -198,21 +198,21 @@
// register a JNDI name, this looks hard.
if (transport.isEmbedded() && !isEmbeddedRegistered()) {
- final CSRReferenceFactoryService referenceFactoryService = new CSRReferenceFactoryService();
- final ServiceName referenceFactoryServiceName =TeiidServiceNames.embeddedTransportServiceName(transportName).append("reference-factory"); //$NON-NLS-1$
+ final ReferenceFactoryService<ClientServiceRegistry> referenceFactoryService = new ReferenceFactoryService<ClientServiceRegistry>();
+ final ServiceName referenceFactoryServiceName = TeiidServiceNames.embeddedTransportServiceName(transportName).append("reference-factory"); //$NON-NLS-1$
final ServiceBuilder<?> referenceBuilder = target.addService(referenceFactoryServiceName,referenceFactoryService);
- referenceBuilder.addDependency(TeiidServiceNames.transportServiceName(transportName), ClientServiceRegistry.class, referenceFactoryService.getCSRInjector());
+ referenceBuilder.addDependency(TeiidServiceNames.transportServiceName(transportName), ClientServiceRegistry.class, referenceFactoryService.getInjector());
referenceBuilder.setInitialMode(ServiceController.Mode.ACTIVE);
final ContextNames.BindInfo bindInfo = ContextNames.bindInfoFor(LocalServerConnection.TEIID_RUNTIME_CONTEXT);
- final BinderService embedded = new BinderService(bindInfo.getBindName());
- final ServiceBuilder<?> embeddedBinderBuilder = target.addService(bindInfo.getBinderServiceName(), embedded);
- embeddedBinderBuilder.addDependency(referenceFactoryServiceName, ManagedReferenceFactory.class, embedded.getManagedObjectInjector());
- embeddedBinderBuilder.addDependency(bindInfo.getParentContextServiceName(), ServiceBasedNamingStore.class, embedded.getNamingStoreInjector());
- embeddedBinderBuilder.setInitialMode(ServiceController.Mode.ACTIVE);
+ final BinderService binderService = new BinderService(bindInfo.getBindName());
+ final ServiceBuilder<?> binderBuilder = target.addService(bindInfo.getBinderServiceName(), binderService);
+ binderBuilder.addDependency(referenceFactoryServiceName, ManagedReferenceFactory.class, binderService.getManagedObjectInjector());
+ binderBuilder.addDependency(bindInfo.getParentContextServiceName(), ServiceBasedNamingStore.class, binderService.getNamingStoreInjector());
+ binderBuilder.setInitialMode(ServiceController.Mode.ACTIVE);
newControllers.add(referenceBuilder.install());
- newControllers.add(embeddedBinderBuilder.install());
+ newControllers.add(binderBuilder.install());
}
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -22,9 +22,6 @@
package org.teiid.jboss.deployers;
import java.io.Serializable;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
@@ -42,8 +39,6 @@
import org.jboss.msc.service.StopContext;
import org.jboss.msc.value.InjectedValue;
import org.teiid.adminapi.impl.SessionMetadata;
-import org.teiid.adminapi.impl.VDBMetaData;
-import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.util.LRUCache;
import org.teiid.deployers.CompositeVDB;
@@ -53,12 +48,10 @@
import org.teiid.dqp.internal.process.AuthorizationValidator;
import org.teiid.dqp.internal.process.DQPConfiguration;
import org.teiid.dqp.internal.process.DQPCore;
-import org.teiid.dqp.internal.process.DataTierManagerImpl;
import org.teiid.dqp.internal.process.SessionAwareCache;
import org.teiid.dqp.internal.process.TransactionServerImpl;
import org.teiid.dqp.service.BufferService;
import org.teiid.dqp.service.TransactionService;
-import org.teiid.events.EventDistributor;
import org.teiid.events.EventDistributorFactory;
import org.teiid.jboss.IntegrationPlugin;
import org.teiid.jboss.TeiidServiceNames;
@@ -66,31 +59,15 @@
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.logging.MessageLevel;
-import org.teiid.metadata.AbstractMetadataRecord;
-import org.teiid.metadata.Column;
-import org.teiid.metadata.ColumnStats;
-import org.teiid.metadata.Procedure;
-import org.teiid.metadata.Schema;
-import org.teiid.metadata.Table;
-import org.teiid.metadata.Table.TriggerEvent;
-import org.teiid.metadata.TableStats;
-import org.teiid.query.ObjectReplicator;
-import org.teiid.query.metadata.TransformationMetadata;
-import org.teiid.query.optimizer.relational.RelationalPlanner;
-import org.teiid.query.processor.DdlPlan;
-import org.teiid.query.tempdata.GlobalTableStore;
import org.teiid.services.BufferServiceImpl;
-import org.teiid.transport.LocalServerConnection;
import org.teiid.vdb.runtime.VDBKey;
-public class RuntimeEngineDeployer extends DQPConfiguration implements Serializable, EventDistributor, EventDistributorFactory, Service<DQPCore> {
+public class RuntimeEngineDeployer extends DQPConfiguration implements Serializable, Service<DQPCore> {
private static final long serialVersionUID = -4676205340262775388L;
private transient TransactionServerImpl transactionServerImpl = new TransactionServerImpl();
private transient DQPCore dqpCore = new DQPCore();
- private transient EventDistributor eventDistributor;
- private transient EventDistributor eventDistributorProxy;
private final InjectedValue<WorkManager> workManagerInjector = new InjectedValue<WorkManager>();
private final InjectedValue<XATerminator> xaTerminatorInjector = new InjectedValue<XATerminator>();
@@ -101,7 +78,7 @@
private final InjectedValue<AuthorizationValidator> authorizationValidatorInjector = new InjectedValue<AuthorizationValidator>();
private final InjectedValue<SessionAwareCache> preparedPlanCacheInjector = new InjectedValue<SessionAwareCache>();
private final InjectedValue<SessionAwareCache> resultSetCacheInjector = new InjectedValue<SessionAwareCache>();
- private final InjectedValue<ObjectReplicator> objectReplicatorInjector = new InjectedValue<ObjectReplicator>();
+ private final InjectedValue<EventDistributorFactory> eventDistributorFactoryInjector = new InjectedValue<EventDistributorFactory>();
@Override
public void start(final StartContext context) {
@@ -110,39 +87,15 @@
this.transactionServerImpl.setTransactionManager(getTxnManagerInjector().getValue());
setAuthorizationValidator(authorizationValidatorInjector.getValue());
-
setBufferService(bufferServiceInjector.getValue());
- dqpCore.setTransactionService((TransactionService)LogManager.createLoggingProxy(LogConstants.CTX_TXN_LOG, transactionServerImpl, new Class[] {TransactionService.class}, MessageLevel.DETAIL, Thread.currentThread().getContextClassLoader()));
-
- if (getObjectReplicatorInjector().getValue() != null) {
- try {
- this.eventDistributor = getObjectReplicatorInjector().getValue().replicate(LocalServerConnection.TEIID_RUNTIME_CONTEXT, EventDistributor.class, this, 0);
- } catch (Exception e) {
- LogManager.logError(LogConstants.CTX_RUNTIME, e, IntegrationPlugin.Util.getString("replication_failed", this)); //$NON-NLS-1$
- }
- }
- else {
- LogManager.logDetail(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("distributed_cache_not_enabled")); //$NON-NLS-1$
- }
-
+ this.dqpCore.setTransactionService((TransactionService)LogManager.createLoggingProxy(LogConstants.CTX_TXN_LOG, transactionServerImpl, new Class[] {TransactionService.class}, MessageLevel.DETAIL, Thread.currentThread().getContextClassLoader()));
this.dqpCore.setMetadataRepository(getVdbRepository().getMetadataRepository());
- this.dqpCore.setEventDistributor(this.eventDistributor);
+ this.dqpCore.setEventDistributor(getEventDistributorFactoryInjector().getValue().getEventDistributor());
this.dqpCore.setResultsetCache(getResultSetCacheInjector().getValue());
this.dqpCore.setPreparedPlanCache(getPreparedPlanCacheInjector().getValue());
this.dqpCore.start(this);
- this.eventDistributorProxy = (EventDistributor)Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[] {EventDistributor.class}, new InvocationHandler() {
-
- @Override
- public Object invoke(Object proxy, Method method, Object[] args)
- throws Throwable {
- method.invoke(RuntimeEngineDeployer.this, args);
- if (eventDistributor != null) {
- method.invoke(eventDistributor, args);
- }
- return null;
- }
- });
+
// add vdb life cycle listeners
getVdbRepository().addListener(new VDBLifeCycleListener() {
@@ -198,163 +151,13 @@
// this bean is already shutdown
}
- LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("engine_stopped", new Date(System.currentTimeMillis()).toString())); //$NON-NLS-1$
-
- if (getObjectReplicatorInjector().getValue() != null && this.eventDistributor != null) {
- getObjectReplicatorInjector().getValue().stop(this.eventDistributor);
- }
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("engine_stopped", new Date(System.currentTimeMillis()).toString())); //$NON-NLS-1$
}
public void setBufferService(BufferService service) {
this.dqpCore.setBufferService(service);
}
-
-
- @Override
- public void updateMatViewRow(String vdbName, int vdbVersion, String schema,
- String viewName, List<?> tuple, boolean delete) {
- VDBMetaData metadata = getVdbRepository().getVDB(vdbName, vdbVersion);
- if (metadata != null) {
- GlobalTableStore gts = metadata.getAttachment(GlobalTableStore.class);
- if (gts != null) {
- try {
- gts.updateMatViewRow((RelationalPlanner.MAT_PREFIX + schema + '.' + viewName).toUpperCase(), tuple, delete);
- } catch (TeiidComponentException e) {
- LogManager.logError(LogConstants.CTX_RUNTIME, e, IntegrationPlugin.Util.getString("replication_failed", "updateMatViewRow")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
- }
-
- @Override
- public void dataModification(String vdbName, int vdbVersion, String schema, String... tableNames) {
- updateModified(true, vdbName, vdbVersion, schema, tableNames);
- }
-
- private void updateModified(boolean data, String vdbName, int vdbVersion, String schema,
- String... objectNames) {
- Schema s = getSchema(vdbName, vdbVersion, schema);
- if (s == null) {
- return;
- }
- long ts = System.currentTimeMillis();
- for (String name:objectNames) {
- Table table = s.getTables().get(name.toUpperCase());
- if (table == null) {
- continue;
- }
- if (data) {
- table.setLastDataModification(ts);
- } else {
- table.setLastModified(ts);
- }
- }
- }
-
- @Override
- public void setColumnStats(String vdbName, int vdbVersion,
- String schemaName, String tableName, String columnName,
- ColumnStats stats) {
- Table t = getTable(vdbName, vdbVersion, schemaName, tableName);
- if (t == null) {
- return;
- }
- for (Column c : t.getColumns()) {
- if (c.getName().equalsIgnoreCase(columnName)) {
- c.setColumnStats(stats);
- t.setLastModified(System.currentTimeMillis());
- break;
- }
- }
- }
-
- @Override
- public void setTableStats(String vdbName, int vdbVersion,
- String schemaName, String tableName, TableStats stats) {
- Table t = getTable(vdbName, vdbVersion, schemaName, tableName);
- if (t == null) {
- return;
- }
- t.setTableStats(stats);
- t.setLastModified(System.currentTimeMillis());
- }
-
- private Table getTable(String vdbName, int vdbVersion, String schemaName,
- String tableName) {
- Schema s = getSchema(vdbName, vdbVersion, schemaName);
- if (s == null) {
- return null;
- }
- return s.getTables().get(tableName.toUpperCase());
- }
-
- private Schema getSchema(String vdbName, int vdbVersion, String schemaName) {
- VDBMetaData vdb = getVdbRepository().getVDB(vdbName, vdbVersion);
- if (vdb == null) {
- return null;
- }
- TransformationMetadata tm = vdb.getAttachment(TransformationMetadata.class);
- if (tm == null) {
- return null;
- }
- return tm.getMetadataStore().getSchemas().get(schemaName.toUpperCase());
- }
-
- @Override
- public void setInsteadOfTriggerDefinition(String vdbName, int vdbVersion,
- String schema, String viewName, TriggerEvent triggerEvent,
- String triggerDefinition, Boolean enabled) {
- Table t = getTable(vdbName, vdbVersion, schema, viewName);
- if (t == null) {
- return;
- }
- DdlPlan.alterInsteadOfTrigger(getVdbRepository().getVDB(vdbName, vdbVersion), t, triggerDefinition, enabled, triggerEvent);
- }
-
- @Override
- public void setProcedureDefinition(String vdbName, int vdbVersion,String schema, String procName, String definition) {
- Schema s = getSchema(vdbName, vdbVersion, schema);
- if (s == null) {
- return;
- }
- Procedure p = s.getProcedures().get(procName.toUpperCase());
- if (p == null) {
- return;
- }
- DdlPlan.alterProcedureDefinition(getVdbRepository().getVDB(vdbName, vdbVersion), p, definition);
- }
-
- @Override
- public void setViewDefinition(String vdbName, int vdbVersion, String schema, String viewName, String definition) {
- Table t = getTable(vdbName, vdbVersion, schema, viewName);
- if (t == null) {
- return;
- }
- DdlPlan.alterView(getVdbRepository().getVDB(vdbName, vdbVersion), t, definition);
- }
-
- @Override
- public void setProperty(String vdbName, int vdbVersion, String uuid,
- String name, String value) {
- VDBMetaData vdb = getVdbRepository().getVDB(vdbName, vdbVersion);
- if (vdb == null) {
- return;
- }
- TransformationMetadata tm = vdb.getAttachment(TransformationMetadata.class);
- if (tm == null) {
- return;
- }
- AbstractMetadataRecord record = DataTierManagerImpl.getByUuid(tm.getMetadataStore(), uuid);
- if (record != null) {
- record.setProperty(name, value);
- }
- }
-
- @Override
- public EventDistributor getEventDistributor() {
- return this.eventDistributorProxy;
- }
-
+
public InjectedValue<SessionAwareCache> getResultSetCacheInjector() {
return resultSetCacheInjector;
}
@@ -395,7 +198,7 @@
return workManagerInjector;
}
- public InjectedValue<ObjectReplicator> getObjectReplicatorInjector() {
- return objectReplicatorInjector;
+ public InjectedValue<EventDistributorFactory> getEventDistributorFactoryInjector() {
+ return eventDistributorFactoryInjector;
}
}
Modified: trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
===================================================================
--- trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2011-12-07 15:46:45 UTC (rev 3721)
@@ -21,9 +21,9 @@
#
engine_started=Teiid Engine {0} Started = {1}
-socket_enabled={0} {1}
+socket_enabled=Teiid JDBC - Host = {0}, Port = {1}, SSL = {2}, security-domains = {3}
odbc_not_enabled=ODBC transport is not enabled in Teiid.
-odbc_enabled={0} {1}
+odbc_enabled=Teiid ODBC - Host = {0}, Port = {1}, SSL = {2}, security-domains = {3}
engine_stopped=Teiid Engine stopped {0}
admin_connection_closed=Teiid admin connection is already closed.
bad_vdb_extension=The extension of the file name must be either ".vdb" for designer vdb or "xxx-vdb.xml" for dynamic VDBs
@@ -37,6 +37,7 @@
socket_not_enabled=Socket based remote JDBC protocol is not enabled.
source_not_found=Source with name {0} not found in the Model {1} in VDB {2}.{3}
model_not_found=Model with name {0} not found in the VDB {1}.{2}
+event_distributor_bound=org.teiid.events.EventDistributorFactory is bound to {0} for manual control of Teiid events.
no_operation=No operation found with given name = {0}
failed_to_remove=Failed to remove the deployment
@@ -48,8 +49,8 @@
datasource_exists=Data source with name {0} already exists!
datasource_template_not_found=Template {0} for creating the data source is not found.
jndi_failed=JNDI lookup failed {0}.
-distributed_cache_not_enabled= object replication not enabled for distributed cache. Missing "object-replicator" property in the configuration or running in standalone mode.
-replication_failed=Could not replicate object {0}
+distributed_cache_not_enabled= Distributed caching NOT enabled. Missing "distributed-cache" property in the configuration or running in standalone mode.
+distributed_cache_enabled=Distributed caching enabled.
distribute_failed=Deploy of the archive failed {0}
template_not_found=Template not found for {0}
admin_executing=JOPR admin {0} is executing command {1}
@@ -63,7 +64,7 @@
translator.added = Teiid translator "{0}" added.
wrong_protocol=Wrong type of protocol supplied
socket_binding_not_defined=Socket binding not specified for transport {0}; only embedded access is granted.
-embedded_enabled=Teiid Embedded transport enabled.
+embedded_enabled=Teiid Embedded transport enabled. Bound to: {0}
vdb-undeploy-failed=error during the undeploy of vdb {0}.{1}
error_adding_translator_deployment=Error adding translator from deployment {0}
@@ -92,6 +93,8 @@
workmanager.describe=WorkManager name to use in processing. (default name is "default")
policy-decider-module.describe=Policy Module; Implementation of org.teiid.PolicyDecider class
authorization-validator-module.describe=Authorization Module; Implementation of org.teiid.dqp.internal.process.AuthorizationValidator class.
+metadata-repository-module.describe=Runtime Metadata repository module; Runtime Metadata Updates can be made persistent though by configuring a "org.teiid.metadata.MetadataRepository". See Developer's Guide.
+
#buffer-manager
buffer-service-use-disk.describe=Use disk for buffer management
@@ -119,8 +122,8 @@
resultset-cache-max-staleness.describe=Max staleness in seconds. Modifications are based upon data updates -1 indicates no max. (default 60 - 1 minute)
#object replicator
-object-replicator-stack.describe=JGroups stack name for cache replication channel
-object-replicator-cluster-name.describe=cache channel cluster name for cache replication
+distributed-cache-jgroups-stack.describe=JGroups stack name for cache replication channel
+distributed-cache-channel.describe=Cache channel name to use for cache entries replication
#transport
transport-name.describe=Name of the transport
Modified: trunk/jboss-integration/src/main/resources/schema/jboss-teiid.xsd
===================================================================
--- trunk/jboss-integration/src/main/resources/schema/jboss-teiid.xsd 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/jboss-integration/src/main/resources/schema/jboss-teiid.xsd 2011-12-07 15:46:45 UTC (rev 3721)
@@ -192,26 +192,24 @@
</xs:annotation>
</xs:element>
- <xs:element name="authorization-validator" minOccurs="0" maxOccurs="1">
- <xs:complexType>
- <xs:attribute name="module" type="xs:string" use="required">
- <xs:annotation>
- <xs:documentation>An authorization validator that by default uses data role information stored in VDBs. Provide module name.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
+ <xs:element name="authorization-validator-module" type="xs:string" minOccurs="0" maxOccurs="1">
+ <xs:annotation>
+ <xs:documentation>An authorization validator that by default uses data role information stored in VDBs. Provide module name.</xs:documentation>
+ </xs:annotation>
</xs:element>
- <xs:element name="policy-decider" minOccurs="0" maxOccurs="1">
- <xs:complexType>
- <xs:attribute name="module" type="xs:string" use="required">
- <xs:annotation>
- <xs:documentation>A policy decider that uses data role information stored in VDBs, Provide module name.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
+ <xs:element name="policy-decider-module" type="xs:string" minOccurs="0" maxOccurs="1">
+ <xs:annotation>
+ <xs:documentation>A policy decider that uses data role information stored in VDBs, Provide module name.</xs:documentation>
+ </xs:annotation>
</xs:element>
-
+
+ <xs:element name="metadata-repository-module" type="xs:string" minOccurs="0" maxOccurs="1">
+ <xs:annotation>
+ <xs:documentation>Runtime Metadata Updates can be made persistent though by configuring a "org.teiid.metadata.MetadataRepository"</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+
<xs:element name="resultset-cache" maxOccurs="1" minOccurs="0">
<xs:annotation>
<xs:documentation>Configuration for result set caching.</xs:documentation>
@@ -235,13 +233,13 @@
</xs:complexType>
</xs:element>
- <xs:element name="object-replicator" maxOccurs="1" minOccurs="0">
+ <xs:element name="distributed-cache" maxOccurs="1" minOccurs="0">
<xs:annotation>
<xs:documentation>Cluster wide results distributor </xs:documentation>
</xs:annotation>
<xs:complexType>
- <xs:attribute name="stack" type="xs:string" use="required"/>
- <xs:attribute name="cluster-name" type="xs:string" use="required"/>
+ <xs:attribute name="jgroups-stack" type="xs:string" use="required"/>
+ <xs:attribute name="channel" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
Modified: trunk/jboss-integration/src/test/resources/teiid-model-config.txt
===================================================================
--- trunk/jboss-integration/src/test/resources/teiid-model-config.txt 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/jboss-integration/src/test/resources/teiid-model-config.txt 2011-12-07 15:46:45 UTC (rev 3721)
@@ -92,14 +92,19 @@
"description" => "Policy Module; Implementation of org.teiid.PolicyDecider class ",
"required" => false
},
- "object-replicator-stack" => {
+ "metadata-repository-module" => {
"type" => STRING,
+ "description" => "Runtime Metadata repository module; Runtime Metadata Updates can be made persistent though by configuring a \"org.teiid.metadata.MetadataRepository\". See Developer's Guide. ",
+ "required" => false
+ },
+ "distributed-cache-jgroups-stack" => {
+ "type" => STRING,
"description" => "JGroups stack name for cache replication channel",
"required" => false
},
- "object-replicator-cluster-name" => {
+ "distributed-cache-channel" => {
"type" => STRING,
- "description" => "cache channel cluster name for cache replication",
+ "description" => "Cache channel name to use for cache entries replication",
"required" => false
},
"buffer-service-use-disk" => {
Modified: trunk/jboss-integration/src/test/resources/teiid-model-json.txt
===================================================================
--- trunk/jboss-integration/src/test/resources/teiid-model-json.txt 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/jboss-integration/src/test/resources/teiid-model-json.txt 2011-12-07 15:46:45 UTC (rev 3721)
@@ -22,8 +22,8 @@
"max-row-fetch-size" : 20480,
"max-source-rows-allowed" : -1,
"max-threads" : 64,
- "object-replicator-cluster-name" : "cluster",
- "object-replicator-stack" : "stack",
+ "distributed-cache-channel" : "cluster",
+ "distributed-cache-jgroups-stack" : "stack",
"preparedplan-cache-max-age-in-seconds" : 28800,
"preparedplan-cache-max-entries" : 512,
"query-threshold-in-seconds" : 600,
Modified: trunk/jboss-integration/src/test/resources/teiid-sample-config.xml
===================================================================
--- trunk/jboss-integration/src/test/resources/teiid-sample-config.xml 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/jboss-integration/src/test/resources/teiid-sample-config.xml 2011-12-07 15:46:45 UTC (rev 3721)
@@ -19,15 +19,16 @@
<query-timeout>23</query-timeout>
<workmanager>wm</workmanager>
<!--
- <authorization-validator module="javax.api"/>
- <policy-decider module="javax.api"/>
+ <authorization-validator-module="javax.api"/>
+ <policy-decider-module="javax.api"/>
+ <metadata-repository-module="javax.api"/>
-->
<resultset-cache name="cache" container-name="container" enable="false" max-staleness="90"/>
<preparedplan-cache max-entries="512" max-age-in-seconds="28800"/>
- <object-replicator stack="stack" cluster-name="cluster"/>
+ <distributed-cache jgroups-stack="stack" channel="cluster"/>
<transport name="jdbc" protocol="teiid" socket-binding="teiid-jdbc" max-socket-threads="1" input-buffer-size="2" output-buffer-size="3"/>
Added: trunk/runtime/src/main/java/org/teiid/deployers/EventDistributorImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/EventDistributorImpl.java (rev 0)
+++ trunk/runtime/src/main/java/org/teiid/deployers/EventDistributorImpl.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -0,0 +1,189 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+package org.teiid.deployers;
+
+import java.util.List;
+
+import org.teiid.adminapi.impl.VDBMetaData;
+import org.teiid.core.TeiidComponentException;
+import org.teiid.dqp.internal.process.DataTierManagerImpl;
+import org.teiid.events.EventDistributor;
+import org.teiid.logging.LogConstants;
+import org.teiid.logging.LogManager;
+import org.teiid.metadata.AbstractMetadataRecord;
+import org.teiid.metadata.Column;
+import org.teiid.metadata.ColumnStats;
+import org.teiid.metadata.Procedure;
+import org.teiid.metadata.Schema;
+import org.teiid.metadata.Table;
+import org.teiid.metadata.Table.TriggerEvent;
+import org.teiid.metadata.TableStats;
+import org.teiid.query.metadata.TransformationMetadata;
+import org.teiid.query.optimizer.relational.RelationalPlanner;
+import org.teiid.query.processor.DdlPlan;
+import org.teiid.query.tempdata.GlobalTableStore;
+import org.teiid.runtime.RuntimePlugin;
+
+public abstract class EventDistributorImpl implements EventDistributor {
+
+ public abstract VDBRepository getVdbRepository();
+
+ @Override
+ public void updateMatViewRow(String vdbName, int vdbVersion, String schema,
+ String viewName, List<?> tuple, boolean delete) {
+ VDBMetaData metadata = getVdbRepository().getVDB(vdbName, vdbVersion);
+ if (metadata != null) {
+ GlobalTableStore gts = metadata.getAttachment(GlobalTableStore.class);
+ if (gts != null) {
+ try {
+ gts.updateMatViewRow((RelationalPlanner.MAT_PREFIX + schema + '.' + viewName).toUpperCase(), tuple, delete);
+ } catch (TeiidComponentException e) {
+ LogManager.logError(LogConstants.CTX_RUNTIME, e, RuntimePlugin.Util.getString("replication_failed", "updateMatViewRow")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ }
+ }
+
+ @Override
+ public void dataModification(String vdbName, int vdbVersion, String schema, String... tableNames) {
+ updateModified(true, vdbName, vdbVersion, schema, tableNames);
+ }
+
+ private void updateModified(boolean data, String vdbName, int vdbVersion, String schema,
+ String... objectNames) {
+ Schema s = getSchema(vdbName, vdbVersion, schema);
+ if (s == null) {
+ return;
+ }
+ long ts = System.currentTimeMillis();
+ for (String name:objectNames) {
+ Table table = s.getTables().get(name.toUpperCase());
+ if (table == null) {
+ continue;
+ }
+ if (data) {
+ table.setLastDataModification(ts);
+ } else {
+ table.setLastModified(ts);
+ }
+ }
+ }
+
+ @Override
+ public void setColumnStats(String vdbName, int vdbVersion,
+ String schemaName, String tableName, String columnName,
+ ColumnStats stats) {
+ Table t = getTable(vdbName, vdbVersion, schemaName, tableName);
+ if (t == null) {
+ return;
+ }
+ for (Column c : t.getColumns()) {
+ if (c.getName().equalsIgnoreCase(columnName)) {
+ c.setColumnStats(stats);
+ t.setLastModified(System.currentTimeMillis());
+ break;
+ }
+ }
+ }
+
+ @Override
+ public void setTableStats(String vdbName, int vdbVersion,
+ String schemaName, String tableName, TableStats stats) {
+ Table t = getTable(vdbName, vdbVersion, schemaName, tableName);
+ if (t == null) {
+ return;
+ }
+ t.setTableStats(stats);
+ t.setLastModified(System.currentTimeMillis());
+ }
+
+ private Table getTable(String vdbName, int vdbVersion, String schemaName,
+ String tableName) {
+ Schema s = getSchema(vdbName, vdbVersion, schemaName);
+ if (s == null) {
+ return null;
+ }
+ return s.getTables().get(tableName.toUpperCase());
+ }
+
+ private Schema getSchema(String vdbName, int vdbVersion, String schemaName) {
+ VDBMetaData vdb = getVdbRepository().getVDB(vdbName, vdbVersion);
+ if (vdb == null) {
+ return null;
+ }
+ TransformationMetadata tm = vdb.getAttachment(TransformationMetadata.class);
+ if (tm == null) {
+ return null;
+ }
+ return tm.getMetadataStore().getSchemas().get(schemaName.toUpperCase());
+ }
+
+ @Override
+ public void setInsteadOfTriggerDefinition(String vdbName, int vdbVersion,
+ String schema, String viewName, TriggerEvent triggerEvent,
+ String triggerDefinition, Boolean enabled) {
+ Table t = getTable(vdbName, vdbVersion, schema, viewName);
+ if (t == null) {
+ return;
+ }
+ DdlPlan.alterInsteadOfTrigger(getVdbRepository().getVDB(vdbName, vdbVersion), t, triggerDefinition, enabled, triggerEvent);
+ }
+
+ @Override
+ public void setProcedureDefinition(String vdbName, int vdbVersion,String schema, String procName, String definition) {
+ Schema s = getSchema(vdbName, vdbVersion, schema);
+ if (s == null) {
+ return;
+ }
+ Procedure p = s.getProcedures().get(procName.toUpperCase());
+ if (p == null) {
+ return;
+ }
+ DdlPlan.alterProcedureDefinition(getVdbRepository().getVDB(vdbName, vdbVersion), p, definition);
+ }
+
+ @Override
+ public void setViewDefinition(String vdbName, int vdbVersion, String schema, String viewName, String definition) {
+ Table t = getTable(vdbName, vdbVersion, schema, viewName);
+ if (t == null) {
+ return;
+ }
+ DdlPlan.alterView(getVdbRepository().getVDB(vdbName, vdbVersion), t, definition);
+ }
+
+ @Override
+ public void setProperty(String vdbName, int vdbVersion, String uuid,
+ String name, String value) {
+ VDBMetaData vdb = getVdbRepository().getVDB(vdbName, vdbVersion);
+ if (vdb == null) {
+ return;
+ }
+ TransformationMetadata tm = vdb.getAttachment(TransformationMetadata.class);
+ if (tm == null) {
+ return;
+ }
+ AbstractMetadataRecord record = DataTierManagerImpl.getByUuid(tm.getMetadataStore(), uuid);
+ if (record != null) {
+ record.setProperty(name, value);
+ }
+ }
+}
Property changes on: trunk/runtime/src/main/java/org/teiid/deployers/EventDistributorImpl.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java 2011-12-07 15:46:45 UTC (rev 3721)
@@ -361,7 +361,7 @@
}
public void start() {
- LogManager.logInfo(LogConstants.CTX_SECURITY, RuntimePlugin.Util.getString("auth_type", authenticationType, securityDomainNames)); //$NON-NLS-1$
+ LogManager.logDetail(LogConstants.CTX_SECURITY, RuntimePlugin.Util.getString("auth_type", authenticationType, securityDomainNames)); //$NON-NLS-1$
this.sessionMonitor.schedule(new TimerTask() {
@Override
public void run() {
Modified: trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties
===================================================================
--- trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties 2011-12-06 20:20:23 UTC (rev 3720)
+++ trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties 2011-12-07 15:46:45 UTC (rev 3721)
@@ -92,6 +92,7 @@
ambigious_name=Ambiguous VDB name specified. Only single occurrence of the "." is allowed in the VDB name. Also, when version based vdb name is specified, then a separate "version" connection option is not allowed:{0}.{1}
lo_not_supported=LO functions are not supported
SSLConfiguration.no_anonymous=The anonymous cipher suite TLS_DH_anon_WITH_AES_128_CBC_SHA is not available. Please change the transport to be non-SSL or use non-anonymous SSL.
+replication_failed=Could not replicate object {0}
PgBackendProtocol.ssl_error=Could not initialize ODBC SSL. non-SSL connections will still be allowed.
PgBackendProtocol.unexpected_error=Unexpected error occurred
13 years
teiid SVN: r3720 - trunk/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-12-06 15:20:23 -0500 (Tue, 06 Dec 2011)
New Revision: 3720
Modified:
trunk/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooExecutionFactory.java
Log:
TEIID-1859 TEIID-3 adding new capabilities to control convert pushdown and restrict comparisons
Modified: trunk/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooExecutionFactory.java
===================================================================
--- trunk/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooExecutionFactory.java 2011-12-06 15:31:53 UTC (rev 3719)
+++ trunk/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooExecutionFactory.java 2011-12-06 20:20:23 UTC (rev 3720)
@@ -87,5 +87,10 @@
metadataFactory.addColumn("volume", DataTypeManager.DefaultDataTypes.BIG_INTEGER, t); //$NON-NLS-1$
metadataFactory.addAccessPattern("needs_symbol", Arrays.asList("symbol"), t); //$NON-NLS-1$ //$NON-NLS-2$
}
+
+ @Override
+ public boolean supportsOnlyLiteralComparison() {
+ return true;
+ }
}
13 years
teiid SVN: r3719 - in trunk: engine/src/main/java/org/teiid/common/buffer and 8 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-12-06 10:31:53 -0500 (Tue, 06 Dec 2011)
New Revision: 3719
Added:
trunk/engine/src/main/java/org/teiid/common/buffer/TupleBufferCache.java
Modified:
trunk/engine/src/main/java/org/teiid/cache/Cachable.java
trunk/engine/src/main/java/org/teiid/common/buffer/BufferManager.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedPlan.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java
trunk/engine/src/main/java/org/teiid/dqp/service/BufferService.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCachedResults.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
trunk/engine/src/test/java/org/teiid/dqp/service/FakeBufferService.java
trunk/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java
trunk/engine/src/test/java/org/teiid/query/processor/TestProcessor.java
trunk/engine/src/test/java/org/teiid/query/processor/TestTempTables.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/BufferManagerService.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/CacheService.java
trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java
trunk/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java
Log:
TEIID-1720 limiting the scope of the buffermanger replication proxy
Modified: trunk/engine/src/main/java/org/teiid/cache/Cachable.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/cache/Cachable.java 2011-12-05 19:12:03 UTC (rev 3718)
+++ trunk/engine/src/main/java/org/teiid/cache/Cachable.java 2011-12-06 15:31:53 UTC (rev 3719)
@@ -21,14 +21,14 @@
*/
package org.teiid.cache;
-import org.teiid.common.buffer.BufferManager;
+import org.teiid.common.buffer.TupleBufferCache;
import org.teiid.dqp.internal.process.AccessInfo;
public interface Cachable {
- boolean prepare(BufferManager bufferManager);
+ boolean prepare(TupleBufferCache bufferManager);
- boolean restore(BufferManager bufferManager);
+ boolean restore(TupleBufferCache bufferManager);
AccessInfo getAccessInfo();
}
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/BufferManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/BufferManager.java 2011-12-05 19:12:03 UTC (rev 3718)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/BufferManager.java 2011-12-06 15:31:53 UTC (rev 3719)
@@ -24,8 +24,6 @@
import java.util.List;
-import org.teiid.Replicated;
-import org.teiid.Replicated.ReplicationMode;
import org.teiid.core.TeiidComponentException;
import org.teiid.query.sql.symbol.Expression;
@@ -38,7 +36,7 @@
* how to store data. The buffer manager should also be aware of memory
* management issues.
*/
-public interface BufferManager extends StorageManager {
+public interface BufferManager extends StorageManager, TupleBufferCache {
public enum TupleSourceType {
/**
@@ -127,9 +125,6 @@
void addTupleBuffer(TupleBuffer tb);
- @Replicated(replicateState=ReplicationMode.PULL)
- TupleBuffer getTupleBuffer(String id);
-
/**
* Set the maxActivePlans as a hint at determining the maxProcessing
* @param maxActivePlans
@@ -142,6 +137,4 @@
* @return
*/
int reserveAdditionalBuffers(int additional);
-
- void distributeTupleBuffer(String uuid, TupleBuffer tb);
}
Added: trunk/engine/src/main/java/org/teiid/common/buffer/TupleBufferCache.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/TupleBufferCache.java (rev 0)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/TupleBufferCache.java 2011-12-06 15:31:53 UTC (rev 3719)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.common.buffer;
+
+import org.teiid.Replicated;
+import org.teiid.Replicated.ReplicationMode;
+
+public interface TupleBufferCache {
+
+ @Replicated(replicateState=ReplicationMode.PULL)
+ TupleBuffer getTupleBuffer(String id);
+
+ void distributeTupleBuffer(String uuid, TupleBuffer tb);
+
+}
Property changes on: trunk/engine/src/main/java/org/teiid/common/buffer/TupleBufferCache.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java 2011-12-05 19:12:03 UTC (rev 3718)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java 2011-12-06 15:31:53 UTC (rev 3719)
@@ -27,8 +27,8 @@
import org.teiid.api.exception.query.QueryParserException;
import org.teiid.api.exception.query.QueryResolverException;
import org.teiid.cache.Cachable;
-import org.teiid.common.buffer.BufferManager;
import org.teiid.common.buffer.TupleBuffer;
+import org.teiid.common.buffer.TupleBufferCache;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidException;
import org.teiid.core.util.Assertion;
@@ -93,14 +93,14 @@
}
@Override
- public boolean prepare(BufferManager bufferManager) {
+ public boolean prepare(TupleBufferCache bufferManager) {
Assertion.assertTrue(!this.results.isForwardOnly());
bufferManager.distributeTupleBuffer(this.results.getId(), results);
return true;
}
@Override
- public synchronized boolean restore(BufferManager bufferManager) {
+ public synchronized boolean restore(TupleBufferCache bufferManager) {
if (this.results == null) {
if (this.hasLobs) {
return false; //the lob store is local only and not distributed
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedPlan.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedPlan.java 2011-12-05 19:12:03 UTC (rev 3718)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedPlan.java 2011-12-06 15:31:53 UTC (rev 3719)
@@ -25,7 +25,7 @@
import java.util.List;
import org.teiid.cache.Cachable;
-import org.teiid.common.buffer.BufferManager;
+import org.teiid.common.buffer.TupleBufferCache;
import org.teiid.query.analysis.AnalysisRecord;
import org.teiid.query.processor.ProcessorPlan;
import org.teiid.query.processor.relational.AccessNode;
@@ -114,12 +114,12 @@
}
@Override
- public boolean prepare(BufferManager bufferManager) {
+ public boolean prepare(TupleBufferCache bufferManager) {
return true; //no remotable actions
}
@Override
- public boolean restore(BufferManager bufferManager) {
+ public boolean restore(TupleBufferCache bufferManager) {
return true; //no remotable actions
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java 2011-12-05 19:12:03 UTC (rev 3718)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java 2011-12-06 15:31:53 UTC (rev 3719)
@@ -37,7 +37,7 @@
import org.teiid.cache.DefaultCache;
import org.teiid.cache.DefaultCacheFactory;
import org.teiid.cache.CacheConfiguration.Policy;
-import org.teiid.common.buffer.BufferManager;
+import org.teiid.common.buffer.TupleBufferCache;
import org.teiid.core.types.DataTypeManager;
import org.teiid.core.util.Assertion;
import org.teiid.core.util.EquivalenceUtil;
@@ -69,7 +69,7 @@
private AtomicInteger cacheHit = new AtomicInteger();
private AtomicInteger totalRequests = new AtomicInteger();
- private BufferManager bufferManager;
+ private TupleBufferCache bufferManager;
public SessionAwareCache(){
this(DEFAULT_MAX_SIZE_TOTAL);
@@ -318,7 +318,7 @@
return maxSize;
}
- public void setBufferManager(BufferManager bufferManager) {
+ public void setTupleBufferCache(TupleBufferCache bufferManager) {
this.bufferManager = bufferManager;
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/service/BufferService.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/service/BufferService.java 2011-12-05 19:12:03 UTC (rev 3718)
+++ trunk/engine/src/main/java/org/teiid/dqp/service/BufferService.java 2011-12-06 15:31:53 UTC (rev 3719)
@@ -23,9 +23,11 @@
package org.teiid.dqp.service;
import org.teiid.common.buffer.BufferManager;
+import org.teiid.common.buffer.TupleBufferCache;
public interface BufferService {
BufferManager getBufferManager();
+ TupleBufferCache getTupleBufferCache();
}
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCachedResults.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCachedResults.java 2011-12-05 19:12:03 UTC (rev 3718)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCachedResults.java 2011-12-06 15:31:53 UTC (rev 3719)
@@ -21,9 +21,7 @@
*/
package org.teiid.dqp.internal.process;
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
import java.util.Arrays;
import java.util.List;
@@ -32,12 +30,13 @@
import org.teiid.cache.Cache;
import org.teiid.cache.DefaultCache;
import org.teiid.common.buffer.BufferManager;
-import org.teiid.common.buffer.BufferManager.TupleSourceType;
import org.teiid.common.buffer.BufferManagerFactory;
import org.teiid.common.buffer.TupleBuffer;
+import org.teiid.common.buffer.BufferManager.TupleSourceType;
import org.teiid.core.types.DataTypeManager;
import org.teiid.core.util.UnitTestUtil;
import org.teiid.dqp.service.BufferService;
+import org.teiid.dqp.service.FakeBufferService;
import org.teiid.metadata.Table;
import org.teiid.query.processor.FakeProcessorPlan;
import org.teiid.query.processor.ProcessorPlan;
@@ -51,12 +50,7 @@
@Test
public void testCaching() throws Exception {
- BufferService fbs = new BufferService() {
- @Override
- public BufferManager getBufferManager() {
- return BufferManagerFactory.getStandaloneBufferManager();
- }
- };
+ BufferService fbs = new FakeBufferService(true);
ElementSymbol x = new ElementSymbol("x"); //$NON-NLS-1$
x.setType(DataTypeManager.DefaultDataClasses.INTEGER);
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2011-12-05 19:12:03 UTC (rev 3718)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2011-12-06 15:31:53 UTC (rev 3719)
@@ -46,7 +46,6 @@
import org.teiid.client.RequestMessage.StatementType;
import org.teiid.client.lob.LobChunk;
import org.teiid.client.util.ResultsFuture;
-import org.teiid.common.buffer.BufferManager;
import org.teiid.common.buffer.BufferManagerFactory;
import org.teiid.common.buffer.impl.BufferManagerImpl;
import org.teiid.core.TeiidProcessingException;
@@ -56,6 +55,7 @@
import org.teiid.dqp.internal.process.AbstractWorkItem.ThreadState;
import org.teiid.dqp.service.AutoGenDataService;
import org.teiid.dqp.service.BufferService;
+import org.teiid.dqp.service.FakeBufferService;
import org.teiid.query.optimizer.TestOptimizer;
import org.teiid.query.optimizer.capabilities.BasicSourceCapabilities;
import org.teiid.query.optimizer.capabilities.SourceCapabilities.Capability;
@@ -114,15 +114,9 @@
ConnectorManagerRepository repo = Mockito.mock(ConnectorManagerRepository.class);
context.getVDB().addAttchment(ConnectorManagerRepository.class, repo);
Mockito.stub(repo.getConnectorManager(Mockito.anyString())).toReturn(agds);
- BufferService bs = new BufferService() {
-
- @Override
- public BufferManager getBufferManager() {
- BufferManagerImpl bm = BufferManagerFactory.createBufferManager();
- bm.setInlineLobs(false);
- return bm;
- }
- };
+ BufferManagerImpl bm = BufferManagerFactory.createBufferManager();
+ bm.setInlineLobs(false);
+ BufferService bs = new FakeBufferService(bm, bm);
core = new DQPCore();
core.setBufferService(bs);
core.setResultsetCache(new SessionAwareCache<CachedResults>(new DefaultCacheFactory(), SessionAwareCache.Type.RESULTSET, new CacheConfiguration()));
@@ -137,7 +131,7 @@
config.setAuthorizationValidator(daa);
core.start(config);
core.getPrepPlanCache().setModTime(1);
- core.getRsCache().setBufferManager(bs.getBufferManager());
+ core.getRsCache().setTupleBufferCache(bs.getBufferManager());
}
@After public void tearDown() throws Exception {
Modified: trunk/engine/src/test/java/org/teiid/dqp/service/FakeBufferService.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/service/FakeBufferService.java 2011-12-05 19:12:03 UTC (rev 3718)
+++ trunk/engine/src/test/java/org/teiid/dqp/service/FakeBufferService.java 2011-12-06 15:31:53 UTC (rev 3719)
@@ -24,19 +24,38 @@
import org.teiid.common.buffer.BufferManager;
import org.teiid.common.buffer.BufferManagerFactory;
+import org.teiid.common.buffer.TupleBufferCache;
public class FakeBufferService implements BufferService {
private BufferManager bufferMgr;
+ private TupleBufferCache tupleBufferCache;
public FakeBufferService() {
- super();
-
- bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
+ this(true);
}
+
+ public FakeBufferService(boolean shared) {
+ if (shared) {
+ bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
+ } else {
+ bufferMgr = BufferManagerFactory.createBufferManager();
+ }
+ this.tupleBufferCache = bufferMgr;
+ }
+
+ public FakeBufferService(BufferManager buffManager, TupleBufferCache tupleBufferCache) {
+ this.bufferMgr = buffManager;
+ this.tupleBufferCache = tupleBufferCache;
+ }
public BufferManager getBufferManager() {
return bufferMgr;
}
+
+ @Override
+ public TupleBufferCache getTupleBufferCache() {
+ return tupleBufferCache;
+ }
}
Modified: trunk/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java 2011-12-05 19:12:03 UTC (rev 3718)
+++ trunk/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java 2011-12-06 15:31:53 UTC (rev 3719)
@@ -74,7 +74,7 @@
hdm.addData("SELECT mattable.info.e2, mattable.info.e1 FROM mattable.info", new List[] {Arrays.asList(1, "a"), Arrays.asList(2, "a")});
SessionAwareCache<CachedResults> cache = new SessionAwareCache<CachedResults>();
- cache.setBufferManager(bm);
+ cache.setTupleBufferCache(bm);
dataManager = new TempTableDataManager(hdm, bm, ExecutorUtils.getDirectExecutor(), cache);
}
Modified: trunk/engine/src/test/java/org/teiid/query/processor/TestProcessor.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/TestProcessor.java 2011-12-05 19:12:03 UTC (rev 3718)
+++ trunk/engine/src/test/java/org/teiid/query/processor/TestProcessor.java 2011-12-06 15:31:53 UTC (rev 3719)
@@ -245,7 +245,7 @@
}
if (!(dataManager instanceof TempTableDataManager)) {
SessionAwareCache<CachedResults> cache = new SessionAwareCache<CachedResults>();
- cache.setBufferManager(bufferMgr);
+ cache.setTupleBufferCache(bufferMgr);
dataManager = new TempTableDataManager(dataManager, bufferMgr, ExecutorUtils.getDirectExecutor(), cache);
}
if (context.getQueryProcessorFactory() == null) {
Modified: trunk/engine/src/test/java/org/teiid/query/processor/TestTempTables.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/TestTempTables.java 2011-12-05 19:12:03 UTC (rev 3718)
+++ trunk/engine/src/test/java/org/teiid/query/processor/TestTempTables.java 2011-12-06 15:31:53 UTC (rev 3719)
@@ -93,7 +93,7 @@
TestProcessor.sampleData1(fdm);
BufferManager bm = BufferManagerFactory.getStandaloneBufferManager();
SessionAwareCache<CachedResults> cache = new SessionAwareCache<CachedResults>();
- cache.setBufferManager(bm);
+ cache.setTupleBufferCache(bm);
dataManager = new TempTableDataManager(fdm, bm, ExecutorUtils.getDirectExecutor(), cache);
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/BufferManagerService.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/BufferManagerService.java 2011-12-05 19:12:03 UTC (rev 3718)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/BufferManagerService.java 2011-12-06 15:31:53 UTC (rev 3719)
@@ -27,6 +27,7 @@
import org.jboss.msc.service.StopContext;
import org.jboss.msc.value.InjectedValue;
import org.teiid.common.buffer.BufferManager;
+import org.teiid.common.buffer.TupleBufferCache;
import org.teiid.dqp.service.BufferService;
import org.teiid.query.ObjectReplicator;
import org.teiid.services.BufferServiceImpl;
@@ -37,6 +38,7 @@
public final InjectedValue<String> pathInjector = new InjectedValue<String>();
public final InjectedValue<ObjectReplicator> replicatorInjector = new InjectedValue<ObjectReplicator>();
private BufferManager manager;
+ private TupleBufferCache tupleBufferCache;
public BufferManagerService(BufferServiceImpl buffer) {
this.bufferService = buffer;
@@ -47,10 +49,11 @@
bufferService.setDiskDirectory(pathInjector.getValue());
bufferService.start();
manager = bufferService.getBufferManager();
+ tupleBufferCache = manager;
if (replicatorInjector.getValue() != null) {
try {
//use a mux name that will not conflict with any vdb
- manager = this.replicatorInjector.getValue().replicate("$BM$", BufferManager.class, this.manager, 0); //$NON-NLS-1$
+ tupleBufferCache = this.replicatorInjector.getValue().replicate("$BM$", TupleBufferCache.class, this.manager, 0); //$NON-NLS-1$
} catch (Exception e) {
throw new StartException(e);
}
@@ -69,6 +72,11 @@
public BufferManager getBufferManager() {
return manager;
}
+
+ @Override
+ public TupleBufferCache getTupleBufferCache() {
+ return tupleBufferCache;
+ }
@Override
public BufferService getValue() throws IllegalStateException,IllegalArgumentException {
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/CacheService.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/CacheService.java 2011-12-05 19:12:03 UTC (rev 3718)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/CacheService.java 2011-12-06 15:31:53 UTC (rev 3719)
@@ -39,7 +39,7 @@
@Override
public void start(StartContext context) throws StartException {
- this.cache.setBufferManager(this.bufferMgrInjector.getValue().getBufferManager());
+ this.cache.setTupleBufferCache(this.bufferMgrInjector.getValue().getTupleBufferCache());
}
@Override
Modified: trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java 2011-12-05 19:12:03 UTC (rev 3718)
+++ trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java 2011-12-06 15:31:53 UTC (rev 3719)
@@ -27,6 +27,7 @@
import java.io.Serializable;
import org.teiid.common.buffer.BufferManager;
+import org.teiid.common.buffer.TupleBufferCache;
import org.teiid.common.buffer.impl.BufferFrontedFileStoreCache;
import org.teiid.common.buffer.impl.BufferManagerImpl;
import org.teiid.common.buffer.impl.FileStorageManager;
@@ -147,6 +148,11 @@
public BufferManagerImpl getBufferManager() {
return this.bufferMgr;
}
+
+ @Override
+ public TupleBufferCache getTupleBufferCache() {
+ return this.bufferMgr;
+ }
public void setUseDisk(boolean flag) {
this.useDisk = flag;
Modified: trunk/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java 2011-12-05 19:12:03 UTC (rev 3718)
+++ trunk/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java 2011-12-06 15:31:53 UTC (rev 3719)
@@ -52,8 +52,7 @@
import org.teiid.cache.CacheConfiguration.Policy;
import org.teiid.client.DQP;
import org.teiid.client.security.ILogon;
-import org.teiid.common.buffer.BufferManager;
-import org.teiid.common.buffer.BufferManagerFactory;
+import org.teiid.common.buffer.TupleBufferCache;
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.util.UnitTestUtil;
import org.teiid.deployers.CompositeVDB;
@@ -71,6 +70,7 @@
import org.teiid.dqp.internal.process.PreparedPlan;
import org.teiid.dqp.internal.process.SessionAwareCache;
import org.teiid.dqp.service.BufferService;
+import org.teiid.dqp.service.FakeBufferService;
import org.teiid.metadata.FunctionMethod;
import org.teiid.metadata.MetadataRepository;
import org.teiid.metadata.MetadataStore;
@@ -269,13 +269,7 @@
this.sessionService.setVDBRepository(repo);
BufferService bs = null;
if (!realBufferMangaer) {
- bs = new BufferService() {
-
- @Override
- public BufferManager getBufferManager() {
- return BufferManagerFactory.createBufferManager();
- }
- };
+ bs = new FakeBufferService(false);
} else {
BufferServiceImpl bsi = new BufferServiceImpl();
bsi.setDiskDirectory(UnitTestUtil.getTestScratchPath());
@@ -284,14 +278,8 @@
}
if (replicator != null) {
try {
- final BufferManager bm = replicator.replicate("$BM$", BufferManager.class, bs.getBufferManager(), 0);
- bs = new BufferService() {
-
- @Override
- public BufferManager getBufferManager() {
- return bm;
- }
- };
+ final TupleBufferCache tbc = replicator.replicate("$BM$", TupleBufferCache.class, bs.getBufferManager(), 0);
+ bs = new FakeBufferService(bs.getBufferManager(), tbc);
} catch (Exception e) {
throw new TeiidRuntimeException(e);
}
@@ -320,10 +308,10 @@
};
SessionAwareCache rs = new SessionAwareCache<CachedResults>(dcf, SessionAwareCache.Type.RESULTSET, new CacheConfiguration(Policy.LRU, 60, 250, "resultsetcache"));
SessionAwareCache ppc = new SessionAwareCache<PreparedPlan>(dcf, SessionAwareCache.Type.PREPAREDPLAN, new CacheConfiguration());
- rs.setBufferManager(this.dqp.getBufferManager());
+ rs.setTupleBufferCache(bs.getTupleBufferCache());
this.dqp.setResultsetCache(rs);
- ppc.setBufferManager(this.dqp.getBufferManager());
+ ppc.setTupleBufferCache(bs.getTupleBufferCache());
this.dqp.setPreparedPlanCache(ppc);
this.dqp.setTransactionService(new FakeTransactionService());
13 years
teiid SVN: r3718 - in trunk: admin/src/main/java/org/teiid/adminapi and 9 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2011-12-05 14:12:03 -0500 (Mon, 05 Dec 2011)
New Revision: 3718
Added:
trunk/test-integration/common/src/test/resources/bqt2.vdb
Modified:
trunk/admin/src/main/java/org/teiid/adminapi/AdminFactory.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidServiceNames.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TranslatorDeployer.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
trunk/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidConfiguration.java
trunk/pom.xml
trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java
trunk/test-integration/common/pom.xml
trunk/test-integration/common/src/test/java/org/teiid/arquillian/SampleExecutionFactory.java
trunk/test-integration/common/src/test/java/org/teiid/arquillian/TestDeployment.java
trunk/test-integration/common/src/test/resources/arquillian.xml
trunk/test-integration/pom.xml
Log:
TEIID-1720: Fixing some regressions based on the tests, added arquillian based test to test admin api.
Modified: trunk/admin/src/main/java/org/teiid/adminapi/AdminFactory.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/AdminFactory.java 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/admin/src/main/java/org/teiid/adminapi/AdminFactory.java 2011-12-05 19:12:03 UTC (rev 3718)
@@ -172,14 +172,7 @@
@Override
public void clearCache(String cacheType) throws AdminException {
final ModelNode request = buildRequest("teiid", "clear-cache", "cache-type", cacheType);//$NON-NLS-1$ //$NON-NLS-2$
- try {
- ModelNode outcome = this.connection.execute(request);
- if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
- }
- } catch (Exception e) {
- throw new AdminProcessingException(e);
- }
+ execute(request);
}
@Override
@@ -188,14 +181,7 @@
"cache-type", cacheType,
"vdb-name", vdbName,
"vdb-version", String.valueOf(vdbVersion));//$NON-NLS-1$ //$NON-NLS-2$
- try {
- ModelNode outcome = this.connection.execute(request);
- if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
- }
- } catch (Exception e) {
- throw new AdminProcessingException(e);
- }
+ execute(request);
}
@Override
@@ -233,14 +219,7 @@
throw new IllegalStateException("Failed to build operation", e); //$NON-NLS-1$
}
- try {
- ModelNode outcome = this.connection.execute(request);
- if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
- }
- } catch (IOException e) {
- throw new AdminProcessingException(e);
- }
+ execute(request);
// add all the config properties
Enumeration keys = properties.propertyNames();
@@ -266,14 +245,7 @@
throw new IllegalStateException("Failed to build operation", e); //$NON-NLS-1$
}
- try {
- ModelNode outcome = this.connection.execute(request);
- if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
- }
- } catch (IOException e) {
- throw new AdminProcessingException(e);
- }
+ execute(request);
}
// /subsystem=resource-adapters/resource-adapter=teiid-connector-ws.rar:add(archive=teiid-connector-ws.rar, transaction-support=NoTransaction)
@@ -292,14 +264,7 @@
throw new IllegalStateException("Failed to build operation", e); //$NON-NLS-1$
}
- try {
- ModelNode outcome = this.connection.execute(request);
- if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
- }
- } catch (IOException e) {
- throw new AdminProcessingException(e);
- }
+ execute(request);
}
class AbstractMetadatMapper implements MetadataMapper<String>{
@@ -371,7 +336,7 @@
}
DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
- final ModelNode request;
+ ModelNode request;
try {
builder.addNode("subsystem", "datasources"); //$NON-NLS-1$ //$NON-NLS-2$
builder.addNode("data-source", deploymentName); //$NON-NLS-1$
@@ -407,14 +372,32 @@
throw new IllegalStateException("Failed to build operation", e); //$NON-NLS-1$
}
+ // execute request
+ execute(request);
+
+ // issue the "enable" operation
+ builder = new DefaultOperationRequestBuilder();
try {
+ builder.addNode("subsystem", "datasources"); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.addNode("data-source", deploymentName); //$NON-NLS-1$
+ builder.setOperationName("enable");
+ request = builder.buildRequest();
+ } catch (OperationFormatException e) {
+ throw new IllegalStateException("Failed to build operation", e); //$NON-NLS-1$
+ }
+
+ execute(request);
+ }
+
+ private void execute(final ModelNode request) throws AdminProcessingException {
+ try {
ModelNode outcome = this.connection.execute(request);
if (!Util.isSuccess(outcome)) {
throw new AdminProcessingException(Util.getFailureDescription(outcome));
}
} catch (IOException e) {
throw new AdminProcessingException(e);
- }
+ }
}
@Override
@@ -486,18 +469,13 @@
@Override
public void undeploy(String deployedName) throws AdminException {
- try {
- ModelNode request = buildUndeployRequest(deployedName);
-
- ModelNode outcome = this.connection.execute(request);
- if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
- }
+ ModelNode request;
+ try {
+ request = buildUndeployRequest(deployedName);
} catch (OperationFormatException e) {
throw new AdminProcessingException(e);
- } catch (IOException e) {
- throw new AdminProcessingException(e);
}
+ execute(request);
}
public ModelNode buildUndeployRequest(String name) throws OperationFormatException {
@@ -539,14 +517,7 @@
@Override
public void deploy(String deployName, InputStream vdb) throws AdminException {
ModelNode request = buildDeployVDBRequest(deployName, vdb);
- try {
- ModelNode outcome = this.connection.execute(request);
- if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
- }
- } catch (Exception e) {
- throw new AdminProcessingException(e);
- }
+ execute(request);
}
private ModelNode buildDeployVDBRequest(String fileName, InputStream vdb) throws AdminProcessingException {
@@ -620,7 +591,11 @@
@Override
public Collection<String> getCacheTypes() throws AdminException {
final ModelNode request = buildRequest("teiid", "cache-types");//$NON-NLS-1$ //$NON-NLS-2$
- try {
+ return executeList(request);
+ }
+
+ private Collection<String> executeList(final ModelNode request) throws AdminProcessingException {
+ try {
ModelNode outcome = this.connection.execute(request);
if (Util.isSuccess(outcome)) {
return Util.getList(outcome);
@@ -814,7 +789,7 @@
@Override
public Collection<? extends Request> getRequestsForSession(String sessionId) throws AdminException {
- final ModelNode request = buildRequest("teiid", "requests-per-session", "session", sessionId);//$NON-NLS-1$
+ final ModelNode request = buildRequest("teiid", "list-requests-per-session", "session", sessionId);//$NON-NLS-1$
if (request != null) {
try {
ModelNode outcome = this.connection.execute(request);
@@ -873,7 +848,7 @@
}
else {
result = new ModelNode();
- result.add(buildProperty("connection-url", "connection URL", ModelType.STRING, "connection url", true));
+ result.add(buildProperty("connection-url", "Connection URL", ModelType.STRING, "connection url to database", true));
result.add(buildProperty("user-name", "User Name", ModelType.STRING, "user name", false));
result.add(buildProperty("password", "Password", ModelType.STRING, "password", false));
result.add(buildProperty("check-valid-connection-sql", "Connection Validate SQL", ModelType.STRING, "SQL to be used to validate the connection", false));
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java 2011-12-05 19:12:03 UTC (rev 3718)
@@ -341,7 +341,7 @@
processorTarget.addDeploymentProcessor(Phase.STRUCTURE, Phase.STRUCTURE_WAR_DEPLOYMENT_INIT|0x0001,new VDBStructureDeployer());
processorTarget.addDeploymentProcessor(Phase.PARSE, Phase.PARSE_WEB_DEPLOYMENT|0x0001, new VDBParserDeployer());
processorTarget.addDeploymentProcessor(Phase.DEPENDENCIES, Phase.DEPENDENCIES_WAR_MODULE|0x0001, new VDBDependencyDeployer());
- processorTarget.addDeploymentProcessor(Phase.INSTALL, Phase.INSTALL_WAR_DEPLOYMENT|0x1000, new VDBDeployer(translatorRepo, asyncThreadPoolName, statusChecker));
+ processorTarget.addDeploymentProcessor(Phase.INSTALL, Phase.INSTALL_WAR_DEPLOYMENT|0x1000, new VDBDeployer(translatorRepo, asyncThreadPoolName, statusChecker, shutdownListener));
// translator deployers
processorTarget.addDeploymentProcessor(Phase.STRUCTURE, Phase.STRUCTURE_JDBC_DRIVER|0x0001,new TranslatorStructureDeployer());
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java 2011-12-05 19:12:03 UTC (rev 3718)
@@ -135,9 +135,9 @@
new RemoveAnyAuthenticatedDataRole().register(teiidSubsystem);
new ListRequests().register(teiidSubsystem);
new ListSessions().register(teiidSubsystem);
- new RequestsPerSession().register(teiidSubsystem);
- new RequestsPerVDB().register(teiidSubsystem);
- new GetLongRunningQueries().register(teiidSubsystem);
+ new ListRequestsPerSession().register(teiidSubsystem);
+ new ListRequestsPerVDB().register(teiidSubsystem);
+ new ListLongRunningRequests().register(teiidSubsystem);
new TerminateSession().register(teiidSubsystem);
new CancelRequest().register(teiidSubsystem);
new WorkerPoolStatistics().register(teiidSubsystem);
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java 2011-12-05 19:12:03 UTC (rev 3718)
@@ -93,10 +93,15 @@
}
@Override
- protected DQPCore getService(OperationContext context, PathAddress pathAddress, ModelNode operation) throws OperationFailedException {
+ protected DQPCore getService(OperationContext context, PathAddress pathAddress, ModelNode operation) throws OperationFailedException {
+
+ this.transports.clear();
+ this.vdbRepo = null;
+ this.engine = null;
+
List<ServiceName> services = context.getServiceRegistry(false).getServiceNames();
for (ServiceName name:services) {
- if (name.isParentOf(TeiidServiceNames.TRANSPORT_BASE)) {
+ if (TeiidServiceNames.TRANSPORT_BASE.isParentOf(name)) {
ServiceController<?> transport = context.getServiceRegistry(false).getService(name);
if (transport != null) {
this.transports.add(Transport.class.cast(transport.getValue()));
@@ -187,9 +192,9 @@
}
}
-class RequestsPerSession extends TeiidOperationHandler{
- protected RequestsPerSession() {
- super("requests-per-session"); //$NON-NLS-1$
+class ListRequestsPerSession extends TeiidOperationHandler{
+ protected ListRequestsPerSession() {
+ super("list-requests-per-session"); //$NON-NLS-1$
}
@Override
protected void executeOperation(OperationContext context, DQPCore engine, ModelNode operation) throws OperationFailedException{
@@ -233,9 +238,9 @@
}
}
-class RequestsPerVDB extends TeiidOperationHandler{
- protected RequestsPerVDB() {
- super("requests-per-vdb"); //$NON-NLS-1$
+class ListRequestsPerVDB extends TeiidOperationHandler{
+ protected ListRequestsPerVDB() {
+ super("list-requests-per-vdb"); //$NON-NLS-1$
}
@Override
protected void executeOperation(OperationContext context, DQPCore engine, ModelNode operation) throws OperationFailedException{
@@ -272,9 +277,9 @@
}
}
-class GetLongRunningQueries extends TeiidOperationHandler{
- protected GetLongRunningQueries() {
- super("long-running-queries"); //$NON-NLS-1$
+class ListLongRunningRequests extends TeiidOperationHandler{
+ protected ListLongRunningRequests() {
+ super("list-long-running-requests"); //$NON-NLS-1$
}
@Override
protected void executeOperation(OperationContext context, DQPCore engine, ModelNode operation) throws OperationFailedException{
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidServiceNames.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidServiceNames.java 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidServiceNames.java 2011-12-05 19:12:03 UTC (rev 3718)
@@ -29,6 +29,7 @@
public static ServiceName VDB_REPO = ServiceName.JBOSS.append("teiid", "vdb-repository");//$NON-NLS-1$ //$NON-NLS-2$
public static ServiceName TRANSLATOR_BASE = ServiceName.JBOSS.append("teiid", "translator");//$NON-NLS-1$ //$NON-NLS-2$
public static ServiceName TRANSPORT_BASE = ServiceName.JBOSS.append("teiid", "transport");//$NON-NLS-1$ //$NON-NLS-2$
+ private static ServiceName EMBEDDED_TRANSPORT_BASE = ServiceName.JBOSS.append("teiid", "embedded", "transport");//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
public static ServiceName BUFFER_DIR = ServiceName.JBOSS.append("teiid", "buffer.dir");//$NON-NLS-1$ //$NON-NLS-2$
public static ServiceName DATA_DIR = ServiceName.JBOSS.append("teiid", "data.dir");//$NON-NLS-1$ //$NON-NLS-2$
public static ServiceName BUFFER_MGR = ServiceName.JBOSS.append("teiid", "buffer-mgr");//$NON-NLS-1$ //$NON-NLS-2$
@@ -58,7 +59,11 @@
return ServiceName.of(TRANSPORT_BASE, name);
}
- public static ServiceName dsListenerServiceName(String name) {
- return ServiceName.of(DS_LISTENER_BASE, name);
+ public static ServiceName embeddedTransportServiceName(String name) {
+ return EMBEDDED_TRANSPORT_BASE.append(name);
+ }
+
+ public static ServiceName dsListenerServiceName(String vdbName, int version, String name) {
+ return ServiceName.of(DS_LISTENER_BASE, vdbName, String.valueOf(version), name);
}
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java 2011-12-05 19:12:03 UTC (rev 3718)
@@ -113,6 +113,7 @@
throw new OperationFailedException( new ModelNode().set(IntegrationPlugin.Util.getString("error_adding_translator", translatorName))); //$NON-NLS-1$
}
+ metadata.addAttchment(ClassLoader.class, translatorLoader);
if (translatorName.equalsIgnoreCase(metadata.getName())) {
LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("translator.added", metadata.getName())); //$NON-NLS-1$
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TranslatorDeployer.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TranslatorDeployer.java 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TranslatorDeployer.java 2011-12-05 19:12:03 UTC (rev 3718)
@@ -62,10 +62,11 @@
final ServiceLoader<ExecutionFactory> serviceLoader = ServiceLoader.load(ExecutionFactory.class, translatorLoader);
if (serviceLoader != null) {
for (ExecutionFactory ef:serviceLoader) {
- VDBTranslatorMetaData metadata = TranslatorUtil.buildTranslatorMetadata(ef, moduleName);
+ VDBTranslatorMetaData metadata = TranslatorUtil.buildTranslatorMetadata(ef, moduleName);
if (metadata == null) {
throw new DeploymentUnitProcessingException(IntegrationPlugin.Util.getString("error_adding_translator_deployment", moduleName)); //$NON-NLS-1$
}
+ metadata.addAttchment(ClassLoader.class, translatorLoader);
LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("translator.added", metadata.getName())); //$NON-NLS-1$
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java 2011-12-05 19:12:03 UTC (rev 3718)
@@ -199,7 +199,7 @@
// register a JNDI name, this looks hard.
if (transport.isEmbedded() && !isEmbeddedRegistered()) {
final CSRReferenceFactoryService referenceFactoryService = new CSRReferenceFactoryService();
- final ServiceName referenceFactoryServiceName =TeiidServiceNames.transportServiceName(transportName).append("reference-factory"); //$NON-NLS-1$
+ final ServiceName referenceFactoryServiceName =TeiidServiceNames.embeddedTransportServiceName(transportName).append("reference-factory"); //$NON-NLS-1$
final ServiceBuilder<?> referenceBuilder = target.addService(referenceFactoryServiceName,referenceFactoryService);
referenceBuilder.addDependency(TeiidServiceNames.transportServiceName(transportName), ClientServiceRegistry.class, referenceFactoryService.getCSRInjector());
referenceBuilder.setInitialMode(ServiceController.Mode.ACTIVE);
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java 2011-12-05 19:12:03 UTC (rev 3718)
@@ -43,6 +43,7 @@
import org.teiid.adminapi.impl.ModelMetaData;
import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.adminapi.impl.VDBTranslatorMetaData;
+import org.teiid.deployers.ContainerLifeCycleListener;
import org.teiid.deployers.UDFMetaData;
import org.teiid.deployers.VDBRepository;
import org.teiid.deployers.VDBStatusChecker;
@@ -60,11 +61,13 @@
private TranslatorRepository translatorRepository;
private String asyncThreadPoolName;
private VDBStatusChecker vdbStatusChecker;
+ private ContainerLifeCycleListener shutdownListener;
- public VDBDeployer (TranslatorRepository translatorRepo, String poolName, VDBStatusChecker vdbStatusChecker) {
+ public VDBDeployer (TranslatorRepository translatorRepo, String poolName, VDBStatusChecker vdbStatusChecker, ContainerLifeCycleListener shutdownListener) {
this.translatorRepository = translatorRepo;
this.asyncThreadPoolName = poolName;
this.vdbStatusChecker = vdbStatusChecker;
+ this.shutdownListener = shutdownListener;
}
public void deploy(final DeploymentPhaseContext context) throws DeploymentUnitProcessingException {
@@ -122,7 +125,7 @@
// build a VDB service
ArrayList<String> unAvailableDS = new ArrayList<String>();
- VDBService vdb = new VDBService(deployment);
+ VDBService vdb = new VDBService(deployment, this.shutdownListener);
final ServiceBuilder<VDBMetaData> vdbService = context.getServiceTarget().addService(TeiidServiceNames.vdbServiceName(deployment.getName(), deployment.getVersion()), vdb);
for (ModelMetaData model:deployment.getModelMetaDatas().values()) {
for (String sourceName:model.getSourceNames()) {
@@ -137,7 +140,7 @@
@Override
public void dependentService(final String dsName, final ServiceName svcName) {
DataSourceListener dsl = new DataSourceListener(dsName, svcName, vdbStatusChecker);
- ServiceBuilder<DataSourceListener> sb = context.getServiceTarget().addService(TeiidServiceNames.dsListenerServiceName(dsName), dsl);
+ ServiceBuilder<DataSourceListener> sb = context.getServiceTarget().addService(TeiidServiceNames.dsListenerServiceName(deployment.getName(), deployment.getVersion(), dsName), dsl);
sb.addDependency(svcName);
sb.setInitialMode(Mode.PASSIVE).install();
}
@@ -258,24 +261,6 @@
if (!TeiidAttachments.isVDBDeployment(deploymentUnit)) {
return;
}
-
- final VDBMetaData deployment = deploymentUnit.getAttachment(TeiidAttachments.VDB_METADATA);
- final ServiceController<?> controller = deploymentUnit.getServiceRegistry().getService(TeiidServiceNames.vdbServiceName(deployment.getName(), deployment.getVersion()));
- if (controller != null) {
- VDBService vdbService = (VDBService)controller.getService();
- vdbService.undeployInProgress();
-
- dataSourceDependencies(deployment, new DependentServices() {
- @Override
- public void dependentService(String dsName, ServiceName svcName) {
- ServiceController<?> controller = deploymentUnit.getServiceRegistry().getService(TeiidServiceNames.dsListenerServiceName(dsName));
- if (controller != null) {
- controller.setMode(ServiceController.Mode.REMOVE);
- }
- }
- });
- controller.setMode(ServiceController.Mode.REMOVE);
- }
}
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java 2011-12-05 19:12:03 UTC (rev 3718)
@@ -55,6 +55,7 @@
import org.teiid.adminapi.impl.VDBTranslatorMetaData;
import org.teiid.common.buffer.BufferManager;
import org.teiid.core.TeiidException;
+import org.teiid.deployers.ContainerLifeCycleListener;
import org.teiid.deployers.MetadataStoreGroup;
import org.teiid.deployers.TranslatorUtil;
import org.teiid.deployers.UDFMetaData;
@@ -86,10 +87,11 @@
private final InjectedValue<ObjectSerializer> serializerInjector = new InjectedValue<ObjectSerializer>();
private final InjectedValue<BufferServiceImpl> bufferServiceInjector = new InjectedValue<BufferServiceImpl>();
private final InjectedValue<ObjectReplicator> objectReplicatorInjector = new InjectedValue<ObjectReplicator>();
- private boolean undeployInProgress = false;
+ private ContainerLifeCycleListener shutdownListener;
- public VDBService(VDBMetaData metadata) {
+ public VDBService(VDBMetaData metadata, ContainerLifeCycleListener shutdownListener) {
this.vdb = metadata;
+ this.shutdownListener = shutdownListener;
}
@Override
@@ -231,7 +233,7 @@
this.vdb.setRemoved(true);
// service stopped not due to shutdown then clean-up the data files
- if (undeployInProgress) {
+ if (!this.shutdownListener.isShutdownInProgress()) {
getSerializer().removeAttachments(vdb);
LogManager.logTrace(LogConstants.CTX_RUNTIME, "VDB "+vdb.getName()+" metadata removed"); //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -488,10 +490,6 @@
return objectReplicatorInjector;
}
- public void undeployInProgress() {
- this.undeployInProgress = true;
- }
-
public void addDataRole(String policyName, String mappedRole) throws AdminProcessingException{
DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2011-12-05 19:12:03 UTC (rev 3718)
@@ -162,7 +162,7 @@
// terminate all the previous sessions
List<ServiceName> services = context.getController().getServiceContainer().getServiceNames();
for (ServiceName service:services) {
- if (service.isParentOf(TeiidServiceNames.TRANSPORT_BASE)) {
+ if (TeiidServiceNames.TRANSPORT_BASE.isParentOf(service)) {
ServiceController<?> transport = context.getController().getServiceContainer().getService(service);
if (transport != null) {
Transport t = Transport.class.cast(transport.getValue());
Modified: trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
===================================================================
--- trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2011-12-05 19:12:03 UTC (rev 3718)
@@ -265,8 +265,8 @@
active-session-count.describe=Number of active sessions
active-session-count.reply=Returns the count of active sessions
-long-running-queries.describe=Long running queries that exceeded the threshold set by the 'query-threshold-in-seconds' configuration property.
-long-running-queries.reply=long running queries
+list-long-running-requests.describe=Long running queries that exceeded the threshold set by the 'query-threshold-in-seconds' configuration property.
+list-long-running-requests.reply=long running queries
runtime-version.describe = Runtime version of the Teiid subsystem
runtime-version.reply=Teiid runtime version
@@ -317,14 +317,14 @@
remove-data-role.mapped-role.describe=Security domain defined role name
remove-data-role.reply=void
-requests-per-session.describe=Current active requests in progress in the query engine for a given session identifier
-requests-per-session.session.describe=The session Identifier
-requests-per-session.reply=requests for given session
+list-requests-per-session.describe=Current active requests in progress in the query engine for a given session identifier
+list-requests-per-session.session.describe=The session Identifier
+list-requests-per-session.reply=requests for given session
-requests-per-vdb.describe=Current active requests in progress in the query engine for a given VDB name and its version.
-requests-per-vdb.vdb-name.describe=VDB Name
-requests-per-vdb.vdb-version.describe=VDB Version
-requests-per-vdb.reply=list of requests on the given vdb
+list-requests-per-vdb.describe=Current active requests in progress in the query engine for a given VDB name and its version.
+list-requests-per-vdb.vdb-name.describe=VDB Name
+list-requests-per-vdb.vdb-version.describe=VDB Version
+list-requests-per-vdb.reply=list of requests on the given vdb
terminate-session.describe=Terminate the session
terminate-session.session.describe=The session Identifier of session to be terminated
Modified: trunk/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidConfiguration.java
===================================================================
--- trunk/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidConfiguration.java 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidConfiguration.java 2011-12-05 19:12:03 UTC (rev 3718)
@@ -240,21 +240,17 @@
List<String> opNames = getList(result);
assertEquals(38, opNames.size());
- String[] ops = { "add", "add-anyauthenticated-role", "add-data-role",
- "assign-datasource", "cache-statistics", "cache-types",
- "cancel-request", "change-vdb-connection-type", "clear-cache",
- "describe", "execute-query", "get-translator", "get-vdb",
- "list-requests", "list-sessions", "list-transactions",
- "list-translators", "list-vdbs", "long-running-queries",
- "mark-datasource-available",
- "merge-vdbs", "read-attribute", "read-children-names",
- "read-children-resources", "read-children-types",
- "read-operation-description", "read-operation-names", "read-rar-description",
- "read-resource", "read-resource-description",
- "remove-anyauthenticated-role", "remove-data-role",
- "requests-per-session", "requests-per-vdb",
- "terminate-session", "terminate-transaction",
- "workerpool-statistics", "write-attribute" };
+ String[] ops = { "add","add-anyauthenticated-role","add-data-role","assign-datasource",
+ "cache-statistics","cache-types","cancel-request","change-vdb-connection-type",
+ "clear-cache","describe","execute-query","get-translator","get-vdb",
+ "list-long-running-requests","list-requests","list-requests-per-session",
+ "list-requests-per-vdb","list-sessions","list-transactions","list-translators",
+ "list-vdbs","mark-datasource-available","merge-vdbs","read-attribute",
+ "read-children-names","read-children-resources","read-children-types",
+ "read-operation-description","read-operation-names","read-rar-description",
+ "read-resource","read-resource-description","remove-anyauthenticated-role",
+ "remove-data-role","terminate-session","terminate-transaction",
+ "workerpool-statistics","write-attribute", };
assertEquals(Arrays.asList(ops), opNames);
}
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/pom.xml 2011-12-05 19:12:03 UTC (rev 3718)
@@ -13,7 +13,7 @@
<jbossas-version>7.1.0.Beta1</jbossas-version>
<version.org.jboss.jboss-common-core>2.2.17.GA</version.org.jboss.jboss-common-core>
<version.org.jboss.staxmapper>1.0.0.Final</version.org.jboss.staxmapper>
- <version.org.jboss.jboss-dmr>1.0.0.Final</version.org.jboss.jboss-dmr>
+ <version.org.jboss.jboss-dmr>1.1.0.Final</version.org.jboss.jboss-dmr>
<version.org.jboss.msc.jboss-msc>1.0.1.GA</version.org.jboss.msc.jboss-msc>
<version.org.jboss.modules.jboss-modules>1.1.0.CR3</version.org.jboss.modules.jboss-modules>
<version.org.jboss.jboss-vfs>3.1.0.CR1</version.org.jboss.jboss-vfs>
@@ -21,6 +21,16 @@
<version.org.jboss.logging.jboss-logging>3.1.0.CR1</version.org.jboss.logging.jboss-logging>
<version.org.jboss.logging.jboss-logging-tools>1.0.0.CR4</version.org.jboss.logging.jboss-logging-tools>
<version.org.picketbox.jbosssx-client>3.0.0.CR2</version.org.picketbox.jbosssx-client>
+ <version.org.jboss.arquillian.core>1.0.0.CR5</version.org.jboss.arquillian.core>
+ <version.javax.enterprise.cdi-api>1.0-SP4</version.javax.enterprise.cdi-api>
+ <version.org.jboss.netty>3.2.4.Final</version.org.jboss.netty>
+ <version.net.sourceforge.saxon>9.2.1.5</version.net.sourceforge.saxon>
+ <version.json-simple>1.1</version.json-simple>
+ <version.org.jgroups>3.0.0.Final</version.org.jgroups>
+ <version.connector-api>1.5</version.connector-api>
+ <version.jta>1.1</version.jta>
+ <version.sun.jaxb>2.2</version.sun.jaxb>
+ <version.junit>4.8.2</version.junit>
</properties>
<scm>
<connection>scm:svn:https://anonsvn.jboss.org/repos/teiid/trunk</connection>
@@ -121,6 +131,22 @@
<module>build</module>
</modules>
</profile>
+ <profile>
+ <id>arquillian-tests</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.spec</groupId>
+ <artifactId>jboss-javaee-6.0</artifactId>
+ <version>1.0.0.Final</version>
+ <type>pom</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-arquillian-container-managed</artifactId>
+ </dependency>
+ </dependencies>
+ </profile>
</profiles>
<build>
<!-- This section defines the default plugin settings inherited by child projects. -->
@@ -349,13 +375,13 @@
<dependency>
<groupId>javax.resource</groupId>
<artifactId>connector-api</artifactId>
- <version>1.5</version>
+ <version>${version.connector-api}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
- <version>1.1</version>
+ <version>${version.jta}</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -535,22 +561,38 @@
<dependency>
<groupId>org.jgroups</groupId>
<artifactId>jgroups</artifactId>
- <version>3.0.0.Final</version>
+ <version>${version.org.jgroups}</version>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-subsystem-test</artifactId>
<version>${jbossas-version}</version>
- </dependency>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian.junit</groupId>
+ <artifactId>arquillian-junit-container</artifactId>
+ <version>${version.org.jboss.arquillian.core}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-arquillian-container-managed</artifactId>
+ <version>${jbossas-version}</version>
+ </dependency>
<dependency>
<groupId>net.sourceforge.saxon</groupId>
<artifactId>saxonhe</artifactId>
- <version>9.2.1.5</version>
+ <version>${version.net.sourceforge.saxon}</version>
</dependency>
<dependency>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
- <version>3.2.3.Final</version>
+ <version>${version.org.jboss.netty}</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
@@ -560,12 +602,28 @@
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
- <version>1.1</version>
+ <version>${version.json-simple}</version>
</dependency>
<dependency>
+ <groupId>javax.enterprise</groupId>
+ <artifactId>cdi-api</artifactId>
+ <version>${version.javax.enterprise.cdi-api}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian.junit</groupId>
+ <artifactId>arquillian-junit-container</artifactId>
+ <version>${version.org.jboss.arquillian.core}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
- <version>2.2</version>
+ <version>${version.sun.jaxb}</version>
<exclusions>
<exclusion>
<groupId>javax.xml.bind</groupId>
@@ -573,6 +631,11 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${version.junit}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
<modules>
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java 2011-12-05 19:12:03 UTC (rev 3718)
@@ -111,7 +111,7 @@
if (t == null) {
throw new AdminProcessingException(RuntimePlugin.Util.getString("translator_not_found", vdb.getName(), vdb.getVersion(), translatorName)); //$NON-NLS-1$
}
- ef = TranslatorUtil.buildExecutionFactory(t, Thread.currentThread().getContextClassLoader());
+ ef = TranslatorUtil.buildExecutionFactory(t, t.getAttachment(ClassLoader.class));
cm.setExecutionFactory(ef);
} catch (TeiidException e) {
throw new AdminProcessingException(e.getCause());
Modified: trunk/test-integration/common/pom.xml
===================================================================
--- trunk/test-integration/common/pom.xml 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/test-integration/common/pom.xml 2011-12-05 19:12:03 UTC (rev 3718)
@@ -30,21 +30,19 @@
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.arquillian.junit</groupId>
- <artifactId>arquillian-junit-container</artifactId>
- <version>1.0.0.CR5</version>
- <scope>test</scope>
- </dependency>
+ <groupId>org.jboss.arquillian.junit</groupId>
+ <artifactId>arquillian-junit-container</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
- <version>1.0</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
@@ -52,23 +50,4 @@
<scope>provided</scope>
</dependency>
</dependencies>
- <profiles>
- <profile>
- <id>jbossas-managed-7</id>
- <dependencies>
- <dependency>
- <groupId>org.jboss.spec</groupId>
- <artifactId>jboss-javaee-6.0</artifactId>
- <version>1.0.0.Final</version>
- <type>pom</type>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.as</groupId>
- <artifactId>jboss-as-arquillian-container-managed</artifactId>
- <version>7.0.2.Final</version>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
</project>
\ No newline at end of file
Modified: trunk/test-integration/common/src/test/java/org/teiid/arquillian/SampleExecutionFactory.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/arquillian/SampleExecutionFactory.java 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/test-integration/common/src/test/java/org/teiid/arquillian/SampleExecutionFactory.java 2011-12-05 19:12:03 UTC (rev 3718)
@@ -1,10 +1,12 @@
package org.teiid.arquillian;
-import org.teiid.translator.ExecutionFactory;
+import org.teiid.translator.loopback.LoopbackExecutionFactory;
-(a)org.teiid.translator.Translator(name = "orcl")
-public class SampleExecutionFactory extends ExecutionFactory<Object, Object> {
+(a)org.teiid.translator.Translator(name = "loopy")
+public class SampleExecutionFactory extends LoopbackExecutionFactory {
public SampleExecutionFactory() {
setSupportsSelectDistinct(true);
+ setWaitTime(10);
+ setRowCount(200);
}
}
\ No newline at end of file
Modified: trunk/test-integration/common/src/test/java/org/teiid/arquillian/TestDeployment.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/arquillian/TestDeployment.java 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/test-integration/common/src/test/java/org/teiid/arquillian/TestDeployment.java 2011-12-05 19:12:03 UTC (rev 3718)
@@ -1,13 +1,20 @@
package org.teiid.arquillian;
+import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.sql.Connection;
+import java.sql.Statement;
import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
import java.util.Properties;
import java.util.Set;
@@ -17,28 +24,47 @@
import org.jboss.shrinkwrap.api.asset.ByteArrayAsset;
import org.jboss.shrinkwrap.api.exporter.ZipExporter;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.teiid.adminapi.Admin;
+import org.teiid.adminapi.AdminException;
import org.teiid.adminapi.AdminFactory;
+import org.teiid.adminapi.DataPolicy;
import org.teiid.adminapi.Model;
+import org.teiid.adminapi.PropertyDefinition;
+import org.teiid.adminapi.Request;
+import org.teiid.adminapi.Session;
import org.teiid.adminapi.Translator;
import org.teiid.adminapi.VDB;
import org.teiid.adminapi.VDB.ConnectionType;
import org.teiid.adminapi.VDB.Status;
import org.teiid.adminapi.impl.VDBTranslatorMetaData;
import org.teiid.core.util.UnitTestUtil;
+import org.teiid.jdbc.TeiidDriver;
@RunWith(Arquillian.class)
@SuppressWarnings("nls")
@Ignore
public class TestDeployment {
+ private Admin admin;
+
+ @Before
+ public void setup() throws Exception {
+ admin = AdminFactory.getInstance().createAdmin("localhost", 9999, "admin", "admin".toCharArray());
+ }
+
+ @After
+ public void teardown() {
+ admin.close();
+ }
+
@Test
public void testVDBDeployment() throws Exception {
boolean deployed = false;
- Admin admin = AdminFactory.getInstance().createAdmin("localhost", 9999, null, null);
try {
Set<?> vdbs = admin.getVDBs();
assertTrue(vdbs.isEmpty());
@@ -81,61 +107,348 @@
admin.undeploy("bqt.vdb");
}
}
-
- admin.close();
}
@Test
public void testTraslators() throws Exception {
- Admin admin = AdminFactory.getInstance().createAdmin("localhost", 9999, null, null);
-
Collection<? extends Translator> translators = admin.getTranslators();
+ System.out.println(translators);
+ assertEquals(29, translators.size());
+
+ JavaArchive jar = getLoopyArchive();
- assertEquals(27, translators.size());
-
- JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "orcl.jar")
- .addClasses(SampleExecutionFactory.class)
- .addAsManifestResource(new ByteArrayAsset(SampleExecutionFactory.class.getName().getBytes()),
- ArchivePaths.create("services/org.teiid.translator.ExecutionFactory"));
try {
- admin.deploy("orcl.jar", jar.as(ZipExporter.class).exportAsInputStream());
+ admin.deploy("loopy.jar", jar.as(ZipExporter.class).exportAsInputStream());
- VDBTranslatorMetaData t = (VDBTranslatorMetaData)admin.getTranslator("orcl");
+ VDBTranslatorMetaData t = (VDBTranslatorMetaData)admin.getTranslator("loopy");
assertNotNull(t);
assertEquals("ANY", t.getPropertyValue("SupportedJoinCriteria"));
assertEquals("true", t.getPropertyValue("supportsSelectDistinct"));
} finally {
- admin.undeploy("orcl.jar");
+ admin.undeploy("loopy.jar");
}
VDBTranslatorMetaData t = (VDBTranslatorMetaData)admin.getTranslator("orcl");
assertNull(t);
-
- admin.close();
}
+ private JavaArchive getLoopyArchive() {
+ JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "loopy.jar")
+ .addClasses(SampleExecutionFactory.class)
+ .addAsManifestResource(new ByteArrayAsset(SampleExecutionFactory.class.getName().getBytes()),
+ ArchivePaths.create("services/org.teiid.translator.ExecutionFactory"));
+ jar.addAsManifestResource(new ByteArrayAsset("Dependencies: org.jboss.teiid.translator.loopback\n".getBytes()),
+ ArchivePaths.create("MANIFEST.MF"));
+ return jar;
+ }
+
@Test
- public void testVDBOperations() throws Exception {
- Admin admin = AdminFactory.getInstance().createAdmin("localhost", 9999, null, null);
+ public void testVDBConnectionType() throws Exception {
+ boolean vdbOneDeployed = false;
+ boolean vdbTwoDeployed = false;
try {
- admin.deploy("bqt.vdb",new FileInputStream(UnitTestUtil.getTestDataFile("bqt.vdb")));
+ admin.deploy("bqt.vdb", new FileInputStream(UnitTestUtil.getTestDataFile("bqt.vdb")));
+ vdbOneDeployed = true;
+
VDB vdb = admin.getVDB("bqt", 1);
Model model = vdb.getModels().get(0);
+ admin.assignToModel("bqt", 1, model.getName(), "Source", "h2", "java:jboss/datasources/ExampleDS");
assertEquals(ConnectionType.BY_VERSION, vdb.getConnectionType());
- admin.assignToModel("bqt", 1, model.getName(), "Source", "h2", "java:jboss/datasources/ExampleDS");
- admin.changeVDBConnectionType("bqt", 1, ConnectionType.ANY);
+ try {
+ Connection conn = TeiidDriver.getInstance().connect("jdbc:teiid:bqt@mm://localhost:31000;user=user;password=user", null);
+ conn.close();
+ } catch (Exception e) {
+ fail("must have succeeded in connection");
+ }
- vdb = admin.getVDB("bqt", 1);
+ admin.changeVDBConnectionType("bqt", 1, ConnectionType.NONE);
+
+ try {
+ TeiidDriver.getInstance().connect("jdbc:teiid:bqt@mm://localhost:31000;user=user;password=user", null);
+ fail("should have failed to connect as no new connections allowed");
+ } catch (Exception e) {
+ //pass
+ }
+
+ admin.deploy("bqt2.vdb", new FileInputStream(UnitTestUtil.getTestDataFile("bqt2.vdb")));
+ admin.assignToModel("bqt", 2, model.getName(), "Source", "h2", "java:jboss/datasources/ExampleDS");
+
+ vdbTwoDeployed = true;
+
+ try {
+ Connection conn = TeiidDriver.getInstance().connect("jdbc:teiid:bqt@mm://localhost:31000;user=user;password=user", null);
+ conn.close();
+ } catch (Exception e) {
+ fail("should not have failed to connect");
+ }
+
+ admin.changeVDBConnectionType("bqt", 2, ConnectionType.ANY);
+ try {
+ Connection conn = TeiidDriver.getInstance().connect("jdbc:teiid:bqt@mm://localhost:31000;user=user;password=user", null);
+ conn.close();
+ } catch (Exception e) {
+ fail("should have connected to the second vdb");
+ }
+
+ vdb = admin.getVDB("bqt", 2);
model = vdb.getModels().get(0);
assertEquals(model.getSourceConnectionJndiName("Source"), "java:jboss/datasources/ExampleDS");
assertEquals(model.getSourceTranslatorName("Source"), "h2");
assertEquals(ConnectionType.ANY, vdb.getConnectionType());
} finally {
- admin.undeploy("bqt.vdb");
+ if (vdbOneDeployed) {
+ admin.undeploy("bqt.vdb");
+ }
+ if (vdbTwoDeployed) {
+ admin.undeploy("bqt2.vdb");
+ }
}
- admin.close();
}
+
+ @Test
+ public void testCacheTypes() throws Exception {
+ String[] array = {Admin.Cache.PREPARED_PLAN_CACHE.toString(), Admin.Cache.QUERY_SERVICE_RESULT_SET_CACHE.toString()};
+ Collection<String> types = admin.getCacheTypes();
+ System.out.println(types);
+ assertArrayEquals(array, types.toArray());
+ }
+
+ @Test
+ public void testSessions() throws Exception {
+ boolean vdbOneDeployed = false;
+ try {
+ vdbOneDeployed = deployVdb();
+
+ Collection<? extends Session> sessions = admin.getSessions();
+ assertEquals (0, sessions.size());
+
+ try {
+ Connection conn = TeiidDriver.getInstance().connect("jdbc:teiid:bqt@mm://localhost:31000;user=user;password=user;ApplicationName=test", null);
+ sessions = admin.getSessions();
+ assertEquals (1, sessions.size());
+ Session s = sessions.iterator().next();
+
+ assertEquals("user@teiid-security", s.getUserName());
+ assertEquals("test", s.getApplicationName());
+ assertEquals("bqt", s.getVDBName());
+ assertEquals(1, s.getVDBVersion());
+ assertNotNull(s.getSessionId());
+
+ conn.close();
+ } catch (Exception e) {
+ fail("should have connected to the vdb");
+ }
+
+ try {
+ Connection conn = TeiidDriver.getInstance().connect("jdbc:teiid:bqt@mm://localhost:31000;user=user;password=user;ApplicationName=test", null);
+ sessions = admin.getSessions();
+ assertEquals (1, sessions.size());
+ Session s = sessions.iterator().next();
+
+ admin.terminateSession(s.getSessionId());
+ sessions = admin.getSessions();
+ assertEquals (0, sessions.size());
+ conn.close();
+ } catch (Exception e) {
+ fail("should have connected to the vdb");
+ }
+
+ } finally {
+ if (vdbOneDeployed) {
+ admin.undeploy("bqt.vdb");
+ }
+
+ }
+ }
+
+ private boolean deployVdb() throws AdminException, FileNotFoundException {
+ boolean vdbOneDeployed;
+ admin.deploy("bqt.vdb", new FileInputStream(UnitTestUtil.getTestDataFile("bqt.vdb")));
+ vdbOneDeployed = true;
+
+ VDB vdb = admin.getVDB("bqt", 1);
+ Model model = vdb.getModels().get(0);
+ admin.assignToModel("bqt", 1, model.getName(), "Source", "h2", "java:jboss/datasources/ExampleDS");
+ return vdbOneDeployed;
+ }
+
+ @Test
+ public void testGetRequests() throws Exception {
+ boolean vdbOneDeployed = false;
+ JavaArchive jar = getLoopyArchive();
+
+ try {
+ admin.deploy("loopy.jar", jar.as(ZipExporter.class).exportAsInputStream());
+ vdbOneDeployed = deployVdb();
+ VDB vdb = admin.getVDB("bqt", 1);
+ Model model = vdb.getModels().get(0);
+ Translator t = admin.getTranslator("loopy");
+ assertNotNull(t);
+
+ admin.assignToModel("bqt", 1, model.getName(), "Source", "loopy", "java:jboss/datasources/ExampleDS");
+ Connection conn = TeiidDriver.getInstance().connect("jdbc:teiid:bqt@mm://localhost:31000;user=user;password=user", null);
+ Collection<? extends Session> sessions = admin.getSessions();
+ assertEquals (1, sessions.size());
+ Session s = sessions.iterator().next();
+
+ Statement stmt = conn.createStatement();
+
+ Collection<? extends Request> requests = admin.getRequests();
+
+ assertEquals(0, requests.size());
+
+ stmt.execute("select * from source.smalla");
+
+ requests = admin.getRequests();
+ assertEquals(1, requests.size());
+
+ Request r = requests.iterator().next();
+ assertEquals("select * from source.smalla", r.getCommand());
+ assertNotNull(r.getExecutionId());
+ assertNotNull(r.getSessionId());
+
+ stmt.execute("select * from source.smalla");
+ Collection<? extends Request> requests2 = admin.getRequestsForSession(s.getSessionId());
+ assertEquals(1, requests2.size());
+
+ Request r2 = requests.iterator().next();
+ assertEquals("select * from source.smalla", r2.getCommand());
+ assertEquals(s.getSessionId(), r2.getSessionId());
+
+ stmt.close();
+ conn.close();
+
+ requests = admin.getRequests();
+ assertEquals(0, requests.size());
+
+ } finally {
+ admin.undeploy("loopy.jar");
+ if (vdbOneDeployed) {
+ admin.undeploy("bqt.vdb");
+ }
+ }
+ }
+
+ @Test
+ public void getDatasourceTemplateNames() throws Exception {
+ String[] array = {"teiid-connector-file.rar", "teiid-connector-salesforce.rar", "teiid-connector-ldap.rar", "teiid-connector-ws.rar", "h2"};
+ boolean vdbOneDeployed = false;
+ try {
+ vdbOneDeployed = deployVdb();
+ Set<String> templates = admin.getDataSourceTemplateNames();
+ assertArrayEquals(array, templates.toArray());
+ } finally {
+ if (vdbOneDeployed) {
+ admin.undeploy("bqt.vdb");
+ }
+ }
+ }
+
+ @Test
+ public void getTemplatePropertyDefinitions() throws Exception{
+ boolean vdbOneDeployed = false;
+ try {
+ HashSet<String> props = new HashSet<String>();
+ vdbOneDeployed = deployVdb();
+ Collection<? extends PropertyDefinition> pds = admin.getTemplatePropertyDefinitions("h2");
+ for(PropertyDefinition pd:pds) {
+ props.add(pd.getName());
+ }
+ assertTrue(props.contains("connection-url"));
+ assertTrue(props.contains("user-name"));
+ assertTrue(props.contains("password"));
+ assertTrue(props.contains("check-valid-connection-sql"));
+
+
+ HashSet<String> rar_props = new HashSet<String>();
+ pds = admin.getTemplatePropertyDefinitions("teiid-connector-file.rar");
+ for(PropertyDefinition pd:pds) {
+ rar_props.add(pd.getName());
+ }
+
+ assertTrue(rar_props.contains("ParentDirectory"));
+ assertTrue(rar_props.contains("FileMapping"));
+ assertTrue(rar_props.contains("AllowParentPaths"));
+
+ } finally {
+ if (vdbOneDeployed) {
+ admin.undeploy("bqt.vdb");
+ }
+ }
+ }
+
+ @Test
+ public void getWorkerPoolStats() throws Exception{
+ boolean vdbOneDeployed = false;
+ try {
+ vdbOneDeployed = deployVdb();
+ assertNotNull(admin.getWorkerPoolStats());
+ } finally {
+ if (vdbOneDeployed) {
+ admin.undeploy("bqt.vdb");
+ }
+ }
+ }
+
+ @Test
+ public void testDataRoleMapping() throws Exception{
+ boolean vdbOneDeployed = false;
+ try {
+ admin.deploy("bqt2.vdb", new FileInputStream(UnitTestUtil.getTestDataFile("bqt2.vdb")));
+ vdbOneDeployed = true;
+
+ VDB vdb = admin.getVDB("bqt", 2);
+ Model model = vdb.getModels().get(0);
+ admin.assignToModel("bqt", 2, model.getName(), "Source", "h2", "java:jboss/datasources/ExampleDS");
+
+ vdb = admin.getVDB("bqt", 2);
+ assertTrue(vdb.isValid());
+ List<DataPolicy> policies = vdb.getDataPolicies();
+ assertEquals(1, policies.size());
+
+ DataPolicy dp = policies.get(0);
+ assertEquals("roleOne", dp.getName());
+ assertEquals(2, dp.getPermissions().size());
+ assertTrue(dp.isAllowCreateTemporaryTables());
+ assertTrue(dp.isAnyAuthenticated());
+
+ List<String> roleNames = dp.getMappedRoleNames();
+ assertArrayEquals(new String[]{"ROLE1", "ROLE2"}, roleNames.toArray());
+
+ admin.removeDataRoleMapping("bqt", 2, "roleOne", "ROLE1");
+
+ vdb = admin.getVDB("bqt", 2);
+ policies = vdb.getDataPolicies();
+ dp = policies.get(0);
+
+ roleNames = dp.getMappedRoleNames();
+ assertArrayEquals(new String[]{"ROLE2"}, roleNames.toArray());
+
+ admin.addDataRoleMapping("bqt", 2, "roleOne", "ROLE3");
+
+ vdb = admin.getVDB("bqt", 2);
+ policies = vdb.getDataPolicies();
+ dp = policies.get(0);
+
+ roleNames = dp.getMappedRoleNames();
+ assertArrayEquals(new String[]{"ROLE2", "ROLE3"}, roleNames.toArray());
+
+ admin.setAnyAuthenticatedForDataRole("bqt", 2, "roleOne", false);
+
+ vdb = admin.getVDB("bqt", 2);
+ policies = vdb.getDataPolicies();
+ dp = policies.get(0);
+
+ assertFalse(dp.isAnyAuthenticated());
+ } finally {
+ if (vdbOneDeployed) {
+ admin.undeploy("bqt2.vdb");
+ }
+ }
+ }
+
+
}
Modified: trunk/test-integration/common/src/test/resources/arquillian.xml
===================================================================
--- trunk/test-integration/common/src/test/resources/arquillian.xml 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/test-integration/common/src/test/resources/arquillian.xml 2011-12-05 19:12:03 UTC (rev 3718)
@@ -8,10 +8,11 @@
<property name="executionType">REMOTE</property>
</protocol>
<configuration>
- <property name="jbossHome">/home/rareddy/testing/jboss-as-7.1.0.Alpha2-SNAPSHOT</property>
+ <property name="jbossHome">/home/rareddy/testing/jboss-as-7.1.0.Beta1</property>
<property name="serverConfig">standalone-teiid.xml</property>
<property name="managementAddress">127.0.0.1</property>
<property name="managementPort">9999</property>
+ <property name="javaVmArguments">-Xmx512m -XX:MaxPermSize=128m -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n</property>
</configuration>
</container>
</arquillian>
\ No newline at end of file
Added: trunk/test-integration/common/src/test/resources/bqt2.vdb
===================================================================
(Binary files differ)
Property changes on: trunk/test-integration/common/src/test/resources/bqt2.vdb
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/test-integration/pom.xml
===================================================================
--- trunk/test-integration/pom.xml 2011-12-05 16:29:37 UTC (rev 3717)
+++ trunk/test-integration/pom.xml 2011-12-05 19:12:03 UTC (rev 3718)
@@ -43,6 +43,11 @@
<artifactId>translator-jdbc</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.teiid.connectors</groupId>
+ <artifactId>translator-loopback</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-client</artifactId>
13 years
teiid SVN: r3717 - trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-12-05 11:29:37 -0500 (Mon, 05 Dec 2011)
New Revision: 3717
Modified:
trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java
Log:
TEIID-1720 reusing existing class
Modified: trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java
===================================================================
--- trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java 2011-12-02 11:42:20 UTC (rev 3716)
+++ trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java 2011-12-05 16:29:37 UTC (rev 3717)
@@ -25,10 +25,8 @@
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
-import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
-import java.io.ObjectStreamClass;
import java.io.Serializable;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
@@ -66,6 +64,7 @@
import org.teiid.Replicated;
import org.teiid.Replicated.ReplicationMode;
import org.teiid.core.TeiidRuntimeException;
+import org.teiid.core.util.ObjectInputStreamWithClassloader;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.query.ObjectReplicator;
@@ -600,26 +599,11 @@
@Override
public Object objectFromBuffer(byte[] buf, int offset, int length) throws Exception {
- ObjectInputStream in = new CLAwareObjectInputStream(new ByteArrayInputStream(buf, offset, length), this.classloader);
+ ObjectInputStream in = new ObjectInputStreamWithClassloader(new ByteArrayInputStream(buf, offset, length), this.classloader);
Object anObj = in.readObject();
in.close();
return anObj;
}
}
- static class CLAwareObjectInputStream extends ObjectInputStream {
- private ClassLoader classloader;
- @Override
- public Class resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException {
- try {
- return this.classloader.loadClass(desc.getName());
- } catch (Throwable t) {
- }
- return super.resolveClass(desc);
- }
- public CLAwareObjectInputStream(InputStream in, ClassLoader classloader) throws IOException {
- super(in);
- this.classloader = classloader;
- }
- }
}
13 years
teiid SVN: r3716 - in trunk: build/kits/jboss-container and 9 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-12-02 06:42:20 -0500 (Fri, 02 Dec 2011)
New Revision: 3716
Modified:
trunk/api/src/main/java/org/teiid/translator/ExecutionFactory.java
trunk/api/src/main/java/org/teiid/translator/TypeFacility.java
trunk/build/kits/jboss-container/teiid-releasenotes.html
trunk/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java
trunk/common-core/src/test/java/org/teiid/core/types/TestDataTypeManager.java
trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/SalesForceExecutionFactory.java
trunk/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/CapabilitiesConverter.java
trunk/engine/src/main/java/org/teiid/query/optimizer/capabilities/BasicSourceCapabilities.java
trunk/engine/src/main/java/org/teiid/query/optimizer/capabilities/SourceCapabilities.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CapabilitiesUtil.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java
trunk/engine/src/test/java/org/teiid/query/optimizer/TestBatchedUpdatePlanner.java
trunk/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java
trunk/engine/src/test/java/org/teiid/query/optimizer/capabilities/AllCapabilities.java
Log:
TEIID-1859 TEIID-3 adding new capabilities to control convert pushdown and restrict comparisons
Modified: trunk/api/src/main/java/org/teiid/translator/ExecutionFactory.java
===================================================================
--- trunk/api/src/main/java/org/teiid/translator/ExecutionFactory.java 2011-12-01 21:54:57 UTC (rev 3715)
+++ trunk/api/src/main/java/org/teiid/translator/ExecutionFactory.java 2011-12-02 11:42:20 UTC (rev 3716)
@@ -666,6 +666,7 @@
/**
* Get list of all supported function names. Arithmetic functions have names like
* "+".
+ * @see SourceSystemFunctions
* @since 3.1 SP3
*/
public List<String> getSupportedFunctions() {
@@ -917,5 +918,28 @@
public boolean supportsLikeRegex() {
return false;
}
+
+ /**
+ * Used for fine grained control of convert/cast pushdown. If {@link #getSupportedFunctions()} contains
+ * {@link SourceSystemFunctions#CONVERT}, then all of the default Teiid pushdown conversions are supported.
+ * So typically this method will be implemented when {@link #getSupportedFunctions()} does not contain
+ * {@link SourceSystemFunctions#CONVERT}. The engine will does not care about an unnecessary conversion
+ * where fromType == toType.
+ * @param fromType @see RUNTIME_CODES
+ * @param toType @see RUNTIME_CODES
+ * @return true if the given conversion is supported.
+ * @since 8.0
+ */
+ public boolean supportsConvert(int fromType, int toType) {
+ return false;
+ }
+
+ /**
+ * @return true if only Literal comparisons (equality, ordered, like, etc.) are supported for non-join conditions.
+ * @since 8.0
+ */
+ public boolean supportsOnlyLiteralComparison() {
+ return false;
+ }
}
Modified: trunk/api/src/main/java/org/teiid/translator/TypeFacility.java
===================================================================
--- trunk/api/src/main/java/org/teiid/translator/TypeFacility.java 2011-12-01 21:54:57 UTC (rev 3715)
+++ trunk/api/src/main/java/org/teiid/translator/TypeFacility.java 2011-12-02 11:42:20 UTC (rev 3716)
@@ -41,6 +41,28 @@
/**
*/
public class TypeFacility {
+
+ public static final class RUNTIME_CODES {
+ public static final int STRING = DataTypeManager.DefaultTypeCodes.STRING;
+ public static final int CHAR = DataTypeManager.DefaultTypeCodes.CHAR;
+ public static final int BOOLEAN = DataTypeManager.DefaultTypeCodes.BOOLEAN;
+ public static final int BYTE = DataTypeManager.DefaultTypeCodes.BYTE;
+ public static final int SHORT = DataTypeManager.DefaultTypeCodes.SHORT;
+ public static final int INTEGER = DataTypeManager.DefaultTypeCodes.INTEGER;
+ public static final int LONG = DataTypeManager.DefaultTypeCodes.LONG;
+ public static final int BIG_INTEGER = DataTypeManager.DefaultTypeCodes.BIGINTEGER;
+ public static final int FLOAT = DataTypeManager.DefaultTypeCodes.FLOAT;
+ public static final int DOUBLE = DataTypeManager.DefaultTypeCodes.DOUBLE;
+ public static final int BIG_DECIMAL = DataTypeManager.DefaultTypeCodes.BIGDECIMAL;
+ public static final int DATE = DataTypeManager.DefaultTypeCodes.DATE;
+ public static final int TIME = DataTypeManager.DefaultTypeCodes.TIME;
+ public static final int TIMESTAMP = DataTypeManager.DefaultTypeCodes.TIMESTAMP;
+ public static final int OBJECT = DataTypeManager.DefaultTypeCodes.OBJECT;
+ public static final int BLOB = DataTypeManager.DefaultTypeCodes.BLOB;
+ public static final int CLOB = DataTypeManager.DefaultTypeCodes.CLOB;
+ public static final int XML = DataTypeManager.DefaultTypeCodes.XML;
+ public static final int NULL = DataTypeManager.DefaultTypeCodes.NULL;
+ }
public interface RUNTIME_TYPES {
public static final Class<String> STRING = DataTypeManager.DefaultDataClasses.STRING;
Modified: trunk/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-12-01 21:54:57 UTC (rev 3715)
+++ trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-12-02 11:42:20 UTC (rev 3716)
@@ -27,6 +27,8 @@
<H2><A NAME="Highlights"></A>Highlights</H2>
<UL>
<LI><B>CallableStatement Named Parameters</B> - you can now use CallableStatement named parameter get/set methods.
+ <LI><B>New Translator capabilities</B> - translators may indicate which convert functions they support and restrict non-join comparisons
+ to only literals.
</UL>
<h2><a name="Compatibility">Compatibility Issues</a></h2>
Modified: trunk/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java 2011-12-01 21:54:57 UTC (rev 3715)
+++ trunk/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java 2011-12-02 11:42:20 UTC (rev 3716)
@@ -234,6 +234,8 @@
public static final int NULL = 18;
}
+ public static int MAX_TYPE_CODE = DefaultTypeCodes.NULL;
+
private static final Map<Class<?>, Integer> typeMap = new LinkedHashMap<Class<?>, Integer>(64);
private static final List<Class<?>> typeList;
Modified: trunk/common-core/src/test/java/org/teiid/core/types/TestDataTypeManager.java
===================================================================
--- trunk/common-core/src/test/java/org/teiid/core/types/TestDataTypeManager.java 2011-12-01 21:54:57 UTC (rev 3715)
+++ trunk/common-core/src/test/java/org/teiid/core/types/TestDataTypeManager.java 2011-12-02 11:42:20 UTC (rev 3716)
@@ -222,7 +222,6 @@
assertEquals("hello", DataTypeManager.transformValue(new Foo(), DataTypeManager.DefaultDataClasses.STRING)); //$NON-NLS-1$
}
- @SuppressWarnings("unchecked")
@Test public void testObjectArrayToObject() throws Exception {
Object[] value = {1,2};
assertArrayEquals(value, (Object[])DataTypeManager.transformValue(value, value.getClass(), DataTypeManager.DefaultDataClasses.OBJECT));
Modified: trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/SalesForceExecutionFactory.java
===================================================================
--- trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/SalesForceExecutionFactory.java 2011-12-01 21:54:57 UTC (rev 3715)
+++ trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/SalesForceExecutionFactory.java 2011-12-02 11:42:20 UTC (rev 3716)
@@ -172,5 +172,10 @@
public boolean supportsIsNullCriteria() {
return true;
}
-
+
+ @Override
+ public boolean supportsOnlyLiteralComparison() {
+ return true;
+ }
+
}
Modified: trunk/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml
===================================================================
--- trunk/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml 2011-12-01 21:54:57 UTC (rev 3715)
+++ trunk/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml 2011-12-02 11:42:20 UTC (rev 3716)
@@ -1061,6 +1061,30 @@
</row>
<row>
<entry>
+ <para>OnlyLiteralComparison</para>
+ </entry>
+ <entry>
+ <para></para>
+ </entry>
+ <entry>
+ <para>Translator if only Literal comparisons (equality, ordered, like, etc.) are supported for non-join conditions.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>Convert(int fromType, int toType)</para>
+ </entry>
+ <entry>
+ <para></para>
+ </entry>
+ <entry>
+ <para>Used for fine grained control of convert/cast pushdown. If <code>ExecutionFactory.getSupportedFunctions()</code> contains <code>SourceSystemFunctions.CONVERT</code>, then all of the default Teiid pushdown conversions are supported.
+ So typically this method will be implemented when <code>ExecutionFactory.getSupportedFunctions()</code> contains <code>SourceSystemFunctions.CONVERT</code>. See <code>TypeFacility.RUNTIME_CODES</code> for the possible type codes.
+ The engine will does not care about an unnecessary conversion where fromType == toType.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
<para>OrderBy</para>
</entry>
<entry>
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/CapabilitiesConverter.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/CapabilitiesConverter.java 2011-12-01 21:54:57 UTC (rev 3715)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/CapabilitiesConverter.java 2011-12-02 11:42:20 UTC (rev 3716)
@@ -25,6 +25,7 @@
import java.util.Iterator;
import java.util.List;
+import org.teiid.core.types.DataTypeManager;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.metadata.FunctionMethod;
@@ -109,7 +110,17 @@
tgtCaps.setCapabilitySupport(Capability.CRITERIA_SIMILAR, srcCaps.supportsSimilarTo());
tgtCaps.setCapabilitySupport(Capability.CRITERIA_LIKE_REGEX, srcCaps.supportsLikeRegex());
setSupports(connectorID, tgtCaps, Capability.WINDOW_FUNCTION_DISTINCT_AGGREGATES, srcCaps.supportsWindowDistinctAggregates(), Capability.ELEMENTARY_OLAP, Capability.QUERY_AGGREGATES_DISTINCT);
+ tgtCaps.setCapabilitySupport(Capability.CRITERIA_ONLY_LITERAL_COMPARE, srcCaps.supportsOnlyLiteralComparison());
+ //TODO: as more types are added it may make more sense to just delegate calls to the executionfactory
+ for (int i = 0; i <= DataTypeManager.MAX_TYPE_CODE; i++) {
+ for (int j = 0; j <= DataTypeManager.MAX_TYPE_CODE; j++) {
+ if (i != j) {
+ tgtCaps.setSupportsConvert(i, j, srcCaps.supportsConvert(i, j));
+ }
+ }
+ }
+
List<String> functions = srcCaps.getSupportedFunctions();
if(functions != null && functions.size() > 0) {
Iterator<String> iter = functions.iterator();
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/capabilities/BasicSourceCapabilities.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/capabilities/BasicSourceCapabilities.java 2011-12-01 21:54:57 UTC (rev 3715)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/capabilities/BasicSourceCapabilities.java 2011-12-02 11:42:20 UTC (rev 3716)
@@ -23,8 +23,14 @@
package org.teiid.query.optimizer.capabilities;
import java.io.Serializable;
-import java.util.*;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TreeMap;
+import org.teiid.core.types.DataTypeManager;
+import org.teiid.core.types.DataTypeManager.DefaultTypeCodes;
+import org.teiid.translator.SourceSystemFunctions;
+
/**
*/
public class BasicSourceCapabilities implements SourceCapabilities, Serializable {
@@ -35,6 +41,7 @@
private Map<Capability, Boolean> capabilityMap = new HashMap<Capability, Boolean>();
private Map<String, Boolean> functionMap = new TreeMap<String, Boolean>(String.CASE_INSENSITIVE_ORDER);
private Map<Capability, Object> propertyMap = new HashMap<Capability, Object>();
+ private boolean[][] converts = new boolean[DataTypeManager.MAX_TYPE_CODE + 1][DataTypeManager.MAX_TYPE_CODE + 1];
/**
* Construct a basic capabilities object.
@@ -61,7 +68,17 @@
}
}
- public void setFunctionSupport(String function, boolean supports) {
+ public void setFunctionSupport(String function, boolean supports) {
+ if (SourceSystemFunctions.CONVERT.equalsIgnoreCase(function)) {
+ for (int i = 0; i < converts.length; i++) {
+ if (i == DefaultTypeCodes.OBJECT || i == DefaultTypeCodes.CLOB || i == DefaultTypeCodes.XML) {
+ continue;
+ }
+ for (int j = 0; j < converts.length; j++) {
+ converts[i][j] = j != DefaultTypeCodes.CLOB && j != DefaultTypeCodes.XML;
+ }
+ }
+ }
functionMap.put(function, Boolean.valueOf(supports));
}
@@ -95,4 +112,13 @@
return this.propertyMap.get(propertyName);
}
+ @Override
+ public boolean supportsConvert(int sourceType, int targetType) {
+ return converts[sourceType][targetType];
+ }
+
+ public void setSupportsConvert(int sourceType, int targetType, boolean value) {
+ this.converts[sourceType][targetType] = value;
+ }
+
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/capabilities/SourceCapabilities.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/capabilities/SourceCapabilities.java 2011-12-01 21:54:57 UTC (rev 3715)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/capabilities/SourceCapabilities.java 2011-12-02 11:42:20 UTC (rev 3716)
@@ -157,6 +157,8 @@
* @since 4.0
*/
CRITERIA_QUANTIFIED_ALL,
+
+ CRITERIA_ONLY_LITERAL_COMPARE,
/**
* Support indicates connector accepts ORDER BY clause
*
@@ -227,7 +229,7 @@
*
* @since 3.1 SP2
*/
- QUERY_AGGREGATES_DISTINCT("AggregatesDistinct"),
+ QUERY_AGGREGATES_DISTINCT("AggregatesDistinct"), //$NON-NLS-1$
/**
* Support indicates connector can accept scalar subqueries in the SELECT, WHERE, and HAVING clauses
*
@@ -389,4 +391,12 @@
* @since 4.4
*/
public Object getSourceProperty(Capability propertyName);
+
+ /**
+ *
+ * @param sourceType
+ * @param targetType
+ * @return
+ */
+ public boolean supportsConvert(int sourceType, int targetType);
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CapabilitiesUtil.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CapabilitiesUtil.java 2011-12-01 21:54:57 UTC (rev 3715)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CapabilitiesUtil.java 2011-12-02 11:42:20 UTC (rev 3716)
@@ -42,7 +42,6 @@
import org.teiid.query.sql.lang.OrderByItem;
import org.teiid.query.sql.lang.SetQuery.Operation;
import org.teiid.query.sql.symbol.AggregateSymbol;
-import org.teiid.query.sql.symbol.Constant;
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.symbol.Function;
@@ -224,15 +223,23 @@
if (metadata.isVirtualModel(modelID)){
return false;
}
+
+ SourceCapabilities caps = getCapabilities(modelID, metadata, capFinder);
+ if (FunctionLibrary.isConvert(function)) {
+ Class<?> fromType = function.getArg(0).getType();
+ Class<?> targetType = function.getType();
+ if (fromType == targetType) {
+ return true; //this should be removed in rewrite
+ }
+ return caps.supportsConvert(DataTypeManager.getTypeCode(fromType), DataTypeManager.getTypeCode(targetType));
+ }
//capabilities check is only valid for non-schema scoped functions
//technically the other functions are scoped to SYS or their function model, but that's
//not formally part of their metadata yet
Schema schema = function.getFunctionDescriptor().getMethod().getParent();
if (schema == null) {
// Find capabilities
- SourceCapabilities caps = getCapabilities(modelID, metadata, capFinder);
-
if (!caps.supportsFunction(function.getFunctionDescriptor().getName())) {
return false;
}
@@ -240,22 +247,6 @@
return false; //not the right schema
}
- //special check to ensure that special conversions are not pushed down (this can be removed after we support type based function pushdown)
- if (FunctionLibrary.isConvert(function)) {
- Class<?> fromType = function.getArg(0).getType();
- //object or clob to anything cannot be pushed down
- if (DataTypeManager.DefaultDataClasses.OBJECT.equals(fromType)
- || DataTypeManager.DefaultDataClasses.CLOB.equals(fromType)
- || DataTypeManager.DefaultDataClasses.XML.equals(fromType)) {
- return false;
- }
- String targetType = (String)((Constant)function.getArg(1)).getValue();
- if (DataTypeManager.DefaultDataTypes.CLOB.equalsIgnoreCase(targetType)
- || DataTypeManager.DefaultDataTypes.XML.equalsIgnoreCase(targetType)) {
- return false;
- }
- }
-
return true;
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java 2011-12-01 21:54:57 UTC (rev 3715)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java 2011-12-02 11:42:20 UTC (rev 3716)
@@ -23,6 +23,7 @@
package org.teiid.query.optimizer.relational.rules;
import java.util.Arrays;
+import java.util.Collection;
import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.core.TeiidComponentException;
@@ -41,39 +42,9 @@
import org.teiid.query.processor.relational.RelationalPlan;
import org.teiid.query.sql.LanguageObject;
import org.teiid.query.sql.LanguageVisitor;
-import org.teiid.query.sql.lang.AbstractCompareCriteria;
-import org.teiid.query.sql.lang.AbstractSetCriteria;
-import org.teiid.query.sql.lang.Command;
-import org.teiid.query.sql.lang.CompareCriteria;
-import org.teiid.query.sql.lang.CompoundCriteria;
-import org.teiid.query.sql.lang.DependentSetCriteria;
-import org.teiid.query.sql.lang.ExistsCriteria;
-import org.teiid.query.sql.lang.IsNullCriteria;
-import org.teiid.query.sql.lang.MatchCriteria;
-import org.teiid.query.sql.lang.NotCriteria;
-import org.teiid.query.sql.lang.OrderByItem;
-import org.teiid.query.sql.lang.Query;
-import org.teiid.query.sql.lang.QueryCommand;
-import org.teiid.query.sql.lang.SetCriteria;
-import org.teiid.query.sql.lang.SubqueryCompareCriteria;
-import org.teiid.query.sql.lang.SubqueryContainer;
-import org.teiid.query.sql.lang.SubquerySetCriteria;
+import org.teiid.query.sql.lang.*;
import org.teiid.query.sql.navigator.PostOrderNavigator;
-import org.teiid.query.sql.symbol.AggregateSymbol;
-import org.teiid.query.sql.symbol.CaseExpression;
-import org.teiid.query.sql.symbol.Function;
-import org.teiid.query.sql.symbol.QueryString;
-import org.teiid.query.sql.symbol.ScalarSubquery;
-import org.teiid.query.sql.symbol.SearchedCaseExpression;
-import org.teiid.query.sql.symbol.TextLine;
-import org.teiid.query.sql.symbol.WindowFunction;
-import org.teiid.query.sql.symbol.XMLAttributes;
-import org.teiid.query.sql.symbol.XMLElement;
-import org.teiid.query.sql.symbol.XMLForest;
-import org.teiid.query.sql.symbol.XMLNamespaces;
-import org.teiid.query.sql.symbol.XMLParse;
-import org.teiid.query.sql.symbol.XMLQuery;
-import org.teiid.query.sql.symbol.XMLSerialize;
+import org.teiid.query.sql.symbol.*;
import org.teiid.query.sql.util.SymbolMap;
import org.teiid.query.sql.visitor.EvaluatableVisitor;
import org.teiid.query.sql.visitor.FunctionCollectorVisitor;
@@ -95,6 +66,7 @@
// Output state
private TeiidComponentException exception;
private boolean valid = true;
+ private boolean isJoin;
/**
* @param iterator
@@ -215,7 +187,20 @@
public void visit(CompareCriteria obj) {
checkCompareCriteria(obj);
+ checkLiteralComparison(obj, Arrays.asList(obj.getRightExpression()));
}
+
+ private void checkLiteralComparison(LanguageObject obj, Collection<? extends LanguageObject> toCheck) {
+ if (isJoin || !this.caps.supportsCapability(Capability.CRITERIA_ONLY_LITERAL_COMPARE)) {
+ return;
+ }
+ for (LanguageObject languageObject : toCheck) {
+ if (!EvaluatableVisitor.willBecomeConstant(languageObject, true)) {
+ markInvalid(obj, "Non-literal comparison not supported by source."); //$NON-NLS-1$
+ return;
+ }
+ }
+ }
public void checkCompareCriteria(AbstractCompareCriteria obj) {
boolean negated = false;
@@ -341,6 +326,8 @@
} catch(TeiidComponentException e) {
handleException(e);
}
+
+ checkLiteralComparison(obj, Arrays.asList(obj.getRightExpression()));
}
public void visit(NotCriteria obj) {
@@ -371,6 +358,7 @@
} catch(TeiidComponentException e) {
handleException(e);
}
+ checkLiteralComparison(crit, crit.getValues());
}
/**
@@ -640,6 +628,10 @@
}
public static boolean canPushLanguageObject(LanguageObject obj, Object modelID, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, AnalysisRecord analysisRecord) throws QueryMetadataException, TeiidComponentException {
+ return canPushLanguageObject(obj, modelID, metadata, capFinder, analysisRecord, false);
+ }
+
+ public static boolean canPushLanguageObject(LanguageObject obj, Object modelID, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, AnalysisRecord analysisRecord, boolean isJoin) throws QueryMetadataException, TeiidComponentException {
if(obj == null) {
return true;
}
@@ -657,6 +649,7 @@
}
CriteriaCapabilityValidatorVisitor visitor = new CriteriaCapabilityValidatorVisitor(modelID, metadata, capFinder, caps);
+ visitor.isJoin = isJoin;
PostOrderNavigator.doVisit(obj, visitor);
if(visitor.getException() != null) {
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java 2011-12-01 21:54:57 UTC (rev 3715)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java 2011-12-02 11:42:20 UTC (rev 3716)
@@ -685,7 +685,7 @@
static boolean isSupportedJoinCriteria(SupportedJoinCriteria sjc, Criteria crit, Object accessModelID,
QueryMetadataInterface metadata, CapabilitiesFinder capFinder, AnalysisRecord record)
throws QueryMetadataException, TeiidComponentException {
- if(!CriteriaCapabilityValidatorVisitor.canPushLanguageObject(crit, accessModelID, metadata, capFinder, record) ) {
+ if(!CriteriaCapabilityValidatorVisitor.canPushLanguageObject(crit, accessModelID, metadata, capFinder, record, true) ) {
return false;
}
if (sjc == SupportedJoinCriteria.ANY) {
Modified: trunk/engine/src/test/java/org/teiid/query/optimizer/TestBatchedUpdatePlanner.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/optimizer/TestBatchedUpdatePlanner.java 2011-12-01 21:54:57 UTC (rev 3715)
+++ trunk/engine/src/test/java/org/teiid/query/optimizer/TestBatchedUpdatePlanner.java 2011-12-02 11:42:20 UTC (rev 3716)
@@ -26,13 +26,14 @@
import java.util.Collection;
import java.util.List;
+import junit.framework.TestCase;
+
import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.api.exception.query.QueryPlannerException;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.query.analysis.AnalysisRecord;
import org.teiid.query.metadata.QueryMetadataInterface;
-import org.teiid.query.optimizer.QueryOptimizer;
import org.teiid.query.optimizer.capabilities.CapabilitiesFinder;
import org.teiid.query.optimizer.capabilities.DefaultCapabilitiesFinder;
import org.teiid.query.optimizer.capabilities.FakeCapabilitiesFinder;
@@ -47,16 +48,15 @@
import org.teiid.query.processor.relational.RelationalPlan;
import org.teiid.query.resolver.QueryResolver;
import org.teiid.query.rewriter.QueryRewriter;
+import org.teiid.query.sql.LanguageObject;
import org.teiid.query.sql.lang.BatchedUpdateCommand;
import org.teiid.query.sql.lang.Command;
import org.teiid.query.unittest.RealMetadataFactory;
import org.teiid.query.validator.Validator;
import org.teiid.query.validator.ValidatorReport;
-import junit.framework.TestCase;
-
/**
* @since 4.2
*/
@@ -73,7 +73,7 @@
Command command = QueryParser.getQueryParser().parseCommand(sql[i]);
QueryResolver.resolveCommand(command, md);
ValidatorReport repo = Validator.validate(command, md);
- Collection failures = new ArrayList();
+ Collection<LanguageObject> failures = new ArrayList<LanguageObject>();
repo.collectInvalidObjects(failures);
if (failures.size() > 0){
fail("Exception during validation (" + repo); //$NON-NLS-1$
@@ -222,6 +222,10 @@
public boolean supportsFunction(String functionName) {return false;}
// since 4.4
public Object getSourceProperty(Capability propertyName) {return null;}
+ @Override
+ public boolean supportsConvert(int sourceType, int targetType) {
+ return false;
+ }
}
Modified: trunk/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java 2011-12-01 21:54:57 UTC (rev 3715)
+++ trunk/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java 2011-12-02 11:42:20 UTC (rev 3716)
@@ -39,6 +39,7 @@
import org.teiid.core.TeiidProcessingException;
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.types.DataTypeManager;
+import org.teiid.core.types.DataTypeManager.DefaultTypeCodes;
import org.teiid.metadata.MetadataStore;
import org.teiid.metadata.Schema;
import org.teiid.metadata.Table;
@@ -117,7 +118,7 @@
caps.setCapabilitySupport(Capability.QUERY_FROM_GROUP_ALIAS, true);
caps.setCapabilitySupport(Capability.CRITERIA_BETWEEN, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_ORDERED, true);
- caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
+ caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
caps.setCapabilitySupport(Capability.CRITERIA_LIKE, true);
caps.setCapabilitySupport(Capability.CRITERIA_LIKE_ESCAPE, true);
caps.setCapabilitySupport(Capability.CRITERIA_IN, true);
@@ -6534,6 +6535,60 @@
});
}
+ @Test public void testNonJoinComparison() throws Exception {
+ BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
+ caps.setCapabilitySupport(Capability.CRITERIA_ONLY_LITERAL_COMPARE, true);
+ ProcessorPlan plan = TestOptimizer.helpPlan("SELECT intkey from bqt1.smalla where intkey = intnum", //$NON-NLS-1$
+ RealMetadataFactory.exampleBQTCached(), null, new DefaultCapabilitiesFinder(caps),
+ new String[] {
+ "SELECT bqt1.smalla.intkey, bqt1.smalla.intnum FROM bqt1.smalla"}, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$
+
+ checkNodeTypes(plan, new int[] {
+ 1, // Access
+ 0, // DependentAccess
+ 0, // DependentSelect
+ 0, // DependentProject
+ 0, // DupRemove
+ 0, // Grouping
+ 0, // NestedLoopJoinStrategy
+ 0, // MergeJoinStrategy
+ 0, // Null
+ 0, // PlanExecution
+ 1, // Project
+ 1, // Select
+ 0, // Sort
+ 0 // UnionAll
+ });
+ }
+
+ @Test public void testConvertSignature() throws Exception {
+ BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
+ caps.setSupportsConvert(DefaultTypeCodes.INTEGER, DefaultTypeCodes.STRING, true);
+ ProcessorPlan plan = TestOptimizer.helpPlan("SELECT e1 from pm1.g1 where e1 = e2 and e1 = e3", //$NON-NLS-1$
+ RealMetadataFactory.example1Cached(), null, new DefaultCapabilitiesFinder(caps),
+ new String[] {
+ "SELECT pm1.g1.e1, pm1.g1.e3 FROM pm1.g1 WHERE pm1.g1.e1 = pm1.g1.e2"}, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$
+
+ checkNodeTypes(plan, new int[] {
+ 1, // Access
+ 0, // DependentAccess
+ 0, // DependentSelect
+ 0, // DependentProject
+ 0, // DupRemove
+ 0, // Grouping
+ 0, // NestedLoopJoinStrategy
+ 0, // MergeJoinStrategy
+ 0, // Null
+ 0, // PlanExecution
+ 1, // Project
+ 1, // Select
+ 0, // Sort
+ 0 // UnionAll
+ });
+ }
+
public static final boolean DEBUG = false;
}
Modified: trunk/engine/src/test/java/org/teiid/query/optimizer/capabilities/AllCapabilities.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/optimizer/capabilities/AllCapabilities.java 2011-12-01 21:54:57 UTC (rev 3715)
+++ trunk/engine/src/test/java/org/teiid/query/optimizer/capabilities/AllCapabilities.java 2011-12-02 11:42:20 UTC (rev 3716)
@@ -25,7 +25,6 @@
*/
package org.teiid.query.optimizer.capabilities;
-import org.teiid.query.optimizer.capabilities.SourceCapabilities;
public class AllCapabilities implements SourceCapabilities {
public boolean supportsCapability(Capability capability) {
@@ -47,5 +46,10 @@
public Scope getScope() {
return Scope.SCOPE_GLOBAL;
}
+
+ @Override
+ public boolean supportsConvert(int sourceType, int targetType) {
+ return true;
+ }
}
\ No newline at end of file
13 years
teiid SVN: r3715 - in trunk: cache-jbosscache/src/main/java/org/teiid/replication/jboss and 1 other directory.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2011-12-01 16:54:57 -0500 (Thu, 01 Dec 2011)
New Revision: 3715
Modified:
trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml
trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java
Log:
TEIID-1720: Updating the code base to use Jboss-as-7.1.0.Beta1
Modified: trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml
===================================================================
--- trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml 2011-12-01 18:19:11 UTC (rev 3714)
+++ trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml 2011-12-01 21:54:57 UTC (rev 3715)
@@ -373,6 +373,14 @@
<login-module code="UsersRoles" flag="required"/>
</authentication>
</security-domain>
+ <security-domain name="teiid-security" cache-type="default">
+ <authentication>
+ <login-module code="UsersRoles" flag="required">
+ <module-option name="usersProperties" value="teiid-security-users.properties"/>
+ <module-option name="rolesProperties" value="teiid-security-roles.properties"/>
+ </login-module>
+ </authentication>
+ </security-domain>
</security-domains>
</subsystem>
<subsystem xmlns="urn:jboss:domain:teiid:1.0">
Modified: trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java
===================================================================
--- trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java 2011-12-01 18:19:11 UTC (rev 3714)
+++ trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java 2011-12-01 21:54:57 UTC (rev 3715)
@@ -22,7 +22,13 @@
package org.teiid.replication.jboss;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.ObjectStreamClass;
import java.io.Serializable;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
@@ -53,6 +59,7 @@
import org.jgroups.blocks.RequestOptions;
import org.jgroups.blocks.ResponseMode;
import org.jgroups.blocks.RpcDispatcher;
+import org.jgroups.util.Buffer;
import org.jgroups.util.Promise;
import org.jgroups.util.Rsp;
import org.jgroups.util.RspList;
@@ -83,6 +90,7 @@
this.object = object;
this.methodMap = methodMap;
this.methodList = methodList;
+ setMarshaller(new ContextAwareMarshaller(getClass().getClassLoader()));
}
@Override
@@ -570,5 +578,48 @@
}
}
}
+ }
+
+ // This class is used so that the objects are loaded with the current classes class loader
+ // rather than foreign class loader
+ static class ContextAwareMarshaller implements RpcDispatcher.Marshaller {
+ private ClassLoader classloader;
+
+ public ContextAwareMarshaller(ClassLoader classloader) {
+ this.classloader = classloader;
+ }
+
+ @Override
+ public Buffer objectToBuffer(Object obj) throws Exception {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectOutputStream out = new ObjectOutputStream(baos);
+ out.writeObject(obj);
+ out.close();
+ return new Buffer(baos.toByteArray());
+ }
+
+ @Override
+ public Object objectFromBuffer(byte[] buf, int offset, int length) throws Exception {
+ ObjectInputStream in = new CLAwareObjectInputStream(new ByteArrayInputStream(buf, offset, length), this.classloader);
+ Object anObj = in.readObject();
+ in.close();
+ return anObj;
+ }
}
+
+ static class CLAwareObjectInputStream extends ObjectInputStream {
+ private ClassLoader classloader;
+ @Override
+ public Class resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException {
+ try {
+ return this.classloader.loadClass(desc.getName());
+ } catch (Throwable t) {
+ }
+ return super.resolveClass(desc);
+ }
+ public CLAwareObjectInputStream(InputStream in, ClassLoader classloader) throws IOException {
+ super(in);
+ this.classloader = classloader;
+ }
+ }
}
13 years
teiid SVN: r3714 - in trunk: admin and 19 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2011-12-01 13:19:11 -0500 (Thu, 01 Dec 2011)
New Revision: 3714
Added:
trunk/jboss-integration/src/main/java/org/teiid/jboss/CacheService.java
Modified:
trunk/admin/pom.xml
trunk/admin/src/main/java/org/teiid/adminapi/impl/VDBMetadataMapper.java
trunk/admin/src/main/resources/org/teiid/adminapi/i18n.properties
trunk/admin/src/test/java/org/teiid/adminapi/impl/TestRequestMetadata.java
trunk/admin/src/test/java/org/teiid/adminapi/impl/TestSessionMetadata.java
trunk/admin/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java
trunk/admin/src/test/resources/vdb-describe.txt
trunk/build/assembly/jboss-as7/dist.xml
trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml
trunk/build/kits/jboss-as7/domain/configuration/host-teiid.xml
trunk/build/kits/jboss-as7/modules/org/jboss/teiid/client/main/module.xml
trunk/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml
trunk/client/pom.xml
trunk/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java
trunk/connectors/translator-hive/pom.xml
trunk/jboss-integration/pom.xml
trunk/jboss-integration/src/main/java/org/teiid/jboss/BaseOperationHandler.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/BufferManagerService.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/Element.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemDescribe.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
trunk/jboss-integration/src/test/resources/teiid-model-config.txt
trunk/jboss-integration/src/test/resources/teiid-transport-config.txt
trunk/pom.xml
trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java
trunk/runtime/src/main/java/org/teiid/transport/ServerWorkItem.java
trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties
Log:
TEIID-1720: Updating the code base to use Jboss-as-7.1.0.Beta1
Modified: trunk/admin/pom.xml
===================================================================
--- trunk/admin/pom.xml 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/admin/pom.xml 2011-12-01 18:19:11 UTC (rev 3714)
@@ -27,7 +27,7 @@
</dependency>
<dependency>
<groupId>org.jboss</groupId>
- <artifactId>jboss-dmr</artifactId>
+ <artifactId>jboss-dmr</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
Modified: trunk/admin/src/main/java/org/teiid/adminapi/impl/VDBMetadataMapper.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/impl/VDBMetadataMapper.java 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/admin/src/main/java/org/teiid/adminapi/impl/VDBMetadataMapper.java 2011-12-01 18:19:11 UTC (rev 3714)
@@ -29,9 +29,9 @@
import org.teiid.adminapi.AdminPlugin;
import org.teiid.adminapi.DataPolicy;
import org.teiid.adminapi.Model;
-import org.teiid.adminapi.Translator;
import org.teiid.adminapi.Request.ProcessingState;
import org.teiid.adminapi.Request.ThreadState;
+import org.teiid.adminapi.Translator;
import org.teiid.adminapi.VDB.ConnectionType;
import org.teiid.adminapi.VDB.Status;
import org.teiid.adminapi.impl.DataPolicyMetadata.PermissionMetaData;
@@ -45,10 +45,11 @@
private static final String URL = "url"; //$NON-NLS-1$
private static final String MODELS = "models"; //$NON-NLS-1$
private static final String OVERRIDE_TRANSLATORS = "override-translators"; //$NON-NLS-1$
- private static final String DESCRIPTION = "description"; //$NON-NLS-1$
+ private static final String VDB_DESCRIPTION = "vdb-description"; //$NON-NLS-1$
private static final String PROPERTIES = "properties"; //$NON-NLS-1$
private static final String DYNAMIC = "dynamic"; //$NON-NLS-1$
private static final String DATA_POLICIES = "data-policies"; //$NON-NLS-1$
+ private static final String DESCRIPTION = "description"; //$NON-NLS-1$
public static VDBMetadataMapper INSTANCE = new VDBMetadataMapper();
@@ -56,7 +57,7 @@
if (vdb == null) {
return null;
}
-
+ node.get(TYPE).set(ModelType.OBJECT);
node.get(VDBNAME).set(vdb.getName());
node.get(CONNECTIONTYPE).set(vdb.getConnectionType().toString());
node.get(STATUS).set(vdb.getStatus().toString());
@@ -64,14 +65,14 @@
if (vdb.getUrl() != null) {
}
if (vdb.getDescription() != null) {
- node.get(DESCRIPTION).set(vdb.getDescription());
+ node.get(VDB_DESCRIPTION).set(vdb.getDescription());
}
node.get(DYNAMIC).set(vdb.isDynamic());
//PROPERTIES
List<PropertyMetadata> properties = vdb.getJAXBProperties();
if (properties!= null && !properties.isEmpty()) {
- ModelNode propsNode = node.get(CHILDREN, PROPERTIES);
+ ModelNode propsNode = node.get(PROPERTIES);
for (PropertyMetadata prop:properties) {
propsNode.add(PropertyMetaDataMapper.INSTANCE.wrap(prop, new ModelNode()));
}
@@ -80,7 +81,7 @@
// MODELS
Map<String, ModelMetaData> models = vdb.getModelMetaDatas();
if (models != null && !models.isEmpty()) {
- ModelNode modelNodes = node.get(CHILDREN, MODELS);
+ ModelNode modelNodes = node.get(MODELS);
for(ModelMetaData model:models.values()) {
modelNodes.add(ModelMetadataMapper.INSTANCE.wrap(model, new ModelNode()));
}
@@ -89,7 +90,7 @@
// OVERRIDE_TRANSLATORS
List<Translator> translators = vdb.getOverrideTranslators();
if (translators != null && !translators.isEmpty()) {
- ModelNode translatorNodes = node.get(CHILDREN, OVERRIDE_TRANSLATORS);
+ ModelNode translatorNodes = node.get(OVERRIDE_TRANSLATORS);
for (Translator translator:translators) {
translatorNodes.add(VDBTranslatorMetaDataMapper.INSTANCE.wrap((VDBTranslatorMetaData)translator, new ModelNode()));
}
@@ -98,7 +99,7 @@
// DATA_POLICIES
List<DataPolicy> policies = vdb.getDataPolicies();
if (policies != null && !policies.isEmpty()) {
- ModelNode dataPoliciesNodes = node.get(CHILDREN, DATA_POLICIES);
+ ModelNode dataPoliciesNodes = node.get(DATA_POLICIES);
for (DataPolicy policy:policies) {
dataPoliciesNodes.add(DataPolicyMetadataMapper.INSTANCE.wrap((DataPolicyMetadata)policy, new ModelNode()));
}
@@ -126,16 +127,16 @@
if (node.has(URL)) {
vdb.setUrl(node.get(URL).asString());
}
- if(node.has(DESCRIPTION)) {
- vdb.setDescription(node.get(DESCRIPTION).asString());
+ if(node.has(VDB_DESCRIPTION)) {
+ vdb.setDescription(node.get(VDB_DESCRIPTION).asString());
}
if (node.has(DYNAMIC)) {
vdb.setDynamic(node.get(DYNAMIC).asBoolean());
}
//PROPERTIES
- if (node.get(CHILDREN, PROPERTIES).isDefined()) {
- List<ModelNode> propNodes = node.get(CHILDREN, PROPERTIES).asList();
+ if (node.get(PROPERTIES).isDefined()) {
+ List<ModelNode> propNodes = node.get(PROPERTIES).asList();
for (ModelNode propNode:propNodes) {
PropertyMetadata prop = PropertyMetaDataMapper.INSTANCE.unwrap(propNode);
if (prop != null) {
@@ -145,8 +146,8 @@
}
// MODELS
- if (node.get(CHILDREN, MODELS).isDefined()) {
- List<ModelNode> modelNodes = node.get(CHILDREN, MODELS).asList();
+ if (node.get(MODELS).isDefined()) {
+ List<ModelNode> modelNodes = node.get(MODELS).asList();
for(ModelNode modelNode:modelNodes) {
ModelMetaData model = ModelMetadataMapper.INSTANCE.unwrap(modelNode);
if (model != null) {
@@ -156,8 +157,8 @@
}
// OVERRIDE_TRANSLATORS
- if (node.get(CHILDREN, OVERRIDE_TRANSLATORS).isDefined()) {
- List<ModelNode> translatorNodes = node.get(CHILDREN, OVERRIDE_TRANSLATORS).asList();
+ if (node.get(OVERRIDE_TRANSLATORS).isDefined()) {
+ List<ModelNode> translatorNodes = node.get(OVERRIDE_TRANSLATORS).asList();
for (ModelNode translatorNode:translatorNodes) {
VDBTranslatorMetaData translator = VDBTranslatorMetaDataMapper.INSTANCE.unwrap(translatorNode);
if (translator != null) {
@@ -167,8 +168,8 @@
}
// DATA_POLICIES
- if (node.get(CHILDREN, DATA_POLICIES).isDefined()) {
- List<ModelNode> policiesNodes = node.get(CHILDREN, DATA_POLICIES).asList();
+ if (node.get(DATA_POLICIES).isDefined()) {
+ List<ModelNode> policiesNodes = node.get(DATA_POLICIES).asList();
for (ModelNode policyNode:policiesNodes) {
DataPolicyMetadata policy = DataPolicyMetadataMapper.INSTANCE.unwrap(policyNode);
if (policy != null) {
@@ -187,34 +188,39 @@
connectionsAllowed.add(ConnectionType.NONE.toString());
connectionsAllowed.add(ConnectionType.ANY.toString());
connectionsAllowed.add(ConnectionType.BY_VERSION.toString());
- addAttribute(node, CONNECTIONTYPE, ModelType.STRING, false).get(ALLOWED).set(connectionsAllowed);
+ addAttribute(node, CONNECTIONTYPE, ModelType.STRING, false);
+ node.get(CONNECTIONTYPE).get(ALLOWED).set(connectionsAllowed);
ModelNode statusAllowed = new ModelNode();
statusAllowed.add(Status.ACTIVE.toString());
statusAllowed.add(Status.INACTIVE.toString());
- addAttribute(node, STATUS, ModelType.STRING, true).get(ALLOWED).set(statusAllowed);
+ addAttribute(node, STATUS, ModelType.STRING, true);
+ node.get(STATUS).get(ALLOWED).set(statusAllowed);
addAttribute(node, VERSION, ModelType.INT, true);
addAttribute(node, URL, ModelType.STRING, false);
- addAttribute(node, DESCRIPTION, ModelType.STRING, false);
+ addAttribute(node, VDB_DESCRIPTION, ModelType.STRING, false);
addAttribute(node, DYNAMIC, ModelType.BOOLEAN, false);
- ModelNode props = node.get(CHILDREN, PROPERTIES);
+ ModelNode props = node.get(PROPERTIES);
+ props.get(TYPE).set(ModelType.LIST);
props.get(DESCRIPTION).set(AdminPlugin.Util.getString(PROPERTIES+DOT_DESC));
- PropertyMetaDataMapper.INSTANCE.describe(props);
+ PropertyMetaDataMapper.INSTANCE.describe(props.get(VALUE_TYPE));
- ModelNode models = node.get(CHILDREN, MODELS);
- ModelMetadataMapper.INSTANCE.describe(models);
+ ModelNode models = node.get( MODELS);
+ models.get(TYPE).set(ModelType.LIST);
+ ModelMetadataMapper.INSTANCE.describe(models.get(VALUE_TYPE));
models.get(DESCRIPTION).set(AdminPlugin.Util.getString(MODELS+DOT_DESC));
- models.get(MIN_OCCURS).set(1);
- ModelNode translators = node.get(CHILDREN, OVERRIDE_TRANSLATORS);
+ ModelNode translators = node.get(OVERRIDE_TRANSLATORS);
+ translators.get(TYPE).set(ModelType.LIST);
translators.get(DESCRIPTION).set(AdminPlugin.Util.getString(OVERRIDE_TRANSLATORS+DOT_DESC));
- VDBTranslatorMetaDataMapper.INSTANCE.describe(translators);
+ VDBTranslatorMetaDataMapper.INSTANCE.describe(translators.get(VALUE_TYPE));
- ModelNode dataPolicies = node.get(CHILDREN, DATA_POLICIES);
+ ModelNode dataPolicies = node.get(DATA_POLICIES);
+ dataPolicies.get(TYPE).set(ModelType.LIST);
dataPolicies.get(DESCRIPTION).set(AdminPlugin.Util.getString(DATA_POLICIES+DOT_DESC));
- DataPolicyMetadataMapper.INSTANCE.describe(dataPolicies);
+ DataPolicyMetadataMapper.INSTANCE.describe(dataPolicies.get(VALUE_TYPE));
return node;
}
@@ -250,7 +256,7 @@
List<PropertyMetadata> properties = model.getJAXBProperties();
if (properties!= null && !properties.isEmpty()) {
- ModelNode propsNode = node.get(CHILDREN, PROPERTIES);
+ ModelNode propsNode = node.get(PROPERTIES);
for (PropertyMetadata prop:properties) {
propsNode.add(PropertyMetaDataMapper.INSTANCE.wrap(prop, new ModelNode()));
}
@@ -258,7 +264,7 @@
List<SourceMappingMetadata> sources = model.getSourceMappings();
if (sources != null && !sources.isEmpty()) {
- ModelNode sourceMappingNode = node.get(CHILDREN, SOURCE_MAPPINGS);
+ ModelNode sourceMappingNode = node.get(SOURCE_MAPPINGS);
for(SourceMappingMetadata source:sources) {
sourceMappingNode.add(SourceMappingMetadataMapper.INSTANCE.wrap(source, new ModelNode()));
}
@@ -266,7 +272,7 @@
List<ValidationError> errors = model.getErrors();
if (errors != null && !errors.isEmpty()) {
- ModelNode errorsNode = node.get(CHILDREN, VALIDITY_ERRORS);
+ ModelNode errorsNode = node.get(VALIDITY_ERRORS);
for (ValidationError error:errors) {
errorsNode.add(ValidationErrorMapper.INSTANCE.wrap(error, new ModelNode()));
}
@@ -296,8 +302,8 @@
model.setPath(node.get(MODELPATH).asString());
}
- if (node.get(CHILDREN, PROPERTIES).isDefined()) {
- List<ModelNode> propNodes = node.get(CHILDREN, PROPERTIES).asList();
+ if (node.get(PROPERTIES).isDefined()) {
+ List<ModelNode> propNodes = node.get(PROPERTIES).asList();
for (ModelNode propNode:propNodes) {
PropertyMetadata prop = PropertyMetaDataMapper.INSTANCE.unwrap(propNode);
if (prop != null) {
@@ -306,8 +312,8 @@
}
}
- if (node.get(CHILDREN, SOURCE_MAPPINGS).isDefined()) {
- List<ModelNode> sourceMappingNodes = node.get(CHILDREN, SOURCE_MAPPINGS).asList();
+ if (node.get(SOURCE_MAPPINGS).isDefined()) {
+ List<ModelNode> sourceMappingNodes = node.get(SOURCE_MAPPINGS).asList();
for (ModelNode sourceMapping:sourceMappingNodes) {
SourceMappingMetadata source = SourceMappingMetadataMapper.INSTANCE.unwrap(sourceMapping);
if (source != null) {
@@ -316,8 +322,8 @@
}
}
- if (node.get(CHILDREN, VALIDITY_ERRORS).isDefined()) {
- List<ModelNode> errorNodes = node.get(CHILDREN, VALIDITY_ERRORS).asList();
+ if (node.get(VALIDITY_ERRORS).isDefined()) {
+ List<ModelNode> errorNodes = node.get(VALIDITY_ERRORS).asList();
for(ModelNode errorNode:errorNodes) {
ValidationError error = ValidationErrorMapper.INSTANCE.unwrap(errorNode);
if (error != null) {
@@ -334,24 +340,28 @@
modelTypes.add(Model.Type.VIRTUAL.toString());
modelTypes.add(Model.Type.FUNCTION.toString());
modelTypes.add(Model.Type.OTHER.toString());
- addAttribute(node, MODEL_NAME, ModelType.STRING, true).get(ALLOWED).set(modelTypes);
+ addAttribute(node, MODEL_NAME, ModelType.STRING, true);
+ node.get(MODEL_NAME).get(ALLOWED).set(modelTypes);
addAttribute(node, DESCRIPTION, ModelType.STRING, false);
addAttribute(node, VISIBLE, ModelType.BOOLEAN, false);
addAttribute(node, MODEL_TYPE, ModelType.STRING, true);
addAttribute(node, MODELPATH, ModelType.STRING, false);
- ModelNode props = node.get(CHILDREN, PROPERTIES);
+ ModelNode props = node.get(PROPERTIES);
+ props.get(TYPE).set(ModelType.LIST);
props.get(DESCRIPTION).set(AdminPlugin.Util.getString(PROPERTIES+DOT_DESC));
- PropertyMetaDataMapper.INSTANCE.describe(props);
+ PropertyMetaDataMapper.INSTANCE.describe(props.get(VALUE_TYPE));
- ModelNode source = node.get(CHILDREN, SOURCE_MAPPINGS);
+ ModelNode source = node.get(SOURCE_MAPPINGS);
+ source.get(TYPE).set(ModelType.LIST);
source.get(DESCRIPTION).set(AdminPlugin.Util.getString(SOURCE_MAPPINGS+DOT_DESC));
- SourceMappingMetadataMapper.INSTANCE.describe(source);
+ SourceMappingMetadataMapper.INSTANCE.describe(source.get(VALUE_TYPE));
- ModelNode errors = node.get(CHILDREN, VALIDITY_ERRORS);
+ ModelNode errors = node.get(VALIDITY_ERRORS);
+ errors.get(TYPE).set(ModelType.LIST);
errors.get(DESCRIPTION).set(AdminPlugin.Util.getString(VALIDITY_ERRORS+DOT_DESC));
- ValidationErrorMapper.INSTANCE.describe(errors);
+ ValidationErrorMapper.INSTANCE.describe(errors.get(VALUE_TYPE));
return node;
}
@@ -460,7 +470,7 @@
public static class VDBTranslatorMetaDataMapper implements MetadataMapper<VDBTranslatorMetaData>{
private static final String TRANSLATOR_NAME = "translator-name"; //$NON-NLS-1$
private static final String BASETYPE = "base-type"; //$NON-NLS-1$
- private static final String DESCRIPTION = "description"; //$NON-NLS-1$
+ private static final String TRANSLATOR_DESCRIPTION = "translator-description"; //$NON-NLS-1$
private static final String PROPERTIES = "properties"; //$NON-NLS-1$
private static final String MODULE_NAME = "module-name"; //$NON-NLS-1$
@@ -477,7 +487,7 @@
node.get(BASETYPE).set(translator.getType());
}
if (translator.getDescription() != null) {
- node.get(DESCRIPTION).set(translator.getDescription());
+ node.get(TRANSLATOR_DESCRIPTION).set(translator.getDescription());
}
if (translator.getModuleName() != null) {
@@ -486,7 +496,7 @@
List<PropertyMetadata> properties = translator.getJAXBProperties();
if (properties!= null && !properties.isEmpty()) {
- ModelNode propsNode = node.get(CHILDREN, PROPERTIES);
+ ModelNode propsNode = node.get(PROPERTIES);
for (PropertyMetadata prop:properties) {
propsNode.add(PropertyMetaDataMapper.INSTANCE.wrap(prop, new ModelNode()));
}
@@ -505,15 +515,15 @@
if (node.has(BASETYPE)) {
translator.setType(node.get(BASETYPE).asString());
}
- if (node.has(DESCRIPTION)) {
- translator.setDescription(node.get(DESCRIPTION).asString());
+ if (node.has(TRANSLATOR_DESCRIPTION)) {
+ translator.setDescription(node.get(TRANSLATOR_DESCRIPTION).asString());
}
if (node.has(MODULE_NAME)) {
translator.setModuleName(node.get(MODULE_NAME).asString());
}
- if (node.get(CHILDREN,PROPERTIES).isDefined()) {
- List<ModelNode> propNodes = node.get(CHILDREN, PROPERTIES).asList();
+ if (node.get(PROPERTIES).isDefined()) {
+ List<ModelNode> propNodes = node.get(PROPERTIES).asList();
for (ModelNode propNode:propNodes) {
PropertyMetadata prop = PropertyMetaDataMapper.INSTANCE.unwrap(propNode);
if (prop != null) {
@@ -527,12 +537,13 @@
public ModelNode describe(ModelNode node) {
addAttribute(node, TRANSLATOR_NAME, ModelType.STRING, true);
addAttribute(node, BASETYPE, ModelType.STRING, true);
- addAttribute(node, DESCRIPTION, ModelType.STRING, false);
+ addAttribute(node, TRANSLATOR_DESCRIPTION, ModelType.STRING, false);
addAttribute(node, MODULE_NAME, ModelType.STRING, false);
- ModelNode props = node.get(CHILDREN, PROPERTIES);
+ ModelNode props = node.get(PROPERTIES);
+ props.get(TYPE).set(ModelType.LIST);
props.get(DESCRIPTION).set(AdminPlugin.Util.getString(PROPERTIES+DOT_DESC));
- PropertyMetaDataMapper.INSTANCE.describe(props);
+ PropertyMetaDataMapper.INSTANCE.describe(props.get(VALUE_TYPE));
return node;
}
}
@@ -593,6 +604,7 @@
private static final String ALLOW_DELETE = "allow-delete"; //$NON-NLS-1$
private static final String ALLOW_EXECUTE = "allow-execute"; //$NON-NLS-1$
private static final String ALLOW_ALTER= "allow-alter"; //$NON-NLS-1$
+ private static final String POLICY_DESCRIPTION = "policy-description"; //$NON-NLS-1$
public static DataPolicyMetadataMapper INSTANCE = new DataPolicyMetadataMapper();
@@ -603,7 +615,7 @@
node.get(POLICY_NAME).set(policy.getName());
if (policy.getDescription() != null) {
- node.get(DESCRIPTION).set(policy.getDescription());
+ node.get(POLICY_DESCRIPTION).set(policy.getDescription());
}
if (policy.isAllowCreateTemporaryTables() != null) {
node.get(ALLOW_CREATE_TEMP_TABLES).set(policy.isAllowCreateTemporaryTables());
@@ -613,7 +625,7 @@
//DATA_PERMISSIONS
List<DataPolicy.DataPermission> permissions = policy.getPermissions();
if (permissions != null && !permissions.isEmpty()) {
- ModelNode permissionNodes = node.get(CHILDREN, DATA_PERMISSIONS);
+ ModelNode permissionNodes = node.get(DATA_PERMISSIONS);
for (DataPolicy.DataPermission dataPermission:permissions) {
permissionNodes.add(PermissionMetaDataMapper.INSTANCE.wrap((PermissionMetaData)dataPermission, new ModelNode()));
}
@@ -621,7 +633,7 @@
//MAPPED_ROLE_NAMES
if (policy.getMappedRoleNames() != null && !policy.getMappedRoleNames().isEmpty()) {
- ModelNode mappedRoleNodes = node.get(CHILDREN, MAPPED_ROLE_NAMES);
+ ModelNode mappedRoleNodes = node.get(MAPPED_ROLE_NAMES);
for (String role:policy.getMappedRoleNames()) {
mappedRoleNodes.add(role);
}
@@ -637,8 +649,8 @@
if (node.has(POLICY_NAME)) {
policy.setName(node.get(POLICY_NAME).asString());
}
- if (node.has(DESCRIPTION)) {
- policy.setDescription(node.get(DESCRIPTION).asString());
+ if (node.has(POLICY_DESCRIPTION)) {
+ policy.setDescription(node.get(POLICY_DESCRIPTION).asString());
}
if (node.has(ALLOW_CREATE_TEMP_TABLES)) {
policy.setAllowCreateTemporaryTables(node.get(ALLOW_CREATE_TEMP_TABLES).asBoolean());
@@ -648,8 +660,8 @@
}
//DATA_PERMISSIONS
- if (node.get(CHILDREN, DATA_PERMISSIONS).isDefined()) {
- List<ModelNode> permissionNodes = node.get(CHILDREN, DATA_PERMISSIONS).asList();
+ if (node.get(DATA_PERMISSIONS).isDefined()) {
+ List<ModelNode> permissionNodes = node.get(DATA_PERMISSIONS).asList();
for (ModelNode permissionNode:permissionNodes) {
PermissionMetaData permission = PermissionMetaDataMapper.INSTANCE.unwrap(permissionNode);
if (permission != null) {
@@ -659,8 +671,8 @@
}
//MAPPED_ROLE_NAMES
- if (node.get(CHILDREN, MAPPED_ROLE_NAMES).isDefined()) {
- List<ModelNode> roleNameNodes = node.get(CHILDREN, MAPPED_ROLE_NAMES).asList();
+ if (node.get(MAPPED_ROLE_NAMES).isDefined()) {
+ List<ModelNode> roleNameNodes = node.get(MAPPED_ROLE_NAMES).asList();
for (ModelNode roleNameNode:roleNameNodes) {
policy.addMappedRoleName(roleNameNode.asString());
}
@@ -670,36 +682,42 @@
public ModelNode describe(ModelNode node) {
addAttribute(node, POLICY_NAME, ModelType.STRING, true);
- addAttribute(node, DESCRIPTION, ModelType.STRING, false);
+ addAttribute(node, POLICY_DESCRIPTION, ModelType.STRING, false);
addAttribute(node, ALLOW_CREATE_TEMP_TABLES, ModelType.BOOLEAN, false);
addAttribute(node, ANY_AUTHENTICATED, ModelType.BOOLEAN, false);
- ModelNode permissions = node.get(CHILDREN, DATA_PERMISSIONS);
+ ModelNode permissions = node.get(DATA_PERMISSIONS);
+ permissions.get(TYPE).set(ModelType.LIST);
permissions.get(DESCRIPTION).set(AdminPlugin.Util.getString(DATA_PERMISSIONS+DOT_DESC));
- permissions.get(MIN_OCCURS).set(1);
- ModelNode create = permissions.get(CHILDREN, ALLOW_CREATE);
+ ModelNode create = permissions.get(VALUE_TYPE, ALLOW_CREATE);
create.get(DESCRIPTION).set(AdminPlugin.Util.getString(ALLOW_CREATE+DOT_DESC));
+ create.get(TYPE).set(ModelType.STRING);
- ModelNode read = permissions.get(CHILDREN, ALLOW_READ);
+ ModelNode read = permissions.get(VALUE_TYPE, ALLOW_READ);
read.get(DESCRIPTION).set(AdminPlugin.Util.getString(ALLOW_READ+DOT_DESC));
+ read.get(TYPE).set(ModelType.STRING);
- ModelNode update = permissions.get(CHILDREN, ALLOW_UPDATE);
+ ModelNode update = permissions.get(VALUE_TYPE, ALLOW_UPDATE);
update.get(DESCRIPTION).set(AdminPlugin.Util.getString(ALLOW_UPDATE+DOT_DESC));
+ update.get(TYPE).set(ModelType.STRING);
- ModelNode delete = permissions.get(CHILDREN, ALLOW_DELETE);
+ ModelNode delete = permissions.get(VALUE_TYPE, ALLOW_DELETE);
delete.get(DESCRIPTION).set(AdminPlugin.Util.getString(ALLOW_DELETE+DOT_DESC));
+ delete.get(TYPE).set(ModelType.STRING);
- ModelNode execute = permissions.get(CHILDREN, ALLOW_EXECUTE);
+ ModelNode execute = permissions.get(VALUE_TYPE, ALLOW_EXECUTE);
execute.get(DESCRIPTION).set(AdminPlugin.Util.getString(ALLOW_EXECUTE+DOT_DESC));
+ execute.get(TYPE).set(ModelType.STRING);
- ModelNode alter = permissions.get(CHILDREN, ALLOW_ALTER);
+ ModelNode alter = permissions.get(VALUE_TYPE, ALLOW_ALTER);
alter.get(DESCRIPTION).set(AdminPlugin.Util.getString(ALLOW_ALTER+DOT_DESC));
+ alter.get(TYPE).set(ModelType.STRING);
- ModelNode roleNames = node.get(CHILDREN, MAPPED_ROLE_NAMES);
+ ModelNode roleNames = node.get(MAPPED_ROLE_NAMES);
roleNames.get(TYPE).set(ModelType.LIST);
roleNames.get(DESCRIPTION).set(AdminPlugin.Util.getString(MAPPED_ROLE_NAMES+DOT_DESC));
- roleNames.get("value-type").set(ModelType.STRING); //$NON-NLS-1$
+ roleNames.get(VALUE_TYPE).set(ModelType.STRING);
return node;
}
}
@@ -1025,7 +1043,7 @@
public ModelNode wrap(WorkerPoolStatisticsMetadata stats, ModelNode node) {
if (stats == null)
return null;
-
+ node.get(TYPE).set(ModelType.OBJECT);
node.get(ACTIVE_THREADS).set(stats.getActiveThreads());
node.get(HIGHEST_ACTIVE_THREADS).set(stats.getHighestActiveThreads());
node.get(TOTAL_COMPLETED).set(stats.getTotalCompleted());
@@ -1067,17 +1085,15 @@
}
}
- private static final String CHILDREN = "children"; //$NON-NLS-1$
- private static final String ATTRIBUTES = "attributes"; //$NON-NLS-1$
private static final String DOT_DESC = ".describe"; //$NON-NLS-1$
private static final String TYPE = "type"; //$NON-NLS-1$
- private static final String MIN_OCCURS = "min-occurs"; //$NON-NLS-1$
private static final String REQUIRED = "required"; //$NON-NLS-1$
private static final String ALLOWED = "allowed"; //$NON-NLS-1$
+ private static final String VALUE_TYPE = "value-type"; //$NON-NLS-1$
static ModelNode addAttribute(ModelNode node, String name, ModelType dataType, boolean required) {
- node.get(ATTRIBUTES, name, TYPE).set(dataType);
- node.get(ATTRIBUTES, name, DESCRIPTION).set(AdminPlugin.Util.getString(name+DOT_DESC));
- node.get(ATTRIBUTES, name, REQUIRED).set(required);
+ node.get(name, TYPE).set(dataType);
+ node.get(name, DESCRIPTION).set(AdminPlugin.Util.getString(name+DOT_DESC));
+ node.get(name, REQUIRED).set(required);
return node;
}
}
Modified: trunk/admin/src/main/resources/org/teiid/adminapi/i18n.properties
===================================================================
--- trunk/admin/src/main/resources/org/teiid/adminapi/i18n.properties 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/admin/src/main/resources/org/teiid/adminapi/i18n.properties 2011-12-01 18:19:11 UTC (rev 3714)
@@ -15,6 +15,7 @@
source-name.describe=Source name for this model
jndi-name.describe=Connection JNDI Name
translator-name.describe=Name of the translator
+translator-description.describe=Translator description
error-path.describe=Path to the error in the Virtual Database
severity.describe=Severity
message.describe=Error message
Modified: trunk/admin/src/test/java/org/teiid/adminapi/impl/TestRequestMetadata.java
===================================================================
--- trunk/admin/src/test/java/org/teiid/adminapi/impl/TestRequestMetadata.java 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/admin/src/test/java/org/teiid/adminapi/impl/TestRequestMetadata.java 2011-12-01 18:19:11 UTC (rev 3714)
@@ -57,7 +57,7 @@
return request;
}
- public static final String desc = "{\"attributes\" : {\n" +
+ public static final String desc = "{\n" +
" \"execution-id\" : {\n" +
" \"type\" : {\n" +
" \"TYPE_MODEL_VALUE\" : \"LONG\"\n" +
@@ -121,7 +121,7 @@
" \"description\" : \"Thread state\",\n" +
" \"required\" : true\n" +
" }\n" +
- "}}";
+ "}";
@Test public void testDescribe() {
assertEquals(desc, VDBMetadataMapper.RequestMetadataMapper.INSTANCE.describe(new ModelNode()).toJSONString(false));
}
Modified: trunk/admin/src/test/java/org/teiid/adminapi/impl/TestSessionMetadata.java
===================================================================
--- trunk/admin/src/test/java/org/teiid/adminapi/impl/TestSessionMetadata.java 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/admin/src/test/java/org/teiid/adminapi/impl/TestSessionMetadata.java 2011-12-01 18:19:11 UTC (rev 3714)
@@ -51,7 +51,7 @@
}
- private static final String describe = "{\"attributes\" : {\n" +
+ private static final String describe = "{\n" +
" \"application-name\" : {\n" +
" \"type\" : {\n" +
" \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
@@ -122,7 +122,7 @@
" \"description\" : \"Security domain that session used for login\",\n" +
" \"required\" : false\n" +
" }\n" +
- "}}";
+ "}";
@Test public void testDescribe() {
ModelNode n = VDBMetadataMapper.SessionMetadataMapper.INSTANCE.describe(new ModelNode());
Modified: trunk/admin/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java
===================================================================
--- trunk/admin/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/admin/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java 2011-12-01 18:19:11 UTC (rev 3714)
@@ -48,7 +48,7 @@
assertEquals(tm.getScope(), tm1.getScope());
}
- private static final String describe = "{\"attributes\" : {\n" +
+ private static final String describe = "{\n" +
" \"session-id\" : {\n" +
" \"type\" : {\n" +
" \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
@@ -77,7 +77,7 @@
" \"description\" : \"Transaction Identifier (XID)\",\n" +
" \"required\" : true\n" +
" }\n" +
- "}}";
+ "}";
@Test
public void testDescribe() {
ModelNode n = VDBMetadataMapper.TransactionMetadataMapper.INSTANCE.describe(new ModelNode());
Modified: trunk/admin/src/test/resources/vdb-describe.txt
===================================================================
--- trunk/admin/src/test/resources/vdb-describe.txt 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/admin/src/test/resources/vdb-describe.txt 2011-12-01 18:19:11 UTC (rev 3714)
@@ -1,234 +1,253 @@
{
- "attributes" : {
- "vdb-name" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "The Virtual Database Name",
- "required" : true
+ "vdb-name" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
},
- "connection-type" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Allowable Connections: 1) NONE - disallow new connections 2) BY VERSION - allow connections only if the version is specified or if this is the earliest 'BY VERSION' vdb and there are no vdbs marked as 'ANY' 3) ANY - allow connections with or without a version specified. If multiple versions of same VDB are deployed, connect to one specified with ANY, or if there are multiple VDBs with ANY then connect to the latest version with ANY ",
- "required" : false
+ "description" : "The Virtual Database Name",
+ "required" : true
+ },
+ "connection-type" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
},
- "status" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "The Virtual Database Status",
- "required" : true
+ "description" : "Allowable Connections: 1) NONE - disallow new connections 2) BY VERSION - allow connections only if the version is specified or if this is the earliest 'BY VERSION' vdb and there are no vdbs marked as 'ANY' 3) ANY - allow connections with or without a version specified. If multiple versions of same VDB are deployed, connect to one specified with ANY, or if there are multiple VDBs with ANY then connect to the latest version with ANY ",
+ "required" : false,
+ "allowed" : [
+ "NONE",
+ "ANY",
+ "BY_VERSION"
+ ]
+ },
+ "status" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
},
- "vdb-version" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "INT"
- },
- "description" : "The Virtual Database Version",
- "required" : true
+ "description" : "The Virtual Database Status",
+ "required" : true,
+ "allowed" : [
+ "ACTIVE",
+ "INACTIVE"
+ ]
+ },
+ "vdb-version" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "INT"
},
- "url" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "The Virtual Database URL",
- "required" : false
+ "description" : "The Virtual Database Version",
+ "required" : true
+ },
+ "url" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
},
- "description" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Description",
- "required" : false
+ "description" : "The Virtual Database URL",
+ "required" : false
+ },
+ "vdb-description" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
},
- "dynamic" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "BOOLEAN"
+ "description" : "<Missing message for key \"vdb-description.describe\" in: org.teiid.adminapi.i18n>",
+ "required" : false
+ },
+ "dynamic" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "BOOLEAN"
+ },
+ "description" : "Dynamic Virtual Database",
+ "required" : false
+ },
+ "properties" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "LIST"
+ },
+ "description" : "properties",
+ "value-type" : {
+ "property-name" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
+ },
+ "description" : "Name",
+ "required" : true
},
- "description" : "Dynamic Virtual Database",
- "required" : false
+ "property-value" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
+ },
+ "description" : "Property value",
+ "required" : true
+ }
}
},
- "allowed" : [
- "ACTIVE",
- "INACTIVE"
- ],
- "children" : {
- "properties" : {
- "description" : "properties",
- "attributes" : {
- "property-name" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Name",
- "required" : true
- },
- "property-value" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Property value",
- "required" : true
- }
- }
+ "models" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "LIST"
},
- "models" : {
- "attributes" : {
- "model-name" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Name of the model",
- "required" : true
+ "value-type" : {
+ "model-name" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
},
- "description" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Description",
- "required" : false
+ "description" : "Name of the model",
+ "required" : true,
+ "allowed" : [
+ "PHYSICAL",
+ "VIRTUAL",
+ "FUNCTION",
+ "OTHER"
+ ]
+ },
+ "description" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
},
- "visible" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "BOOLEAN"
- },
- "description" : "Visibility of the model",
- "required" : false
+ "description" : "Description",
+ "required" : false
+ },
+ "visible" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "BOOLEAN"
},
- "model-type" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Type of the Model(PHYSICAL, VIRTUAL, FUNCTION, OTHER)",
- "required" : true
+ "description" : "Visibility of the model",
+ "required" : false
+ },
+ "model-type" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
},
- "model-path" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
+ "description" : "Type of the Model(PHYSICAL, VIRTUAL, FUNCTION, OTHER)",
+ "required" : true
+ },
+ "model-path" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
+ },
+ "description" : "Path to model file inside the archive",
+ "required" : false
+ },
+ "properties" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "LIST"
+ },
+ "description" : "properties",
+ "value-type" : {
+ "property-name" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
+ },
+ "description" : "Name",
+ "required" : true
},
- "description" : "Path to model file inside the archive",
- "required" : false
+ "property-value" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
+ },
+ "description" : "Property value",
+ "required" : true
+ }
}
},
- "allowed" : [
- "PHYSICAL",
- "VIRTUAL",
- "FUNCTION",
- "OTHER"
- ],
- "children" : {
- "properties" : {
- "description" : "properties",
- "attributes" : {
- "property-name" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Name",
- "required" : true
- },
- "property-value" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Property value",
- "required" : true
- }
- }
+ "source-mappings" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "LIST"
},
- "source-mappings" : {
- "description" : "Model to source mapping",
- "attributes" : {
- "source-name" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Source name for this model",
- "required" : true
+ "description" : "Model to source mapping",
+ "value-type" : {
+ "source-name" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
},
- "jndi-name" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Connection JNDI Name",
- "required" : true
+ "description" : "Source name for this model",
+ "required" : true
+ },
+ "jndi-name" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
},
- "translator-name" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Name of the translator",
- "required" : true
- }
+ "description" : "Connection JNDI Name",
+ "required" : true
+ },
+ "translator-name" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
+ },
+ "description" : "Name of the translator",
+ "required" : true
}
+ }
+ },
+ "validity-errors" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "LIST"
},
- "validity-errors" : {
- "description" : "Model validation errors",
- "attributes" : {
- "error-path" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Path to the error in the Virtual Database",
- "required" : false
+ "description" : "Model validation errors",
+ "value-type" : {
+ "error-path" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
},
- "severity" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Severity",
- "required" : true
+ "description" : "Path to the error in the Virtual Database",
+ "required" : false
+ },
+ "severity" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
},
- "message" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Error message",
- "required" : true
- }
+ "description" : "Severity",
+ "required" : true
+ },
+ "message" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
+ },
+ "description" : "Error message",
+ "required" : true
}
}
- },
- "description" : "Models inside a virtual database",
- "min-occurs" : 1
+ }
},
- "override-translators" : {
- "description" : "Overridden translators for the Virtual Database",
- "attributes" : {
- "translator-name" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Name of the translator",
- "required" : true
+ "description" : "Models inside a virtual database"
+ },
+ "override-translators" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "LIST"
+ },
+ "description" : "Overridden translators for the Virtual Database",
+ "value-type" : {
+ "translator-name" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
},
- "base-type" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Translator Base Type",
- "required" : true
+ "description" : "Name of the translator",
+ "required" : true
+ },
+ "base-type" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
},
- "description" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Description",
- "required" : false
+ "description" : "Translator Base Type",
+ "required" : true
+ },
+ "translator-description" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
},
- "module-name" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Translator's Module name",
- "required" : false
- }
+ "description" : "Translator description",
+ "required" : false
},
- "children" : {"properties" : {
+ "module-name" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
+ },
+ "description" : "Translator's Module name",
+ "required" : false
+ },
+ "properties" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "LIST"
+ },
"description" : "properties",
- "attributes" : {
+ "value-type" : {
"property-name" : {
"type" : {
"TYPE_MODEL_VALUE" : "STRING"
@@ -244,62 +263,95 @@
"required" : true
}
}
- }}
+ }
+ }
+ },
+ "data-policies" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "LIST"
},
- "data-policies" : {
- "description" : "Data access policies defined for the Virtual Database",
- "attributes" : {
- "policy-name" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Resource Name, for which permission defined",
- "required" : true
+ "description" : "Data access policies defined for the Virtual Database",
+ "value-type" : {
+ "policy-name" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
},
- "description" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "STRING"
- },
- "description" : "Description",
- "required" : false
+ "description" : "Resource Name, for which permission defined",
+ "required" : true
+ },
+ "policy-description" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
},
- "allow-create-temp-tables" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "BOOLEAN"
- },
- "description" : "Allows create of temporary table",
- "required" : false
+ "description" : "<Missing message for key \"policy-description.describe\" in: org.teiid.adminapi.i18n>",
+ "required" : false
+ },
+ "allow-create-temp-tables" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "BOOLEAN"
},
- "any-authenticated" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "BOOLEAN"
- },
- "description" : "Indicates if the role is mapped to any authenticated user",
- "required" : false
- }
+ "description" : "Allows create of temporary table",
+ "required" : false
},
- "children" : {
- "data-permissions" : {
- "description" : "Permissions defined for data access",
- "min-occurs" : 1,
- "children" : {
- "allow-create" : {"description" : "create allowed"},
- "allow-read" : {"description" : "read allowed"},
- "allow-update" : {"description" : "update allowed"},
- "allow-delete" : {"description" : "delete allowed"},
- "allow-execute" : {"description" : "execute allowed"},
- "allow-alter" : {"description" : "alter allowed"}
- }
+ "any-authenticated" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "BOOLEAN"
},
- "mapped-role-names" : {
- "type" : {
- "TYPE_MODEL_VALUE" : "LIST"
+ "description" : "Indicates if the role is mapped to any authenticated user",
+ "required" : false
+ },
+ "data-permissions" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "LIST"
+ },
+ "description" : "Permissions defined for data access",
+ "value-type" : {
+ "allow-create" : {
+ "description" : "create allowed",
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
+ }
},
- "description" : "Policy name to role name mapping",
- "value-type" : {
- "TYPE_MODEL_VALUE" : "STRING"
+ "allow-read" : {
+ "description" : "read allowed",
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
+ }
+ },
+ "allow-update" : {
+ "description" : "update allowed",
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
+ }
+ },
+ "allow-delete" : {
+ "description" : "delete allowed",
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
+ }
+ },
+ "allow-execute" : {
+ "description" : "execute allowed",
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
+ }
+ },
+ "allow-alter" : {
+ "description" : "alter allowed",
+ "type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
+ }
}
}
+ },
+ "mapped-role-names" : {
+ "type" : {
+ "TYPE_MODEL_VALUE" : "LIST"
+ },
+ "description" : "Policy name to role name mapping",
+ "value-type" : {
+ "TYPE_MODEL_VALUE" : "STRING"
+ }
}
}
}
Modified: trunk/build/assembly/jboss-as7/dist.xml
===================================================================
--- trunk/build/assembly/jboss-as7/dist.xml 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/build/assembly/jboss-as7/dist.xml 2011-12-01 18:19:11 UTC (rev 3714)
@@ -41,20 +41,7 @@
<fileMode>0644</fileMode>
<directoryMode>0755</directoryMode>
</fileSet>
-
- <!-- We may want to do this if including multiple doc types or languages
- as the parent directory structure will be copied. However the parent
- directory permissions still seem wrong.
- <fileSet>
- <directory>target/distribution/teiid-${version}-docs</directory>
- <includes>
- <include>**/*.pdf</include>
- </includes>
- <outputDirectory>teiid-docs</outputDirectory>
- <fileMode>0644</fileMode>
- <directoryMode>0755</directoryMode>
- </fileSet> -->
-
+
</fileSets>
<files>
@@ -167,6 +154,19 @@
</binaries>
</moduleSet>
+ <!-- This is separated out so that we can avoid dragging in transitive dependencies, using pom build the adminshell correctly -->
+ <moduleSet>
+ <useAllReactorProjects>true</useAllReactorProjects>
+ <includes>
+ <include>org.jboss.teiid:teiid-admin</include>
+ </includes>
+ <binaries>
+ <includeDependencies>false</includeDependencies>
+ <unpack>false</unpack>
+ <outputDirectory>modules/org/jboss/teiid/main</outputDirectory>
+ </binaries>
+ </moduleSet>
+
<!-- These are built in connectors -->
<moduleSet>
<includeSubModules>true</includeSubModules>
Modified: trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml
===================================================================
--- trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml 2011-12-01 18:19:11 UTC (rev 3714)
@@ -1,30 +1,11 @@
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2010, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ This 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 software 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 software; if not, write to the Free
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- -->
+<?xml version='1.0' encoding='UTF-8'?>
<domain xmlns="urn:jboss:domain:1.1">
<extensions>
<extension module="org.jboss.as.clustering.infinispan"/>
<extension module="org.jboss.as.clustering.jgroups"/>
+ <extension module="org.jboss.as.cmp"/>
<extension module="org.jboss.as.connector"/>
<extension module="org.jboss.as.ee"/>
<extension module="org.jboss.as.ejb3"/>
@@ -34,6 +15,7 @@
<extension module="org.jboss.as.jmx"/>
<extension module="org.jboss.as.jpa"/>
<extension module="org.jboss.as.logging"/>
+ <extension module="org.jboss.as.mail"/>
<extension module="org.jboss.as.messaging"/>
<extension module="org.jboss.as.modcluster"/>
<extension module="org.jboss.as.naming"/>
@@ -45,7 +27,7 @@
<extension module="org.jboss.as.threads"/>
<extension module="org.jboss.as.transactions"/>
<extension module="org.jboss.as.web"/>
- <extension module="org.jboss.as.webservices" />
+ <extension module="org.jboss.as.webservices"/>
<extension module="org.jboss.as.weld"/>
</extensions>
@@ -63,7 +45,6 @@
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
</console-handler>
-
<periodic-rotating-file-handler name="FILE">
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
@@ -71,7 +52,6 @@
<file relative-to="jboss.server.log.dir" path="server.log"/>
<suffix value=".yyyy-MM-dd"/>
</periodic-rotating-file-handler>
-
<logger category="com.arjuna">
<level name="WARN"/>
</logger>
@@ -84,11 +64,9 @@
<logger category="jacorb">
<level name="WARN"/>
</logger>
- <!-- set jacorb.config to ERROR to avoid the "jacorb.properties not found" messages during startup -->
<logger category="jacorb.config">
<level name="ERROR"/>
</logger>
-
<root-logger>
<level name="INFO"/>
<handlers>
@@ -116,33 +94,7 @@
</datasources>
</subsystem>
<subsystem xmlns="urn:jboss:domain:ee:1.0"/>
- <subsystem xmlns="urn:jboss:domain:ejb3:1.2" >
-
- <remote connector-ref="remoting-connector" thread-pool-name="default" />
- <async thread-pool-name="default" />
-
- <timer-service thread-pool-name="default" >
- <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>
- </timer-service>
-
- <!-- EJB3 pools -->
- <pools>
- <bean-instance-pools>
- <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5"
- instance-acquisition-timeout-unit="MINUTES"/>
-
- <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5"
- instance-acquisition-timeout-unit="MINUTES"/>
- </bean-instance-pools>
- </pools>
-
- <!-- Default MDB configurations -->
- <mdb>
- <resource-adapter-ref resource-adapter-name="hornetq-ra"/>
- <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
- </mdb>
-
- <!-- Session bean configurations -->
+ <subsystem xmlns="urn:jboss:domain:ejb3:1.2">
<session-bean>
<stateless>
<bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
@@ -150,12 +102,26 @@
<stateful default-access-timeout="5000"/>
<singleton default-access-timeout="5000"/>
</session-bean>
-
+ <mdb>
+ <resource-adapter-ref resource-adapter-name="hornetq-ra"/>
+ <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
+ </mdb>
+ <pools>
+ <bean-instance-pools>
+ <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
+ <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
+ </bean-instance-pools>
+ </pools>
+ <async thread-pool-name="default"/>
+ <timer-service thread-pool-name="default">
+ <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>
+ </timer-service>
+ <remote connector-ref="remoting-connector" thread-pool-name="default"/>
<thread-pools>
- <thread-pool name="default" max-threads="10" keepalive-time="100" />
+ <thread-pool name="default" max-threads="10" keepalive-time="100"/>
</thread-pools>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:infinispan:1.0" default-cache-container="cluster">
+ <subsystem xmlns="urn:jboss:domain:infinispan:1.1" default-cache-container="cluster">
<cache-container name="cluster" default-cache="default">
<alias>ha-partition</alias>
<replicated-cache name="default" mode="SYNC" batching="true">
@@ -203,7 +169,7 @@
</subsystem>
<subsystem xmlns="urn:jboss:domain:jacorb:1.1"/>
<subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
- <subsystem xmlns="urn:jboss:domain:jca:1.0">
+ <subsystem xmlns="urn:jboss:domain:jca:1.1">
<archive-validation enabled="true"/>
<bean-validation enabled="true"/>
<default-workmanager>
@@ -260,20 +226,22 @@
<protocol type="pbcast.FLUSH"/>
</stack>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:jmx:1.1" show-model="true">
- <jmx-connector registry-binding="jmx-connector-registry" server-binding="jmx-connector-server" />
- </subsystem>
+ <subsystem xmlns="urn:jboss:domain:jmx:1.1" show-model="true"/>
<subsystem xmlns="urn:jboss:domain:jpa:1.0">
<jpa default-datasource=""/>
</subsystem>
+ <subsystem xmlns="urn:jboss:domain:mail:1.0">
+ <mail-session jndi-name="java:jboss/mail/Default">
+ <smtp-server outbound-socket-binding-ref="mail-smtp"/>
+ </mail-session>
+ </subsystem>
<subsystem xmlns="urn:jboss:domain:messaging:1.1">
<hornetq-server>
+ <!-- disable messaging persistence -->
+ <persistence-enabled>false</persistence-enabled>
<!-- Default journal file size is 10Mb, reduced here to 100k for faster first boot -->
<journal-file-size>102400</journal-file-size>
<journal-min-files>2</journal-min-files>
- <journal-type>NIO</journal-type>
- <!-- disable messaging persistence -->
- <persistence-enabled>false</persistence-enabled>
<connectors>
<netty-connector name="netty" socket-binding="messaging"/>
@@ -294,10 +262,10 @@
<security-settings>
<security-setting match="#">
+ <permission type="send" roles="guest"/>
+ <permission type="consume" roles="guest"/>
<permission type="createNonDurableQueue" roles="guest"/>
<permission type="deleteNonDurableQueue" roles="guest"/>
- <permission type="consume" roles="guest"/>
- <permission type="send" roles="guest"/>
</security-setting>
</security-settings>
@@ -313,7 +281,6 @@
</address-setting>
</address-settings>
- <!--JMS Stuff-->
<jms-connection-factories>
<connection-factory name="InVmConnectionFactory">
<connectors>
@@ -355,7 +322,7 @@
<subsystem xmlns="urn:jboss:domain:modcluster:1.0">
<mod-cluster-config advertise-socket="modcluster"/>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:naming:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:naming:1.1"/>
<subsystem xmlns="urn:jboss:domain:osgi:1.1" activation="lazy">
<configuration pid="org.apache.felix.webconsole.internal.servlet.OsgiManager">
<property name="manager.root" value="jboss-osgi"/>
@@ -394,12 +361,12 @@
<capability name="org.jboss.osgi.xerces" startlevel="3"/>
</capabilities>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:remoting:1.0">
+ <subsystem xmlns="urn:jboss:domain:remoting:1.1">
<connector name="remoting-connector" socket-binding="remoting"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"/>
<subsystem xmlns="urn:jboss:domain:sar:1.0"/>
- <subsystem xmlns="urn:jboss:domain:security:1.0">
+ <subsystem xmlns="urn:jboss:domain:security:1.1">
<security-domains>
<security-domain name="other">
<authentication>
@@ -457,33 +424,47 @@
<max-threads count="2" per-cpu="2" />
</queueless-thread-pool>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:transactions:1.0">
- <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
+ <subsystem xmlns="urn:jboss:domain:transactions:1.1">
<core-environment>
<process-id>
<uuid />
</process-id>
</core-environment>
+ <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
<coordinator-environment default-timeout="300"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">
- <connector name="http" scheme="http" protocol="HTTP/1.1" socket-binding="http"/>
+ <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<virtual-server name="default-host" enable-welcome-root="true">
- <alias name="localhost" />
- <alias name="example.com" />
+ <alias name="localhost"/>
+ <alias name="example.com"/>
</virtual-server>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:webservices:1.0">
+ <subsystem xmlns="urn:jboss:domain:webservices:1.0" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:jaxwsconfig="urn:jboss:jbossws-jaxws-config:4.0">
<modify-wsdl-address>true</modify-wsdl-address>
<wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
<!--
<wsdl-port>8080</wsdl-port>
<wsdl-secure-port>8443</wsdl-secure-port>
-->
+ <endpoint-config>
+ <jaxwsconfig:config-name>Standard-Endpoint-Config</jaxwsconfig:config-name>
+ </endpoint-config>
+ <endpoint-config>
+ <jaxwsconfig:config-name>Recording-Endpoint-Config</jaxwsconfig:config-name>
+ <jaxwsconfig:pre-handler-chains>
+ <javaee:handler-chain xmlns="http://java.sun.com/xml/ns/javaee">
+ <javaee:protocol-bindings>##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM</javaee:protocol-bindings>
+ <javaee:handler>
+ <javaee:handler-name>RecordingHandler</javaee:handler-name>
+ <javaee:handler-class>org.jboss.ws.common.invocation.RecordingServerHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </jaxwsconfig:pre-handler-chains>
+ </endpoint-config>
</subsystem>
<subsystem xmlns="urn:jboss:domain:weld:1.0"/>
</profile>
-
</profiles>
<!--
@@ -506,12 +487,15 @@
<socket-binding name="jacorb-ssl" port="3529"/>
<socket-binding name="jmx-connector-registry" interface="management" port="1090"/>
<socket-binding name="jmx-connector-server" interface="management" port="1091"/>
- <socket-binding name="messaging" port="5445" />
+ <socket-binding name="messaging" port="5445"/>
<socket-binding name="messaging-throughput" port="5455"/>
<socket-binding name="osgi-http" interface="management" port="8090"/>
<socket-binding name="remoting" port="4447"/>
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
+ <outbound-socket-binding name="mail-smtp">
+ <remote-destination host="localhost" port="25"/>
+ </outbound-socket-binding>
</socket-binding-group>
<socket-binding-group name="ha-sockets" default-interface="public">
<socket-binding name="http" port="8080"/>
@@ -526,7 +510,7 @@
<socket-binding name="jgroups-udp-fd" port="54200"/>
<socket-binding name="jmx-connector-registry" interface="management" port="1090"/>
<socket-binding name="jmx-connector-server" interface="management" port="1091"/>
- <socket-binding name="messaging" port="5445" />
+ <socket-binding name="messaging" port="5445"/>
<socket-binding name="messaging-throughput" port="5455"/>
<socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
<socket-binding name="osgi-http" interface="management" port="8090"/>
@@ -535,6 +519,9 @@
<socket-binding name="txn-status-manager" port="4713"/>
<socket-binding name="teiid-jdbc" port="31000"/>
<socket-binding name="teiid-odbc" port="35432"/>
+ <outbound-socket-binding name="mail-smtp">
+ <remote-destination host="localhost" port="25"/>
+ </outbound-socket-binding>
</socket-binding-group>
</socket-binding-groups>
Modified: trunk/build/kits/jboss-as7/domain/configuration/host-teiid.xml
===================================================================
--- trunk/build/kits/jboss-as7/domain/configuration/host-teiid.xml 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/build/kits/jboss-as7/domain/configuration/host-teiid.xml 2011-12-01 18:19:11 UTC (rev 3714)
@@ -1,27 +1,6 @@
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2010, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ This 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 software 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 software; if not, write to the Free
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- -->
+<?xml version='1.0' encoding='UTF-8'?>
-<host xmlns="urn:jboss:domain:1.1"
- name="master">
+<host name="master" xmlns="urn:jboss:domain:1.1">
<management>
<security-realms>
@@ -73,16 +52,14 @@
-->
</jvm>
</server>
-
<server name="server-two" group="main-server-group" auto-start="true">
<!-- server-two avoids port conflicts by incrementing the ports in
the default socket-group declared in the server-group -->
<socket-binding-group ref="ha-sockets" port-offset="150"/>
<jvm name="default">
- <heap size="512m" max-size="1024m"/>
+ <heap size="64m" max-size="256m"/>
</jvm>
</server>
-
<server name="server-three" group="main-server-group" auto-start="false">
<!-- server-three avoids port conflicts by incrementing the ports in
the default socket-group declared in the server-group -->
Modified: trunk/build/kits/jboss-as7/modules/org/jboss/teiid/client/main/module.xml
===================================================================
--- trunk/build/kits/jboss-as7/modules/org/jboss/teiid/client/main/module.xml 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/build/kits/jboss-as7/modules/org/jboss/teiid/client/main/module.xml 2011-12-01 18:19:11 UTC (rev 3714)
@@ -10,5 +10,7 @@
<module name="org.jboss.teiid.common-core" />
<module name="javax.transaction.api"/>
<module name="javax.api"/>
+ <module name="sun.jdk"/>
+ <module name="org.jboss.modules"/>
</dependencies>
</module>
\ No newline at end of file
Modified: trunk/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml
===================================================================
--- trunk/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml 2011-12-01 18:19:11 UTC (rev 3714)
@@ -1,43 +1,19 @@
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ This 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 software 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 software; if not, write to the Free
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- -->
+<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:1.1">
<extensions>
<extension module="org.jboss.as.clustering.infinispan"/>
- <extension module="org.jboss.as.cmp"/>
<extension module="org.jboss.as.connector"/>
<extension module="org.jboss.as.deployment-scanner"/>
<extension module="org.jboss.as.ee"/>
<extension module="org.jboss.as.ejb3"/>
- <extension module="org.jboss.as.jacorb"/>
- <extension module="org.jboss.as.jaxr"/>
<extension module="org.jboss.as.jaxrs"/>
<extension module="org.jboss.as.jdr"/>
<extension module="org.jboss.as.jmx"/>
<extension module="org.jboss.as.jpa"/>
<extension module="org.jboss.as.logging"/>
<extension module="org.jboss.as.mail"/>
- <extension module="org.jboss.as.messaging"/>
<extension module="org.jboss.as.naming"/>
<extension module="org.jboss.as.osgi"/>
<extension module="org.jboss.as.pojo"/>
@@ -78,7 +54,6 @@
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
</console-handler>
-
<periodic-rotating-file-handler name="FILE">
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
@@ -87,7 +62,6 @@
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-rotating-file-handler>
-
<logger category="com.arjuna">
<level name="WARN"/>
</logger>
@@ -100,11 +74,9 @@
<logger category="jacorb">
<level name="WARN"/>
</logger>
- <!-- set jacorb.config to ERROR to avoid the "jacorb.properties not found" messages during startup -->
<logger category="jacorb.config">
<level name="ERROR"/>
</logger>
-
<root-logger>
<level name="INFO"/>
<handlers>
@@ -113,7 +85,6 @@
</handlers>
</root-logger>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:cmp:1.0"/>
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<datasource jndi-name="java:jboss/datasources/ExampleDS" enabled="true" use-java-context="true"
@@ -126,78 +97,18 @@
<password>sa</password>
</security>
</datasource>
- <datasource jndi-name="java:/postgres-ds" pool-name="PostgreDS">
- <connection-url>jdbc:postgresql://127.0.0.1:5432/txns</connection-url>
- <driver>postgresql</driver>
- <pool>
- <prefill>false</prefill>
- <use-strict-min>false</use-strict-min>
- <flush-strategy>FailingConnectionOnly</flush-strategy>
- </pool>
- <security>
- <user-name>rareddy</user-name>
- <password>mm</password>
- </security>
- </datasource>
- <datasource jndi-name="java:/mysql-ds" pool-name="mysqlDS">
- <connection-url>jdbc:mysql://localhost:3306/txns</connection-url>
- <driver>mysql</driver>
- <pool>
- <prefill>false</prefill>
- <use-strict-min>false</use-strict-min>
- <flush-strategy>FailingConnectionOnly</flush-strategy>
- </pool>
- <security>
- <user-name>rareddy</user-name>
- <password>mm</password>
- </security>
- </datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
- <driver name="mysql" module="com.mysql">
- <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
- </driver>
- <driver name="oracle" module="com.oracle">
- <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
- </driver>
- <driver name="com.mysql" module="com.mysql"/>
- <driver name="postgresql" module="com.mysql"/>
</drivers>
</datasources>
</subsystem>
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">
<deployment-scanner scan-interval="5000" relative-to="jboss.server.base.dir" path="deployments"/>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:ee:1.0" />
- <subsystem xmlns="urn:jboss:domain:ejb3:1.2" >
-
- <remote connector-ref="remoting-connector" thread-pool-name="default" />
- <async thread-pool-name="default" />
-
- <timer-service thread-pool-name="default" >
- <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>
- </timer-service>
-
- <!-- EJB3 pools -->
- <pools>
- <bean-instance-pools>
- <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5"
- instance-acquisition-timeout-unit="MINUTES"/>
-
- <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5"
- instance-acquisition-timeout-unit="MINUTES"/>
- </bean-instance-pools>
- </pools>
-
- <!-- Default MDB configurations -->
- <mdb>
- <resource-adapter-ref resource-adapter-name="hornetq-ra"/>
- <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
- </mdb>
-
- <!-- Session bean configurations -->
+ <subsystem xmlns="urn:jboss:domain:ee:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:ejb3:1.2">
<session-bean>
<stateless>
<bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
@@ -205,12 +116,26 @@
<stateful default-access-timeout="5000"/>
<singleton default-access-timeout="5000"/>
</session-bean>
-
+ <mdb>
+ <resource-adapter-ref resource-adapter-name="hornetq-ra"/>
+ <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
+ </mdb>
+ <pools>
+ <bean-instance-pools>
+ <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
+ <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
+ </bean-instance-pools>
+ </pools>
+ <async thread-pool-name="default"/>
+ <timer-service thread-pool-name="default">
+ <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>
+ </timer-service>
+ <remote connector-ref="remoting-connector" thread-pool-name="default"/>
<thread-pools>
- <thread-pool name="default" max-threads="10" keepalive-time="100" />
+ <thread-pool name="default" max-threads="10" keepalive-time="100"/>
</thread-pools>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:infinispan:1.0" default-cache-container="hibernate">
+ <subsystem xmlns="urn:jboss:domain:infinispan:1.1" default-cache-container="hibernate">
<cache-container name="hibernate" default-cache="local-query">
<local-cache name="entity">
<eviction strategy="LRU" max-entries="10000"/>
@@ -231,12 +156,8 @@
</local-cache>
</cache-container>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:jacorb:1.1"/>
- <subsystem xmlns="urn:jboss:domain:jaxr:1.0">
- <datasource jndi-name="java:jboss/datasources/ExampleDS"/>
- </subsystem>
<subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
- <subsystem xmlns="urn:jboss:domain:jca:1.0">
+ <subsystem xmlns="urn:jboss:domain:jca:1.1">
<archive-validation enabled="false"/>
<bean-validation enabled="false"/>
<default-workmanager>
@@ -255,103 +176,16 @@
</default-workmanager>
</subsystem>
<subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
- <subsystem xmlns="urn:jboss:domain:jmx:1.1" show-model="true">
- <jmx-connector registry-binding="jmx-connector-registry" server-binding="jmx-connector-server" />
- </subsystem>
+ <subsystem xmlns="urn:jboss:domain:jmx:1.1" show-model="true"/>
<subsystem xmlns="urn:jboss:domain:jpa:1.0">
<jpa default-datasource=""/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:mail:1.0">
<mail-session jndi-name="java:jboss/mail/Default">
- <smtp-server address="localhost" port="25"/>
+ <smtp-server outbound-socket-binding-ref="mail-smtp"/>
</mail-session>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:messaging:1.1">
- <hornetq-server>
- <!-- Default journal file size is 10Mb, reduced here to 100k for faster first boot -->
- <journal-file-size>102400</journal-file-size>
- <journal-min-files>2</journal-min-files>
- <!-- disable messaging persistence -->
- <persistence-enabled>false</persistence-enabled>
-
- <connectors>
- <netty-connector name="netty" socket-binding="messaging-client"/>
- <netty-connector name="netty-throughput" socket-binding="messaging-throughput-client">
- <param key="batch-delay" value="50"/>
- </netty-connector>
- <in-vm-connector name="in-vm" server-id="0"/>
- </connectors>
-
- <acceptors>
- <netty-acceptor name="netty" socket-binding="messaging"/>
- <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">
- <param key="batch-delay" value="50"/>
- <param key="direct-deliver" value="false"/>
- </netty-acceptor>
- <in-vm-acceptor name="in-vm" server-id="0"/>
- </acceptors>
-
- <security-settings>
- <security-setting match="#">
- <permission type="createNonDurableQueue" roles="guest"/>
- <permission type="deleteNonDurableQueue" roles="guest"/>
- <permission type="consume" roles="guest"/>
- <permission type="send" roles="guest"/>
- </security-setting>
- </security-settings>
-
- <address-settings>
- <!--default for catch all-->
- <address-setting match="#">
- <dead-letter-address>jms.queue.DLQ</dead-letter-address>
- <expiry-address>jms.queue.ExpiryQueue</expiry-address>
- <redelivery-delay>0</redelivery-delay>
- <max-size-bytes>10485760</max-size-bytes>
- <message-counter-history-day-limit>10</message-counter-history-day-limit>
- <address-full-policy>BLOCK</address-full-policy>
- </address-setting>
- </address-settings>
-
- <!--JMS Stuff-->
- <jms-connection-factories>
- <connection-factory name="InVmConnectionFactory">
- <connectors>
- <connector-ref connector-name="in-vm"/>
- </connectors>
- <entries>
- <entry name="java:/ConnectionFactory"/>
- </entries>
- </connection-factory>
- <connection-factory name="RemoteConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="RemoteConnectionFactory"/>
- </entries>
- </connection-factory>
- <pooled-connection-factory name="hornetq-ra">
- <transaction mode="xa"/>
- <connectors>
- <connector-ref connector-name="in-vm"/>
- </connectors>
- <entries>
- <entry name="java:/JmsXA"/>
- </entries>
- </pooled-connection-factory>
- </jms-connection-factories>
-
- <jms-destinations>
- <jms-queue name="testQueue">
- <entry name="queue/test"/>
- </jms-queue>
- <jms-topic name="testTopic">
- <entry name="topic/test"/>
- </jms-topic>
- </jms-destinations>
- </hornetq-server>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:naming:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:naming:1.1"/>
<subsystem xmlns="urn:jboss:domain:osgi:1.1" activation="lazy">
<configuration pid="org.apache.felix.webconsole.internal.servlet.OsgiManager">
<property name="manager.root" value="jboss-osgi"/>
@@ -390,30 +224,13 @@
<capability name="org.jboss.osgi.xerces" startlevel="3"/>
</capabilities>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:pojo:1.0" />
- <subsystem xmlns="urn:jboss:domain:remoting:1.0">
+ <subsystem xmlns="urn:jboss:domain:pojo:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:remoting:1.1">
<connector name="remoting-connector" socket-binding="remoting"/>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
- <resource-adapters>
- <resource-adapter>
- <archive>teiid-connector-file.rar</archive>
- <transaction-support>NoTransaction</transaction-support>
- <connection-definitions>
- <connection-definition class-name="org.teiid.resource.adapter.file.FileManagedConnectionFactory"
- jndi-name="java:/fileDS"
- enabled="true"
- use-java-context="true"
- pool-name="teiid-file-ds">
- <config-property name="ParentDirectory">/home/rareddy/testing/</config-property>
- <config-property name="AllowParentPaths">true</config-property>
- </connection-definition>
- </connection-definitions>
- </resource-adapter>
- </resource-adapters>
- </subsystem>
+ <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"/>
<subsystem xmlns="urn:jboss:domain:sar:1.0"/>
- <subsystem xmlns="urn:jboss:domain:security:1.0">
+ <subsystem xmlns="urn:jboss:domain:security:1.1">
<security-domains>
<security-domain name="other" cache-type="default">
<authentication>
@@ -490,43 +307,42 @@
</queueless-thread-pool>
</subsystem>
<subsystem xmlns="urn:jboss:domain:transactions:1.1">
- <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
<core-environment>
<process-id>
<uuid/>
</process-id>
</core-environment>
+ <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
<coordinator-environment default-timeout="300"/>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">
- <connector name="http" scheme="http" protocol="HTTP/1.1" socket-binding="http"/>
+ <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host">
+ <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<virtual-server name="default-host" enable-welcome-root="true">
<alias name="localhost"/>
<alias name="example.com"/>
</virtual-server>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:webservices:1.0">
+ <subsystem xmlns="urn:jboss:domain:webservices:1.0" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:jaxwsconfig="urn:jboss:jbossws-jaxws-config:4.0">
<modify-wsdl-address>true</modify-wsdl-address>
<wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
<!--
<wsdl-port>8080</wsdl-port>
<wsdl-secure-port>8443</wsdl-secure-port>
-->
- <endpoint-config xmlns:ws="urn:jboss:jbossws-jaxws-config:4.0">
- <ws:config-name>Standard-Endpoint-Config</ws:config-name>
+ <endpoint-config>
+ <jaxwsconfig:config-name>Standard-Endpoint-Config</jaxwsconfig:config-name>
</endpoint-config>
- <endpoint-config xmlns:ws="urn:jboss:jbossws-jaxws-config:4.0">
- <ws:config-name>Recording-Endpoint-Config</ws:config-name>
- <ws:pre-handler-chains>
- <handler-chain xmlns="http://java.sun.com/xml/ns/javaee">
- <protocol-bindings>##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM
- </protocol-bindings>
- <handler>
- <handler-name>RecordingHandler</handler-name>
- <handler-class>org.jboss.ws.common.invocation.RecordingServerHandler</handler-class>
- </handler>
- </handler-chain>
- </ws:pre-handler-chains>
+ <endpoint-config>
+ <jaxwsconfig:config-name>Recording-Endpoint-Config</jaxwsconfig:config-name>
+ <jaxwsconfig:pre-handler-chains>
+ <javaee:handler-chain xmlns="http://java.sun.com/xml/ns/javaee">
+ <javaee:protocol-bindings>##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM</javaee:protocol-bindings>
+ <javaee:handler>
+ <javaee:handler-name>RecordingHandler</javaee:handler-name>
+ <javaee:handler-class>org.jboss.ws.common.invocation.RecordingServerHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </jaxwsconfig:pre-handler-chains>
</endpoint-config>
</subsystem>
<subsystem xmlns="urn:jboss:domain:weld:1.0"/>
@@ -537,7 +353,7 @@
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
<interface name="public">
- <inet-address value="${jboss.bind.address:127.0.0.1}"/>
+ <inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
</interfaces>
@@ -557,13 +373,10 @@
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<socket-binding name="teiid-jdbc" port="31000"/>
- <socket-binding name="teiid-odbc" port="35432"/>
- <outbound-socket-binding name="messaging-client">
- <local-destination socket-binding-ref="messaging"/>
+ <socket-binding name="teiid-odbc" port="35432"/>
+ <outbound-socket-binding name="mail-smtp">
+ <remote-destination host="localhost" port="25"/>
</outbound-socket-binding>
- <outbound-socket-binding name="messaging-throughput-client">
- <local-destination socket-binding-ref="messaging-throughput"/>
- </outbound-socket-binding>
</socket-binding-group>
</server>
Modified: trunk/client/pom.xml
===================================================================
--- trunk/client/pom.xml 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/client/pom.xml 2011-12-01 18:19:11 UTC (rev 3714)
@@ -20,5 +20,10 @@
<artifactId>teiid-common-core</artifactId>
<type>test-jar</type>
</dependency>
+ <dependency>
+ <groupId>org.jboss.modules</groupId>
+ <artifactId>jboss-modules</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: trunk/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java
===================================================================
--- trunk/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java 2011-12-01 18:19:11 UTC (rev 3714)
@@ -26,6 +26,9 @@
import java.util.Arrays;
import java.util.Properties;
+import org.jboss.modules.Module;
+import org.jboss.modules.ModuleIdentifier;
+import org.jboss.modules.ModuleLoadException;
import org.teiid.core.TeiidException;
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.util.PropertiesUtils;
@@ -62,9 +65,19 @@
}
}
- protected ServerConnection createServerConnection(Properties info)
- throws TeiidException {
- return (ServerConnection)ReflectionHelper.create("org.teiid.transport.LocalServerConnection", Arrays.asList(info, PropertiesUtils.getBooleanProperty(info, USE_CALLING_THREAD, true)), Thread.currentThread().getContextClassLoader()); //$NON-NLS-1$
+ protected ServerConnection createServerConnection(Properties info) throws TeiidException {
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ try {
+ final Module module = Module.getCallerModuleLoader().loadModule(ModuleIdentifier.create("org.jboss.teiid")); //$NON-NLS-1$
+ Thread.currentThread().setContextClassLoader(module.getClassLoader());
+ } catch (ModuleLoadException e) {
+ Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
+ }
+ return (ServerConnection)ReflectionHelper.create("org.teiid.transport.LocalServerConnection", Arrays.asList(info, PropertiesUtils.getBooleanProperty(info, USE_CALLING_THREAD, true)), Thread.currentThread().getContextClassLoader()); //$NON-NLS-1$
+ } finally {
+ Thread.currentThread().setContextClassLoader(tccl);
+ }
}
}
Property changes on: trunk/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java:3149-3217,3535-3555
/branches/7.6.x/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java:3673-3711
/trunk/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java:3188-3450,3452-3666
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java:3149-3217,3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java:3188-3450,3452-3666
Modified: trunk/connectors/translator-hive/pom.xml
===================================================================
--- trunk/connectors/translator-hive/pom.xml 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/connectors/translator-hive/pom.xml 2011-12-01 18:19:11 UTC (rev 3714)
@@ -25,13 +25,13 @@
<dependency>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>translator-jdbc</artifactId>
- <version>${version}</version>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>translator-jdbc</artifactId>
- <version>${version}</version>
+ <version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
Modified: trunk/jboss-integration/pom.xml
===================================================================
--- trunk/jboss-integration/pom.xml 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/jboss-integration/pom.xml 2011-12-01 18:19:11 UTC (rev 3714)
@@ -37,6 +37,7 @@
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-admin</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
@@ -62,22 +63,34 @@
<artifactId>jta</artifactId>
<scope>provided</scope>
</dependency>
-
+
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-security</artifactId>
- <scope>provided</scope>
+ <scope>provided</scope>
</dependency>
<!-- This dependency is to read the ra.xml file details -->
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-connector</artifactId>
- <scope>provided</scope>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-server</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.picketbox</groupId>
+ <artifactId>jbosssx-client</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.as</groupId>
<artifactId>jboss-as-security</artifactId>
<scope>provided</scope>
</dependency>
@@ -108,12 +121,6 @@
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- <scope>test</scope>
- </dependency>
-
</dependencies>
</project>
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/BaseOperationHandler.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/BaseOperationHandler.java 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/BaseOperationHandler.java 2011-12-01 18:19:11 UTC (rev 3714)
@@ -24,6 +24,7 @@
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIPTION;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OPERATION_NAME;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP_ADDR;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REPLY_PROPERTIES;
import java.util.Locale;
import java.util.ResourceBundle;
@@ -38,6 +39,7 @@
public abstract class BaseOperationHandler<T> implements DescriptionProvider, OperationStepHandler {
private static final String DESCRIBE = ".describe"; //$NON-NLS-1$
+ private static final String REPLY = ".reply"; //$NON-NLS-1$
protected static final String MISSING = ".missing"; //$NON-NLS-1$
private String operationName;
@@ -86,14 +88,14 @@
final ModelNode operation = new ModelNode();
operation.get(OPERATION_NAME).set(this.operationName);
operation.get(DESCRIPTION).set(bundle.getString(name()+DESCRIBE));
+
+ ModelNode reply = operation.get(REPLY_PROPERTIES);
+ reply.get(DESCRIPTION).set(bundle.getString(name()+REPLY));
+
describeParameters(operation, bundle);
return operation;
}
-// protected String getReplyName() {
-// return name()+".reply"+DESCRIBE; //$NON-NLS-1$
-// }
-
protected String getParameterDescription(ResourceBundle bundle, String paramName) {
return bundle.getString(name()+"."+paramName+DESCRIBE); //$NON-NLS-1$
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/BufferManagerService.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/BufferManagerService.java 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/BufferManagerService.java 2011-12-01 18:19:11 UTC (rev 3714)
@@ -33,25 +33,24 @@
class BufferManagerService implements Service<BufferService>, BufferService {
- private BufferServiceImpl bufferMgr;
- private ObjectReplicator replicator;
+ private BufferServiceImpl bufferService;
public final InjectedValue<String> pathInjector = new InjectedValue<String>();
+ public final InjectedValue<ObjectReplicator> replicatorInjector = new InjectedValue<ObjectReplicator>();
private BufferManager manager;
- public BufferManagerService(BufferServiceImpl buffer, ObjectReplicator replicator) {
- this.bufferMgr = buffer;
- this.replicator = replicator;
+ public BufferManagerService(BufferServiceImpl buffer) {
+ this.bufferService = buffer;
}
@Override
public void start(StartContext context) throws StartException {
- bufferMgr.setDiskDirectory(pathInjector.getValue());
- bufferMgr.start();
- manager = bufferMgr.getBufferManager();
- if (replicator != null) {
+ bufferService.setDiskDirectory(pathInjector.getValue());
+ bufferService.start();
+ manager = bufferService.getBufferManager();
+ if (replicatorInjector.getValue() != null) {
try {
//use a mux name that will not conflict with any vdb
- manager = this.replicator.replicate("$BM$", BufferManager.class, this.manager, 0); //$NON-NLS-1$
+ manager = this.replicatorInjector.getValue().replicate("$BM$", BufferManager.class, this.manager, 0); //$NON-NLS-1$
} catch (Exception e) {
throw new StartException(e);
}
@@ -60,9 +59,9 @@
@Override
public void stop(StopContext context) {
- bufferMgr.stop();
- if (this.replicator != null) {
- this.replicator.stop(bufferMgr);
+ bufferService.stop();
+ if (this.replicatorInjector.getValue() != null) {
+ this.replicatorInjector.getValue().stop(bufferService);
}
}
@@ -73,7 +72,7 @@
@Override
public BufferService getValue() throws IllegalStateException,IllegalArgumentException {
- return this.bufferMgr;
+ return this.bufferService;
}
}
Added: trunk/jboss-integration/src/main/java/org/teiid/jboss/CacheService.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/CacheService.java (rev 0)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/CacheService.java 2011-12-01 18:19:11 UTC (rev 3714)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+package org.teiid.jboss;
+
+import org.jboss.msc.service.Service;
+import org.jboss.msc.service.StartContext;
+import org.jboss.msc.service.StartException;
+import org.jboss.msc.service.StopContext;
+import org.jboss.msc.value.InjectedValue;
+import org.teiid.dqp.internal.process.SessionAwareCache;
+import org.teiid.dqp.service.BufferService;
+
+class CacheService<T> implements Service<SessionAwareCache<T>> {
+ private SessionAwareCache<T> cache;
+ public final InjectedValue<BufferService> bufferMgrInjector = new InjectedValue<BufferService>();
+
+ public CacheService(SessionAwareCache<T> t){
+ this.cache = t;
+ }
+
+ @Override
+ public void start(StartContext context) throws StartException {
+ this.cache.setBufferManager(this.bufferMgrInjector.getValue().getBufferManager());
+ }
+
+ @Override
+ public void stop(StopContext context) {
+ }
+
+ @Override
+ public SessionAwareCache<T> getValue() throws IllegalStateException, IllegalArgumentException {
+ return this.cache;
+ }
+}
Property changes on: trunk/jboss-integration/src/main/java/org/teiid/jboss/CacheService.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/Element.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/Element.java 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/Element.java 2011-12-01 18:19:11 UTC (rev 3714)
@@ -196,7 +196,7 @@
node.get(type, name, TYPE).set(this.modelType);
node.get(type, name, DESCRIPTION).set(getDescription(bundle));
node.get(type, name, REQUIRED).set(this.required);
- node.get(type, name, MAX_OCCURS).set(1);
+ //node.get(type, name, MAX_OCCURS).set(1);
if (this.defaultValue != null) {
if (ModelType.INT == this.modelType) {
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java 2011-12-01 18:19:11 UTC (rev 3714)
@@ -22,7 +22,10 @@
package org.teiid.jboss;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.*;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIPTION;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OPERATION_NAME;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REQUEST_PROPERTIES;
import java.util.List;
import java.util.Locale;
@@ -49,19 +52,18 @@
import org.jboss.modules.ModuleIdentifier;
import org.jboss.modules.ModuleLoadException;
import org.jboss.msc.service.ServiceBuilder;
+import org.jboss.msc.service.ServiceBuilder.DependencyType;
import org.jboss.msc.service.ServiceContainer;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.ServiceName;
import org.jboss.msc.service.ServiceTarget;
import org.jboss.msc.service.ValueService;
-import org.jboss.msc.service.ServiceBuilder.DependencyType;
import org.jboss.msc.value.InjectedValue;
import org.teiid.PolicyDecider;
import org.teiid.cache.CacheConfiguration;
-import org.teiid.cache.DefaultCacheFactory;
import org.teiid.cache.CacheConfiguration.Policy;
+import org.teiid.cache.DefaultCacheFactory;
import org.teiid.cache.jboss.ClusterableCacheFactory;
-import org.teiid.common.buffer.BufferManager;
import org.teiid.deployers.SystemVDBDeployer;
import org.teiid.deployers.VDBRepository;
import org.teiid.deployers.VDBStatusChecker;
@@ -164,7 +166,12 @@
final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> newControllers) throws OperationFailedException {
ClassLoader classloader = Thread.currentThread().getContextClassLoader();
try {
- Thread.currentThread().setContextClassLoader(Module.getCallerModule().getClassLoader());
+ try {
+ classloader = Module.getCallerModule().getClassLoader();
+ } catch(Throwable t) {
+ //ignore..
+ }
+ Thread.currentThread().setContextClassLoader(classloader);
initilaizeTeiidEngine(context, operation, newControllers);
} finally {
Thread.currentThread().setContextClassLoader(classloader);
@@ -198,7 +205,7 @@
else {
systemFunctionManager.setAllowEnvFunction(false);
}
- systemFunctionManager.setClassloader(Module.getCallerModule().getClassLoader());
+ systemFunctionManager.setClassloader(Thread.currentThread().getContextClassLoader());
// VDB repository
final VDBRepository vdbRepository = new VDBRepository();
@@ -232,7 +239,6 @@
newControllers.add(objectSerializerService.install());
// Object Replicator
- JGroupsObjectReplicatorService replicatorService = null;
if (Element.OR_STACK_ATTRIBUTE.isDefined(operation)) {
String stack = Element.OR_STACK_ATTRIBUTE.asString(operation);
@@ -241,7 +247,7 @@
clusterName = Element.OR_CLUSTER_NAME_ATTRIBUTE.asString(operation);
}
- replicatorService = new JGroupsObjectReplicatorService(clusterName);
+ JGroupsObjectReplicatorService replicatorService = new JGroupsObjectReplicatorService(clusterName);
ServiceBuilder<JGroupsObjectReplicator> serviceBuilder = target.addService(TeiidServiceNames.OBJECT_REPLICATOR, replicatorService);
serviceBuilder.addDependency(ServiceName.JBOSS.append("jgroups", "stack", stack), ChannelFactory.class, replicatorService.channelFactoryInjector); //$NON-NLS-1$ //$NON-NLS-2$
newControllers.add(serviceBuilder.install());
@@ -249,10 +255,10 @@
// TODO: remove verbose service by moving the buffer service from runtime project
newControllers.add(RelativePathService.addService(TeiidServiceNames.BUFFER_DIR, "teiid-buffer", "jboss.server.temp.dir", target)); //$NON-NLS-1$ //$NON-NLS-2$
- BufferManagerService bufferService = new BufferManagerService(buildBufferManager(operation), replicatorService.getValue());
+ BufferManagerService bufferService = new BufferManagerService(buildBufferManager(operation));
ServiceBuilder<BufferService> bufferServiceBuilder = target.addService(TeiidServiceNames.BUFFER_MGR, bufferService);
bufferServiceBuilder.addDependency(TeiidServiceNames.BUFFER_DIR, String.class, bufferService.pathInjector);
- bufferServiceBuilder.addDependency(TeiidServiceNames.BUFFER_DIR, String.class, bufferService.pathInjector);
+ bufferServiceBuilder.addDependency(DependencyType.OPTIONAL, TeiidServiceNames.OBJECT_REPLICATOR, ObjectReplicator.class, bufferService.replicatorInjector);
newControllers.add(bufferServiceBuilder.install());
PolicyDecider policyDecider;
@@ -287,24 +293,18 @@
newControllers.add(target.addService(TeiidServiceNames.AUTHORIZATION_VALIDATOR, authValidatorService).install());
// resultset cache
- final SessionAwareCache<CachedResults> resultsetCache = buildResultsetCache(operation, bufferService.getValue().getBufferManager());
- ValueService<SessionAwareCache<CachedResults>> resultSetService = new ValueService<SessionAwareCache<CachedResults>>(new org.jboss.msc.value.Value<SessionAwareCache<CachedResults>>() {
- @Override
- public SessionAwareCache<CachedResults> getValue() throws IllegalStateException, IllegalArgumentException {
- return resultsetCache;
- }
- });
- newControllers.add(target.addService(TeiidServiceNames.CACHE_RESULTSET, resultSetService).install());
+ final SessionAwareCache<CachedResults> resultsetCache = buildResultsetCache(operation);
+ CacheService<CachedResults> resultSetService = new CacheService<CachedResults>(resultsetCache);
+ ServiceBuilder<SessionAwareCache<CachedResults>> resultsCacheBuilder = target.addService(TeiidServiceNames.CACHE_RESULTSET, resultSetService);
+ resultsCacheBuilder.addDependency(TeiidServiceNames.BUFFER_MGR, BufferService.class, resultSetService.bufferMgrInjector);
+ newControllers.add(resultsCacheBuilder.install());
// prepared-plan cache
- final SessionAwareCache<PreparedPlan> preparedPlanCache = buildPreparedPlanCache(operation, bufferService.getValue().getBufferManager());
- ValueService<SessionAwareCache<PreparedPlan>> preparedPlanService = new ValueService<SessionAwareCache<PreparedPlan>>(new org.jboss.msc.value.Value<SessionAwareCache<PreparedPlan>>() {
- @Override
- public SessionAwareCache<PreparedPlan> getValue() throws IllegalStateException, IllegalArgumentException {
- return preparedPlanCache;
- }
- });
- newControllers.add(target.addService(TeiidServiceNames.CACHE_PREPAREDPLAN, preparedPlanService).install());
+ final SessionAwareCache<PreparedPlan> preparedPlanCache = buildPreparedPlanCache(operation);
+ CacheService<PreparedPlan> preparedPlanService = new CacheService<PreparedPlan>(preparedPlanCache);
+ ServiceBuilder<SessionAwareCache<PreparedPlan>> preparedPlanCacheBuilder = target.addService(TeiidServiceNames.CACHE_PREPAREDPLAN, preparedPlanService);
+ preparedPlanCacheBuilder.addDependency(TeiidServiceNames.BUFFER_MGR, BufferService.class, preparedPlanService.bufferMgrInjector);
+ newControllers.add(preparedPlanCacheBuilder.install());
// Query Engine
final RuntimeEngineDeployer engine = buildQueryEngine(operation);
@@ -413,7 +413,7 @@
return bufferManger;
}
- private SessionAwareCache<CachedResults> buildResultsetCache(ModelNode node, BufferManager bufferManager) {
+ private SessionAwareCache<CachedResults> buildResultsetCache(ModelNode node) {
CacheConfiguration cacheConfig = new CacheConfiguration();
cacheConfig.setMaxEntries(1024);
@@ -436,7 +436,6 @@
}
else {
SessionAwareCache<CachedResults> resultsetCache = new SessionAwareCache<CachedResults>(new DefaultCacheFactory(), SessionAwareCache.Type.RESULTSET, cacheConfig);
- resultsetCache.setBufferManager(bufferManager);
return resultsetCache;
}
@@ -452,12 +451,11 @@
}
SessionAwareCache<CachedResults> resultsetCache = new SessionAwareCache<CachedResults>(cacheFactory, SessionAwareCache.Type.RESULTSET, cacheConfig);
- resultsetCache.setBufferManager(bufferManager);
return resultsetCache;
}
- private SessionAwareCache<PreparedPlan> buildPreparedPlanCache(ModelNode node, BufferManager bufferManager) {
+ private SessionAwareCache<PreparedPlan> buildPreparedPlanCache(ModelNode node) {
CacheConfiguration cacheConfig = new CacheConfiguration();
if (Element.PPC_MAX_ENTRIES_ATTRIBUTE.isDefined(node)) {
cacheConfig.setMaxEntries(Element.PPC_MAX_ENTRIES_ATTRIBUTE.asInt(node));
@@ -477,7 +475,6 @@
cacheConfig.setLocation("prepared"); //$NON-NLS-1$
SessionAwareCache<PreparedPlan> cache = new SessionAwareCache<PreparedPlan>(new DefaultCacheFactory(), SessionAwareCache.Type.PREPAREDPLAN, cacheConfig);
- cache.setBufferManager(bufferManager);
return cache;
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java 2011-12-01 18:19:11 UTC (rev 3714)
@@ -23,11 +23,10 @@
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ATTRIBUTES;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.CHILDREN;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIBE;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIPTION;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.HEAD_COMMENT_ALLOWED;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REMOVE;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.TAIL_COMMENT_ALLOWED;
import java.util.Locale;
import java.util.ResourceBundle;
@@ -37,6 +36,7 @@
import org.jboss.as.controller.PathElement;
import org.jboss.as.controller.SubsystemRegistration;
import org.jboss.as.controller.descriptions.DescriptionProvider;
+import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
import org.jboss.as.controller.parsing.ExtensionParsingContext;
import org.jboss.as.controller.registry.AttributeAccess.Storage;
import org.jboss.as.controller.registry.ManagementResourceRegistration;
@@ -67,7 +67,19 @@
// Main Teiid system, with children query engine and translators.
- final ManagementResourceRegistration teiidSubsystem = registration.registerSubsystemModel(TEIID_DESCRIBE);
+ final ManagementResourceRegistration teiidSubsystem = registration.registerSubsystemModel(new DescriptionProvider() {
+ @Override
+ public ModelNode getModelDescription(Locale locale) {
+ final ResourceBundle bundle = IntegrationPlugin.getResourceBundle(locale);
+ ModelNode node = new ModelNode();
+ node.get(ModelDescriptionConstants.DESCRIPTION).set("teiid subsystem"); //$NON-NLS-1$
+
+ TeiidAdd.describeTeiid(node, ATTRIBUTES, bundle);
+ node.get(CHILDREN, Element.TRANSPORT_ELEMENT.getLocalName(), DESCRIPTION).set(Element.TRANSPORT_ELEMENT.getDescription(bundle));
+ node.get(CHILDREN, Element.TRANSLATOR_ELEMENT.getLocalName(), DESCRIPTION).set(Element.TRANSLATOR_ELEMENT.getDescription(bundle));
+ return node;
+ }
+ });
teiidSubsystem.registerOperationHandler(ADD, TEIID_BOOT_ADD, TEIID_BOOT_ADD, false);
teiidSubsystem.registerOperationHandler(DESCRIBE, TEIID_DESCRIBE, TEIID_DESCRIBE, false);
@@ -79,8 +91,6 @@
final ModelNode node = new ModelNode();
node.get(DESCRIPTION).set(Element.TRANSLATOR_ELEMENT.getDescription(bundle));
- node.get(HEAD_COMMENT_ALLOWED).set(true);
- node.get(TAIL_COMMENT_ALLOWED).set(true);
Element.TRANSLATOR_MODULE_ATTRIBUTE.describe(node, ATTRIBUTES, bundle);
return node;
}
@@ -97,11 +107,7 @@
final ModelNode node = new ModelNode();
node.get(DESCRIPTION).set(Element.TRANSPORT_ELEMENT.getDescription(bundle));
- node.get(HEAD_COMMENT_ALLOWED).set(true);
- node.get(TAIL_COMMENT_ALLOWED).set(true);
-
TransportAdd.transportDescribe(node, ATTRIBUTES, bundle);
-
return node;
}
});
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java 2011-12-01 18:19:11 UTC (rev 3714)
@@ -21,7 +21,15 @@
*/
package org.teiid.jboss;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.*;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ALLOWED;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DEFAULT;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIPTION;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.READ_ONLY;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REPLY_PROPERTIES;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REQUEST_PROPERTIES;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REQUIRED;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.TYPE;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.VALUE_TYPE;
import java.io.IOException;
import java.math.BigDecimal;
@@ -130,7 +138,8 @@
context.getResult().set(engine.getRuntimeVersion());
}
protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
- operationNode.get(REPLY_PROPERTIES).set(ModelType.STRING);
+ ModelNode reply = operationNode.get(REPLY_PROPERTIES);
+ reply.get(TYPE).set(ModelType.STRING);
}
}
@@ -145,13 +154,14 @@
for (Transport t: this.transports) {
count += t.getActiveSessionsCount();
}
- context.getResult().set(String.valueOf(count));
+ context.getResult().set(count);
} catch (AdminException e) {
throw new OperationFailedException(new ModelNode().set(e.getMessage()));
}
}
protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
- operationNode.get(REPLY_PROPERTIES).set(ModelType.INT);
+ ModelNode reply = operationNode.get(REPLY_PROPERTIES);
+ reply.get(TYPE).set(ModelType.INT);
}
}
@@ -171,7 +181,9 @@
}
protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
- operationNode.get(REPLY_PROPERTIES).add(VDBMetadataMapper.SessionMetadataMapper.INSTANCE.describe(new ModelNode()));
+ ModelNode reply = operationNode.get(REPLY_PROPERTIES);
+ reply.get(TYPE).set(ModelType.LIST);
+ VDBMetadataMapper.SessionMetadataMapper.INSTANCE.describe(reply.get(VALUE_TYPE));
}
}
@@ -196,7 +208,9 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.SESSION, REQUIRED).set(true);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.SESSION, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.SESSION));
- operationNode.get(REPLY_PROPERTIES).add(VDBMetadataMapper.RequestMetadataMapper.INSTANCE.describe(new ModelNode()));
+ ModelNode reply = operationNode.get(REPLY_PROPERTIES);
+ reply.get(TYPE).set(ModelType.LIST);
+ VDBMetadataMapper.RequestMetadataMapper.INSTANCE.describe(reply.get(VALUE_TYPE));
}
}
@@ -213,7 +227,9 @@
}
}
protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
- operationNode.get(REPLY_PROPERTIES).add(VDBMetadataMapper.RequestMetadataMapper.INSTANCE.describe(new ModelNode()));
+ ModelNode reply = operationNode.get(REPLY_PROPERTIES);
+ reply.get(TYPE).set(ModelType.LIST);
+ VDBMetadataMapper.RequestMetadataMapper.INSTANCE.describe(reply.get(VALUE_TYPE));
}
}
@@ -250,7 +266,9 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.VDB_VERSION, REQUIRED).set(true);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.VDB_VERSION, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.VDB_VERSION));
- operationNode.get(REPLY_PROPERTIES).add(VDBMetadataMapper.RequestMetadataMapper.INSTANCE.describe(new ModelNode()));
+ ModelNode reply = operationNode.get(REPLY_PROPERTIES);
+ reply.get(TYPE).set(ModelType.LIST);
+ VDBMetadataMapper.RequestMetadataMapper.INSTANCE.describe(reply.get(VALUE_TYPE));
}
}
@@ -267,7 +285,9 @@
}
}
protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
- operationNode.get(REPLY_PROPERTIES).add(VDBMetadataMapper.RequestMetadataMapper.INSTANCE.describe(new ModelNode()));
+ ModelNode reply = operationNode.get(REPLY_PROPERTIES);
+ reply.get(TYPE).set(ModelType.LIST);
+ VDBMetadataMapper.RequestMetadataMapper.INSTANCE.describe(reply.get(VALUE_TYPE));
}
}
@@ -289,6 +309,7 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.SESSION, TYPE).set(ModelType.STRING);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.SESSION, REQUIRED).set(true);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.SESSION, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.SESSION));
+ operationNode.get(REPLY_PROPERTIES).setEmptyObject();
}
}
@@ -307,6 +328,7 @@
}
boolean pass = engine.cancelRequest(operation.get(OperationsConstants.SESSION).asString(), operation.get(OperationsConstants.EXECUTION_ID).asLong());
ModelNode result = context.getResult();
+
result.set(pass);
} catch (TeiidComponentException e) {
throw new OperationFailedException(e, new ModelNode().set(e.getMessage()));
@@ -322,7 +344,7 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.EXECUTION_ID, REQUIRED).set(true);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.EXECUTION_ID, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.EXECUTION_ID));
- operationNode.get(REPLY_PROPERTIES).set(ModelType.BOOLEAN);
+ operationNode.get(REPLY_PROPERTIES).get(TYPE).set(ModelType.BOOLEAN);
}
}
@@ -368,11 +390,12 @@
}
protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
- ModelNode node = new ModelNode();
+ ModelNode reply = operationNode.get(REPLY_PROPERTIES);
+ reply.get(TYPE).set(ModelType.LIST);
+
+ ModelNode node = reply.get(VALUE_TYPE);
node.get(OperationsConstants.CACHE_TYPE, TYPE).set(ModelType.STRING);
- node.get(OperationsConstants.CACHE_TYPE, REQUIRED).set(true);
node.get(OperationsConstants.CACHE_TYPE, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.CACHE_TYPE));
- operationNode.get(REPLY_PROPERTIES).add(node);
}
}
@@ -413,7 +436,7 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.VDB_VERSION, TYPE).set(ModelType.INT);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.VDB_VERSION, REQUIRED).set(false);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.VDB_VERSION, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.VDB_VERSION));
-
+ operationNode.get(REPLY_PROPERTIES).setEmptyObject();
}
}
@@ -448,8 +471,9 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.CACHE_TYPE, REQUIRED).set(true);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.CACHE_TYPE, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.CACHE_TYPE));
- ModelNode node = new ModelNode();
- operationNode.get(REPLY_PROPERTIES).add(VDBMetadataMapper.CacheStatisticsMetadataMapper.INSTANCE.describe(node));
+ ModelNode reply = operationNode.get(REPLY_PROPERTIES);
+ reply.get(TYPE).set(ModelType.OBJECT);
+ VDBMetadataMapper.CacheStatisticsMetadataMapper.INSTANCE.describe(reply.get(VALUE_TYPE));
}
}
@@ -473,6 +497,7 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.DS_NAME, TYPE).set(ModelType.STRING);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.DS_NAME, REQUIRED).set(true);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.DS_NAME, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.DS_NAME));
+ operationNode.get(REPLY_PROPERTIES).setEmptyObject();
}
}
@@ -488,7 +513,9 @@
VDBMetadataMapper.WorkerPoolStatisticsMetadataMapper.INSTANCE.wrap(stats, result);
}
protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
- operationNode.get(REPLY_PROPERTIES).add(VDBMetadataMapper.WorkerPoolStatisticsMetadataMapper.INSTANCE.describe(new ModelNode()));
+ ModelNode reply = operationNode.get(REPLY_PROPERTIES);
+ reply.get(TYPE).set(ModelType.OBJECT);
+ VDBMetadataMapper.WorkerPoolStatisticsMetadataMapper.INSTANCE.describe(reply.get(VALUE_TYPE));
}
}
@@ -506,8 +533,9 @@
}
}
protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
- ModelNode node = new ModelNode();
- operationNode.get(REPLY_PROPERTIES).add(TransactionMetadataMapper.INSTANCE.describe(node));
+ ModelNode reply = operationNode.get(REPLY_PROPERTIES);
+ reply.get(TYPE).set(ModelType.LIST);
+ TransactionMetadataMapper.INSTANCE.describe(reply.get(VALUE_TYPE));
}
}
@@ -535,6 +563,7 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.XID, TYPE).set(ModelType.STRING);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.XID, REQUIRED).set(true);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.XID, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.XID));
+ operationNode.get(REPLY_PROPERTIES).setEmptyObject();
}
}
@@ -593,6 +622,7 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.TARGET_VDBVERSION, TYPE).set(ModelType.STRING);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.TARGET_VDBVERSION, REQUIRED).set(true);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.TARGET_VDBVERSION, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.TARGET_VDBVERSION));
+ operationNode.get(REPLY_PROPERTIES).setEmptyObject();
}
}
@@ -643,7 +673,8 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.TIMEOUT_IN_MILLI, REQUIRED).set(true);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.TIMEOUT_IN_MILLI, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.TIMEOUT_IN_MILLI));
- operationNode.get(REPLY_PROPERTIES).set(ModelType.LIST);
+ operationNode.get(REPLY_PROPERTIES).get(TYPE).set(ModelType.LIST);
+ operationNode.get(REPLY_PROPERTIES).get(VALUE_TYPE).set(ModelType.STRING);
}
public ModelNode executeQuery(final String vdbName, final int version, final String command, final long timoutInMilli, final ModelNode resultsNode) throws OperationFailedException {
@@ -812,7 +843,9 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.VDB_VERSION, REQUIRED).set(true);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.VDB_VERSION, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.VDB_VERSION));
- operationNode.get(REPLY_PROPERTIES).set(VDBMetadataMapper.INSTANCE.describe(new ModelNode()));
+ ModelNode reply = operationNode.get(REPLY_PROPERTIES);
+ reply.get(TYPE).set(ModelType.OBJECT);
+ VDBMetadataMapper.INSTANCE.describe(reply.get(VALUE_TYPE));
}
}
@@ -837,7 +870,9 @@
}
}
protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
- operationNode.get(REPLY_PROPERTIES).add(VDBMetadataMapper.INSTANCE.describe(new ModelNode()));
+ ModelNode reply = operationNode.get(REPLY_PROPERTIES);
+ reply.get(TYPE).set(ModelType.LIST);
+ VDBMetadataMapper.INSTANCE.describe(reply.get(VALUE_TYPE));
}
}
@@ -857,7 +892,9 @@
}
protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
- operationNode.get(REPLY_PROPERTIES).add(VDBMetadataMapper.VDBTranslatorMetaDataMapper.INSTANCE.describe(new ModelNode()));
+ ModelNode reply = operationNode.get(REPLY_PROPERTIES);
+ reply.get(TYPE).set(ModelType.LIST);
+ VDBMetadataMapper.VDBTranslatorMetaDataMapper.INSTANCE.describe(reply.get(VALUE_TYPE));
}
}
@@ -885,7 +922,9 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.TRANSLATOR_NAME, REQUIRED).set(true);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.TRANSLATOR_NAME, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.TRANSLATOR_NAME));
- operationNode.get(REPLY_PROPERTIES).set(VDBTranslatorMetaDataMapper.INSTANCE.describe(new ModelNode()));
+ ModelNode reply = operationNode.get(REPLY_PROPERTIES);
+ reply.get(TYPE).set(ModelType.OBJECT);
+ VDBTranslatorMetaDataMapper.INSTANCE.describe(reply.get(VALUE_TYPE));
}
}
@@ -981,6 +1020,7 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.MAPPED_ROLE, TYPE).set(ModelType.STRING);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.MAPPED_ROLE, REQUIRED).set(true);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.MAPPED_ROLE, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.MAPPED_ROLE));
+ operationNode.get(REPLY_PROPERTIES).setEmptyObject();
}
}
@@ -1028,6 +1068,7 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.MAPPED_ROLE, TYPE).set(ModelType.STRING);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.MAPPED_ROLE, REQUIRED).set(true);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.MAPPED_ROLE, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.MAPPED_ROLE));
+ operationNode.get(REPLY_PROPERTIES).setEmptyObject();
}
}
@@ -1066,6 +1107,7 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.DATA_ROLE, TYPE).set(ModelType.STRING);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.DATA_ROLE, REQUIRED).set(true);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.DATA_ROLE, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.DATA_ROLE));
+ operationNode.get(REPLY_PROPERTIES).setEmptyObject();
}
}
@@ -1105,6 +1147,7 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.DATA_ROLE, TYPE).set(ModelType.STRING);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.DATA_ROLE, REQUIRED).set(true);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.DATA_ROLE, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.DATA_ROLE));
+ operationNode.get(REPLY_PROPERTIES).setEmptyObject();
}
}
@@ -1136,6 +1179,7 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.CONNECTION_TYPE, TYPE).set(ModelType.STRING);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.CONNECTION_TYPE, REQUIRED).set(true);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.CONNECTION_TYPE, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.CONNECTION_TYPE));
+ operationNode.get(REPLY_PROPERTIES).setEmptyObject();
}
}
@@ -1211,7 +1255,7 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.DS_NAME, TYPE).set(ModelType.STRING);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.DS_NAME, REQUIRED).set(true);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.DS_NAME, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.DS_NAME));
-
+ operationNode.get(REPLY_PROPERTIES).setEmptyObject();
}
}
@@ -1301,6 +1345,11 @@
protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.RAR_NAME, TYPE).set(ModelType.STRING);
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.RAR_NAME, REQUIRED).set(true);
- operationNode.get(REQUEST_PROPERTIES, OperationsConstants.RAR_NAME, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.RAR_NAME));
+ operationNode.get(REQUEST_PROPERTIES, OperationsConstants.RAR_NAME, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.RAR_NAME));
+
+ ModelNode reply = operationNode.get(REPLY_PROPERTIES);
+ reply.get(TYPE).set(ModelType.LIST);
+ // this is incomplete
+ reply.get(VALUE_TYPE).set(ModelType.STRING);
}
}
\ No newline at end of file
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemDescribe.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemDescribe.java 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemDescribe.java 2011-12-01 18:19:11 UTC (rev 3714)
@@ -22,7 +22,14 @@
package org.teiid.jboss;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.*;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIBE;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OPERATION_NAME;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP_ADDR;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REPLY_PROPERTIES;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.TYPE;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.VALUE_TYPE;
import java.util.Locale;
import java.util.ResourceBundle;
@@ -35,8 +42,12 @@
import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
import org.jboss.as.controller.registry.Resource;
import org.jboss.dmr.ModelNode;
+import org.jboss.dmr.ModelType;
import org.jboss.dmr.Property;
+/**
+ * This is class that satisfies "describe" operation.
+ */
public class TeiidSubsystemDescribe implements OperationStepHandler, DescriptionProvider {
@Override
@@ -44,18 +55,10 @@
final ResourceBundle bundle = IntegrationPlugin.getResourceBundle(locale);
ModelNode node = new ModelNode();
- node.get(ModelDescriptionConstants.DESCRIPTION).set("teiid subsystem"); //$NON-NLS-1$
- node.get(ModelDescriptionConstants.HEAD_COMMENT_ALLOWED).set(true);
- node.get(ModelDescriptionConstants.TAIL_COMMENT_ALLOWED).set(true);
- node.get(ModelDescriptionConstants.NAMESPACE).set(Namespace.CURRENT.getUri());
-
- TeiidAdd.describeTeiid(node, ATTRIBUTES, bundle);
- node.get(CHILDREN, Element.TRANSPORT_ELEMENT.getLocalName(), DESCRIPTION).set(Element.TRANSPORT_ELEMENT.getDescription(bundle));
- node.get(CHILDREN, Element.TRANSPORT_ELEMENT.getLocalName(), REQUIRED).set(true);
-
- node.get(CHILDREN, Element.TRANSLATOR_ELEMENT.getLocalName(), DESCRIPTION).set(Element.TRANSLATOR_ELEMENT.getDescription(bundle));
- node.get(CHILDREN, Element.TRANSLATOR_ELEMENT.getLocalName(), REQUIRED).set(true);
-
+ node.get(OPERATION_NAME).set(DESCRIBE);
+ node.get(ModelDescriptionConstants.DESCRIPTION).set(bundle.getString("teiid_subsystem.describe")); //$NON-NLS-1$
+ node.get(REPLY_PROPERTIES).get(TYPE).set(ModelType.LIST);
+ TeiidAdd.describeTeiid(node.get(REPLY_PROPERTIES), VALUE_TYPE, bundle);
return node;
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java 2011-12-01 18:19:11 UTC (rev 3714)
@@ -42,6 +42,7 @@
import org.jboss.modules.Module;
import org.jboss.modules.ModuleIdentifier;
import org.jboss.modules.ModuleLoadException;
+import org.jboss.modules.ModuleLoader;
import org.jboss.msc.service.ServiceBuilder;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.ServiceTarget;
@@ -93,10 +94,11 @@
final Module module;
ClassLoader translatorLoader = this.getClass().getClassLoader();
- if (moduleName != null) {
+ ModuleLoader ml = Module.getCallerModuleLoader();
+ if (moduleName != null && ml != null) {
try {
- module = Module.getCallerModuleLoader().loadModule(ModuleIdentifier.create(moduleName));
- translatorLoader = module.getClassLoader();
+ module = ml.loadModule(ModuleIdentifier.create(moduleName));
+ translatorLoader = module.getClassLoader();
} catch (ModuleLoadException e) {
throw new OperationFailedException(e, new ModelNode().set(IntegrationPlugin.Util.getString("failed_load_module", moduleName, translatorName))); //$NON-NLS-1$
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java 2011-12-01 18:19:11 UTC (rev 3714)
@@ -65,7 +65,7 @@
import org.teiid.transport.SSLConfiguration;
import org.teiid.transport.SocketConfiguration;
-public class TransportAdd extends AbstractAddStepHandler implements DescriptionProvider {
+class TransportAdd extends AbstractAddStepHandler implements DescriptionProvider {
private static Element[] attributes = {
Element.TRANSPORT_PROTOCOL_ATTRIBUTE,
@@ -189,7 +189,7 @@
// add security domains
for (String domain:domainList) {
- LogManager.logInfo(LogConstants.CTX_SECURITY, IntegrationPlugin.Util.getString("security_enabled", domain)); //$NON-NLS-1$
+ LogManager.logInfo(LogConstants.CTX_SECURITY, IntegrationPlugin.Util.getString("security_enabled", domain, transportName)); //$NON-NLS-1$
transportBuilder.addDependency(ServiceName.JBOSS.append("security", "security-domain", domain), SecurityDomainContext.class, new ConcurrentMapInjector<String,SecurityDomainContext>(transport.securityDomains, domain)); //$NON-NLS-1$ //$NON-NLS-2$
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2011-12-01 18:19:11 UTC (rev 3714)
@@ -35,7 +35,6 @@
import javax.resource.spi.work.WorkManager;
import javax.transaction.TransactionManager;
-import org.jboss.modules.Module;
import org.jboss.msc.service.Service;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.ServiceName;
@@ -114,7 +113,7 @@
setBufferService(bufferServiceInjector.getValue());
- dqpCore.setTransactionService((TransactionService)LogManager.createLoggingProxy(LogConstants.CTX_TXN_LOG, transactionServerImpl, new Class[] {TransactionService.class}, MessageLevel.DETAIL, Module.getCallerModule().getClassLoader()));
+ dqpCore.setTransactionService((TransactionService)LogManager.createLoggingProxy(LogConstants.CTX_TXN_LOG, transactionServerImpl, new Class[] {TransactionService.class}, MessageLevel.DETAIL, Thread.currentThread().getContextClassLoader()));
if (getObjectReplicatorInjector().getValue() != null) {
try {
@@ -132,7 +131,7 @@
this.dqpCore.setResultsetCache(getResultSetCacheInjector().getValue());
this.dqpCore.setPreparedPlanCache(getPreparedPlanCacheInjector().getValue());
this.dqpCore.start(this);
- this.eventDistributorProxy = (EventDistributor)Proxy.newProxyInstance(Module.getCallerModule().getClassLoader(), new Class[] {EventDistributor.class}, new InvocationHandler() {
+ this.eventDistributorProxy = (EventDistributor)Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[] {EventDistributor.class}, new InvocationHandler() {
@Override
public Object invoke(Object proxy, Method method, Object[] args)
Modified: trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
===================================================================
--- trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2011-12-01 18:19:11 UTC (rev 3714)
@@ -58,7 +58,7 @@
translator.add=Add Translator
translator.remove=Remove Translator
protocol_not_found=protocol is not defined for the transport configuration.
-security_enabled=Security Enabled: {0}
+security_enabled=Security enabled for transport "{1}" with security-domain set to {0}
DQPCore.unable_to_process_event=Unable to process event.
translator.added = Teiid translator "{0}" added.
wrong_protocol=Wrong type of protocol supplied
@@ -204,19 +204,22 @@
model-name.missing=Parameter "model-name" is required
connection-type.missing = Parameter "connection-type" is required. Must be one of [NONE, BY_VERSION, ANY]
rar-name.missing=Parameter "rar-name" is is required.
+vdb-description.describe=vdb description
+teiid_subsystem.describe=describe the teiid subsystem
-
# Operation descriptions (alpha layout)
add-anyauthenticated-role.describe=Mark any authenticated to the datarole
add-anyauthenticated-role.vdb-name.describe=VDB Name
add-anyauthenticated-role.vdb-version.describe=VDB Version
add-anyauthenticated-role.data-role.describe=VDB Defined Data Role Name
+add-anyauthenticated-role.reply=void
add-data-role.describe= Map a JAAS based role to the VDB data role, for granting permission
add-data-role.vdb-name.describe=VDB Name
add-data-role.vdb-version.describe=VDB Version
add-data-role.data-role.describe=VDB Defined Data Role Name
add-data-role.mapped-role.describe=Security domain defined role name
+add-data-role.reply=void
assign-datasource.describe=Assign a data source or translator names to a given model in the VDB
assign-datasource.vdb-name.describe=VDB Name
@@ -225,91 +228,119 @@
assign-datasource.ds-name.describe=Data source name
assign-datasource.translator-name.describe=translator name
assign-datasource.model-name.describe=Model Name
+assign-datasource.reply=void
cache-statistics.describe=Get the cache statistics for the given cache type
cache-statistics.cache-type.describe=cache type (PREPARED_PLAN_CACHE, QUERY_SERVICE_RESULT_SET_CACHE)
+cache-statistics.reply=cache statistics
cache-types.describe=List the available cache types
+cache-types.cache-type.describe=Cache type
+cache-types.reply=list of cache types
cancel-request.describe=Cancel the execution of the actively running query
cancel-request.session.describe=The session Identifier of the user
cancel-request.execution-id.describe=The Execution Identifier of the query
-cancel-request.reply.describe=True if successful; false otherwise.
+cancel-request.reply=True if successful; false otherwise.
change-vdb-connection-type.describe=Change the default VDB version selection
change-vdb-connection-type.vdb-name.describe=VDB Name
change-vdb-connection-type.vdb-version.describe=VDB Version
change-vdb-connection-type.connection-type.describe=VDB Connection Type
+change-vdb-connection-type.reply=void
clear-cache.describe=Clear the caches in the system of the given type
clear-cache.cache-type.describe=cache type to be cleared. (PREPARED_PLAN_CACHE, QUERY_SERVICE_RESULT_SET_CACHE)
clear-cache.vdb-name.describe=VDB name
clear-cache.vdb-version.describe=VDB version
+clear-cache.reply=void
execute-query.describe=Execute a sql query
execute-query.vdb-name.describe=vdb name
execute-query.vdb-version.describe=vdb version
execute-query.sql-query.describe=sql query to execute
execute-query.timeout-in-milli.describe=timeout
+execute-query.reply=list of rows
active-session-count.describe=Number of active sessions
-active-session-count.reply.describe=Returns the count of active sessions
+active-session-count.reply=Returns the count of active sessions
long-running-queries.describe=Long running queries that exceeded the threshold set by the 'query-threshold-in-seconds' configuration property.
+long-running-queries.reply=long running queries
runtime-version.describe = Runtime version of the Teiid subsystem
-runtime-version.reply.describe=Teiid runtime version
+runtime-version.reply=Teiid runtime version
get-translator.describe=retrieve translator
get-translator.translator-name.describe=translator name
get-translator.reply.describe=Returns translator if found with given name
+get-translator.reply=translator
get-vdb.describe=Get the VDB with the given name and version
get-vdb.vdb-name.describe=name of the vdb
get-vdb.vdb-version.describe=vdb version
+get-vdb.reply=vdb
list-requests.describe=List of active requests
+list-requests.reply=list of requests
list-sessions.describe=List of all the current active sessions in the Teiid subsystem.
+list-sessions.reply=list of sessions
list-transactions.describe=Active Transactions in the Query Engine
+list-transactions.reply=list of transactions
list-translators.describe=List of translators registered in the teiid container
list-translators.reply.describe=List of translators registered in the teiid container
+list-translators.reply=list of translators
list-vdbs.describe=List the available virtual databases in the system
+list-vdbs.reply=list of vdbs
merge-vdbs.describe=Merge Two VDBs
merge-vdbs.source-vdb-name.describe=Source VDB name
merge-vdbs.source-vdb-version.describe=Source VDB version number
merge-vdbs.target-vdb-name.describe=Target VDB name
merge-vdbs.target-vdb-version.describe=Target VDB version number
+merge-vdbs.reply=void
remove-anyauthenticated-role.describe=remove any authenticated from the data role provided
remove-anyauthenticated-role.vdb-name.describe=VDB Name
remove-anyauthenticated-role.vdb-version.describe=VDB Version
remove-anyauthenticated-role.data-role.describe=VDB Defined Data Role Name
+remove-anyauthenticated-role.reply=void
remove-data-role.describe=remove the JAAS based role mapping from VDB data role
remove-data-role.vdb-name.describe=VDB Name
remove-data-role.vdb-version.describe=VDB Version
remove-data-role.data-role.describe=VDB Defined Data Role Name
remove-data-role.mapped-role.describe=Security domain defined role name
+remove-data-role.reply=void
requests-per-session.describe=Current active requests in progress in the query engine for a given session identifier
requests-per-session.session.describe=The session Identifier
+requests-per-session.reply=requests for given session
requests-per-vdb.describe=Current active requests in progress in the query engine for a given VDB name and its version.
requests-per-vdb.vdb-name.describe=VDB Name
requests-per-vdb.vdb-version.describe=VDB Version
+requests-per-vdb.reply=list of requests on the given vdb
terminate-session.describe=Terminate the session
terminate-session.session.describe=The session Identifier of session to be terminated
+terminate-session.reply=void
terminate-transaction.describe=Terminate the XA transaction
terminate-transaction.xid.describe=xid identifier of the XA transaction
+terminate-transaction.reply=void
workerpool-statistics.describe=Get thread statistics worker pool
+workerpool-statistics.reply=Returns the worker pool statistics
read-rar-description.describe=Describe the properties of the Resource Adapter
-read-rar-description.rar-name.describe=resource adapter name
\ No newline at end of file
+read-rar-description.rar-name.describe=resource adapter name
+read-rar-description.reply=returns all the attribute names and their properties
+
+mark-datasource-available.describe=Notify that the defined data source is now available
+mark-datasource-available.ds-name.describe=Data Source name
+mark-datasource-available.reply=void
\ No newline at end of file
Modified: trunk/jboss-integration/src/test/resources/teiid-model-config.txt
===================================================================
--- trunk/jboss-integration/src/test/resources/teiid-model-config.txt 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/jboss-integration/src/test/resources/teiid-model-config.txt 2011-12-01 18:19:11 UTC (rev 3714)
@@ -3,245 +3,209 @@
"type" => BOOLEAN,
"description" => "Allow the execution of ENV function. (default false)",
"required" => false,
- "max-occurs" => 1,
"default" => false
},
"async-thread-pool" => {
"type" => STRING,
"description" => "Thread Pool to be used with Asynchronous operations in Teiid",
- "required" => true,
- "max-occurs" => 1
+ "required" => true
},
"max-threads" => {
"type" => INT,
"description" => "Process pool maximum thread count. (default 64)",
"required" => false,
- "max-occurs" => 1,
"default" => 64
},
"max-active-plans" => {
"type" => INT,
"description" => "Max active plans (default 20). Increase this value on highly concurrent systems - but ensure that the underlying pools can handle the increased load without timeouts.",
"required" => false,
- "max-occurs" => 1,
"default" => 20
},
"thread-count-for-source-concurrency" => {
"type" => INT,
"description" => "Max source query concurrency per user request (default 0). 0 indicates use the default calculated value based on max active plans and max threads - approximately 2*(max threads)/(max active plans). ",
"required" => false,
- "max-occurs" => 1,
"default" => 0
},
"time-slice-in-millseconds" => {
"type" => INT,
"description" => "Query processor time slice, in milliseconds. (default 2000)",
"required" => false,
- "max-occurs" => 1,
"default" => 2000
},
"max-row-fetch-size" => {
"type" => INT,
"description" => "Maximum allowed fetch size, set via JDBC. User requested value ignored above this value. (default 20480)",
"required" => false,
- "max-occurs" => 1,
"default" => 20480
},
"lob-chunk-size-in-kb" => {
"type" => INT,
"description" => "The max lob chunk size in KB transferred each time when processing blobs, clobs (100KB default)",
"required" => false,
- "max-occurs" => 1,
"default" => 100
},
"query-threshold-in-seconds" => {
"type" => INT,
"description" => "Long running query threshold, after which a alert can be generated by tooling if configured",
"required" => false,
- "max-occurs" => 1,
"default" => 600
},
"max-source-rows-allowed" => {
"type" => INT,
"description" => "Maximum rows allowed from a source query. -1 indicates no limit. (default -1)",
"required" => false,
- "max-occurs" => 1,
"default" => -1
},
"exception-on-max-source-rows" => {
"type" => BOOLEAN,
"description" => "Indicates if an exception should be thrown if the specified value for Maximum Source Rows is exceeded; only up to the maximum rows will be consumed. (default true)",
"required" => false,
- "max-occurs" => 1,
"default" => true
},
"detect-change-events" => {
"type" => BOOLEAN,
"description" => "Set to true for the engine to detect local change events. Should be disabled if using external change data capture tools. (default true)",
"required" => false,
- "max-occurs" => 1,
"default" => true
},
"query-timeout" => {
"type" => LONG,
"description" => "Set the default query timeout for all queries in milliseconds. 0 indicates no timeout. Lesser timeout values may be set per VDB or by clients. (default 0)",
"required" => false,
- "max-occurs" => 1,
"default" => 0L
},
"workmanager" => {
"type" => STRING,
"description" => "WorkManager name to use in processing. (default name is \"default\")",
"required" => false,
- "max-occurs" => 1,
"default" => "default"
},
"authorization-validator-module" => {
"type" => STRING,
"description" => "Authorization Module; Implementation of org.teiid.dqp.internal.process.AuthorizationValidator class.",
- "required" => false,
- "max-occurs" => 1
+ "required" => false
},
"policy-decider-module" => {
"type" => STRING,
"description" => "Policy Module; Implementation of org.teiid.PolicyDecider class ",
- "required" => false,
- "max-occurs" => 1
+ "required" => false
},
"object-replicator-stack" => {
"type" => STRING,
"description" => "JGroups stack name for cache replication channel",
- "required" => false,
- "max-occurs" => 1
+ "required" => false
},
"object-replicator-cluster-name" => {
"type" => STRING,
"description" => "cache channel cluster name for cache replication",
- "required" => false,
- "max-occurs" => 1
+ "required" => false
},
"buffer-service-use-disk" => {
"type" => BOOLEAN,
"description" => "Use disk for buffer management",
"required" => false,
- "max-occurs" => 1,
"default" => true
},
"buffer-service-inline-lobs" => {
"type" => BOOLEAN,
"description" => "Set to true to allow inlining of memory based and small lobs into results. However inline lob values are not supported by pre-7.6 clients, so disable this property if using older clients utilizing lobs. (default true) ",
"required" => false,
- "max-occurs" => 1,
"default" => true
},
"buffer-service-processor-batch-size" => {
"type" => INT,
"description" => "The max row count of a batch sent internally within the query processor. Should be <= the 'connector-batch-size'. (default 256)",
"required" => false,
- "max-occurs" => 1,
"default" => 256
},
"buffer-service-connector-batch-size" => {
"type" => INT,
"description" => "The max row count of a batch from a connector. Should be even multiple of 'processor-batch-size'. (default 512)",
"required" => false,
- "max-occurs" => 1,
"default" => 512
},
"buffer-service-max-processing-kb" => {
"type" => INT,
"description" => "The approximate amount of buffer memory in kilobytes allowable for a single processing operation (sort, grouping, etc.) regardless of existing memory commitments. -1 means to automatically calculate a value (default -1)",
"required" => false,
- "max-occurs" => 1,
"default" => -1
},
"buffer-service-max-reserve-kb" => {
"type" => INT,
"description" => "The approximate amount of memory in kilobytes allowed to be held by the buffer manager. -1 means to automatically calculate a value (default -1)",
"required" => false,
- "max-occurs" => 1,
"default" => -1
},
"buffer-service-max-file-size" => {
"type" => LONG,
"description" => "Max File size in MB (default 2GB)",
"required" => false,
- "max-occurs" => 1,
"default" => 2048L
},
"buffer-service-max-buffer-space" => {
"type" => LONG,
"description" => "Max storage space, in MB, to be used for buffer files (default 50G)",
"required" => false,
- "max-occurs" => 1,
"default" => 51200L
},
"buffer-service-max-open-files" => {
"type" => INT,
"description" => "Max open buffer files (default 64)",
"required" => false,
- "max-occurs" => 1,
"default" => 64
},
"buffer-service-memory-buffer-space" => {
"type" => INT,
"description" => "Memory buffer space used by the buffer manager in MB. -1 determines the setting automatically from the max-reserve-kb (default -1). This value cannot be smaller than max-storage-object-size",
"required" => false,
- "max-occurs" => 1,
"default" => -1
},
"buffer-service-memory-buffer-off-heap" => {
"type" => BOOLEAN,
"description" => "Set to true to hold the memory buffer off-heap. If true you must ensure that the VM can allocate that much direct memory (default false).",
"required" => false,
- "max-occurs" => 1,
"default" => false
},
"buffer-service-max-storage-object-size" => {
"type" => INT,
"description" => "The maximum size of a buffer managed object (typically a table page or a results batch) in bytes (default 8388608 or 8MB). Setting this value too high will reduce the effectiveness of the memory buffer.",
"required" => false,
- "max-occurs" => 1,
"default" => 8388608
},
"preparedplan-cache-max-entries" => {
"type" => INT,
"description" => "Max Entries allowed",
"required" => false,
- "max-occurs" => 1,
"default" => 512
},
"preparedplan-cache-max-age-in-seconds" => {
"type" => INT,
"description" => "Max age in seconds",
"required" => false,
- "max-occurs" => 1,
"default" => 28800
},
"resultset-cache-name" => {
"type" => STRING,
"description" => "Infinispan cache name for resultset",
"required" => false,
- "max-occurs" => 1,
"default" => "resultset"
},
"resultset-cache-container-name" => {
"type" => STRING,
"description" => "Infinispan cache container name",
- "required" => false,
- "max-occurs" => 1
+ "required" => false
},
"resultset-cache-max-staleness" => {
"type" => INT,
"description" => "Max staleness in seconds. Modifications are based upon data updates -1 indicates no max. (default 60 - 1 minute)",
"required" => false,
- "max-occurs" => 1,
"default" => 60
},
"resultset-cache-enable" => {
"type" => BOOLEAN,
"description" => "Resultset cache enabled",
- "required" => false,
- "max-occurs" => 1
+ "required" => false
}
}}
\ No newline at end of file
Modified: trunk/jboss-integration/src/test/resources/teiid-transport-config.txt
===================================================================
--- trunk/jboss-integration/src/test/resources/teiid-transport-config.txt 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/jboss-integration/src/test/resources/teiid-transport-config.txt 2011-12-01 18:19:11 UTC (rev 3714)
@@ -3,131 +3,111 @@
"type" => STRING,
"description" => "Transport protocol (allowed=teiid, pg) ",
"required" => false,
- "max-occurs" => 1,
"default" => "teiid"
},
"socket-binding" => {
"type" => STRING,
"description" => "Socket binding to be used for the transport",
- "required" => true,
- "max-occurs" => 1
+ "required" => true
},
"max-socket-threads" => {
"type" => INT,
"description" => "Max number of threads dedicated to initial request processing. Zero indicates the system default of max available processors. (default 0) Setting this value above the max available processors is not recommended.",
"required" => false,
- "max-occurs" => 1,
"default" => 0
},
"input-buffer-size" => {
"type" => INT,
"description" => "SO_RCVBUF size, 0 indicates that system default should be used (default 0)",
"required" => false,
- "max-occurs" => 1,
"default" => 0
},
"output-buffer-size" => {
"type" => INT,
"description" => "SO_SNDBUF size, 0 indicates that system default should be used (default 0)",
"required" => false,
- "max-occurs" => 1,
"default" => 0
},
"authentication-security-domain" => {
"type" => STRING,
"description" => "Security domain to be enforced with the transport",
- "required" => false,
- "max-occurs" => 1
+ "required" => false
},
"authentication-max-sessions-allowed" => {
"type" => INT,
"description" => "Maximum number of sessions allowed by the system (default 5000)",
"required" => false,
- "max-occurs" => 1,
"default" => 5000
},
"authentication-sessions-expiration-timelimit" => {
"type" => INT,
"description" => "Max allowed time before the session is terminated by the system, 0 indicates unlimited (default 0)",
"required" => false,
- "max-occurs" => 1,
"default" => 0
},
"authentication-krb5-domain" => {
"type" => STRING,
"description" => "KRB5 security domain name, if GSS API based single-sign-on is being used. Note security-domain still needed to define the roles for users. ",
- "required" => false,
- "max-occurs" => 1
+ "required" => false
},
"pg-max-lob-size-in-bytes" => {
"type" => INT,
"description" => "Max LOB size in Postgres protocol, as streaming is not supported",
"required" => false,
- "max-occurs" => 1,
"default" => 5242880
},
"ssl-mode" => {
"type" => STRING,
"description" => "can be one of disabled, login, or enabled disabled = no transport or message level security will be used; login = only the login traffic will be encrypted at a message level using 128 bit AES with an ephemerial DH key exchange. No other config values are needed in this mode; enabled = traffic will be secured using this configuration,if the client supports SSL",
"required" => false,
- "max-occurs" => 1,
"default" => "login"
},
"ssl-authentication-mode" => {
"type" => STRING,
"description" => "Authentication Mode (1-way, 2-way, anonymous) ",
"required" => false,
- "max-occurs" => 1,
"default" => "anonymous"
},
"ssl-ssl-protocol" => {
"type" => STRING,
"description" => "SSL protocol used",
"required" => false,
- "max-occurs" => 1,
"default" => "SSLv3"
},
"ssl-keymanagement-algorithm" => {
"type" => STRING,
"description" => "Use key management algorithm",
- "required" => false,
- "max-occurs" => 1
+ "required" => false
},
"enabled-cipher-suites" => {
"type" => STRING,
"description" => "Cipher suites that are allowed to be used for SSL. Use to restrict encryption strength(128 bit, 256 bit). Only provide encryption suites that are supported by both client and server JVM. ex:SSL_RSA_WITH_RC4_128_MD5,SSL_RSA_WITH_RC4_128_SHA,SSL_RSA_WITH_3DES_EDE_CBC_SHA,SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA,SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_DSS_WITH_AES_128_CBC_SHA,TLS_KRB5_WITH_RC4_128_MD5,TLS_KRB5_WITH_RC4_128_SHA,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_KRB5_WITH_3DES_EDE_CBC_MD5,TLS_KRB5_WITH_3DES_EDE_CBC_SHA,TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_DSS_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA",
- "required" => false,
- "max-occurs" => 1
+ "required" => false
},
"keystore-name" => {
"type" => STRING,
"description" => "Keystore File Name",
- "required" => false,
- "max-occurs" => 1
+ "required" => false
},
"keystore-password" => {
"type" => STRING,
"description" => "Keystore password",
- "required" => false,
- "max-occurs" => 1
+ "required" => false
},
"keystore-type" => {
"type" => STRING,
"description" => "Keystore type",
"required" => false,
- "max-occurs" => 1,
"default" => "JKS"
},
"truststore-name" => {
"type" => STRING,
"description" => "Truststore Name",
- "required" => false,
- "max-occurs" => 1
+ "required" => false
},
"truststore-password" => {
"type" => STRING,
"description" => "Truststore Password",
- "required" => false,
- "max-occurs" => 1
+ "required" => false
}
}}
\ No newline at end of file
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/pom.xml 2011-12-01 18:19:11 UTC (rev 3714)
@@ -10,7 +10,17 @@
<properties>
<ant.version>1.7.0</ant.version>
<site.url>http://www.jboss.org/teiid</site.url>
- <jbossas-version>7.1.0.Alpha2-SNAPSHOT</jbossas-version>
+ <jbossas-version>7.1.0.Beta1</jbossas-version>
+ <version.org.jboss.jboss-common-core>2.2.17.GA</version.org.jboss.jboss-common-core>
+ <version.org.jboss.staxmapper>1.0.0.Final</version.org.jboss.staxmapper>
+ <version.org.jboss.jboss-dmr>1.0.0.Final</version.org.jboss.jboss-dmr>
+ <version.org.jboss.msc.jboss-msc>1.0.1.GA</version.org.jboss.msc.jboss-msc>
+ <version.org.jboss.modules.jboss-modules>1.1.0.CR3</version.org.jboss.modules.jboss-modules>
+ <version.org.jboss.jboss-vfs>3.1.0.CR1</version.org.jboss.jboss-vfs>
+ <version.org.picketbox>4.0.6.Beta1</version.org.picketbox>
+ <version.org.jboss.logging.jboss-logging>3.1.0.CR1</version.org.jboss.logging.jboss-logging>
+ <version.org.jboss.logging.jboss-logging-tools>1.0.0.CR4</version.org.jboss.logging.jboss-logging-tools>
+ <version.org.picketbox.jbosssx-client>3.0.0.CR2</version.org.picketbox.jbosssx-client>
</properties>
<scm>
<connection>scm:svn:https://anonsvn.jboss.org/repos/teiid/trunk</connection>
@@ -375,7 +385,7 @@
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-common-core</artifactId>
- <version>2.2.17.GA</version>
+ <version>${version.org.jboss.jboss-common-core}</version>
<exclusions>
<exclusion>
<groupId>org.jboss.logging</groupId>
@@ -396,29 +406,34 @@
<dependency>
<groupId>org.jboss</groupId>
<artifactId>staxmapper</artifactId>
- <version>1.0.0.Final</version>
+ <version>${version.org.jboss.staxmapper}</version>
</dependency>
+ <dependency>
+ <groupId>org.picketbox</groupId>
+ <artifactId>jbosssx-client</artifactId>
+ <version>${version.org.picketbox.jbosssx-client}</version>
+ </dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-dmr</artifactId>
- <version>1.0.0.Final</version>
+ <version>${version.org.jboss.jboss-dmr}</version>
</dependency>
<dependency>
<groupId>org.jboss.msc</groupId>
<artifactId>jboss-msc</artifactId>
- <version>1.0.0.GA</version>
+ <version>${version.org.jboss.msc.jboss-msc}</version>
</dependency>
<dependency>
<groupId>org.jboss.modules</groupId>
<artifactId>jboss-modules</artifactId>
- <version>1.0.3.GA</version>
+ <version>${version.org.jboss.modules.jboss-modules}</version>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-vfs</artifactId>
- <version>3.0.1.GA</version>
+ <version>${version.org.jboss.jboss-vfs}</version>
<exclusions>
<exclusion>
<groupId>org.jboss.logging</groupId>
@@ -433,22 +448,48 @@
<dependency>
<groupId>org.picketbox</groupId>
<artifactId>picketbox</artifactId>
- <version>4.0.1</version>
+ <version>${version.org.picketbox}</version>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-server</artifactId>
<version>${jbossas-version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-transactions</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-connector</artifactId>
<version>${jbossas-version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-server</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-transactions</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-security</artifactId>
<version>${jbossas-version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-server</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-transactions</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
@@ -463,17 +504,23 @@
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
- <version>3.0.0.GA</version>
+ <version>${version.org.jboss.logging.jboss-logging}</version>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-generator</artifactId>
- <version>1.0.0.CR1</version>
+ <version>${version.org.jboss.logging.jboss-logging-tools}</version>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-clustering-infinispan</artifactId>
<version>${jbossas-version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-processor</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
Modified: trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java 2011-12-01 18:19:11 UTC (rev 3714)
@@ -357,11 +357,11 @@
}
public void setAuthenticationType(AuthenticationType flag) {
- this.authenticationType = flag;
- LogManager.logInfo(LogConstants.CTX_SECURITY, "Authentication Type set to: "+flag); //$NON-NLS-1$
+ this.authenticationType = flag;
}
public void start() {
+ LogManager.logInfo(LogConstants.CTX_SECURITY, RuntimePlugin.Util.getString("auth_type", authenticationType, securityDomainNames)); //$NON-NLS-1$
this.sessionMonitor.schedule(new TimerTask() {
@Override
public void run() {
Modified: trunk/runtime/src/main/java/org/teiid/transport/ServerWorkItem.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/ServerWorkItem.java 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/runtime/src/main/java/org/teiid/transport/ServerWorkItem.java 2011-12-01 18:19:11 UTC (rev 3714)
@@ -70,7 +70,11 @@
final boolean encrypt = message.getContents() instanceof SealedObject;
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
try {
- Thread.currentThread().setContextClassLoader(Module.getCallerModule().getClassLoader());
+ try {
+ Thread.currentThread().setContextClassLoader(Module.getCallerModule().getClassLoader());
+ } catch(Throwable t) {
+ // ignore
+ }
message.setContents(this.socketClientInstance.getCryptor().unsealObject(message.getContents()));
if (!(message.getContents() instanceof ServiceInvocationStruct)) {
throw new AssertionError("unknown message contents"); //$NON-NLS-1$
Modified: trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties
===================================================================
--- trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties 2011-12-01 17:33:11 UTC (rev 3713)
+++ trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties 2011-12-01 18:19:11 UTC (rev 3714)
@@ -100,3 +100,4 @@
krb5_login_failed=Kerberos context login failed
no_security_domains=No security domain configured for Kerberos authentication. Can not authenticate.
krb5_user_not_found=GSS authentication is in use, however authenticated user not found in the context to proceed.
+auth_type=Authentication Type set to {0} for security-domains {1}
13 years