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&... - 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...
+<li><a
href="http://jira.jboss.org/jira/browse/TEIID">JIRA</a>...
+<li><a
href="http://community.jboss.org/en/teiid?view=discussions">...
+</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&... - 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...
-<li><a
href="http://jira.jboss.org/jira/browse/TEIID">JIRA</a>...
-<li><a
href="http://community.jboss.org/en/teiid?view=discussions">...
-</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"&g...
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"&g...
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