[teiid-commits] teiid SVN: r3464 - in branches/as7: build/kits/jboss-as7/domain and 17 other directories.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Mon Sep 12 10:56:07 EDT 2011


Author: rareddy
Date: 2011-09-12 10:56:06 -0400 (Mon, 12 Sep 2011)
New Revision: 3464

Added:
   branches/as7/build/kits/jboss-as7/domain/configuration/
   branches/as7/build/kits/jboss-as7/domain/configuration/domain-teiid.xml
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/JGroupsObjectReplicatorService.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemDescribe.java
Removed:
   branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ClusteredTupleBatchCacheLoader.java
   branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ExpirationAwareCache.java
   branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheListener.java
   branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/TupleBatchCacheLoader.java
   branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/TupleBatchCacheLoaderConfig.java
Modified:
   branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/main/module.xml
   branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml
   branches/as7/cache-jbosscache/pom.xml
   branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java
   branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java
   branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java
   branches/as7/jboss-integration/pom.xml
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/BufferManagerService.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Configuration.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Element.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/ObjectsSerializerService.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineAdd.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineOperationHandler.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineReferenceFactoryService.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineRemove.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/SystemVDBService.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidBootServicesAdd.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidServiceNames.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorRemove.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBDependencyProcessor.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBParserDeployer.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBRepositoryService.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBStructure.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
   branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
   branches/as7/jboss-integration/src/main/resources/schema/jboss-teiid.xsd
   branches/as7/pom.xml
   branches/as7/runtime/src/main/java/org/teiid/transport/ODBCSocketListener.java
   branches/as7/runtime/src/main/java/org/teiid/transport/SocketListener.java
   branches/as7/runtime/src/test/java/org/teiid/transport/TestCommSockets.java
   branches/as7/runtime/src/test/java/org/teiid/transport/TestFailover.java
   branches/as7/test-integration/common/pom.xml
   branches/as7/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViewReplication.java
   branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestJDBCSocketTransport.java
   branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestODBCSocketTransport.java
   branches/as7/test-integration/pom.xml
Log:
TEIID-1720: Configured Object Replicator and Domain Mode

Copied: branches/as7/build/kits/jboss-as7/domain/configuration/domain-teiid.xml (from rev 3454, branches/as7/build/kits/jboss-as7/domain/domain-teiid.xml)
===================================================================
--- branches/as7/build/kits/jboss-as7/domain/configuration/domain-teiid.xml	                        (rev 0)
+++ branches/as7/build/kits/jboss-as7/domain/configuration/domain-teiid.xml	2011-09-12 14:56:06 UTC (rev 3464)
@@ -0,0 +1,749 @@
+<!--
+  ~ JBoss, Home of Professional Open Source.
+  ~ Copyright 2010, Red Hat, Inc., and individual contributors
+  ~ as indicated by the @author tags. See the copyright.txt file in the
+  ~ distribution for a full listing of individual contributors.
+  ~
+  ~ This is free software; you can redistribute it and/or modify it
+  ~ under the terms of the GNU Lesser General Public License as
+  ~ published by the Free Software Foundation; either version 2.1 of
+  ~ the License, or (at your option) any later version.
+  ~
+  ~ This software is distributed in the hope that it will be useful,
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  ~ Lesser General Public License for more details.
+  ~
+  ~ You should have received a copy of the GNU Lesser General Public
+  ~ License along with this software; if not, write to the Free
+  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  -->
+
+<domain xmlns="urn:jboss:domain:1.0">
+
+    <extensions>
+        <extension module="org.jboss.as.clustering.infinispan"/>
+        <extension module="org.jboss.as.clustering.jgroups"/>
+        <extension module="org.jboss.as.connector"/>
+        <extension module="org.jboss.as.ee"/>
+        <extension module="org.jboss.as.ejb3"/>
+        <extension module="org.jboss.as.jaxrs"/>
+        <extension module="org.jboss.as.jmx"/>
+        <extension module="org.jboss.as.jpa"/>
+        <extension module="org.jboss.as.logging"/>
+        <extension module="org.jboss.as.modcluster"/>
+        <extension module="org.jboss.as.naming"/>
+        <extension module="org.jboss.as.osgi"/>
+        <extension module="org.jboss.as.remoting"/>
+        <extension module="org.jboss.as.sar"/>
+        <extension module="org.jboss.as.security"/>
+        <extension module="org.jboss.teiid"/>
+        <extension module="org.jboss.as.threads"/>
+        <extension module="org.jboss.as.transactions"/>
+        <extension module="org.jboss.as.web"/>
+        <extension module="org.jboss.as.weld"/>
+    </extensions>
+
+    <system-properties>
+        <!-- IPv4 is not required, but setting this helps avoid unintended use of IPv6 -->
+        <property name="java.net.preferIPv4Stack" value="true"/>
+    </system-properties>
+
+    <profiles>
+        <profile name="default">
+            <subsystem xmlns="urn:jboss:domain:logging:1.1">
+                <console-handler name="CONSOLE">
+                    <level name="INFO"/>
+                    <formatter>
+                        <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
+                    </formatter>
+                </console-handler>
+
+                <periodic-rotating-file-handler name="FILE">
+                    <level name="INFO"/>
+                    <formatter>
+                        <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
+                    </formatter>
+                    <file relative-to="jboss.server.log.dir" path="server.log"/>
+                    <suffix value=".yyyy-MM-dd"/>
+                </periodic-rotating-file-handler>
+
+                <logger category="com.arjuna">
+                    <level name="WARN"/>
+                </logger>
+                <logger category="org.apache.tomcat.util.modeler">
+                    <level name="WARN"/>
+                </logger>
+                <logger category="sun.rmi">
+                    <level name="WARN"/>
+                </logger>
+
+                <root-logger>
+                    <level name="INFO"/>
+                    <handlers>
+                        <handler name="CONSOLE"/>
+                        <handler name="FILE"/>
+                    </handlers>
+                </root-logger>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:datasources:1.0">
+                <datasources>
+                    <datasource jndi-name="java:jboss/datasources/ExampleDS" enabled="true" use-java-context="true" pool-name="H2DS">
+                        <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
+                        <driver>h2</driver>
+                        <pool></pool>
+                        <security>
+                            <user-name>sa</user-name>
+                            <password>sa</password>
+                        </security>
+                    </datasource>
+                    <datasource jndi-name="java:/Oracle11_PushDS" pool-name="OracleDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
+                        <connection-url>jdbc:oracle:thin:@englxdbs11.mw.lab.eng.bos.redhat.com:1521:orcl</connection-url>
+                        <driver>oracle</driver>
+                        <pool>
+                            <prefill>false</prefill>
+                            <use-strict-min>false</use-strict-min>
+                            <flush-strategy>FailingConnectionOnly</flush-strategy>
+                        </pool>
+                        <security>
+                            <user-name>bqt2_ro</user-name>
+                            <password>mm</password>
+                        </security>
+                    </datasource>                     
+                    <drivers>
+                        <driver name="h2" module="com.h2database.h2">
+                            <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
+                        </driver>
+                    <driver name="oracle" module="com.oracle">
+                        <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
+                    </driver>                         
+                    </drivers>
+                </datasources>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:ee:1.0"/>
+            <subsystem xmlns="urn:jboss:domain:ejb3:1.1" lite="true">
+                <!-- EJB3 pools -->
+                <pools>
+                    <bean-instance-pools>
+                        <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5"
+                                         instance-acquisition-timeout-unit="MINUTES"/>
+                    </bean-instance-pools>
+                </pools>
+
+                <!-- Session bean configurations -->
+                <session-bean>
+                    <stateless>
+                        <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
+                    </stateless>
+                </session-bean>
+
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:infinispan:1.0" default-cache-container="hibernate">
+                <cache-container name="hibernate" default-cache="local-query">
+                    <local-cache name="entity">
+                        <eviction strategy="LRU" max-entries="10000"/>
+                        <expiration max-idle="100000"/>
+                    </local-cache>
+                    <local-cache name="local-query">
+                        <eviction strategy="LRU" max-entries="10000"/>
+                        <expiration max-idle="100000"/>
+                    </local-cache>
+                    <local-cache name="timestamps">
+                        <eviction strategy="NONE"/>
+                    </local-cache>
+                </cache-container>
+                <cache-container name="teiid" default-cache="resultset">
+                    <local-cache name="resultset">
+                        <expiration lifespan="7200" />
+                        <eviction max-entries="1024" strategy="LRU"/>
+                    </local-cache>
+                </cache-container>                  
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
+            <subsystem xmlns="urn:jboss:domain:jca:1.0">
+                <archive-validation enabled="true"/>
+                <bean-validation enabled="true"/>
+                <default-workmanager>
+                    <short-running-threads blocking="true">
+                        <core-threads count="10" per-cpu="20"/>
+                        <queue-length count="10" per-cpu="20"/>
+                        <max-threads count="10" per-cpu="20"/>
+                        <keepalive-time time="10" unit="seconds"/>
+                    </short-running-threads>
+                    <long-running-threads blocking="true">
+                        <core-threads count="10" per-cpu="20"/>
+                        <queue-length count="10" per-cpu="20"/>
+                        <max-threads count="10" per-cpu="20"/>
+                        <keepalive-time time="10" unit="seconds"/>
+                    </long-running-threads>
+                </default-workmanager>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:jmx:1.0">
+                 <jmx-connector registry-binding="jmx-connector-registry" server-binding="jmx-connector-server" />
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:jpa:1.0">
+                 <jpa default-datasource=""/>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:naming:1.0"/>
+            <subsystem xmlns="urn:jboss:domain:osgi:1.0" activation="lazy">
+                <configuration pid="org.apache.felix.webconsole.internal.servlet.OsgiManager">
+                    <property name="manager.root">jboss-osgi</property>
+                </configuration>
+                <properties>
+                    <!--
+                        A comma seperated list of module identifiers. Each system module
+                        is added as a dependency to the OSGi framework module. The packages
+                        from these system modules can be made visible as framework system packages.
+                        http://www.osgi.org/javadoc/r4v42/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES_EXTRA
+                    -->
+                    <property name="org.jboss.osgi.system.modules">
+                        org.apache.commons.logging,
+                        org.apache.log4j,
+                        org.jboss.as.osgi,
+                        org.slf4j,
+                    </property>
+                    <!--
+                        Framework environment property identifying extra packages which the system bundle
+                        must export from the current execution environment
+                    -->
+                    <property name="org.osgi.framework.system.packages.extra">
+                        org.apache.commons.logging;version=1.1.1,
+                        org.apache.log4j;version=1.2,
+                        org.jboss.as.osgi.service;version=7.0,
+                        org.jboss.osgi.deployment.interceptor;version=1.0,
+                        org.jboss.osgi.spi.capability;version=1.0,
+                        org.jboss.osgi.spi.util;version=1.0,
+                        org.jboss.osgi.testing;version=1.0,
+                        org.jboss.osgi.vfs;version=1.0,
+                        org.slf4j;version=1.5.10,
+                    </property>
+                    <!-- Specifies the beginning start level of the framework -->
+                    <property name="org.osgi.framework.startlevel.beginning">1</property>
+                </properties>
+                <modules>
+                    <!-- modules registered with the OSGi layer on startup -->
+                    <module identifier="javaee.api"/>
+                    <module identifier="org.jboss.logging"/>
+                    <!-- bundles installed on startup -->
+                    <module identifier="org.apache.aries.util"/>
+                    <module identifier="org.jboss.osgi.webconsole"/>
+                    <module identifier="org.osgi.compendium"/>
+                    <!-- bundles started in startlevel 1 -->
+                    <module identifier="org.apache.felix.log" startlevel="1"/>
+                    <module identifier="org.jboss.osgi.logging" startlevel="1"/>
+                    <module identifier="org.apache.felix.configadmin" startlevel="1"/>
+                    <module identifier="org.jboss.as.osgi.configadmin" startlevel="1"/>
+                    <!-- bundles started in startlevel 2 -->
+                    <module identifier="org.apache.aries.jmx" startlevel="2"/>
+                    <module identifier="org.apache.felix.eventadmin" startlevel="2"/>
+                    <module identifier="org.apache.felix.metatype" startlevel="2"/>
+                    <module identifier="org.apache.felix.webconsole" startlevel="2"/>
+                    <module identifier="org.jboss.osgi.jmx" startlevel="2"/>
+                    <module identifier="org.jboss.osgi.http" startlevel="2"/>
+                    <!-- bundles started in startlevel 3 -->
+                    <module identifier="org.jboss.osgi.blueprint" startlevel="3"/>
+                    <module identifier="org.jboss.osgi.webapp" startlevel="3"/>
+                    <module identifier="org.jboss.osgi.xerces" startlevel="3"/>
+                </modules>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:remoting:1.0"/>
+            <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"/>
+            <subsystem xmlns="urn:jboss:domain:sar:1.0"/>
+            <subsystem xmlns="urn:jboss:domain:security:1.0">
+                <security-domains>
+                    <security-domain name="other">
+                        <authentication>
+                            <login-module code="UsersRoles" flag="required"/>
+                        </authentication>
+                    </security-domain>
+                    <security-domain name="teiid-security" cache-type="default">
+                        <authentication>
+                            <login-module code="UsersRoles" flag="required">
+                                <module-option name="usersProperties" value="teiid-security-users.properties"/>
+                                <module-option name="rolesProperties" value="teiid-security-roles.properties"/>
+                            </login-module>
+                        </authentication>
+                    </security-domain>                       
+                </security-domains>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:teiid:1.0">
+                <async-thread-group>teiid-async</async-thread-group>
+                <resultset-cache container-name="teiid" name="resultset"/>
+                
+                <query-engine name = "default">
+                    <security-domain>teiid-security</security-domain>
+                    <jdbc socket-binding="teiid-jdbc"/>
+                    <odbc socket-binding="teiid-odbc"/>
+                </query-engine>
+                
+                <translator name="jdbc-simple" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="jdbc-ansi" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="access" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="db2" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="derby" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="h2" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="hsql" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="informix" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="metamatrix" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="mysql" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="mysql5" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="oracle" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="postgresql" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="sqlserver" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="sybase" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="teiid" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="teradata" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="modeshape" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="ingres" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="ingres93" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="intersystems-cache" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="netezza" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="file" module="org.jboss.teiid.translator.file"/>
+                <translator name="ldap" module="org.jboss.teiid.translator.ldap"/>
+                <translator name="loopback" module="org.jboss.teiid.translator.loopback"/>
+                <translator name="olap" module="org.jboss.teiid.translator.olap"/>
+                <translator name="ws" module="org.jboss.teiid.translator.ws"/>
+            </subsystem>
+
+            <subsystem xmlns="urn:jboss:domain:threads:1.0">
+                <queueless-thread-pool name="teiid-async">
+                    <max-threads count="2" per-cpu="2" />
+                </queueless-thread-pool>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:transactions:1.0">
+                <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
+                <core-environment>
+                    <process-id>
+                        <uuid />
+                    </process-id>
+                </core-environment>
+                <coordinator-environment default-timeout="300"/>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">
+                <connector name="http" scheme="http" protocol="HTTP/1.1" socket-binding="http"/>
+                <virtual-server name="default-host">
+                    <alias name="localhost" />
+                    <alias name="example.com" />
+                </virtual-server>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:weld:1.0"/>
+        </profile>
+
+        <profile name="ha">
+            <subsystem xmlns="urn:jboss:domain:logging:1.1">
+                <console-handler name="CONSOLE">
+                    <level name="INFO"/>
+                    <formatter>
+                        <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
+                    </formatter>
+                </console-handler>
+
+                <periodic-rotating-file-handler name="FILE">
+                    <level name="INFO"/>
+                    <formatter>
+                        <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
+                    </formatter>
+                    <file relative-to="jboss.server.log.dir" path="server.log"/>
+                    <suffix value=".yyyy-MM-dd"/>
+                </periodic-rotating-file-handler>
+
+                <logger category="com.arjuna">
+                    <level name="WARN"/>
+                </logger>
+                <logger category="org.apache.tomcat.util.modeler">
+                    <level name="WARN"/>
+                </logger>
+                <logger category="sun.rmi">
+                    <level name="WARN"/>
+                </logger>
+
+                <root-logger>
+                    <level name="INFO"/>
+                    <handlers>
+                        <handler name="CONSOLE"/>
+                        <handler name="FILE"/>
+                    </handlers>
+                </root-logger>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:datasources:1.0">
+                <datasources>
+                    <datasource jndi-name="java:jboss/datasources/ExampleDS" enabled="true" use-java-context="true" pool-name="H2DS">
+                        <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
+                        <driver>h2</driver>
+                        <pool></pool>
+                        <security>
+                            <user-name>sa</user-name>
+                            <password>sa</password>
+                        </security>
+                    </datasource>
+                    <datasource jndi-name="java:/Oracle11_PushDS" pool-name="OracleDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
+                        <connection-url>jdbc:oracle:thin:@englxdbs11.mw.lab.eng.bos.redhat.com:1521:orcl</connection-url>
+                        <driver>oracle</driver>
+                        <pool>
+                            <prefill>false</prefill>
+                            <use-strict-min>false</use-strict-min>
+                            <flush-strategy>FailingConnectionOnly</flush-strategy>
+                        </pool>
+                        <security>
+                            <user-name>bqt2_ro</user-name>
+                            <password>mm</password>
+                        </security>
+                    </datasource>                      
+                    <drivers>
+                        <driver name="h2" module="com.h2database.h2">
+                            <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
+                        </driver>
+                    <driver name="oracle" module="com.oracle">
+                        <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
+                    </driver>                         
+                    </drivers>
+                </datasources>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:ee:1.0"/>
+            <subsystem xmlns="urn:jboss:domain:ejb3:1.1" lite="true">
+                <!-- EJB3 pools -->
+                <pools>
+                    <bean-instance-pools>
+                        <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5"
+                                         instance-acquisition-timeout-unit="MINUTES"/>
+                    </bean-instance-pools>
+                </pools>
+
+                <!-- Session bean configurations -->
+                <session-bean>
+                    <stateless>
+                        <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
+                    </stateless>
+                </session-bean>
+
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:infinispan:1.0" default-cache-container="cluster">
+                <cache-container name="cluster" default-cache="default">
+                    <alias>ha-partition</alias>
+                    <replicated-cache name="default" mode="SYNC" batching="true">
+                        <locking isolation="REPEATABLE_READ"/>
+                    </replicated-cache>
+                </cache-container>
+                <cache-container name="web" default-cache="repl">
+                    <alias>standard-session-cache</alias>
+                    <replicated-cache name="repl" mode="ASYNC" batching="true">
+                        <locking isolation="REPEATABLE_READ"/>
+                        <file-store/>
+                    </replicated-cache>
+                    <distributed-cache name="dist" mode="ASYNC" batching="true">
+                        <locking isolation="REPEATABLE_READ"/>
+                        <file-store/>
+                    </distributed-cache>
+                </cache-container>
+                <cache-container name="sfsb" default-cache="repl">
+                    <alias>sfsb-cache</alias>
+                    <alias>jboss.cache:service=EJB3SFSBClusteredCache</alias>
+                    <replicated-cache name="repl" mode="ASYNC" batching="true">
+                        <locking isolation="REPEATABLE_READ"/>
+                        <eviction strategy="LRU" max-entries="10000"/>
+                        <file-store/>
+                    </replicated-cache>
+                </cache-container>
+                <cache-container name="hibernate" default-cache="local-query">
+                    <invalidation-cache name="entity" mode="SYNC">
+                        <eviction strategy="LRU" max-entries="10000"/>
+                        <expiration max-idle="100000"/>
+                    </invalidation-cache>
+                    <local-cache name="local-query">
+                        <eviction strategy="LRU" max-entries="10000"/>
+                        <expiration max-idle="100000"/>
+                    </local-cache>
+                    <replicated-cache name="timestamps" mode="ASYNC">
+                        <eviction strategy="NONE"/>
+                    </replicated-cache>
+                </cache-container>
+                <cache-container name="teiid" default-cache="resultset">
+                    <replicated-cache name="resultset" mode="SYNC" batching="true">
+                        <locking isolation="READ_COMMITTED"/>
+                        <transaction mode="FULL_XA"/>
+                        <expiration lifespan="7200" />
+                        <eviction max-entries="1024" strategy="LRU"/>
+                    </replicated-cache>
+                </cache-container>                 
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
+            <subsystem xmlns="urn:jboss:domain:jca:1.0">
+                <archive-validation enabled="true"/>
+                <bean-validation enabled="true"/>
+                <default-workmanager>
+                    <short-running-threads blocking="true">
+                        <core-threads count="10" per-cpu="20"/>
+                        <queue-length count="10" per-cpu="20"/>
+                        <max-threads count="10" per-cpu="20"/>
+                        <keepalive-time time="10" unit="seconds"/>
+                    </short-running-threads>
+                    <long-running-threads blocking="true">
+                        <core-threads count="10" per-cpu="20"/>
+                        <queue-length count="10" per-cpu="20"/>
+                        <max-threads count="10" per-cpu="20"/>
+                        <keepalive-time time="10" unit="seconds"/>
+                    </long-running-threads>
+                </default-workmanager>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:jgroups:1.0" default-stack="udp">
+                <stack name="udp">
+                    <transport type="UDP" socket-binding="jgroups-udp" diagnostics-socket-binding="jgroups-diagnostics"/>
+                    <protocol type="PING"/>
+                    <protocol type="MERGE2"/>
+                    <protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>
+                    <protocol type="FD"/>
+                    <protocol type="VERIFY_SUSPECT"/>
+                    <protocol type="BARRIER"/>
+                    <protocol type="pbcast.NAKACK"/>
+                    <protocol type="UNICAST"/>
+                    <protocol type="pbcast.STABLE"/>
+                    <protocol type="VIEW_SYNC"/>
+                    <protocol type="pbcast.GMS"/>
+                    <protocol type="UFC"/>
+                    <protocol type="MFC"/>
+                    <protocol type="FRAG2"/>
+                    <protocol type="pbcast.STREAMING_STATE_TRANSFER"/>
+                    <protocol type="pbcast.FLUSH"/>
+                </stack>
+                <stack name="tcp">
+                    <transport type="TCP" socket-binding="jgroups-tcp" diagnostics-socket-binding="jgroups-diagnostics"/>
+                    <protocol type="MPING" socket-binding="jgroups-mping"/>
+                    <protocol type="MERGE2"/>
+                    <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
+                    <protocol type="FD"/>
+                    <protocol type="VERIFY_SUSPECT"/>
+                    <protocol type="BARRIER"/>
+                    <protocol type="pbcast.NAKACK"/>
+                    <protocol type="UNICAST"/>
+                    <protocol type="pbcast.STABLE"/>
+                    <protocol type="VIEW_SYNC"/>
+                    <protocol type="pbcast.GMS"/>
+                    <protocol type="UFC"/>
+                    <protocol type="MFC"/>
+                    <protocol type="FRAG2"/>
+                    <protocol type="pbcast.STREAMING_STATE_TRANSFER"/>
+                    <protocol type="pbcast.FLUSH"/>
+                </stack>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:jmx:1.0">
+                 <jmx-connector registry-binding="jmx-connector-registry" server-binding="jmx-connector-server" />
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:jpa:1.0">
+                 <jpa default-datasource=""/>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:modcluster:1.0">
+                <mod-cluster-config advertise-socket="modcluster"/>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:naming:1.0"/>
+            <subsystem xmlns="urn:jboss:domain:osgi:1.0" activation="lazy">
+                <configuration pid="org.apache.felix.webconsole.internal.servlet.OsgiManager">
+                    <property name="manager.root">jboss-osgi</property>
+                </configuration>
+                <properties>
+                    <!--
+                        A comma seperated list of module identifiers. Each system module
+                        is added as a dependency to the OSGi framework module. The packages
+                        from these system modules can be made visible as framework system packages.
+                        http://www.osgi.org/javadoc/r4v42/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES_EXTRA
+                    -->
+                    <property name="org.jboss.osgi.system.modules">
+                        org.apache.commons.logging,
+                        org.apache.log4j,
+                        org.jboss.as.osgi,
+                        org.slf4j,
+                    </property>
+                    <!--
+                        Framework environment property identifying extra packages which the system bundle
+                        must export from the current execution environment
+                    -->
+                    <property name="org.osgi.framework.system.packages.extra">
+                        org.apache.commons.logging;version=1.1.1,
+                        org.apache.log4j;version=1.2,
+                        org.jboss.as.osgi.service;version=7.0,
+                        org.jboss.osgi.deployment.interceptor;version=1.0,
+                        org.jboss.osgi.spi.capability;version=1.0,
+                        org.jboss.osgi.spi.util;version=1.0,
+                        org.jboss.osgi.testing;version=1.0,
+                        org.jboss.osgi.vfs;version=1.0,
+                        org.slf4j;version=1.5.10,
+                    </property>
+                    <!-- Specifies the beginning start level of the framework -->
+                    <property name="org.osgi.framework.startlevel.beginning">1</property>
+                </properties>
+                <modules>
+                    <!-- modules registered with the OSGi layer on startup -->
+                    <module identifier="javaee.api"/>
+                    <module identifier="org.jboss.logging"/>
+                    <!-- bundles installed on startup -->
+                    <module identifier="org.apache.aries.util"/>
+                    <module identifier="org.jboss.osgi.webconsole"/>
+                    <module identifier="org.osgi.compendium"/>
+                    <!-- bundles started in startlevel 1 -->
+                    <module identifier="org.apache.felix.log" startlevel="1"/>
+                    <module identifier="org.jboss.osgi.logging" startlevel="1"/>
+                    <module identifier="org.apache.felix.configadmin" startlevel="1"/>
+                    <module identifier="org.jboss.as.osgi.configadmin" startlevel="1"/>
+                    <!-- bundles started in startlevel 2 -->
+                    <module identifier="org.apache.aries.jmx" startlevel="2"/>
+                    <module identifier="org.apache.felix.eventadmin" startlevel="2"/>
+                    <module identifier="org.apache.felix.metatype" startlevel="2"/>
+                    <module identifier="org.apache.felix.webconsole" startlevel="2"/>
+                    <module identifier="org.jboss.osgi.jmx" startlevel="2"/>
+                    <module identifier="org.jboss.osgi.http" startlevel="2"/>
+                    <!-- bundles started in startlevel 3 -->
+                    <module identifier="org.jboss.osgi.blueprint" startlevel="3"/>
+                    <module identifier="org.jboss.osgi.webapp" startlevel="3"/>
+                    <module identifier="org.jboss.osgi.xerces" startlevel="3"/>
+                </modules>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:remoting:1.0"/>
+            <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"/>
+            <subsystem xmlns="urn:jboss:domain:sar:1.0"/>
+            <subsystem xmlns="urn:jboss:domain:security:1.0">
+                <security-domains>
+                    <security-domain name="other">
+                        <authentication>
+                            <login-module code="UsersRoles" flag="required"/>
+                        </authentication>
+                    </security-domain>
+                    <security-domain name="teiid-security" cache-type="default">
+                        <authentication>
+                            <login-module code="UsersRoles" flag="required">
+                                <module-option name="usersProperties" value="teiid-security-users.properties"/>
+                                <module-option name="rolesProperties" value="teiid-security-roles.properties"/>
+                            </login-module>
+                        </authentication>
+                    </security-domain>                     
+                </security-domains>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:teiid:1.0">
+                <async-thread-group>teiid-async</async-thread-group>
+                <object-replicator stack="udp" cluster-name="teiid-rep"/>
+                <resultset-cache container-name="teiid" name="resultset"/>
+                
+                <query-engine name = "default">
+                    <security-domain>teiid-security</security-domain>
+                    <jdbc socket-binding="teiid-jdbc"/>
+                    <odbc socket-binding="teiid-odbc"/>
+                </query-engine>
+                
+                <translator name="jdbc-simple" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="jdbc-ansi" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="access" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="db2" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="derby" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="h2" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="hsql" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="informix" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="metamatrix" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="mysql" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="mysql5" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="oracle" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="postgresql" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="sqlserver" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="sybase" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="teiid" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="teradata" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="modeshape" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="ingres" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="ingres93" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="intersystems-cache" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="netezza" module="org.jboss.teiid.translator.jdbc"/>
+                <translator name="file" module="org.jboss.teiid.translator.file"/>
+                <translator name="ldap" module="org.jboss.teiid.translator.ldap"/>
+                <translator name="loopback" module="org.jboss.teiid.translator.loopback"/>
+                <translator name="olap" module="org.jboss.teiid.translator.olap"/>
+                <translator name="ws" module="org.jboss.teiid.translator.ws"/>
+            </subsystem>            
+            <subsystem xmlns="urn:jboss:domain:threads:1.0">
+                <queueless-thread-pool name="teiid-async">
+                    <max-threads count="2" per-cpu="2" />
+                </queueless-thread-pool>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:transactions:1.0">
+                <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
+                <core-environment>
+                    <process-id>
+                        <uuid />
+                    </process-id>
+                </core-environment>
+                <coordinator-environment default-timeout="300"/>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">
+                <connector name="http" scheme="http" protocol="HTTP/1.1" socket-binding="http"/>
+                <virtual-server name="default-host">
+                    <alias name="localhost" />
+                    <alias name="example.com" />
+                </virtual-server>
+            </subsystem>
+            <subsystem xmlns="urn:jboss:domain:weld:1.0"/>
+        </profile>
+    </profiles>
+
+
+    <!--
+         Named interfaces that can be referenced elsewhere in the configuration. The configuration
+         for how to associate these logical names with an actual network interface can either
+         be specified here or can be declared on a per-host basis in the equivalent element in host.xml.
+
+         These default configurations require the binding specification to be done in host.xml.
+    -->
+    <interfaces>
+        <interface name="management"/>
+        <interface name="public"/>
+    </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="jmx-connector-registry" port="1090"/>
+            <socket-binding name="jmx-connector-server" port="1091"/>
+            <socket-binding name="jndi" port="1099"/>
+            <socket-binding name="osgi-http" port="8090"/>
+            <socket-binding name="remoting" port="4447"/>
+            <socket-binding name="txn-recovery-environment" port="4712"/>
+            <socket-binding name="txn-status-manager" port="4713"/>
+            <socket-binding name="teiid-jdbc" port="31000"/>
+            <socket-binding name="teiid-odbc" port="35432"/>  
+        </socket-binding-group>
+        <socket-binding-group name="ha-sockets" default-interface="public">
+            <socket-binding name="http" port="8080"/>
+            <socket-binding name="https" port="8443"/>
+            <socket-binding name="jgroups-diagnostics" port="0" multicast-address="224.0.75.75" multicast-port="7500"/>
+            <socket-binding name="jgroups-mping" port="0" multicast-address="230.0.0.4" multicast-port="45700"/>
+            <socket-binding name="jgroups-tcp" port="7600"/>
+            <socket-binding name="jgroups-tcp-fd" port="57600"/>
+            <socket-binding name="jgroups-udp" port="55200" multicast-address="230.0.0.4" multicast-port="45688"/>
+            <socket-binding name="jgroups-udp-fd" port="54200"/>
+            <socket-binding name="jmx-connector-registry" port="1090"/>
+            <socket-binding name="jmx-connector-server" port="1091"/>
+            <socket-binding name="jndi" port="1099"/>
+            <socket-binding name="modcluster" port="0"  multicast-address="224.0.1.105" multicast-port="23364"/>
+            <socket-binding name="osgi-http" port="8090"/>
+            <socket-binding name="remoting" port="4447"/>
+            <socket-binding name="txn-recovery-environment" port="4712"/>
+            <socket-binding name="txn-status-manager" port="4713"/>
+            <socket-binding name="teiid-jdbc" port="31000"/>
+            <socket-binding name="teiid-odbc" port="35432"/>             
+        </socket-binding-group>
+    </socket-binding-groups>
+
+    <server-groups>
+        <server-group name="main-server-group" profile="default">
+            <jvm name="default">
+               <heap size="64m" max-size="512m"/>
+            </jvm>
+            <socket-binding-group ref="standard-sockets"/>
+        </server-group>
+
+        <server-group name="other-server-group" profile="ha">
+            <jvm name="default">
+               <heap size="64m" max-size="512m"/>
+            </jvm>
+            <socket-binding-group ref="ha-sockets"/>
+        </server-group>
+    </server-groups>
+
+</domain>


Property changes on: branches/as7/build/kits/jboss-as7/domain/configuration/domain-teiid.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Modified: branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/main/module.xml
===================================================================
--- branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/main/module.xml	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/main/module.xml	2011-09-12 14:56:06 UTC (rev 3464)
@@ -40,6 +40,7 @@
         <module name="javax.xml.bind.api"/>
         <module name="javax.transaction.api"/>
         <module name="javax.activation.api"/>
+        <module name="org.jboss.as.clustering.jgroups"/>
     </dependencies>
 
 </module>
\ No newline at end of file

Modified: branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml
===================================================================
--- branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml	2011-09-12 14:56:06 UTC (rev 3464)
@@ -161,8 +161,14 @@
                 </local-cache>
                 <local-cache name="timestamps">
                     <eviction strategy="NONE"/>
+                </local-cache>                 
+            </cache-container>
+            <cache-container name="teiid" default-cache="resultset">
+                <local-cache name="resultset">
+                    <expiration lifespan="7200" />
+                    <eviction max-entries="1024" strategy="LRU"/>
                 </local-cache>
-            </cache-container>
+            </cache-container>            
         </subsystem>
         <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
         <subsystem xmlns="urn:jboss:domain:jca:1.0">
@@ -274,6 +280,7 @@
         </subsystem>
         <subsystem xmlns="urn:jboss:domain:teiid:1.0">
             <async-thread-group>teiid-async</async-thread-group>
+            <resultset-cache container-name="teiid" name="resultset"/>
             
             <query-engine name = "default">
                 <security-domain>teiid-security</security-domain>

Modified: branches/as7/cache-jbosscache/pom.xml
===================================================================
--- branches/as7/cache-jbosscache/pom.xml	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/cache-jbosscache/pom.xml	2011-09-12 14:56:06 UTC (rev 3464)
@@ -8,7 +8,7 @@
 	<modelVersion>4.0.0</modelVersion>
 	<artifactId>teiid-cache-jbosscache</artifactId>
 	<name>JBoss Cache</name>
-	<description>JBossCache provider.</description>
+	<description>Infinispan Provider</description>
 	<dependencies>
         <dependency>
             <groupId>org.jboss.teiid</groupId>
@@ -25,15 +25,15 @@
 			<artifactId>teiid-engine</artifactId>
             <scope>provided</scope>
 		</dependency>
-		<dependency>
-			<groupId>org.jboss.cache</groupId>
-			<artifactId>jbosscache-core</artifactId>
-            <scope>provided</scope>
-		</dependency>
-		<dependency>
-			<groupId>commons-logging</groupId>
-			<artifactId>commons-logging</artifactId>
-			<scope>provided</scope>
-		</dependency>
+        <dependency>
+          <groupId>org.infinispan</groupId>
+          <artifactId>infinispan-core</artifactId>
+          <scope>provided</scope>
+        </dependency>
+        <dependency>
+          <groupId>org.jboss.as</groupId>
+          <artifactId>jboss-as-clustering-jgroups</artifactId>
+          <scope>provided</scope>
+        </dependency>        
 	</dependencies>
 </project>
\ No newline at end of file

Deleted: branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ClusteredTupleBatchCacheLoader.java
===================================================================
--- branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ClusteredTupleBatchCacheLoader.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ClusteredTupleBatchCacheLoader.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -1,305 +0,0 @@
-/*
- * 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.cache.jboss;
-
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.cache.CacheStatus;
-import org.jboss.cache.Fqn;
-import org.jboss.cache.Modification;
-import org.jboss.cache.RegionManager;
-import org.jboss.cache.ReplicationException;
-import org.jboss.cache.commands.CommandsFactory;
-import org.jboss.cache.commands.DataCommand;
-import org.jboss.cache.commands.read.ExistsCommand;
-import org.jboss.cache.commands.read.GetDataMapCommand;
-import org.jboss.cache.commands.remote.ClusteredGetCommand;
-import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
-import org.jboss.cache.factories.annotations.Inject;
-import org.jboss.cache.loader.AbstractCacheLoader;
-import org.jboss.cache.lock.StripedLock;
-import org.jgroups.Address;
-import org.jgroups.blocks.GroupRequest;
-import org.jgroups.blocks.RspFilter;
-
-class ClusteredTupleBatchCacheLoader extends AbstractCacheLoader {
-	private StripedLock lock = new StripedLock();
-	private TupleBatchCacheLoaderConfig config;
-	private CommandsFactory commandsFactory;
-
-	private boolean init = false;
-
-	@Override
-	public void start() {
-		init();
-	}
-
-	private void init() {
-		if (!this.init) {
-			setCommandsFactory(cache.getComponentRegistry().getComponent(CommandsFactory.class));
-			this.init = true;
-		}
-	}
-
-	/**
-	 * A test to check whether the cache is in its started state. If not, calls
-	 * should not be made as the channel may not have properly started, blocks
-	 * due to state transfers may be in progress, etc.
-	 * 
-	 * @return true if the cache is in its STARTED state.
-	 */
-	protected boolean isCacheReady() {
-		return cache.getCacheStatus() == CacheStatus.STARTED;
-	}
-
-	@Inject
-	public void setCommandsFactory(CommandsFactory commandsFactory) {
-		this.commandsFactory = commandsFactory;
-	}
-
-	/**
-	 * Sets the configuration. A property <code>timeout</code> is used as the
-	 * timeout value.
-	 */
-	public void setConfig(IndividualCacheLoaderConfig base) {
-		this.config = (TupleBatchCacheLoaderConfig) base;
-	}
-
-	public IndividualCacheLoaderConfig getConfig() {
-		return config;
-	}
-
-	public Set getChildrenNames(Fqn fqn) throws Exception {
-		return Collections.emptySet();
-	}
-
-	private List<Object> callRemote(DataCommand dataCommand) throws Exception {
-		ClusteredGetCommand clusteredGet = commandsFactory	.buildClusteredGetCommand(false, dataCommand);
-		List resps;
-		// JBCACHE-1186
-		resps = cache.getRPCManager().callRemoteMethods(null,	clusteredGet, GroupRequest.GET_ALL, config.getTimeout(), new ResponseValidityFilter(cache.getMembers(), cache.getLocalAddress(), dataCommand), false);
-
-		if (resps == null) {
-			throw new ReplicationException("No replies to call " + dataCommand	+ ".  Perhaps we're alone in the cluster?"); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-		
-		return resps;
-	}
-
-	public Map get(Fqn name) throws Exception {
-		return get0(name);
-	}
-
-	protected Map get0(Fqn name) throws Exception {
-		// DON'T make a remote call if this is a remote call in the first place
-		// - leads to deadlocks - JBCACHE-1103
-		if (!isCacheReady() || !cache.getInvocationContext().isOriginLocal()) {
-			return null;
-		}
-		// return Collections.emptyMap();
-		lock.acquireLock(name, true);
-		try {
-			init();
-			GetDataMapCommand command = commandsFactory.buildGetDataMapCommand(name);
-			List resps = callRemote(command);
-			
-			Map result = Collections.EMPTY_MAP;
-			for (Object o:resps) {
-				if (o != null && !(o instanceof Exception)) {
-					List clusteredGetResp = (List) o;
-					if ((Boolean)clusteredGetResp.get(0)) {
-						Map resp = (Map)clusteredGetResp.get(1);
-						if (!resp.isEmpty()) {
-							result = resp;
-						}
-					}
-				}
-			}			
-			return result;
-		} finally {
-			lock.releaseLock(name);
-		}
-	}
-
-	public boolean exists(Fqn name) throws Exception {
-		// DON'T make a remote call if this is a remote call in the first place
-		// - leads to deadlocks - JBCACHE-1103
-		if (!isCacheReady() || !cache.getInvocationContext().isOriginLocal()) {
-			return false;
-		}
-
-		lock.acquireLock(name, false);
-		try {
-			init();
-			ExistsCommand command = commandsFactory.buildExistsNodeCommand(name);
-			List resps = callRemote(command);
-			boolean result = false;
-			for (Object o:resps) {
-				if (o != null && !(o instanceof Exception)) {
-					List<Boolean> clusteredGetResp = (List<Boolean>) o;
-					if (clusteredGetResp.get(0)) {
-						if (clusteredGetResp.get(1)) {
-							result = true;
-							break;
-						}
-					}
-				}
-			}
-			return result;
-		} finally {
-			lock.releaseLock(name);
-		}
-	}
-
-	public Object put(Fqn name, Object key, Object value) throws Exception {
-		return null;
-	}
-
-	/**
-	 * Does nothing; replication handles put.
-	 */
-	public void put(Fqn name, Map attributes) throws Exception {
-	}
-
-	/**
-	 * Does nothing; replication handles put.
-	 */
-	@Override
-	public void put(List<Modification> modifications) throws Exception {
-	}
-
-	/**
-	 * Fetches the remove value, does not remove. Replication handles removal.
-	 */
-	public Object remove(Fqn name, Object key) throws Exception {
-		return null;
-	}
-
-	/**
-	 * Does nothing; replication handles removal.
-	 */
-	public void remove(Fqn name) throws Exception {
-		// do nothing
-	}
-
-	/**
-	 * Does nothing; replication handles removal.
-	 */
-	public void removeData(Fqn name) throws Exception {
-	}
-
-	/**
-	 * Does nothing.
-	 */
-	@Override
-	public void prepare(Object tx, List modifications, boolean one_phase)
-			throws Exception {
-	}
-
-	/**
-	 * Does nothing.
-	 */
-	@Override
-	public void commit(Object tx) throws Exception {
-	}
-
-	/**
-	 * Does nothing.
-	 */
-	@Override
-	public void rollback(Object tx) {
-	}
-
-	@Override
-	public void loadEntireState(ObjectOutputStream os) throws Exception {
-		// intentional no-op
-	}
-
-	@Override
-	public void loadState(Fqn subtree, ObjectOutputStream os) throws Exception {
-		// intentional no-op
-	}
-
-	@Override
-	public void storeEntireState(ObjectInputStream is) throws Exception {
-		// intentional no-op
-	}
-
-	@Override
-	public void storeState(Fqn subtree, ObjectInputStream is) throws Exception {
-		// intentional no-op
-	}
-
-	@Override
-	public void setRegionManager(RegionManager manager) {
-	}
-
-	public static class ResponseValidityFilter implements RspFilter {
-		private int numValidResponses = 0;
-		private List<Address> pendingResponders;
-		private DataCommand command;
-
-		public ResponseValidityFilter(List<Address> expected,Address localAddress, DataCommand command) {
-			this.pendingResponders = new ArrayList<Address>(expected);
-			// We'll never get a response from ourself
-			this.pendingResponders.remove(localAddress);
-			this.command = command;
-		}
-
-		public boolean isAcceptable(Object object, Address address) {
-			pendingResponders.remove(address);
-
-			if (object instanceof List) {
-				List response = (List) object;
-				Boolean foundResult = (Boolean) response.get(0);
-				if (foundResult) {
-					if (command instanceof ExistsCommand) {
-						Boolean resp = (Boolean)response.get(1);
-						if (resp) {
-							numValidResponses++;		
-						}
-					}
-					else if (command instanceof GetDataMapCommand) {
-						Map resp = (Map)response.get(1);
-						if (!resp.isEmpty()) {
-							numValidResponses++;
-						}
-					}
-				}
-			}
-			// always return true to make sure a response is logged by the
-			// JGroups RpcDispatcher.
-			return true;
-		}
-
-		public boolean needMoreResponses() {
-			return numValidResponses < 1 && pendingResponders.size() > 0;
-		}
-
-	}
-}

Deleted: branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ExpirationAwareCache.java
===================================================================
--- branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ExpirationAwareCache.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ExpirationAwareCache.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -1,75 +0,0 @@
-/*
- * 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.cache.jboss;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.jboss.cache.Cache;
-import org.jboss.cache.Fqn;
-import org.jboss.cache.Node;
-import org.jboss.cache.eviction.ExpirationAlgorithmConfig;
-import org.teiid.cache.DefaultCache;
-
-public class ExpirationAwareCache<K, V> extends JBossCache<K, V> {
-
-	public ExpirationAwareCache(Cache cacheStore, Fqn fqn) {
-		super(cacheStore, fqn);
-	}
-	
-	@Override
-	protected boolean validateNode(Node node) {
-		Long future = (Long) node.get(ExpirationAlgorithmConfig.EXPIRATION_KEY);
-		return future == null || future > System.currentTimeMillis();
-	}
-
-	@Override
-	public V put(K key, V value) {
-		return this.put(key, value, null);
-	}
-	
-	@Override
-	public V put(K key, V value, Long ttl) {
-		Node<K, V> node = getRootNode();
-		Node child = node.addChild(getFqn(key));
-		
-		long future = DefaultCache.getExpirationTime(config.getMaxAgeInSeconds()*1000, ttl);				
-		child.put(ExpirationAlgorithmConfig.EXPIRATION_KEY, future);
-		return (V)child.put(key, value);
-	}
-	
-	@Override
-	public Set<K> keys() {
-		HashSet keys = new HashSet();
-		Node<K, V> node = getRootNode();
-		Set<Node<K, V>> children = node.getChildren();
-		for (Node<K, V> child:children) {
-			for (K key:child.getData().keySet()) {
-				if ((key instanceof String) && (key.equals(ExpirationAlgorithmConfig.EXPIRATION_KEY))) {
-					continue;
-				}
-				keys.add(key);
-			}
-		}
-		return keys;
-	}	
-}

Modified: branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java
===================================================================
--- branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -22,138 +22,65 @@
 
 package org.teiid.cache.jboss;
 
-import java.util.HashSet;
 import java.util.Set;
+import java.util.concurrent.TimeUnit;
 
-import org.jboss.cache.Fqn;
-import org.jboss.cache.Node;
 import org.teiid.cache.Cache;
-import org.teiid.cache.CacheConfiguration;
-import org.teiid.cache.CacheListener;
 
 
 /**
- * Implementation of Cache using JBoss Cache
+ * Implementation of Cache using Infinispan
  */
-public class JBossCache<K, V> implements Cache<K, V> {
+public class JBossCache<K, V> implements Cache<String, V> {
 
-	protected org.jboss.cache.Cache<K, V> cacheStore;
-	protected Fqn rootFqn;
-	protected JBossCacheListener cacheListener;
-	protected CacheConfiguration config;
+	protected org.infinispan.Cache<String, V> cacheStore;
+	private final String name; 
 	
-	public JBossCache(org.jboss.cache.Cache<K, V> cacheStore, Fqn fqn) {
+	public JBossCache(org.infinispan.Cache<String, V> cacheStore, String cacheName) {
 		this.cacheStore = cacheStore;
-		this.rootFqn = fqn;
+		this.name = cacheName;
 	}
 	
+	private String fqn(String key) {
+		return this.name+"."+key; //$NON-NLS-1$
+	}
+	
 	@Override
-	public V get(K key) {
-		Node<K, V> node = getRootNode();
-		Node child = node.getChild(getFqn(key));
-		if (child != null) {
-			if (validateNode(child)) {
-				return (V)child.get(key);
-			}
-			remove(key);
-		}
-		return null;
+	public V get(String key) {
+		return this.cacheStore.get(fqn(key));
 	}
 	
-	protected boolean validateNode(Node node) {
-		return true;
+	public V put(String key, V value) {
+		return this.cacheStore.put(fqn(key), value);
 	}
-
-	protected Fqn<String> getFqn(K key) {
-		if (key.getClass().isPrimitive() || key instanceof String) {
-			return Fqn.fromString(String.valueOf(key));
-		}
-		return Fqn.fromString(String.valueOf(key.getClass().getSimpleName()+key.hashCode()));
-	}
-
-	public V put(K key, V value) {
-		Node<K, V> node = getRootNode();
-		Node<K, V> child = node.addChild(getFqn(key));
-		return child.put(key, value);
-	}
 	
 	@Override
-	public V put(K key, V value, Long ttl) {
-		return this.put(key, value);
+	public V put(String key, V value, Long ttl) {
+		return this.cacheStore.put(fqn(key), value, ttl, TimeUnit.SECONDS);
 	}
 
 	@Override
-	public V remove(K key) {
-		Node<K, V> node = getRootNode();
-		Fqn<String> fqn = getFqn(key);
-		Node child = node.getChild(fqn);
-		if (child != null) {
-			V value = (V)child.remove(key);
-			node.removeChild(fqn);
-			return value;
-		}
-		return null;
+	public V remove(String key) {
+		return this.cacheStore.remove(fqn(key));
 	}
 	
 	@Override
 	public int size() {
-		Node<K, V> node = getRootNode();
-		int size = 0;
-		Set<Node<K,V>> nodes = new HashSet<Node<K, V>>(node.getChildren());
-		for (Node<K, V> child : nodes) {
-			if (!child.getData().isEmpty()) {
-				size++;
-			}
-		}
-		return size;
+		return this.cacheStore.size();
 	}
 	
 	@Override
 	public void clear() {
-		Node<K, V> node = getRootNode();
-		node.clearData();
-		Set<Node<K,V>> nodes = new HashSet<Node<K, V>>(node.getChildren());
-		for (Node<K, V> child : nodes) {
-			child.clearData();
-			node.removeChild(child.getFqn());
-		}
+		this.cacheStore.clear();
 	}
 	
-	public synchronized void addListener(CacheListener listener) {
-		this.cacheListener = new JBossCacheListener(this.rootFqn, listener);
-		this.cacheStore.addCacheListener(this.cacheListener);
-	}
-
-	public synchronized void removeListener() {
-		this.cacheStore.removeCacheListener(this.cacheListener);
-		this.cacheListener = null;	
-	}
-
-	protected Node<K, V> getRootNode() {
-		Node<K, V> node = this.cacheStore.getNode(this.rootFqn);
-		if (node == null) {
-			throw new IllegalStateException("Cache Node "+ this.rootFqn +" not found."); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-		return node;
-	}
-
 	@Override
 	public String getName() {
-		return this.rootFqn.toString();
+		return this.name;
 	}
 
-	void setCacheConfiguration(CacheConfiguration config) {
-		this.config = config;
-	}
-
 	@Override
-	public Set<K> keys() {
-		HashSet keys = new HashSet();
-		Node<K, V> node = getRootNode();
-		Set<Node<K, V>> children = node.getChildren();
-		for (Node<K, V> child:children) {
-			keys.addAll(child.getData().keySet());
-		}
-		return keys;
+	public Set<String> keys() {
+		return this.cacheStore.keySet();
 	}
 }

Modified: branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java
===================================================================
--- branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -24,31 +24,22 @@
 
 import java.io.Serializable;
 
-import org.jboss.cache.CacheManager;
-import org.jboss.cache.Fqn;
-import org.jboss.cache.Node;
-import org.jboss.cache.Region;
-import org.jboss.cache.config.EvictionAlgorithmConfig;
-import org.jboss.cache.config.EvictionRegionConfig;
-import org.jboss.cache.eviction.ExpirationAlgorithmConfig;
-import org.jboss.cache.eviction.LRUAlgorithmConfig;
-import org.jboss.cache.eviction.RemoveOnEvictActionPolicy;
+import org.infinispan.manager.CacheContainer;
 import org.teiid.cache.Cache;
 import org.teiid.cache.CacheConfiguration;
-import org.teiid.cache.CacheConfiguration.Policy;
 import org.teiid.cache.CacheFactory;
 import org.teiid.core.TeiidRuntimeException;
 
 
 public class JBossCacheFactory implements CacheFactory, Serializable{
 	private static final long serialVersionUID = -2767452034178675653L;
-	private transient org.jboss.cache.Cache cacheStore;
+	private transient org.infinispan.Cache cacheStore;
 	private volatile boolean destroyed = false;
 	
 
 	public JBossCacheFactory(String name, Object cm) throws Exception {
-		CacheManager cachemanager = (CacheManager)cm;
-		this.cacheStore = cachemanager.getCache(name, true);
+		CacheContainer cachemanager = (CacheContainer)cm;
+		this.cacheStore = cachemanager.getCache(name);
 	}
 	
 	/**
@@ -56,64 +47,15 @@
 	 */
 	public Cache get(String location, CacheConfiguration config) {
 		if (!destroyed) {
-			
-			if (!this.cacheStore.getCacheStatus().allowInvocations()) {
-				this.cacheStore.start();
-				if (this.cacheStore.getRegion(this.cacheStore.getRoot().getFqn(), false) != null) {
-					this.cacheStore.getRegion(this.cacheStore.getRoot().getFqn(), true).activate();	
-				}
-			}
-			
-			Node cacheRoot = this.cacheStore.getRoot().addChild(Fqn.fromString("Teiid")); //$NON-NLS-1$
-			Node node = cacheRoot.addChild(Fqn.fromString(location));
-			node.setResident(true);
-			
-			Region cacheRegion = this.cacheStore.getRegion(node.getFqn(), true);
-			cacheRegion.setEvictionRegionConfig(buildEvictionConfig(node.getFqn(), config));
-			cacheRegion.activate();
-			cacheRegion = this.cacheStore.getRegion(node.getFqn(), true);
-			cacheRegion.setEvictionRegionConfig(buildEvictionConfig(node.getFqn(), config));
-						
-			JBossCache jc = null;
-			if (config != null && config.getPolicy().equals(Policy.EXPIRATION)) {
-				jc = new ExpirationAwareCache(this.cacheStore, node.getFqn());
-			}
-			else {
-				jc = new JBossCache(this.cacheStore, node.getFqn());	
-			}
-			
-			jc.setCacheConfiguration(config);
-			return jc;
+			return new JBossCache(this.cacheStore, config.getLocation());	
 		}
 		throw new TeiidRuntimeException("Cache system has been shutdown"); //$NON-NLS-1$
 	}
 	
-	private EvictionRegionConfig  buildEvictionConfig(Fqn rootFqn, CacheConfiguration config) {
-		EvictionAlgorithmConfig  evictionConfig = null;
-		
-		if (config.getPolicy() == Policy.LRU) {
-			LRUAlgorithmConfig lru = new LRUAlgorithmConfig();
-			lru.setMaxNodes(config.getMaxEntries());
-			lru.setMaxAge(config.getMaxAgeInSeconds()*1000);
-			lru.setTimeToLive(-1); // -1 no limit
-			evictionConfig = lru;
-		}
-		else if (config.getPolicy() == Policy.EXPIRATION) {
-			ExpirationAlgorithmConfig lfu  = new ExpirationAlgorithmConfig();
-			lfu.setMaxNodes(config.getMaxEntries());
-			evictionConfig = lfu;
-		}
-		
-		EvictionRegionConfig erc = new EvictionRegionConfig(rootFqn, evictionConfig);
-		erc.setEvictionActionPolicyClassName(RemoveOnEvictActionPolicy.class.getName());
-		return erc;
-	}	
-	
 	public void destroy() {
 		this.destroyed = true;		
 	}	
 	
-	// this will be called by microcontainer.
 	public void stop() {
 		destroy();
 	}

Deleted: branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheListener.java
===================================================================
--- branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheListener.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheListener.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -1,58 +0,0 @@
-/*
- * 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.cache.jboss;
-
-import org.jboss.cache.Fqn;
-import org.jboss.cache.notifications.annotation.NodeCreated;
-import org.jboss.cache.notifications.annotation.NodeEvicted;
-import org.jboss.cache.notifications.annotation.NodeLoaded;
-import org.jboss.cache.notifications.annotation.NodeModified;
-import org.jboss.cache.notifications.annotation.NodeMoved;
-import org.jboss.cache.notifications.annotation.NodeRemoved;
-import org.jboss.cache.notifications.event.NodeEvent;
-import org.teiid.cache.CacheListener;
-
-
- at org.jboss.cache.notifications.annotation.CacheListener
-public class JBossCacheListener {
-
-	private CacheListener listener;
-	private Fqn rootFqn;
-
-	public JBossCacheListener(Fqn fqn, CacheListener listener) {
-		this.rootFqn = fqn;
-		this.listener = listener;
-	}
-	
-    @NodeCreated
-	@NodeRemoved
-	@NodeModified
-	@NodeMoved
-	@NodeLoaded
-	@NodeEvicted 
-	public synchronized void cacheChanged(NodeEvent ne) {
-    	Fqn fqn = ne.getFqn();
-    	if (fqn.isChildOrEquals(rootFqn)) {
-    		listener.cacheChanged();
-    	}
-	}
-}

Deleted: branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/TupleBatchCacheLoader.java
===================================================================
--- branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/TupleBatchCacheLoader.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/TupleBatchCacheLoader.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -1,110 +0,0 @@
-/*
- * 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.cache.jboss;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.cache.Fqn;
-import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
-import org.teiid.common.buffer.BufferManager;
-import org.teiid.common.buffer.TupleBatch;
-import org.teiid.common.buffer.TupleBuffer;
-import org.teiid.core.TeiidRuntimeException;
-
-public class TupleBatchCacheLoader extends ClusteredTupleBatchCacheLoader {
-
-	private BufferManager bufferMgr;
-	private IndividualCacheLoaderConfig config;
-	
-	@Override
-	public boolean exists(Fqn fqn) throws Exception {
-		String id = fqn.getLastElementAsString();
-		int index = id.indexOf(',');
-		if (index != -1) {
-			return true;
-		}
-		return false;
-	}
-
-	@Override
-	public Map<Object, Object> get(Fqn fqn) throws Exception {
-		String id = fqn.getLastElementAsString();
-		int index = id.indexOf(',');
-		if (index != -1) {
-			String uuid = id.substring(0, index);
-			int row = Integer.parseInt(id.substring(index+1));
-			TupleBuffer tb = this.bufferMgr.getTupleBuffer(uuid);
-			if (tb != null) {
-				Map map = new HashMap();
-				TupleBatch b = tb.getBatch(row);
-				b.preserveTypes();
-				map.put(id, b);
-				return map;
-			}
-		}
-		return super.get(fqn);
-	}
-
-	@Override
-	public Set<?> getChildrenNames(Fqn fqn) throws Exception {
-		return super.getChildrenNames(fqn);
-	}
-
-	@Override
-	public IndividualCacheLoaderConfig getConfig() {
-		return this.config;
-	}
-
-	@Override
-	public Object put(Fqn fqn, Object key, Object value) throws Exception {
-		return super.put(fqn, key, value);
-	}
-
-	@Override
-	public void remove(Fqn fqn) throws Exception {
-		super.remove(fqn);
-	}
-
-	@Override
-	public Object remove(Fqn fqn, Object key) throws Exception {
-		return super.remove(fqn, key);
-	}
-
-	@Override
-	public void removeData(Fqn fqn) throws Exception {
-		super.removeData(fqn);
-	}
-
-	@Override
-	public void setConfig(IndividualCacheLoaderConfig config) {
-		if (!(config instanceof TupleBatchCacheLoaderConfig)) {
-			throw new TeiidRuntimeException("Wrong Configuration"); //$NON-NLS-1$
-		}
-		this.config = config;
-		TupleBatchCacheLoaderConfig bmc = (TupleBatchCacheLoaderConfig)config;
-		this.bufferMgr = bmc.getBufferService().getBufferManager();
-		super.setConfig(config);
-	}
-
-}

Deleted: branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/TupleBatchCacheLoaderConfig.java
===================================================================
--- branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/TupleBatchCacheLoaderConfig.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/TupleBatchCacheLoaderConfig.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -1,57 +0,0 @@
-/*
- * 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.cache.jboss;
-
-import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
-import org.teiid.dqp.service.BufferService;
-
-public class TupleBatchCacheLoaderConfig extends IndividualCacheLoaderConfig {
-	private static final long serialVersionUID = -5926642610388245871L;
-	private BufferService service;
-	private long timeout;
-	
-	public long getTimeout() {
-		return timeout;
-	}
-
-	public void setTimeout(long timeout) {
-		this.timeout = timeout;
-	}
-
-	public TupleBatchCacheLoaderConfig() {
-		setClassName(TupleBatchCacheLoader.class.getName());
-	}
-	
-	public TupleBatchCacheLoaderConfig(IndividualCacheLoaderConfig config) {
-		setClassName(TupleBatchCacheLoader.class.getName());
-		populateFromBaseConfig(config);
-	}
-	
-	
-	public void setBufferService(BufferService service) {
-		this.service = service;
-	}
-	
-	public BufferService getBufferService() {
-		return this.service;
-	}
-}

Modified: branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java
===================================================================
--- branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -34,6 +34,7 @@
 import java.util.concurrent.Executor;
 import java.util.concurrent.Executors;
 
+import org.jboss.as.clustering.jgroups.ChannelFactory;
 import org.jgroups.*;
 import org.jgroups.blocks.GroupRequest;
 import org.jgroups.blocks.MethodCall;
@@ -48,7 +49,7 @@
 import org.teiid.query.ObjectReplicator;
 import org.teiid.query.ReplicatedObject;
 
-public class JGroupsObjectReplicator implements ObjectReplicator, Serializable {
+public abstract class JGroupsObjectReplicator implements ObjectReplicator, Serializable {
 	
 	private static final long serialVersionUID = -6851804958313095166L;
 	private static final String CREATE_STATE = "createState"; //$NON-NLS-1$
@@ -221,53 +222,17 @@
 		void finishState(String id);
 	}
 
-	private transient ChannelFactory channelFactory;
-	private String multiplexerStack;
+	
 	private String clusterName;
-	private String jndiName;
 	//TODO: this should be configurable, or use a common executor
 	private transient Executor executor = Executors.newCachedThreadPool();
 
-	public ChannelFactory getChannelFactory() {
-		return channelFactory;
-	}
-	
-	public void setJndiName(String jndiName) {
-		this.jndiName = jndiName;
-	}
-	
-	public String getJndiName() {
-		return jndiName;
-	}
-	
-	public String getMultiplexerStack() {
-		return multiplexerStack;
-	}
-	
-	public String getClusterName() {
-		return clusterName;
-	}
-	
-	public void setChannelFactory(ChannelFactory channelFactory) {
-		this.channelFactory = channelFactory;
-	}
-	
-	public void setClusterName(String clusterName) {
+	public JGroupsObjectReplicator(String clusterName) {
 		this.clusterName = clusterName;
 	}
 	
-	public void setMultiplexerStack(String multiplexerStack) {
-		this.multiplexerStack = multiplexerStack;
-	}
+	public abstract ChannelFactory getChannelFactory();
 	
-	public void start() throws Exception {
-		if (this.channelFactory == null) {
-			return; //no need to distribute events
-		}
-	}
-
-	public void stop() {
-	}
 	
 	public void stop(Object object) {
 		ReplicatedInvocationHandler<?> handler = (ReplicatedInvocationHandler<?>) Proxy.getInvocationHandler(object);
@@ -280,7 +245,7 @@
 	@Override
 	public <T, S> T replicate(String mux_id,
 			Class<T> iface, final S object, long startTimeout) throws Exception {
-		Channel channel = this.channelFactory.createMultiplexerChannel(this.multiplexerStack, mux_id);
+		Channel channel = getChannelFactory().createChannel(mux_id);
 		Method[] methods = iface.getMethods();
 		
 		final HashMap<Method, Short> methodMap = new HashMap<Method, Short>();

Modified: branches/as7/jboss-integration/pom.xml
===================================================================
--- branches/as7/jboss-integration/pom.xml	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/pom.xml	2011-09-12 14:56:06 UTC (rev 3464)
@@ -51,6 +51,11 @@
         <scope>provided</scope>
     </dependency>
     <dependency>
+      <groupId>org.jboss.as</groupId>
+      <artifactId>jboss-as-clustering-jgroups</artifactId>
+      <scope>provided</scope>
+    </dependency>      
+    <dependency>
         <groupId>org.jboss</groupId>
         <artifactId>staxmapper</artifactId>
         <scope>provided</scope>

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/BufferManagerService.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/BufferManagerService.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/BufferManagerService.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -28,7 +28,7 @@
 import org.jboss.msc.value.InjectedValue;
 import org.teiid.services.BufferServiceImpl;
 
-public class BufferManagerService implements Service<BufferServiceImpl> {
+class BufferManagerService implements Service<BufferServiceImpl> {
 
 	private BufferServiceImpl bufferMgr;
 	public final InjectedValue<String> pathInjector = new InjectedValue<String>();

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Configuration.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Configuration.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Configuration.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -28,9 +28,8 @@
 
 class Configuration {
 	public static final String BUFFER_SERVICE = "buffer-service";//$NON-NLS-1$
+	public static final String PREPAREDPLAN_CACHE = "preparedplan-cache";//$NON-NLS-1$	
 	public static final String RESULTSET_CACHE = "resultset-cache";//$NON-NLS-1$
-	public static final String PREPAREDPLAN_CACHE = "preparedplan-cache";//$NON-NLS-1$	
-	public static final String CACHE_FACORY = "distributed-cache-factory";//$NON-NLS-1$
 	public static final String QUERY_ENGINE = "query-engine";//$NON-NLS-1$
 	public static final String JDBC = "jdbc";//$NON-NLS-1$
 	public static final String ODBC = "odbc"; //$NON-NLS-1$
@@ -48,7 +47,7 @@
 	public static final String MAX_SOURCE_ROWS = "max-source-rows-allowed";//$NON-NLS-1$
 	public static final String EXCEPTION_ON_MAX_SOURCE_ROWS = "exception-on-max-source-rows";//$NON-NLS-1$
 	public static final String MAX_ODBC_LOB_SIZE_ALLOWED = "max-odbc-lob-size-allowed";//$NON-NLS-1$
-	public static final String OBJECT_REPLICATOR_NAME = "object-replicator-name";//$NON-NLS-1$
+	public static final String OBJECT_REPLICATOR = "object-replicator";//$NON-NLS-1$
 	public static final String DETECTING_CHANGE_EVENTS = "detect-change-events";//$NON-NLS-1$
 	public static final String SECURITY_DOMAIN = "security-domain";//$NON-NLS-1$
 	public static final String MAX_SESSIONS_ALLOWED = "max-sessions-allowed";//$NON-NLS-1$
@@ -72,33 +71,35 @@
 	public static final String MAX_ENTRIES = "max-entries";//$NON-NLS-1$
 	public static final String MAX_AGE_IN_SECS = "max-age-in-seconds";//$NON-NLS-1$
 	public static final String MAX_STALENESS = "max-staleness";//$NON-NLS-1$
-	public static final String CACHE_TYPE = "type";//$NON-NLS-1$
 	public static final String ENABLE = "enable";//$NON-NLS-1$
 	
-	// cache-factory
-	public static final String  CACHE_SERVICE_JNDI_NAME = "cache-manager-jndi-name";//$NON-NLS-1$
-	public static final String  RESULTSET_CACHE_NAME = "resultsetCacheName";//$NON-NLS-1$
+	// cache-container
+	public static final String  NAME = "name";//$NON-NLS-1$
+	public static final String  CONTAINER_NAME = "container-name";//$NON-NLS-1$
 	
 	//socket config
-	public static final String MAX_SOCKET_THREAD_SIZE = "maxSocketThreads";//$NON-NLS-1$
-	public static final String IN_BUFFER_SIZE = "inputBufferSize";//$NON-NLS-1$
-	public static final String OUT_BUFFER_SIZE = "outputBufferSize";//$NON-NLS-1$
+	public static final String MAX_SOCKET_THREAD_SIZE = "max-socket-threads";//$NON-NLS-1$
+	public static final String IN_BUFFER_SIZE = "input-buffer-size";//$NON-NLS-1$
+	public static final String OUT_BUFFER_SIZE = "output-buffer-size";//$NON-NLS-1$
 	public static final String SOCKET_BINDING = "socket-binding";//$NON-NLS-1$
 	public static final String SOCKET_ENABLED = "enabled";//$NON-NLS-1$
 	public static final String SSL_MODE = "mode";//$NON-NLS-1$
-	public static final String KEY_STORE_FILE = "keystoreFilename";//$NON-NLS-1$
-	public static final String KEY_STORE_PASSWD = "keystorePassword";//$NON-NLS-1$
-	public static final String KEY_STORE_TYPE = "keystoreType";//$NON-NLS-1$
-	public static final String SSL_PROTOCOL = "sslProtocol";//$NON-NLS-1$
-	public static final String KEY_MANAGEMENT_ALG = "keymanagementAlgorithm";//$NON-NLS-1$
-	public static final String TRUST_FILE = "truststoreFilename";//$NON-NLS-1$
-	public static final String TRUST_PASSWD = "truststorePassword";//$NON-NLS-1$
-	public static final String AUTH_MODE = "authenticationMode";//$NON-NLS-1$
+	public static final String KEY_STORE_FILE = "keystore-name";//$NON-NLS-1$
+	public static final String KEY_STORE_PASSWD = "keystore-password";//$NON-NLS-1$
+	public static final String KEY_STORE_TYPE = "keystore-type";//$NON-NLS-1$
+	public static final String SSL_PROTOCOL = "ssl-protocol";//$NON-NLS-1$
+	public static final String KEY_MANAGEMENT_ALG = "keymanagement-algorithm";//$NON-NLS-1$
+	public static final String TRUST_FILE = "truststore-name";//$NON-NLS-1$
+	public static final String TRUST_PASSWD = "truststore-password";//$NON-NLS-1$
+	public static final String AUTH_MODE = "authentication-mode";//$NON-NLS-1$
 	public static final String SSL = "ssl";//$NON-NLS-1$
 	
 	public static final String TRANSLATOR_NAME = "name";//$NON-NLS-1$
 	public static final String TRANSLATOR_MODULE = "module";//$NON-NLS-1$
 	
+	public static final String STACK = "stack";//$NON-NLS-1$
+	public static final String CLUSTER_NAME = "cluster-name";//$NON-NLS-1$
+	
 	public static final String ENGINE_NAME = "name";//$NON-NLS-1$
 	
 	public static final String DESC = ".describe"; //$NON-NLS-1$

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Element.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Element.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Element.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -29,11 +29,14 @@
 enum Element {
     // must be first
     UNKNOWN(null),
+
+    // VM wide elements
     QUERY_ENGINE_ELEMENT(QUERY_ENGINE),
+    ASYNC_THREAD_GROUP_ELEMENT(ASYNC_THREAD_GROUP),
+    OBJECT_REPLICATOR_ELEMENT(OBJECT_REPLICATOR),
     	
 	// Query-ENGINE
     ENGINE_NAME_ATTRIBUTE(ENGINE_NAME),
-    ASYNC_THREAD_GROUP_ELEMENT(ASYNC_THREAD_GROUP),
 	MAX_THREADS_ELEMENT(MAX_THREADS),
 	MAX_ACTIVE_PLANS_ELEMENT(MAX_ACTIVE_PLANS),
 	USER_REQUEST_SOURCE_CONCURRENCY_ELEMENT(USER_REQUEST_SOURCE_CONCURRENCY),
@@ -46,7 +49,6 @@
 	MAX_SOURCE_ROWS_ELEMENT(MAX_SOURCE_ROWS),
 	EXCEPTION_ON_MAX_SOURCE_ROWS_ELEMENT(EXCEPTION_ON_MAX_SOURCE_ROWS),
 	MAX_ODBC_LOB_SIZE_ALLOWED_ELEMENT(MAX_ODBC_LOB_SIZE_ALLOWED),
-	OBJECT_REPLICATOR_NAME_ELEMENT(OBJECT_REPLICATOR_NAME),
 	DETECTING_CHANGE_EVENTS_ELEMENT(DETECTING_CHANGE_EVENTS),
 	MAX_SESSIONS_ALLOWED_ELEMENT(MAX_SESSIONS_ALLOWED),
 	SESSION_EXPIRATION_TIME_LIMIT_ELEMENT(SESSION_EXPIRATION_TIME_LIMIT),
@@ -55,9 +57,8 @@
 	
 	//children
 	BUFFER_SERVICE_ELEMENT(BUFFER_SERVICE),
+	PREPAREDPLAN_CACHE_ELEMENT(PREPAREDPLAN_CACHE),	
 	RESULTSET_CACHE_ELEMENT(RESULTSET_CACHE),
-	PREPAREDPLAN_CACHE_ELEMENT(PREPAREDPLAN_CACHE),	
-	CACHE_FACORY_ELEMENT(CACHE_FACORY),
 	JDBC_ELEMENT(JDBC),
 	ODBC_ELEMENT(ODBC),	
 	
@@ -71,23 +72,25 @@
 	MAX_BUFFER_SPACE_ELEMENT(MAX_BUFFER_SPACE),
 	MAX_OPEN_FILES_ELEMENT(MAX_OPEN_FILES),
 	
-	//cache-config
+	//prepared-plan-cache-config
 	MAX_ENTRIES_ELEMENT(MAX_ENTRIES),
 	MAX_AGE_IN_SECS_ELEMENT(MAX_AGE_IN_SECS),
 	MAX_STALENESS_ELEMENT(MAX_STALENESS),
-	CACHE_TYPE_ELEMENT(CACHE_TYPE),
 	ENABLE_ATTRIBUTE(ENABLE),
 	
-	// cache-factory
-	 CACHE_SERVICE_JNDI_NAME_ELEMENT(CACHE_SERVICE_JNDI_NAME),
-	 RESULTSET_CACHE_NAME_ELEMENT(RESULTSET_CACHE_NAME),
+	// Object Replicator
+	STACK_ATTRIBUTE(STACK),
+	CLUSTER_NAME_ATTRIBUTE(CLUSTER_NAME),
 	
+	// cache-container
+	NAME_ELEMENT(NAME),
+	CONTAINER_NAME_ELEMENT(CONTAINER_NAME),
+	
 	//socket config
 	MAX_SOCKET_SIZE_ELEMENT(MAX_SOCKET_THREAD_SIZE),
 	IN_BUFFER_SIZE_ELEMENT(IN_BUFFER_SIZE),
 	OUT_BUFFER_SIZE_ELEMENT(OUT_BUFFER_SIZE),
 	SOCKET_BINDING_ELEMENT(SOCKET_BINDING),
-	SOCKET_ENABLED_ELEMENT(SOCKET_ENABLED),
 	SSL_MODE_ELEMENT(SSL_MODE),
 	KEY_STORE_FILE_ELEMENT(KEY_STORE_FILE),
 	KEY_STORE_PASSWD_ELEMENT(KEY_STORE_PASSWD),

Added: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/JGroupsObjectReplicatorService.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/JGroupsObjectReplicatorService.java	                        (rev 0)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/JGroupsObjectReplicatorService.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+package org.teiid.jboss;
+
+import org.jboss.as.clustering.jgroups.ChannelFactory;
+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.replication.jboss.JGroupsObjectReplicator;
+
+class JGroupsObjectReplicatorService implements Service<JGroupsObjectReplicator> {
+
+	public final InjectedValue<ChannelFactory> channelFactoryInjector = new InjectedValue<ChannelFactory>();
+	private JGroupsObjectReplicator replicator; 
+	private String clusterName;
+	
+	public JGroupsObjectReplicatorService(String clusterName){
+		this.clusterName = clusterName;
+	}
+	
+	@Override
+	public void start(StartContext context) throws StartException {
+		replicator = new JGroupsObjectReplicator(this.clusterName) {
+			@Override
+			public ChannelFactory getChannelFactory() {
+				return channelFactoryInjector.getValue();
+			}
+		};
+	}
+
+	@Override
+	public void stop(StopContext context) {
+	}
+
+	@Override
+	public JGroupsObjectReplicator getValue() throws IllegalStateException,IllegalArgumentException {
+		return replicator;
+	}
+
+}


Property changes on: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/JGroupsObjectReplicatorService.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/ObjectsSerializerService.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/ObjectsSerializerService.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/ObjectsSerializerService.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -27,7 +27,7 @@
 import org.jboss.msc.service.StopContext;
 import org.jboss.msc.value.InjectedValue;
 
-public class ObjectsSerializerService implements Service<ObjectSerializer> {
+class ObjectsSerializerService implements Service<ObjectSerializer> {
 	private InjectedValue<String> pathInjector = new InjectedValue<String>();
 	private ObjectSerializer serializer;
 	

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineAdd.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineAdd.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineAdd.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -45,6 +45,7 @@
 import org.jboss.dmr.ModelType;
 import org.jboss.msc.inject.ConcurrentMapInjector;
 import org.jboss.msc.service.*;
+import org.jboss.msc.service.ServiceBuilder.DependencyType;
 import org.jboss.msc.value.InjectedValue;
 import org.teiid.deployers.SystemVDBDeployer;
 import org.teiid.deployers.VDBRepository;
@@ -54,6 +55,7 @@
 import org.teiid.jboss.deployers.RuntimeEngineDeployer;
 import org.teiid.logging.LogConstants;
 import org.teiid.logging.LogManager;
+import org.teiid.query.ObjectReplicator;
 import org.teiid.services.BufferServiceImpl;
 import org.teiid.transport.ClientServiceRegistry;
 import org.teiid.transport.LocalServerConnection;
@@ -68,7 +70,7 @@
 		
         final ModelNode node = new ModelNode();
         node.get(OPERATION_NAME).set(ADD);
-        node.get(DESCRIPTION).set("engine.add"); //$NON-NLS-1$
+        node.get(DESCRIPTION).set("engine.add");  //$NON-NLS-1$
         
         ModelNode engine = node.get(REQUEST_PROPERTIES, Configuration.QUERY_ENGINE);
         describeQueryEngine(engine, ATTRIBUTES, bundle);
@@ -81,7 +83,7 @@
         final PathAddress pathAddress = PathAddress.pathAddress(address);
     	final String engineName = pathAddress.getLastElement().getValue();
 
-		populateQueryEngine(engineName, operation, model);
+		populate(engineName, operation, model);
 	}
 	
 	@Override
@@ -124,6 +126,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());
         
         if (jdbc != null) {
         	engineBuilder.addDependency(ServiceName.JBOSS.append("binding", jdbc.getSocketBinding()), SocketBinding.class, engine.getJdbcSocketBindingInjector()); //$NON-NLS-1$
@@ -200,9 +203,6 @@
     	if (node.hasDefined(Configuration.MAX_ODBC_LOB_SIZE_ALLOWED)) {
     		engine.setMaxODBCLobSizeAllowed(node.get(Configuration.MAX_ODBC_LOB_SIZE_ALLOWED).asInt());
     	}
-    	if (node.hasDefined(Configuration.OBJECT_REPLICATOR_NAME)) {
-    		engine.setObjectReplicatorName(node.get(Configuration.OBJECT_REPLICATOR_NAME).asString());
-    	}
     	if (node.hasDefined(Configuration.DETECTING_CHANGE_EVENTS)) {
     		engine.setDetectingChangeEvents(node.get(Configuration.DETECTING_CHANGE_EVENTS).asBoolean());
     	}	             
@@ -295,8 +295,7 @@
 		addAttribute(node, Configuration.QUERY_THRESHOLD_IN_SECS, type, bundle.getString(Configuration.QUERY_THRESHOLD_IN_SECS+DESC), ModelType.INT, false, "600"); //$NON-NLS-1$		
 		addAttribute(node, Configuration.MAX_SOURCE_ROWS, type, bundle.getString(Configuration.MAX_SOURCE_ROWS+DESC), ModelType.INT, false, "-1"); //$NON-NLS-1$
 		addAttribute(node, Configuration.EXCEPTION_ON_MAX_SOURCE_ROWS, type, bundle.getString(Configuration.EXCEPTION_ON_MAX_SOURCE_ROWS+DESC), ModelType.BOOLEAN, false, "true"); //$NON-NLS-1$
-		addAttribute(node, Configuration.MAX_ODBC_LOB_SIZE_ALLOWED, type, bundle.getString(Configuration.MAX_ODBC_LOB_SIZE_ALLOWED+DESC), ModelType.INT, false, "5242880"); //$NON-NLS-1$
-		addAttribute(node, Configuration.OBJECT_REPLICATOR_NAME, type, bundle.getString(Configuration.OBJECT_REPLICATOR_NAME+DESC), ModelType.STRING, false, "teiid/event-distributor"); //$NON-NLS-1$
+		addAttribute(node, Configuration.MAX_ODBC_LOB_SIZE_ALLOWED, type, bundle.getString(Configuration.MAX_ODBC_LOB_SIZE_ALLOWED+DESC), ModelType.INT, false, "5242880"); //$NON-NLS-1$		
 		addAttribute(node, Configuration.DETECTING_CHANGE_EVENTS, type, bundle.getString(Configuration.DETECTING_CHANGE_EVENTS+DESC), ModelType.BOOLEAN, false, "true"); //$NON-NLS-1$
 		
 		//session stuff
@@ -325,11 +324,10 @@
 	
 	
 	private static void describeSocketConfig(ModelNode node, String type, ResourceBundle bundle) {
-		addAttribute(node, Configuration.SOCKET_ENABLED, type, bundle.getString(Configuration.SOCKET_ENABLED+DESC), ModelType.BOOLEAN, false, "true"); //$NON-NLS-1$
 		addAttribute(node, Configuration.MAX_SOCKET_THREAD_SIZE, type, bundle.getString(Configuration.MAX_SOCKET_THREAD_SIZE+DESC), ModelType.INT, false, "0"); //$NON-NLS-1$
 		addAttribute(node, Configuration.IN_BUFFER_SIZE, type, bundle.getString(Configuration.IN_BUFFER_SIZE+DESC), ModelType.INT, false, "0"); //$NON-NLS-1$
 		addAttribute(node, Configuration.OUT_BUFFER_SIZE, type, bundle.getString(Configuration.OUT_BUFFER_SIZE+DESC), ModelType.INT, false, "0"); //$NON-NLS-1$
-		addAttribute(node, Configuration.SOCKET_BINDING, type, bundle.getString(Configuration.SOCKET_BINDING+DESC), ModelType.INT, true, null);
+		addAttribute(node, Configuration.SOCKET_BINDING, type, bundle.getString(Configuration.SOCKET_BINDING+DESC), ModelType.STRING, true, null);
 		
 		ModelNode sslNode = node.get(CHILDREN, Configuration.SSL);
 		sslNode.get(TYPE).set(ModelType.OBJECT);
@@ -348,7 +346,7 @@
 		addAttribute(node, Configuration.AUTH_MODE, type, bundle.getString(Configuration.AUTH_MODE+DESC), ModelType.STRING, false, "anonymous");	//$NON-NLS-1$
 	}	
 	
-	private void populateQueryEngine(String engineName, ModelNode operation, ModelNode model) {
+	static void populate(String engineName, ModelNode operation, ModelNode model) {
 		model.get(Configuration.ENGINE_NAME).set(engineName);
 		
 		if (operation.hasDefined(Configuration.MAX_THREADS)) {
@@ -381,9 +379,6 @@
     	if (operation.hasDefined(Configuration.MAX_ODBC_LOB_SIZE_ALLOWED)) {
     		model.get(Configuration.MAX_ODBC_LOB_SIZE_ALLOWED).set(operation.get(Configuration.MAX_ODBC_LOB_SIZE_ALLOWED).asInt());
     	}
-    	if (operation.hasDefined(Configuration.OBJECT_REPLICATOR_NAME)) {
-    		model.get(Configuration.OBJECT_REPLICATOR_NAME).set(operation.get(Configuration.OBJECT_REPLICATOR_NAME).asString());
-    	}
     	if (operation.hasDefined(Configuration.SECURITY_DOMAIN)) {
     		List<ModelNode> domains = operation.get(Configuration.SECURITY_DOMAIN).asList();
     		for (ModelNode domain: domains) {
@@ -409,7 +404,7 @@
     	}     	
 	}
 
-	private void populateSocketConfiguration(ModelNode operation, ModelNode model) {
+	private static void populateSocketConfiguration(ModelNode operation, ModelNode model) {
 		if (operation.hasDefined(Configuration.SOCKET_BINDING)) {
 			model.get(Configuration.SOCKET_BINDING).set(operation.get(Configuration.SOCKET_BINDING).asString());
 		}

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineOperationHandler.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineOperationHandler.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineOperationHandler.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -577,7 +577,7 @@
 	protected void executeOperation(VDBRepository repo, ModelNode operation, ModelNode node) throws OperationFailedException {
 		List<VDBMetaData> vdbs = repo.getVDBs();
 		for (VDBMetaData vdb:vdbs) {
-			node.add(MetadataMapper.wrap(vdb, node.add()));
+			MetadataMapper.wrap(vdb, node.add());
 		}
 	}
 	protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
@@ -595,7 +595,7 @@
 	protected void executeOperation(TranslatorRepository repo, ModelNode operation, ModelNode node) throws OperationFailedException {
 		List<VDBTranslatorMetaData> translators = repo.getTranslators();
 		for (VDBTranslatorMetaData t:translators) {
-			node.add(MetadataMapper.VDBTranslatorMetaDataMapper.wrap(t, node.add()));
+			MetadataMapper.VDBTranslatorMetaDataMapper.wrap(t, node.add());
 		}
 	}
 	

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineReferenceFactoryService.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineReferenceFactoryService.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineReferenceFactoryService.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -35,7 +35,7 @@
 import org.teiid.jboss.deployers.RuntimeEngineDeployer;
 
 
-public class QueryEngineReferenceFactoryService implements Service<ManagedReferenceFactory>, ManagedReferenceFactory {
+class QueryEngineReferenceFactoryService implements Service<ManagedReferenceFactory>, ManagedReferenceFactory {
     private final InjectedValue<RuntimeEngineDeployer> engineInjector = new InjectedValue<RuntimeEngineDeployer>();
 
     private ManagedReference reference;

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineRemove.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineRemove.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineRemove.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -37,7 +37,7 @@
 import org.jboss.msc.service.ServiceRegistry;
 import org.teiid.transport.LocalServerConnection;
 
-public class QueryEngineRemove extends AbstractRemoveStepHandler implements DescriptionProvider {
+class QueryEngineRemove extends AbstractRemoveStepHandler implements DescriptionProvider {
 
 	@Override
     protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) {

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/SystemVDBService.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/SystemVDBService.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/SystemVDBService.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -27,7 +27,7 @@
 import org.jboss.msc.service.StopContext;
 import org.teiid.deployers.SystemVDBDeployer;
 
-public class SystemVDBService implements Service<SystemVDBDeployer> {
+class SystemVDBService implements Service<SystemVDBDeployer> {
 	private SystemVDBDeployer deployer;
 	
 	public SystemVDBService(SystemVDBDeployer deployer){

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidBootServicesAdd.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidBootServicesAdd.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidBootServicesAdd.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -31,6 +31,7 @@
 import java.util.ResourceBundle;
 import java.util.ServiceLoader;
 
+import org.jboss.as.clustering.jgroups.ChannelFactory;
 import org.jboss.as.controller.AbstractAddStepHandler;
 import org.jboss.as.controller.OperationContext;
 import org.jboss.as.controller.OperationFailedException;
@@ -45,14 +46,11 @@
 import org.jboss.modules.Module;
 import org.jboss.modules.ModuleIdentifier;
 import org.jboss.modules.ModuleLoadException;
-import org.jboss.msc.service.ServiceBuilder;
-import org.jboss.msc.service.ServiceController;
-import org.jboss.msc.service.ServiceTarget;
-import org.jboss.msc.service.ValueService;
+import org.jboss.msc.service.*;
 import org.teiid.PolicyDecider;
 import org.teiid.cache.CacheConfiguration;
 import org.teiid.cache.CacheConfiguration.Policy;
-import org.teiid.cache.CacheFactory;
+import org.teiid.cache.DefaultCacheFactory;
 import org.teiid.cache.jboss.ClusterableCacheFactory;
 import org.teiid.common.buffer.BufferManager;
 import org.teiid.deployers.SystemVDBDeployer;
@@ -60,9 +58,11 @@
 import org.teiid.dqp.internal.datamgr.TranslatorRepository;
 import org.teiid.dqp.internal.process.*;
 import org.teiid.query.function.SystemFunctionManager;
+import org.teiid.replication.jboss.JGroupsObjectReplicator;
 import org.teiid.services.BufferServiceImpl;
 
-public class TeiidBootServicesAdd extends AbstractAddStepHandler implements DescriptionProvider {
+class TeiidBootServicesAdd extends AbstractAddStepHandler implements DescriptionProvider {
+
 	@Override
 	public ModelNode getModelDescription(Locale locale) {
         final ResourceBundle bundle = IntegrationPlugin.getResourceBundle(locale);
@@ -81,6 +81,7 @@
 
         addAttribute(node, Configuration.AUTHORIZATION_VALIDATOR_MODULE, type, bundle.getString(Configuration.AUTHORIZATION_VALIDATOR_MODULE+DESC), ModelType.BOOLEAN, false, "false"); //$NON-NLS-1$
         addAttribute(node, Configuration.POLICY_DECIDER_MODULE, type, bundle.getString(Configuration.POLICY_DECIDER_MODULE+DESC), ModelType.STRING, false, "teiid-async-threads"); //$NON-NLS-1$
+        addAttribute(node, Configuration.OBJECT_REPLICATOR, type, bundle.getString(Configuration.OBJECT_REPLICATOR+DESC), ModelType.STRING, false, "teiid/event-distributor"); //$NON-NLS-1$
         
 		ModelNode bufferNode = node.get(CHILDREN, Configuration.BUFFER_SERVICE);
 		bufferNode.get(TYPE).set(ModelType.OBJECT);
@@ -88,13 +89,6 @@
 		bufferNode.get(REQUIRED).set(false);
 		describeBufferManager(bufferNode, ATTRIBUTES, bundle);		
         
-		// result-set-cache
-		ModelNode rsCacheNode = node.get(CHILDREN, Configuration.RESULTSET_CACHE);
-		rsCacheNode.get(TYPE).set(ModelType.OBJECT);
-		rsCacheNode.get(DESCRIPTION).set(bundle.getString(Configuration.RESULTSET_CACHE+DESC));
-		rsCacheNode.get(REQUIRED).set(false);
-		describeResultsetcache(rsCacheNode, ATTRIBUTES, bundle);
-		
 		// preparedplan-set-cache
 		ModelNode preparedPlanCacheNode = node.get(CHILDREN, Configuration.PREPAREDPLAN_CACHE);
 		preparedPlanCacheNode.get(TYPE).set(ModelType.OBJECT);
@@ -102,16 +96,20 @@
 		preparedPlanCacheNode.get(REQUIRED).set(false);
 		describePreparedPlanCache(preparedPlanCacheNode, ATTRIBUTES, bundle);
 		
-		//distributed-cache
-		ModelNode distributedCacheNode = node.get(CHILDREN, Configuration.CACHE_FACORY);
+		// result-set-cache
+		ModelNode distributedCacheNode = node.get(CHILDREN, Configuration.RESULTSET_CACHE);
 		distributedCacheNode.get(TYPE).set(ModelType.OBJECT);
-		distributedCacheNode.get(DESCRIPTION).set(bundle.getString(Configuration.CACHE_FACORY+DESC));
+		distributedCacheNode.get(DESCRIPTION).set(bundle.getString(Configuration.RESULTSET_CACHE+DESC));
 		distributedCacheNode.get(REQUIRED).set(false);
-		describeCacheFactory(preparedPlanCacheNode, ATTRIBUTES, bundle);
+		describeResultsetCache(preparedPlanCacheNode, ATTRIBUTES, bundle);
 	}
 
 	@Override
 	protected void populateModel(ModelNode operation, ModelNode model)	throws OperationFailedException {
+		populate(operation, model);
+	}
+
+	static void populate(ModelNode operation, ModelNode model) {
 		if (operation.hasDefined(Configuration.ALLOW_ENV_FUNCTION)) {
 			model.get(Configuration.ALLOW_ENV_FUNCTION).set(operation.get(Configuration.ALLOW_ENV_FUNCTION).asString());
 		}
@@ -129,9 +127,13 @@
 			model.get(Configuration.AUTHORIZATION_VALIDATOR_MODULE).set(operation.get(Configuration.AUTHORIZATION_VALIDATOR_MODULE).asString());
 		}		
 		
-		populateCache(operation, model);
+		populateResultsetCache(operation, model);
+		populatePreparedPlanCache(operation, model);
+		populateObjectReplicator(operation, model);
 	}
 	
+
+
 	@Override
     protected void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model,
             final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> newControllers) throws OperationFailedException {
@@ -222,18 +224,8 @@
     	});    	
     	newControllers.add(target.addService(TeiidServiceNames.AUTHORIZATION_VALIDATOR, authValidatorService).install());
     	
-    	//cache factory
-    	final CacheFactory cacheFactory = buildCacheFactory(operation.get(Configuration.CACHE_FACORY));
-    	ValueService<CacheFactory> cacheFactoryService = new ValueService<CacheFactory>(new org.jboss.msc.value.Value<CacheFactory>() {
-			@Override
-			public CacheFactory getValue() throws IllegalStateException, IllegalArgumentException {
-				return cacheFactory;
-			}
-    	});
-    	newControllers.add(target.addService(TeiidServiceNames.CACHE_FACTORY, cacheFactoryService).install());
-    	
     	// resultset cache
-    	final SessionAwareCache<CachedResults> resultsetCache = buildResultsetCache(operation.get(Configuration.RESULTSET_CACHE), cacheFactory, bufferManager.getBufferManager());
+    	final SessionAwareCache<CachedResults> resultsetCache = buildResultsetCache(operation, bufferManager.getBufferManager());
     	ValueService<SessionAwareCache<CachedResults>> resultSetService = new ValueService<SessionAwareCache<CachedResults>>(new org.jboss.msc.value.Value<SessionAwareCache<CachedResults>>() {
 			@Override
 			public SessionAwareCache<CachedResults> getValue() throws IllegalStateException, IllegalArgumentException {
@@ -243,7 +235,7 @@
     	newControllers.add(target.addService(TeiidServiceNames.CACHE_RESULTSET, resultSetService).install());
     	
     	// prepared-plan cache
-    	final SessionAwareCache<PreparedPlan> preparedPlanCache = buildPreparedPlanCache(operation.get(Configuration.PREPAREDPLAN_CACHE), cacheFactory, bufferManager.getBufferManager());
+    	final SessionAwareCache<PreparedPlan> preparedPlanCache = buildPreparedPlanCache(operation.get(Configuration.PREPAREDPLAN_CACHE), bufferManager.getBufferManager());
     	ValueService<SessionAwareCache<PreparedPlan>> preparedPlanService = new ValueService<SessionAwareCache<PreparedPlan>>(new org.jboss.msc.value.Value<SessionAwareCache<PreparedPlan>>() {
 			@Override
 			public SessionAwareCache<PreparedPlan> getValue() throws IllegalStateException, IllegalArgumentException {
@@ -252,7 +244,21 @@
     	});
     	newControllers.add(target.addService(TeiidServiceNames.CACHE_PREPAREDPLAN, preparedPlanService).install());
     	
+    	// Object Replicator
+    	if (operation.hasDefined(Configuration.OBJECT_REPLICATOR)) {
+    		ModelNode node = operation.get(Configuration.OBJECT_REPLICATOR);
+    		String stack = node.get(Configuration.STACK).asString();
+    		String clusterName = "teiid-rep"; //$NON-NLS-1$ 
+    		if (node.hasDefined(Configuration.CLUSTER_NAME)) {
+    			clusterName = node.get(Configuration.CLUSTER_NAME).asString();
+    		}
+    		JGroupsObjectReplicatorService replicatorService = new JGroupsObjectReplicatorService(clusterName);
+			ServiceBuilder<JGroupsObjectReplicator> serviceBuilder = target.addService(TeiidServiceNames.OBJECT_REPLICATOR, replicatorService);
+			serviceBuilder.addDependency(ServiceName.JBOSS.append("jgroups", stack), ChannelFactory.class, replicatorService.channelFactoryInjector); //$NON-NLS-1$
+			newControllers.add(serviceBuilder.install());
+    	}
     	
+    	
     	// Register VDB deployer
         context.addStep(new AbstractDeploymentChainStep() {
 			@Override
@@ -325,7 +331,7 @@
     	return bufferManger;
     }	
     
-    private void populateBufferManager(ModelNode operation, ModelNode model) {
+    private static void populateBufferManager(ModelNode operation, ModelNode model) {
     	
     	ModelNode childNode = operation.get(CHILDREN, Configuration.BUFFER_SERVICE);
     	if (!childNode.isDefined()) {
@@ -361,121 +367,118 @@
 		}
     }
     
-	private void populateCache(ModelNode operation, ModelNode model) {
-		if (operation.hasDefined(Configuration.CACHE_FACORY)) {
-			ModelNode cacheFactory = operation.get(Configuration.CACHE_FACORY);
-			if (cacheFactory.hasDefined(Configuration.CACHE_SERVICE_JNDI_NAME)) {
-				model.get(Configuration.CACHE_FACORY, Configuration.CACHE_SERVICE_JNDI_NAME).set(cacheFactory.get(Configuration.CACHE_SERVICE_JNDI_NAME).asString());
-			}
-			if (cacheFactory.hasDefined(Configuration.RESULTSET_CACHE_NAME)) {
-				model.get(Configuration.CACHE_FACORY, Configuration.RESULTSET_CACHE_NAME).set(cacheFactory.get(Configuration.RESULTSET_CACHE_NAME).asString());
-			}			
-		}
-		
+	private static void populateResultsetCache(ModelNode operation, ModelNode model) {
 		if (operation.hasDefined(Configuration.RESULTSET_CACHE)) {
 			ModelNode cache = operation.get(Configuration.RESULTSET_CACHE);
-			populateCacheConfig(cache, model.get(Configuration.RESULTSET_CACHE));
+			if (cache.hasDefined(Configuration.NAME)) {
+				model.get(Configuration.RESULTSET_CACHE, Configuration.NAME).set(cache.get(Configuration.NAME).asString());
+			}
+			
+			if (cache.hasDefined(Configuration.CONTAINER_NAME)) {
+				model.get(Configuration.RESULTSET_CACHE, Configuration.CONTAINER_NAME).set(cache.get(Configuration.CONTAINER_NAME).asString());
+			}
+
+			if (cache.hasDefined(Configuration.ENABLE)) {
+				model.get(Configuration.RESULTSET_CACHE, Configuration.ENABLE).set(cache.get(Configuration.ENABLE).asBoolean());
+			}
+
+			if (cache.hasDefined(Configuration.MAX_STALENESS)) {
+				model.get(Configuration.RESULTSET_CACHE, Configuration.MAX_STALENESS).set(cache.get(Configuration.MAX_STALENESS).asInt());
+			}
 		}
-		
+	}    
+	
+	private static void populateObjectReplicator(ModelNode operation, ModelNode model) {
+		if (operation.hasDefined(Configuration.OBJECT_REPLICATOR)) {
+			ModelNode replicator = operation.get(Configuration.OBJECT_REPLICATOR);
+			if (replicator.hasDefined(Configuration.STACK)) {
+				model.get(Configuration.OBJECT_REPLICATOR, Configuration.STACK).set(replicator.get(Configuration.STACK).asString());
+			}
+			
+			if (replicator.hasDefined(Configuration.CLUSTER_NAME)) {
+				model.get(Configuration.OBJECT_REPLICATOR, Configuration.CLUSTER_NAME).set(replicator.get(Configuration.CLUSTER_NAME).asString());
+			}
+		}
+	}	
+    
+	private static void populatePreparedPlanCache(ModelNode operation, ModelNode model) {
 		if (operation.hasDefined(Configuration.PREPAREDPLAN_CACHE)) {
 			ModelNode cache = operation.get(Configuration.PREPAREDPLAN_CACHE);
-			populateCacheConfig(cache, model.get(Configuration.PREPAREDPLAN_CACHE));
+			if (cache.hasDefined(Configuration.MAX_ENTRIES)) {
+	    		model.get(Configuration.MAX_ENTRIES).set(cache.get(Configuration.MAX_ENTRIES).asInt());
+	    	}
+	    	if (cache.hasDefined(Configuration.MAX_AGE_IN_SECS)) {
+	    		model.get(Configuration.MAX_AGE_IN_SECS).set(cache.get(Configuration.MAX_AGE_IN_SECS).asInt());
+	    	}
+	    	if (cache.hasDefined(Configuration.MAX_STALENESS)) {
+	    		model.get(Configuration.MAX_STALENESS).set(cache.get(Configuration.MAX_STALENESS).asInt());
+	    	}
 		}
-	}    
-    
-	private void populateCacheConfig(ModelNode operation, ModelNode model) {
-    	if (operation.hasDefined(Configuration.ENABLE)) {
-    		model.get(Configuration.ENABLE).set(operation.get(Configuration.ENABLE).asBoolean());
-    	}
-    	if (operation.hasDefined(Configuration.MAX_ENTRIES)) {
-    		model.get(Configuration.MAX_ENTRIES).set(operation.get(Configuration.MAX_ENTRIES).asInt());
-    	}
-    	if (operation.hasDefined(Configuration.MAX_AGE_IN_SECS)) {
-    		model.get(Configuration.MAX_AGE_IN_SECS).set(operation.get(Configuration.MAX_AGE_IN_SECS).asInt());
-    	}
-    	if (operation.hasDefined(Configuration.MAX_STALENESS)) {
-    		model.get(Configuration.MAX_STALENESS).set(operation.get(Configuration.MAX_STALENESS).asInt());
-    	}
-    	if (operation.hasDefined(Configuration.CACHE_TYPE)) {
-    		model.get(Configuration.CACHE_TYPE).set(operation.get(Configuration.CACHE_TYPE).asString());
-    	}
 	}
 
-	private static void describeCacheFactory(ModelNode node, String type, ResourceBundle bundle) {
-		addAttribute(node, Configuration.CACHE_SERVICE_JNDI_NAME, type, bundle.getString(Configuration.CACHE_SERVICE_JNDI_NAME+DESC), ModelType.STRING, false, "java:TeiidCacheManager"); //$NON-NLS-1$
-		addAttribute(node, Configuration.RESULTSET_CACHE_NAME, type, bundle.getString(Configuration.RESULTSET_CACHE_NAME+DESC), ModelType.STRING, false, "teiid-resultset-cache"); //$NON-NLS-1$
-	}
-	
-	private static void describeResultsetcache(ModelNode node, String type, ResourceBundle bundle) {
-		addAttribute(node, Configuration.MAX_ENTRIES, type, bundle.getString(Configuration.MAX_ENTRIES+DESC), ModelType.INT, false, "1024"); //$NON-NLS-1$
-		addAttribute(node, Configuration.MAX_AGE_IN_SECS, type, bundle.getString(Configuration.MAX_AGE_IN_SECS+DESC), ModelType.INT, false, "7200");//$NON-NLS-1$
+	private static void describeResultsetCache(ModelNode node, String type, ResourceBundle bundle) {
+		addAttribute(node, Configuration.NAME, type, bundle.getString(Configuration.NAME+DESC), ModelType.STRING, false, "resultset"); //$NON-NLS-1$
 		addAttribute(node, Configuration.MAX_STALENESS, type, bundle.getString(Configuration.MAX_STALENESS+DESC), ModelType.INT, false, "60");//$NON-NLS-1$
-		addAttribute(node, Configuration.CACHE_TYPE, type, bundle.getString(Configuration.CACHE_TYPE+DESC), ModelType.STRING, false, "EXPIRATION"); //$NON-NLS-1$
+		addAttribute(node, Configuration.ENABLE, type, bundle.getString(Configuration.ENABLE+DESC), ModelType.BOOLEAN, false, null);
+		addAttribute(node, Configuration.CONTAINER_NAME, type, bundle.getString(Configuration.CONTAINER_NAME+DESC), ModelType.STRING, false, null);		
 	}
 	
 	private static void describePreparedPlanCache(ModelNode node, String type, ResourceBundle bundle) {
 		addAttribute(node, Configuration.MAX_ENTRIES, type, bundle.getString(Configuration.MAX_ENTRIES+DESC), ModelType.INT, false, "512"); //$NON-NLS-1$
 		addAttribute(node, Configuration.MAX_AGE_IN_SECS, type, bundle.getString(Configuration.MAX_AGE_IN_SECS+DESC), ModelType.INT, false, "28800");//$NON-NLS-1$
 		addAttribute(node, Configuration.MAX_STALENESS, type, bundle.getString(Configuration.MAX_STALENESS+DESC), ModelType.INT, false, "0");//$NON-NLS-1$
-		addAttribute(node, Configuration.CACHE_TYPE, type, bundle.getString(Configuration.CACHE_TYPE+DESC), ModelType.STRING, false, "LRU"); //$NON-NLS-1$
 	}
-	
-    private CacheFactory buildCacheFactory(ModelNode node) {
-    	ClusterableCacheFactory cacheFactory = new ClusterableCacheFactory();	
-    	if (node.hasDefined(Configuration.CACHE_SERVICE_JNDI_NAME)) {
-    		cacheFactory.setCacheManager(node.get(Configuration.CACHE_SERVICE_JNDI_NAME).asString());
-    	}	                	
-    	if (node.hasDefined(Configuration.RESULTSET_CACHE_NAME)) {
-    		cacheFactory.setResultsetCacheName(node.get(Configuration.RESULTSET_CACHE_NAME).asString());
-    	}
-    	return cacheFactory;
-    }
     
-    private SessionAwareCache<CachedResults> buildResultsetCache(ModelNode node, CacheFactory cacheFactory, BufferManager bufferManager) {
-    	if (node.hasDefined(Configuration.ENABLE)) {
-    		if (!node.get(Configuration.ENABLE).asBoolean()) {
-    			return null;
-    		}
+    private SessionAwareCache<CachedResults> buildResultsetCache(ModelNode operation, BufferManager bufferManager) throws OperationFailedException {
+
+    	CacheConfiguration cacheConfig = new CacheConfiguration();
+    	// these settings are not really used; they are defined by infinispan
+    	cacheConfig.setMaxEntries(1024);
+   		cacheConfig.setMaxAgeInSeconds(7200);
+   		cacheConfig.setType(Policy.EXPIRATION.name());
+    	cacheConfig.setLocation("resultset"); //$NON-NLS-1$
+    	cacheConfig.setMaxStaleness(60);
+    	
+    	if (!operation.hasDefined(Configuration.RESULTSET_CACHE)) {
+       		SessionAwareCache<CachedResults> resultsetCache = new SessionAwareCache<CachedResults>(new DefaultCacheFactory(), SessionAwareCache.Type.RESULTSET, cacheConfig);
+        	resultsetCache.setBufferManager(bufferManager);
+        	return resultsetCache;
     	}
     	
-    	CacheConfiguration cacheConfig = new CacheConfiguration();
-    	if (node.hasDefined(Configuration.MAX_ENTRIES)) {
-    		cacheConfig.setMaxEntries(node.get(Configuration.MAX_ENTRIES).asInt());
+    	ModelNode node = operation.get(Configuration.RESULTSET_CACHE);
+    	ClusterableCacheFactory cacheFactory = new ClusterableCacheFactory();
+
+    	if (node.hasDefined(Configuration.CONTAINER_NAME)) {
+    		cacheFactory.setCacheManager(node.get(Configuration.CONTAINER_NAME).asString());
     	}
     	else {
-    		cacheConfig.setMaxEntries(1024);
+    		throw new OperationFailedException(new ModelNode().set(IntegrationPlugin.Util.getString("cache-container-name-required"))); //$NON-NLS-1$
     	}
     	
-    	if (node.hasDefined(Configuration.MAX_AGE_IN_SECS)) {
-    		cacheConfig.setMaxAgeInSeconds(node.get(Configuration.MAX_AGE_IN_SECS).asInt());
-    	}
+    	if (node.hasDefined(Configuration.NAME)) {
+    		cacheFactory.setResultsetCacheName(node.get(Configuration.NAME).asString());
+    	}	 
     	else {
-    		cacheConfig.setMaxAgeInSeconds(7200);
+    		cacheFactory.setResultsetCacheName("resultset"); //$NON-NLS-1$
     	}
     	
-    	if (node.hasDefined(Configuration.MAX_STALENESS)) {
+    	if (node.hasDefined(Configuration.ENABLE)) {
+    		if (!node.get(Configuration.ENABLE).asBoolean()) {
+    			return null;
+    		}
+    	}
+
+   		if (node.hasDefined(Configuration.MAX_STALENESS)) {
     		cacheConfig.setMaxStaleness(node.get(Configuration.MAX_STALENESS).asInt());
     	}
-    	else {
-    		cacheConfig.setMaxStaleness(60);
-    	}
-    	if (node.hasDefined(Configuration.CACHE_TYPE)) {
-    		cacheConfig.setType(node.get(Configuration.CACHE_TYPE).asString());
-    	}
-    	else {
-    		cacheConfig.setType(Policy.EXPIRATION.name());
-    	}
-    	
-    	cacheConfig.setLocation("resultset"); //$NON-NLS-1$
-    	SessionAwareCache<CachedResults> resultsetCache = new SessionAwareCache<CachedResults>(cacheFactory, SessionAwareCache.Type.RESULTSET, cacheConfig);
+
+   		SessionAwareCache<CachedResults> resultsetCache = new SessionAwareCache<CachedResults>(cacheFactory, SessionAwareCache.Type.RESULTSET, cacheConfig);
     	resultsetCache.setBufferManager(bufferManager);
-    	
     	return resultsetCache;
 	}	      
     
     
-    private SessionAwareCache<PreparedPlan> buildPreparedPlanCache(ModelNode node, CacheFactory cacheFactory, BufferManager bufferManager) {
-    	
+    private SessionAwareCache<PreparedPlan> buildPreparedPlanCache(ModelNode node, BufferManager bufferManager) {
     	CacheConfiguration cacheConfig = new CacheConfiguration();
     	if (node.hasDefined(Configuration.MAX_ENTRIES)) {
     		cacheConfig.setMaxEntries(node.get(Configuration.MAX_ENTRIES).asInt());
@@ -497,15 +500,10 @@
     	else {
     		cacheConfig.setMaxStaleness(0);
     	}
-    	if (node.hasDefined(Configuration.CACHE_TYPE)) {
-    		cacheConfig.setType(node.get(Configuration.CACHE_TYPE).asString());
-    	}
-    	else {
-    		cacheConfig.setType(Policy.LRU.name());
-    	}
+		cacheConfig.setType(Policy.LRU.name());
     	
     	cacheConfig.setLocation("prepared"); //$NON-NLS-1$
-    	SessionAwareCache<PreparedPlan> cache = new SessionAwareCache<PreparedPlan>(cacheFactory, SessionAwareCache.Type.PREPAREDPLAN, cacheConfig);
+    	SessionAwareCache<PreparedPlan> cache = new SessionAwareCache<PreparedPlan>(new DefaultCacheFactory(), SessionAwareCache.Type.PREPAREDPLAN, cacheConfig);
     	cache.setBufferManager(bufferManager);
     	
     	return cache;

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -32,10 +32,9 @@
 import org.jboss.as.controller.PathElement;
 import org.jboss.as.controller.SubsystemRegistration;
 import org.jboss.as.controller.descriptions.DescriptionProvider;
-import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
 import org.jboss.as.controller.parsing.ExtensionParsingContext;
-import org.jboss.as.controller.registry.ManagementResourceRegistration;
 import org.jboss.as.controller.registry.AttributeAccess.Storage;
+import org.jboss.as.controller.registry.ManagementResourceRegistration;
 import org.jboss.dmr.ModelNode;
 import org.jboss.dmr.ModelType;
 import org.teiid.logging.Log4jListener;
@@ -53,6 +52,7 @@
 	private static TranslatorAdd TRANSLATOR_ADD = new TranslatorAdd();
 	private static TranslatorRemove TRANSLATOR_REMOVE = new TranslatorRemove();
 	private static TeiidBootServicesAdd TEIID_BOOT_ADD = new TeiidBootServicesAdd();
+	private static TeiidSubsystemDescribe TEIID_DESCRIBE = new TeiidSubsystemDescribe();
 	
 	@Override
 	public void initialize(ExtensionContext context) {
@@ -63,29 +63,10 @@
 		registration.registerXMLElementWriter(parser);
 
 		// Main Teiid system, with children query engine and translators.
-		final ManagementResourceRegistration teiidSubsystem = registration.registerSubsystemModel(new DescriptionProvider() {
-			@Override
-			public ModelNode getModelDescription(Locale locale) {
-				final ResourceBundle bundle = IntegrationPlugin.getResourceBundle(locale);
-				
-		        ModelNode node = new ModelNode();
-		        node.get(ModelDescriptionConstants.DESCRIPTION).set("teiid subsystem"); //$NON-NLS-1$
-		        node.get(ModelDescriptionConstants.HEAD_COMMENT_ALLOWED).set(true);
-		        node.get(ModelDescriptionConstants.TAIL_COMMENT_ALLOWED).set(true);
-		        node.get(ModelDescriptionConstants.NAMESPACE).set(Namespace.CURRENT.getUri());
-		        
-		        TeiidBootServicesAdd.describeTeiidRoot(bundle, ATTRIBUTES, node);
-		        node.get(CHILDREN, Configuration.QUERY_ENGINE, DESCRIPTION).set(bundle.getString(Configuration.QUERY_ENGINE+Configuration.DESC)); 
-		        node.get(CHILDREN, Configuration.QUERY_ENGINE, REQUIRED).set(true);
-		        
-		        node.get(CHILDREN, Configuration.TRANSLATOR, DESCRIPTION).set(bundle.getString(Configuration.TRANSLATOR+Configuration.DESC));
-		        node.get(CHILDREN, Configuration.TRANSLATOR, REQUIRED).set(true);
-
-		        return node;
-		    }
-		});
+		
+		final ManagementResourceRegistration teiidSubsystem = registration.registerSubsystemModel(TEIID_DESCRIBE);
 		teiidSubsystem.registerOperationHandler(ADD, TEIID_BOOT_ADD, TEIID_BOOT_ADD, false);
-		//teiidSubsystem.registerOperationHandler(REMOVE, ENGINE_REMOVE, ENGINE_REMOVE, false);     
+		teiidSubsystem.registerOperationHandler(DESCRIBE, TEIID_DESCRIBE, TEIID_DESCRIBE, false);     
 				
 		// Translator Subsystem
         final ManagementResourceRegistration translatorSubsystem = teiidSubsystem.registerSubModel(PathElement.pathElement(Configuration.TRANSLATOR), new DescriptionProvider() {

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidServiceNames.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidServiceNames.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidServiceNames.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -35,9 +35,9 @@
 	public static ServiceName AUTHORIZATION_VALIDATOR = ServiceName.JBOSS.append("teiid", "authorization-validator");//$NON-NLS-1$ //$NON-NLS-2$
 	private static ServiceName VDB_SVC_BASE = ServiceName.JBOSS.append("teiid", "vdb"); //$NON-NLS-1$ //$NON-NLS-2$
 	public static ServiceName OBJECT_SERIALIZER = ServiceName.JBOSS.append("teiid", "object-serializer"); //$NON-NLS-1$ //$NON-NLS-2$
-	public static ServiceName CACHE_FACTORY = ServiceName.JBOSS.append("teiid", "cache-factory"); //$NON-NLS-1$ //$NON-NLS-2$
 	public static ServiceName CACHE_RESULTSET = ServiceName.JBOSS.append("teiid", "cache", "resultset"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 	public static ServiceName CACHE_PREPAREDPLAN = ServiceName.JBOSS.append("teiid", "cache", "prepared-plan"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	public static ServiceName OBJECT_REPLICATOR = ServiceName.JBOSS.append("teiid", "object-replicator"); //$NON-NLS-1$ //$NON-NLS-2$
 	
 	
 	public static ServiceName translatorServiceName(String name) {

Added: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemDescribe.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemDescribe.java	                        (rev 0)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemDescribe.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -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 static org.jboss.as.controller.descriptions.ModelDescriptionConstants.*;
+
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import org.jboss.as.controller.OperationContext;
+import org.jboss.as.controller.OperationFailedException;
+import org.jboss.as.controller.OperationStepHandler;
+import org.jboss.as.controller.PathAddress;
+import org.jboss.as.controller.descriptions.DescriptionProvider;
+import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
+import org.jboss.as.controller.registry.Resource;
+import org.jboss.dmr.ModelNode;
+import org.jboss.dmr.Property;
+
+public class TeiidSubsystemDescribe implements OperationStepHandler, DescriptionProvider {
+
+	@Override
+	public ModelNode getModelDescription(Locale locale) {
+		final ResourceBundle bundle = IntegrationPlugin.getResourceBundle(locale);
+		
+        ModelNode node = new ModelNode();
+        node.get(ModelDescriptionConstants.DESCRIPTION).set("teiid subsystem"); //$NON-NLS-1$
+        node.get(ModelDescriptionConstants.HEAD_COMMENT_ALLOWED).set(true);
+        node.get(ModelDescriptionConstants.TAIL_COMMENT_ALLOWED).set(true);
+        node.get(ModelDescriptionConstants.NAMESPACE).set(Namespace.CURRENT.getUri());
+        
+        TeiidBootServicesAdd.describeTeiidRoot(bundle, ATTRIBUTES, node);
+        node.get(CHILDREN, Configuration.QUERY_ENGINE, DESCRIPTION).set(bundle.getString(Configuration.QUERY_ENGINE+Configuration.DESC)); 
+        node.get(CHILDREN, Configuration.QUERY_ENGINE, REQUIRED).set(true);
+        
+        node.get(CHILDREN, Configuration.TRANSLATOR, DESCRIPTION).set(bundle.getString(Configuration.TRANSLATOR+Configuration.DESC));
+        node.get(CHILDREN, Configuration.TRANSLATOR, REQUIRED).set(true);
+
+        return node;
+    }
+
+    public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
+        ModelNode result = context.getResult();
+
+        PathAddress rootAddress = PathAddress.pathAddress(PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)).getLastElement());
+        ModelNode subModel = Resource.Tools.readModel(context.readResource(PathAddress.EMPTY_ADDRESS));
+
+        final ModelNode subsystemAdd = new ModelNode();
+        subsystemAdd.get(OP).set(ADD);
+        subsystemAdd.get(OP_ADDR).set(rootAddress.toModelNode());
+
+        TeiidBootServicesAdd.populate(subModel, subsystemAdd);
+        result.add(subsystemAdd);
+        
+        if (subModel.hasDefined(Configuration.QUERY_ENGINE)) {
+            for (Property container : subModel.get(Configuration.QUERY_ENGINE).asPropertyList()) {
+                ModelNode address = rootAddress.toModelNode();
+                address.add(Configuration.QUERY_ENGINE, container.getName());
+                
+                final ModelNode addOperation = new ModelNode();
+                addOperation.get(OP).set(ADD);
+                addOperation.get(OP_ADDR).set(address);
+                
+                QueryEngineAdd.populate(container.getName(), container.getValue(), addOperation);
+                
+                result.add(addOperation);
+            }
+        }
+        
+        if (subModel.hasDefined(Configuration.TRANSLATOR)) {
+            for (Property container : subModel.get(Configuration.TRANSLATOR).asPropertyList()) {
+                ModelNode address = rootAddress.toModelNode();
+                address.add(Configuration.TRANSLATOR, container.getName());
+                
+                final ModelNode addOperation = new ModelNode();
+                addOperation.get(OP).set(ADD);
+                addOperation.get(OP_ADDR).set(address);
+                
+                TranslatorAdd.populate(container.getName(), container.getValue(), addOperation);
+                
+                result.add(addOperation);
+            }
+        }        
+
+        context.completeStep();
+    }
+}


Property changes on: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemDescribe.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -62,21 +62,21 @@
     		writer.writeEndElement();
     	}
     	
-    	if (has(node, Element.CACHE_FACORY_ELEMENT.getLocalName())){
-    		writer.writeStartElement(Element.CACHE_FACORY_ELEMENT.getLocalName());
-    		writeCacheFactoryConfiguration(writer, node.get(Element.CACHE_FACORY_ELEMENT.getLocalName()));
+    	if (has(node, Element.RESULTSET_CACHE_ELEMENT.getLocalName())){
+    		writer.writeStartElement(Element.RESULTSET_CACHE_ELEMENT.getLocalName());
+    		writeResultsetCacheConfiguration(writer, node.get(Element.RESULTSET_CACHE_ELEMENT.getLocalName()));
     		writer.writeEndElement();
     	}    	
     	
-    	if (has(node, Element.RESULTSET_CACHE_ELEMENT.getLocalName())){
-    		writer.writeStartElement(Element.RESULTSET_CACHE_ELEMENT.getLocalName());
-    		writeCacheConfiguration(writer, node.get(Element.RESULTSET_CACHE_ELEMENT.getLocalName()));
+    	if (has(node, Element.PREPAREDPLAN_CACHE_ELEMENT.getLocalName())){
+    		writer.writeStartElement(Element.PREPAREDPLAN_CACHE_ELEMENT.getLocalName());
+    		writePreparedPlanCacheConfiguration(writer, node.get(Element.PREPAREDPLAN_CACHE_ELEMENT.getLocalName()));
     		writer.writeEndElement();
     	}
     	
-    	if (has(node, Element.PREPAREDPLAN_CACHE_ELEMENT.getLocalName())){
-    		writer.writeStartElement(Element.RESULTSET_CACHE_ELEMENT.getLocalName());
-    		writeCacheConfiguration(writer, node.get(Element.PREPAREDPLAN_CACHE_ELEMENT.getLocalName()));
+    	if (has(node, Element.OBJECT_REPLICATOR_ELEMENT.getLocalName())){
+    		writer.writeStartElement(Element.OBJECT_REPLICATOR_ELEMENT.getLocalName());
+    		writeObjectReplicatorConfiguration(writer, node.get(Element.OBJECT_REPLICATOR_ELEMENT.getLocalName()));
     		writer.writeEndElement();
     	}
     	
@@ -100,7 +100,12 @@
         writer.writeEndElement(); // End of subsystem element
     }
     
-    private void writeTranslator(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
+    private void writeObjectReplicatorConfiguration(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
+    	writeAttribute(writer, Element.STACK_ATTRIBUTE, node);
+    	writeAttribute(writer, Element.CLUSTER_NAME_ATTRIBUTE, node);
+	}
+
+	private void writeTranslator(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
     	writeAttribute(writer, Element.TRANSLATOR_NAME_ATTRIBUTE, node);
     	writeAttribute(writer, Element.TRANSLATOR_MODULE_ATTRIBUTE, node);
     }
@@ -121,7 +126,7 @@
     	writeElement(writer, Element.MAX_SOURCE_ROWS_ELEMENT, node);
     	writeElement(writer, Element.EXCEPTION_ON_MAX_SOURCE_ROWS_ELEMENT, node);
     	writeElement(writer, Element.MAX_ODBC_LOB_SIZE_ALLOWED_ELEMENT, node);
-    	writeElement(writer, Element.OBJECT_REPLICATOR_NAME_ELEMENT, node);
+    	writeElement(writer, Element.OBJECT_REPLICATOR_ELEMENT, node);
     	writeElement(writer, Element.DETECTING_CHANGE_EVENTS_ELEMENT, node);
     	
     	if (node.hasDefined(Element.SECURITY_DOMAIN_ELEMENT.getLocalName())) {
@@ -184,17 +189,17 @@
 		writeElement(writer, Element.MAX_OPEN_FILES_ELEMENT, node);
 	}
 
-	private void writeCacheFactoryConfiguration(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
-		writeElement(writer, Element.CACHE_SERVICE_JNDI_NAME_ELEMENT, node);
-		writeElement(writer, Element.RESULTSET_CACHE_NAME_ELEMENT, node);
+	private void writeResultsetCacheConfiguration(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
+		writeAttribute(writer, Element.NAME_ELEMENT, node);
+		writeAttribute(writer, Element.CONTAINER_NAME_ELEMENT, node);
+		writeAttribute(writer, Element.ENABLE_ATTRIBUTE, node);
+		writeAttribute(writer, Element.MAX_STALENESS_ELEMENT, node);
 	}
 
-	private void writeCacheConfiguration(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
-		writeAttribute(writer, Element.ENABLE_ATTRIBUTE, node);
-		writeElement(writer, Element.MAX_ENTRIES_ELEMENT, node);
-		writeElement(writer, Element.MAX_AGE_IN_SECS_ELEMENT, node);
-		writeElement(writer, Element.MAX_STALENESS_ELEMENT, node);
-		writeElement(writer, Element.CACHE_TYPE_ELEMENT, node);
+	private void writePreparedPlanCacheConfiguration(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
+		writeAttribute(writer, Element.MAX_ENTRIES_ELEMENT, node);
+		writeAttribute(writer, Element.MAX_AGE_IN_SECS_ELEMENT, node);
+		writeAttribute(writer, Element.MAX_STALENESS_ELEMENT, node);
 	}
 
 	private boolean has(ModelNode node, String name) {
@@ -252,19 +257,20 @@
     				case ASYNC_THREAD_GROUP_ELEMENT:
     					bootServices.get(reader.getLocalName()).set(reader.getElementText());
     					break;
+
+    				case OBJECT_REPLICATOR_ELEMENT:
+    					bootServices.get(reader.getLocalName()).set(parseObjectReplicator(reader));
+    					break;
     					
     					// complex types
     				case BUFFER_SERVICE_ELEMENT:
     					bootServices.get(reader.getLocalName()).set(parseBufferConfiguration(reader));
     					break;
-    				case RESULTSET_CACHE_ELEMENT:
-    					bootServices.get(reader.getLocalName()).set(parseCacheConfiguration(reader));
-    					break;
     				case PREPAREDPLAN_CACHE_ELEMENT:
-    					bootServices.get(reader.getLocalName()).set(parseCacheConfiguration(reader));
+    					bootServices.get(reader.getLocalName()).set(parsePreparedPlanCacheConfiguration(reader));
     					break;
-    				case CACHE_FACORY_ELEMENT:
-    					bootServices.get(reader.getLocalName()).set(parseCacheFacoryConfiguration(reader));
+    				case RESULTSET_CACHE_ELEMENT:
+    					bootServices.get(reader.getLocalName()).set(parseResultsetCacheConfiguration(reader));
     					break;
 
                     case QUERY_ENGINE_ELEMENT:
@@ -304,7 +310,20 @@
         }  
     }
     
-    private ModelNode parseQueryEngine(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
+    private ModelNode parseObjectReplicator(XMLExtendedStreamReader reader) throws XMLStreamException {
+    	ModelNode node = new ModelNode();
+    	if (reader.getAttributeCount() > 0) {
+    		for(int i=0; i<reader.getAttributeCount(); i++) {
+    			String attrName = reader.getAttributeLocalName(i);
+    			String attrValue = reader.getAttributeValue(i);
+   				node.get(attrName).set(attrValue);	
+    		}
+    	}
+        while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT));
+    	return node;
+	}
+
+	private ModelNode parseQueryEngine(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
     	
     	if (reader.getAttributeCount() > 0) {
     		for(int i=0; i<reader.getAttributeCount(); i++) {
@@ -335,15 +354,9 @@
 				// booleans
 				case EXCEPTION_ON_MAX_SOURCE_ROWS_ELEMENT:
 				case DETECTING_CHANGE_EVENTS_ELEMENT:
-				case ALLOW_ENV_FUNCTION_ELEMENT:
 					node.get(reader.getLocalName()).set(Boolean.parseBoolean(reader.getElementText()));
 					break;
 
-				//Strings
-				case OBJECT_REPLICATOR_NAME_ELEMENT:
-					node.get(reader.getLocalName()).set(reader.getElementText());
-					break;
-				
 					//List
 				case SECURITY_DOMAIN_ELEMENT:
 					node.get(reader.getLocalName()).add(reader.getElementText());
@@ -390,14 +403,14 @@
     	return node;
     }
     
-    private ModelNode parseCacheConfiguration(XMLExtendedStreamReader reader) throws XMLStreamException {
+    private ModelNode parsePreparedPlanCacheConfiguration(XMLExtendedStreamReader reader) throws XMLStreamException {
     	ModelNode node = new ModelNode();
 
     	if (reader.getAttributeCount() > 0) {
     		for(int i=0; i<reader.getAttributeCount(); i++) {
     			String attrName = reader.getAttributeLocalName(i);
     			String attrValue = reader.getAttributeValue(i);
-    			node.get(attrName).set(Boolean.parseBoolean(attrValue));
+    			node.get(attrName).set(attrValue);
     		}
     	}    	
  
@@ -409,9 +422,6 @@
             case MAX_STALENESS_ELEMENT:
             	node.get(reader.getLocalName()).set(Integer.parseInt(reader.getElementText()));
             	break;
-            case CACHE_TYPE_ELEMENT:
-            	node.get(reader.getLocalName()).set(reader.getElementText());    
-            	break;
             default: 
                 throw ParseUtils.unexpectedElement(reader);
             }
@@ -419,20 +429,22 @@
     	return node;
     }    
     
-    private ModelNode parseCacheFacoryConfiguration(XMLExtendedStreamReader reader) throws XMLStreamException {
+    private ModelNode parseResultsetCacheConfiguration(XMLExtendedStreamReader reader) throws XMLStreamException {
     	ModelNode node = new ModelNode();
- 
-        while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT)) {
-            Element element = Element.forName(reader.getLocalName());
-            switch (element) {
-            case CACHE_SERVICE_JNDI_NAME_ELEMENT:
-            case RESULTSET_CACHE_NAME_ELEMENT:
-            	node.get(reader.getLocalName()).set(reader.getElementText());
-            	break;
-            default: 
-                throw ParseUtils.unexpectedElement(reader);
-            }
-        }
+    	
+    	if (reader.getAttributeCount() > 0) {
+    		for(int i=0; i<reader.getAttributeCount(); i++) {
+    			String attrName = reader.getAttributeLocalName(i);
+    			String attrValue = reader.getAttributeValue(i);
+    			if (attrName.equals(Element.ENABLE_ATTRIBUTE.getLocalName())) {
+    				node.get(attrName).set(Boolean.parseBoolean(attrValue));
+    			}
+    			else {
+    				node.get(attrName).set(attrValue);	
+    			}
+    		}
+    	}
+        while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT));
     	return node;
     }       
     
@@ -443,7 +455,7 @@
     		for(int i=0; i<reader.getAttributeCount(); i++) {
     			String attrName = reader.getAttributeLocalName(i);
     			String attrValue = reader.getAttributeValue(i);
-    			node.get(attrName).set(Boolean.parseBoolean(attrValue));
+   				node.get(attrName).set(attrValue);
     		}
     	}    	
  
@@ -455,9 +467,6 @@
             case OUT_BUFFER_SIZE_ELEMENT:
             	node.get(reader.getLocalName()).set(Integer.parseInt(reader.getElementText()));
             	break;
-            case SOCKET_BINDING_ELEMENT:
-            	node.get(reader.getLocalName()).set(reader.getElementText());
-            	break;
             case SSL_ELEMENT:            	
             	node.get(reader.getLocalName()).set(parseSSLConfiguration(reader));
             	break;

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -46,7 +46,7 @@
 import org.teiid.logging.LogManager;
 import org.teiid.translator.ExecutionFactory;
 
-public class TranslatorAdd extends AbstractAddStepHandler implements DescriptionProvider {
+class TranslatorAdd extends AbstractAddStepHandler implements DescriptionProvider {
 
     @Override
     public ModelNode getModelDescription(final Locale locale) {
@@ -64,12 +64,15 @@
         final ModelNode address = operation.require(OP_ADDR);
         final PathAddress pathAddress = PathAddress.pathAddress(address);
 
-        final String moduleName = operation.require(Configuration.TRANSLATOR_MODULE).asString();
-
-        model.get(NAME).set(pathAddress.getLastElement().getValue());
-        model.get(Configuration.TRANSLATOR_MODULE).set(moduleName);
+        populate(pathAddress.getLastElement().getValue(), operation, model);
 	}
 	
+	static void populate(String name, ModelNode operation, ModelNode model) {
+		final String moduleName = operation.require(Configuration.TRANSLATOR_MODULE).asString();
+        model.get(NAME).set(name);
+        model.get(Configuration.TRANSLATOR_MODULE).set(moduleName);		
+	}
+	
 	@Override
     protected void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model,
             final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> newControllers) throws OperationFailedException {
@@ -83,11 +86,9 @@
 		
         final ServiceTarget target = context.getServiceTarget();
 
-        final ModuleIdentifier moduleId;
         final Module module;
         try {
-            moduleId = ModuleIdentifier.create(moduleName);
-            module = Module.getCallerModuleLoader().loadModule(moduleId);
+            module = Module.getCallerModuleLoader().loadModule(ModuleIdentifier.create(moduleName));
         } catch (ModuleLoadException e) {
             throw new OperationFailedException(e, new ModelNode().set(IntegrationPlugin.Util.getString("failed_load_module", moduleName, translatorName))); //$NON-NLS-1$
         }

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorRemove.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorRemove.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorRemove.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -40,7 +40,7 @@
 import org.teiid.logging.LogConstants;
 import org.teiid.logging.LogManager;
 
-public class TranslatorRemove extends AbstractRemoveStepHandler implements DescriptionProvider {
+class TranslatorRemove extends AbstractRemoveStepHandler implements DescriptionProvider {
 
 	@Override
 	public ModelNode getModelDescription(Locale locale) {

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBDependencyProcessor.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBDependencyProcessor.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBDependencyProcessor.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -36,11 +36,9 @@
 import org.jboss.vfs.VirtualFileFilter;
 import org.jboss.vfs.VisitorAttributes;
 import org.jboss.vfs.util.SuffixMatchFilter;
-import org.teiid.adminapi.impl.ModelMetaData;
-import org.teiid.adminapi.impl.VDBMetaData;
 import org.teiid.deployers.TeiidAttachments;
 
-public class VDBDependencyProcessor implements DeploymentUnitProcessor {
+class VDBDependencyProcessor implements DeploymentUnitProcessor {
 	public static final String LIB = "/lib"; //$NON-NLS-1$
 	private static final VirtualFileFilter DEFAULT_JAR_LIB_FILTER = new SuffixMatchFilter(".jar", VisitorAttributes.DEFAULT); //$NON-NLS-1$
 	

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -44,7 +44,7 @@
 import org.teiid.runtime.RuntimePlugin;
 
 
-public class VDBDeployer implements DeploymentUnitProcessor {
+class VDBDeployer implements DeploymentUnitProcessor {
 			
 	private TranslatorRepository translatorRepository;
 	private String asyncThreadPoolName;

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBParserDeployer.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBParserDeployer.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBParserDeployer.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -44,7 +44,7 @@
 /**
  * This file loads the "vdb.xml" file inside a ".vdb" file, along with all the metadata in the .INDEX files
  */
-public class VDBParserDeployer implements DeploymentUnitProcessor {
+class VDBParserDeployer implements DeploymentUnitProcessor {
 	
 	public VDBParserDeployer() {
 	}

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBRepositoryService.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBRepositoryService.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBRepositoryService.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -27,7 +27,7 @@
 import org.jboss.msc.service.StopContext;
 import org.teiid.deployers.VDBRepository;
 
-public class VDBRepositoryService implements Service<VDBRepository> {
+class VDBRepositoryService implements Service<VDBRepository> {
 	private VDBRepository repo;
 	
 	public VDBRepositoryService(VDBRepository repo) {

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -52,7 +52,7 @@
 import org.teiid.translator.ExecutionFactory;
 import org.teiid.translator.TranslatorException;
 
-public class VDBService implements Service<VDBMetaData> {
+class VDBService implements Service<VDBMetaData> {
 	public static final String VDB_LASTMODIFIED_TIME = "VDB_LASTMODIFIED_TIME"; //$NON-NLS-1$
 	private VDBMetaData vdb;
 	private final InjectedValue<VDBRepository> vdbRepositoryInjector = new InjectedValue<VDBRepository>();

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBStructure.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBStructure.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBStructure.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -28,7 +28,7 @@
 
 
 
-public class VDBStructure  implements DeploymentUnitProcessor {
+class VDBStructure  implements DeploymentUnitProcessor {
 	private static final String VDB_EXTENSION = ".vdb"; //$NON-NLS-1$
 	private static final String DYNAMIC_VDB_STRUCTURE = "-vdb.xml"; //$NON-NLS-1$
 	

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -26,6 +26,7 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
+import java.net.InetSocketAddress;
 import java.sql.Blob;
 import java.sql.Clob;
 import java.sql.SQLException;
@@ -33,8 +34,6 @@
 import java.util.*;
 import java.util.concurrent.*;
 
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
 import javax.resource.spi.XATerminator;
 import javax.resource.spi.work.WorkManager;
 import javax.security.auth.login.LoginException;
@@ -113,8 +112,6 @@
     private long sessionMaxLimit = SessionService.DEFAULT_MAX_SESSIONS;
 	private long sessionExpirationTimeLimit = SessionService.DEFAULT_SESSION_EXPIRATION;
 
-	private transient ObjectReplicator objectReplicator;
-	private String objectReplicatorName;
 	private transient EventDistributor eventDistributor;	
 	private transient EventDistributor eventDistributorProxy;
 
@@ -129,6 +126,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>();
 	
 	public final ConcurrentMap<String, SecurityDomainContext> securityDomains = new ConcurrentHashMap<String, SecurityDomainContext>();
 	private LinkedList<String> securityDomainNames = new LinkedList<String>();
@@ -175,32 +173,19 @@
 		
 		this.setBufferService(bufferServiceInjector.getValue());
 		
-		if (this.jdbcSocketConfiguration != null) {
-			this.jdbcSocketConfiguration.setHostAddress(this.jdbcSocketBindingInjector.getValue().getAddress());
-			this.jdbcSocketConfiguration.setPortNumber(this.jdbcSocketBindingInjector.getValue().getPort());
-		}
-		
-		if (this.odbcSocketConfiguration != null) {
-			this.odbcSocketConfiguration.setHostAddress(this.odbcSocketBindingInjector.getValue().getAddress());
-			this.odbcSocketConfiguration.setPortNumber(this.odbcSocketBindingInjector.getValue().getPort());
-		}
-		
 		dqpCore.setTransactionService((TransactionService)LogManager.createLoggingProxy(LogConstants.CTX_TXN_LOG, transactionServerImpl, new Class[] {TransactionService.class}, MessageLevel.DETAIL, Module.getCallerModule().getClassLoader()));
 
-		if (this.objectReplicatorName != null) {
+		if (getObjectReplicatorInjector().getValue() != null) {
 			try {
-				InitialContext ic = new InitialContext();
-				this.objectReplicator = (ObjectReplicator) ic.lookup(this.objectReplicatorName);
-				try {
-					this.eventDistributor = this.objectReplicator.replicate(LocalServerConnection.TEIID_RUNTIME_CONTEXT+getName(), EventDistributor.class, this, 0);
-				} catch (Exception e) {
-					LogManager.logError(LogConstants.CTX_RUNTIME, e, IntegrationPlugin.Util.getString("replication_failed", this)); //$NON-NLS-1$
-				}
-			} catch (NamingException ne) {
-				//log at a detail level since we may not be in the all profile
-				LogManager.logDetail(LogConstants.CTX_RUNTIME, ne, IntegrationPlugin.Util.getString("jndi_failed", this.objectReplicatorName)); //$NON-NLS-1$
+				this.eventDistributor = getObjectReplicatorInjector().getValue().replicate(LocalServerConnection.TEIID_RUNTIME_CONTEXT+getName(), 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.setMetadataRepository(this.vdbRepository.getMetadataRepository());
 		this.dqpCore.setEventDistributor(this.eventDistributor);
 		this.dqpCore.setResultsetCache(getResultSetCacheInjector().getValue());
@@ -221,21 +206,6 @@
     	// create the necessary services
     	createClientServices();
     	
-    	int offset = 0;
-    	String portBinding = System.getProperty("jboss.service.binding.set"); //$NON-NLS-1$
-    	if (portBinding != null && portBinding.startsWith("ports-")) { //$NON-NLS-1$
-    		if (portBinding.equals("ports-default")) { //$NON-NLS-1$
-    			offset = 0;
-    		}
-    		else {
-    			try {
-					offset = Integer.parseInt(portBinding.substring(portBinding.length()-2))*100;
-				} catch (NumberFormatException e) {
-					offset = 0;
-				}
-    		}
-    	}
-    	
     	this.csr.registerClientService(ILogon.class, logon, LogConstants.CTX_SECURITY);
     	DQP dqpProxy = proxyService(DQP.class, this.dqpCore, LogConstants.CTX_DQP);
     	this.csr.registerClientService(DQP.class, dqpProxy, LogConstants.CTX_DQP);
@@ -245,18 +215,20 @@
     	jdbcCsr.registerClientService(DQP.class, dqpProxy, LogConstants.CTX_DQP);
     	
     	if (this.jdbcSocketConfiguration != null) {
-	    	this.jdbcSocket = new SocketListener(this.jdbcSocketConfiguration, jdbcCsr, this.dqpCore.getBufferManager(), offset);
-	    	LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("socket_enabled","Teiid JDBC = ",(this.jdbcSocketConfiguration.getSSLConfiguration().isSslEnabled()?"mms://":"mm://")+this.jdbcSocketConfiguration.getHostAddress().getHostName()+":"+(this.jdbcSocketConfiguration.getPortNumber()+offset))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+    		InetSocketAddress address = getJdbcSocketBindingInjector().getValue().getSocketAddress();
+	    	this.jdbcSocket = new SocketListener(address, this.jdbcSocketConfiguration, jdbcCsr, this.dqpCore.getBufferManager());
+	    	LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("socket_enabled","Teiid JDBC = ",(this.jdbcSocketConfiguration.getSSLConfiguration().isSslEnabled()?"mms://":"mm://")+address.getHostName()+":"+address.getPort())); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
     	} else {
     		LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("socket_not_enabled", "jdbc connections")); //$NON-NLS-1$ //$NON-NLS-2$
     	}
     	
     	if (this.odbcSocketConfiguration != null) {
     		this.vdbRepository.odbcEnabled();
-    		ODBCSocketListener odbc = new ODBCSocketListener(this.odbcSocketConfiguration, this.dqpCore.getBufferManager(), offset, getMaxODBCLobSizeAllowed(), this.logon);
+    		InetSocketAddress address = getOdbcSocketBindingInjector().getValue().getSocketAddress();
+    		ODBCSocketListener odbc = new ODBCSocketListener(address, this.odbcSocketConfiguration, this.dqpCore.getBufferManager(), getMaxODBCLobSizeAllowed(), this.logon);
     		odbc.setAuthenticationType(sessionService.getAuthType());
 	    	this.odbcSocket = odbc;
-	    	LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("odbc_enabled","Teiid ODBC - SSL=", (this.odbcSocketConfiguration.getSSLConfiguration().isSslEnabled()?"ON":"OFF")+" Host = "+this.odbcSocketConfiguration.getHostAddress().getHostName()+" Port = "+(this.odbcSocketConfiguration.getPortNumber()+offset))); //$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","Teiid ODBC - SSL=", (this.odbcSocketConfiguration.getSSLConfiguration().isSslEnabled()?"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$
     	} else {
     		LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("odbc_not_enabled")); //$NON-NLS-1$
     	}    	
@@ -270,18 +242,18 @@
 			@Override
 			public void removed(String name, int version, CompositeVDB vdb) {
 				recentlyRemoved.add(new VDBKey(name, version));
-				if (objectReplicator != null) {
+				if (getObjectReplicatorInjector().getValue() != null) {
 					GlobalTableStore gts = vdb.getVDB().getAttachment(GlobalTableStore.class);
-					objectReplicator.stop(gts);
+					getObjectReplicatorInjector().getValue().stop(gts);
 				}
 			}
 			
 			@Override
 			public void added(String name, int version, CompositeVDB vdb) {
 				GlobalTableStore gts = new GlobalTableStoreImpl(dqpCore.getBufferManager(), vdb.getVDB().getAttachment(TransformationMetadata.class));
-				if (objectReplicator != null) {
+				if (getObjectReplicatorInjector().getValue() != null) {
 					try {
-						gts = objectReplicator.replicate(name + version, GlobalTableStore.class, gts, 300000);
+						gts = getObjectReplicatorInjector().getValue().replicate(name + version, GlobalTableStore.class, gts, 300000);
 					} catch (Exception e) {
 						LogManager.logError(LogConstants.CTX_RUNTIME, e, IntegrationPlugin.Util.getString("replication_failed", gts)); //$NON-NLS-1$
 					}
@@ -337,8 +309,8 @@
     	
     	LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("engine_stopped", new Date(System.currentTimeMillis()).toString())); //$NON-NLS-1$
     	
-    	if (this.objectReplicator != null && this.eventDistributor != null) {
-    		this.objectReplicator.stop(this.eventDistributor);
+    	if (getObjectReplicatorInjector().getValue() != null && this.eventDistributor != null) {
+    		getObjectReplicatorInjector().getValue().stop(this.eventDistributor);
     	}
     }
     
@@ -611,14 +583,6 @@
 		return newResults;
 	}
 	
-	public String getObjectReplicatorName() {
-		return objectReplicatorName;
-	}
-	
-	public void setObjectReplicatorName(String eventDistributorName) {
-		this.objectReplicatorName = eventDistributorName;
-	}
-	
 	@Override
 	public void updateMatViewRow(String vdbName, int vdbVersion, String schema,
 			String viewName, List<?> tuple, boolean delete) {
@@ -825,5 +789,9 @@
 
 	public InjectedValue<SocketBinding> getOdbcSocketBindingInjector() {
 		return odbcSocketBindingInjector;
+	}
+
+	public InjectedValue<ObjectReplicator> getObjectReplicatorInjector() {
+		return objectReplicatorInjector;
 	}	
 }

Modified: branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
===================================================================
--- branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties	2011-09-12 14:56:06 UTC (rev 3464)
@@ -45,6 +45,7 @@
 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}
 distribute_failed=Deploy of the archive failed {0}
 template_not_found=Template not found for {0}
@@ -112,17 +113,18 @@
 type.describe=Allowed values are LRU, EXPIRATION. \  
              Setting this value to LRU will cause cache hint TTL values \
              to be ignored. (default EXPIRATION)
+container-name.describe=Infinispan cache container name            
 	
-#cache-factory
-cache-service-jndi-name.describe=cache service for the distributed cache
-resultsetCacheName.describe=resultset cache node name
+#cache
+resultset-cache.describe=Resultset cache
+preparedplan-cache.describe=Prepared Plan cache
 	
 #socket config
-maxSocketThreads.describe=Max number of threads dedicated to initial request processing. \
+max-socket-threads.describe=Max number of threads dedicated to initial request processing. \
              Zero indicates the system default of max available processors. (default 0)  \
              Setting this value above the max available processors is not recommended.
-inputBufferSize.describe=SO_RCVBUF size, 0 indicates that system default should be used (default 0)
-outputBufferSize.describe=SO_SNDBUF size, 0 indicates that system default should be used (default 0)
+input-buffer-size.describe=SO_RCVBUF size, 0 indicates that system default should be used (default 0)
+output-buffer-size.describe=SO_SNDBUF size, 0 indicates that system default should be used (default 0)
 socket-binding.describe=Socket binding for the profile
 enabled.describe=enabled
 mode.describe=can be one of disabled, login, or enabled \
@@ -131,14 +133,14 @@
                      using 128 bit AES with an ephemerial DH key exchange. \
                      No other config values are needed in this mode; \
              enabled = traffic will be secured using this configuration,if the client supports SSL
-keystoreFilename.describe=Keystore File Name
-keystorePassword.describe=Keystore password
-keystoreType.describe=Keystore type
-sslProtocol.describe=SSL protocol used
-keymanagementAlgorithm.describe=Use key management algorithm
-truststoreFilename.describe=Truststore Name
-truststorePassword.describe=Truststore Password
-authenticationMode.describe=Authentication Mode (1-way, 2-way, anonymous)
+keystore-name.describe=Keystore File Name
+keystore-password.describe=Keystore password
+keystore-type.describe=Keystore type
+ssl-protocol.describe=SSL protocol used
+keymanagement-algorithm.describe=Use key management algorithm
+truststore-name.describe=Truststore Name
+truststore-password.describe=Truststore Password
+authentication-mode.describe=Authentication Mode (1-way, 2-way, anonymous)
 ssl.describe=SSL
 
 
@@ -231,4 +233,5 @@
 translator-name.missing=Parameter "translator-name" is required
 engine_service_not_found= Query Engine Service with name {0} is not found
 translator.removed = Translator "{0}" removed
-translator.failed-to-load = Translator "{0}" not found in the module "{1}" 
\ No newline at end of file
+translator.failed-to-load = Translator "{0}" not found in the module "{1}" 
+cache-container-name-required=container-name required for the resultset cache configuration

Modified: branches/as7/jboss-integration/src/main/resources/schema/jboss-teiid.xsd
===================================================================
--- branches/as7/jboss-integration/src/main/resources/schema/jboss-teiid.xsd	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/jboss-integration/src/main/resources/schema/jboss-teiid.xsd	2011-09-12 14:56:06 UTC (rev 3464)
@@ -61,27 +61,36 @@
                 </xs:annotation>
             </xs:element>
 
-
-            <xs:element name="distributed-cache-factory" type="cache-factory-type" maxOccurs="1" minOccurs="1">
+            <xs:element name="resultset-cache" type="xs:string" maxOccurs="1" minOccurs="0">
                 <xs:annotation>
-                    <xs:documentation>Cache Factory</xs:documentation>
-                </xs:annotation>
-            </xs:element>
-
-            <xs:element name="resultset-cache" type="cache-config" maxOccurs="1" minOccurs="0">
-                <xs:annotation>
                     <xs:documentation>Configuration for result set caching.
                         There will be 2 caches with these settings.
                         One cache holds results that are specific to sessions.
                         The other cache holds vdb scoped results and can
                         be replicated.</xs:documentation>
                 </xs:annotation>
+                <xs:attribute name="container-name" type="xs:string" use="required"/>
+                <xs:attribute name="name" type="xs:string" use="required"/>
+                <xs:attribute name="enable" type="xs:boolean" default="true"/>
+                <xs:attribute name="max-staleness" type="xs:int" default="60"/>
             </xs:element>
-            <xs:element name="preparedplan-cache" type="cache-config" maxOccurs="1" minOccurs="0">
+            
+            <xs:element name="preparedplan-cache" type="xs:string" maxOccurs="1" minOccurs="0">
                 <xs:annotation>
                     <xs:documentation>Configuration for prepared plan caching. (local memory only)</xs:documentation>
                 </xs:annotation>
+                <xs:attribute name="max-entries" type="xs:string"/>
+                <xs:attribute name="max-age-in-seconds" type="xs:boolean" default="true"/>
+                <xs:attribute name="max-staleness" type="xs:int" default="0"/>                
             </xs:element>
+            
+            <xs:element name="object-replicator" type="xs:string" maxOccurs="1" minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>Cluster wide results distributor </xs:documentation>
+                </xs:annotation>
+                <xs:attribute name="stack" type="xs:string" use="required"/>
+                <xs:attribute name="cluster-name" type="xs:string" use="required"/>
+            </xs:element>            
         
             <xs:element name="query-engine" type="runtime-engine-type" maxOccurs="2" minOccurs="1">
                 <xs:annotation>
@@ -136,50 +145,6 @@
         </xs:sequence>
     </xs:complexType>
 
-    <xs:complexType name="cache-factory-type">
-        <xs:sequence>
-            <xs:element name="cache-service-jndi-name" type="xs:string" minOccurs="1" maxOccurs="1">
-                <xs:annotation>
-                    <xs:documentation>JNDI Name of the Cache manager</xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="resultsetCacheName" type="xs:string" minOccurs="1" maxOccurs="1">
-                <xs:annotation>
-                    <xs:documentation>Name of the resultset cache name</xs:documentation>
-                </xs:annotation>
-            </xs:element>
-        </xs:sequence>
-    </xs:complexType>
-    <xs:complexType name="cache-config">
-        <xs:sequence>
-            <xs:element name="max-entries" type="xs:string" minOccurs="0" maxOccurs="1" default="1024">
-                <xs:annotation>
-                    <xs:documentation>Max Entries allowed (default 1024)</xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="max-age-in-seconds" type="xs:int" minOccurs="0" maxOccurs="1" default="7200">
-                <xs:annotation>
-                    <xs:documentation>Max age in seconds (default 7200 - 2 hours)</xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="max-staleness" type="xs:int" minOccurs="0" maxOccurs="1" default="-1">
-                <xs:annotation>
-                    <xs:documentation>Max staleness in seconds. Modifications are based upon data updates -1 indicates no max. (default 60 - 1 minute)</xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="type" minOccurs="0" maxOccurs="1" default="LRU">
-                <xs:annotation>
-                    <xs:documentation>Allowed values are LRU, EXPIRATION. Setting this value to LRU will cause cache hint TTL values to be ignored. (default EXPIRATION)</xs:documentation>
-                </xs:annotation>
-                <xs:simpleType>
-                    <xs:restriction base="xs:string">
-                        <xs:enumeration value="LRU" />
-                        <xs:enumeration value="EXPIRATION" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:element>
-        </xs:sequence>
-    </xs:complexType>
     <xs:complexType name="runtime-engine-type">
         <xs:sequence>
             <xs:element name="max-threads" type="xs:int" minOccurs="0" maxOccurs="1" default="64">
@@ -274,34 +239,21 @@
         <xs:attribute name="name" type="xs:string" use="required"/>
     </xs:complexType>
 
-    <xs:complexType name="authorization-validator-type">
-        <xs:sequence>
-            <xs:element name="maxSocketThreads" type="xs:int" minOccurs="0" maxOccurs="1">
-                <xs:annotation>
-                    <xs:documentation>Max number of threads dedicated to initial request processing.
-                        Zero indicates the system default of max available processors. (default 0)
-                        Setting this value above the max available processors is not recommended.</xs:documentation>
-                </xs:annotation>
-            </xs:element>
-        </xs:sequence>
-    </xs:complexType>
-
-
     <xs:complexType name="socket-config">
         <xs:sequence>
-            <xs:element name="maxSocketThreads" type="xs:int" minOccurs="0" maxOccurs="1" default="0">
+            <xs:element name="max-socket-threads" type="xs:int" minOccurs="0" maxOccurs="1" default="0">
                 <xs:annotation>
                     <xs:documentation>Max number of threads dedicated to initial request processing.
                         Zero indicates the system default of max available processors. (default 0)
                         Setting this value above the max available processors is not recommended.</xs:documentation>
                 </xs:annotation>
             </xs:element>
-            <xs:element name="inputBufferSize" type="xs:int" minOccurs="0" maxOccurs="1" default="0">
+            <xs:element name="input-buffer-size" type="xs:int" minOccurs="0" maxOccurs="1" default="0">
                 <xs:annotation>
                     <xs:documentation>SO_RCVBUF size, 0 indicates that system default should be used (default 0) </xs:documentation>
                 </xs:annotation>
             </xs:element>
-            <xs:element name="outputBufferSize" type="xs:int" minOccurs="0" maxOccurs="1" default="0">
+            <xs:element name="output-buffer-size" type="xs:int" minOccurs="0" maxOccurs="1" default="0">
                 <xs:annotation>
                     <xs:documentation>SO_SNDBUF size, 0 indicates that system default should be used (default 0)</xs:documentation>
                 </xs:annotation>
@@ -334,14 +286,14 @@
                     </xs:restriction>
                 </xs:simpleType>                
             </xs:element>
-            <xs:element name="keystoreFilename" type="xs:string" minOccurs="0" maxOccurs="1" />
-            <xs:element name="keystorePassword" type="xs:string" minOccurs="0" maxOccurs="1" />
-            <xs:element name="keystoreType" type="xs:string" minOccurs="0" maxOccurs="1" />
-            <xs:element name="sslProtocol" type="xs:string" minOccurs="0" maxOccurs="1" />
-            <xs:element name="keymanagementAlgorithm" type="xs:boolean" minOccurs="0" maxOccurs="1" />
-            <xs:element name="truststoreFilename" type="xs:string" minOccurs="0" maxOccurs="1" />
-            <xs:element name="truststorePassword" type="xs:string" minOccurs="0" maxOccurs="1" />
-            <xs:element name="authenticationMode" minOccurs="0" maxOccurs="1" default="anonymous">
+            <xs:element name="keystore-name" type="xs:string" minOccurs="0" maxOccurs="1" />
+            <xs:element name="keystore-password" type="xs:string" minOccurs="0" maxOccurs="1" />
+            <xs:element name="keystore-type" type="xs:string" minOccurs="0" maxOccurs="1" />
+            <xs:element name="ssl-protocol" type="xs:string" minOccurs="0" maxOccurs="1" />
+            <xs:element name="keymanagement-algorithm" type="xs:boolean" minOccurs="0" maxOccurs="1" />
+            <xs:element name="truststore-name" type="xs:string" minOccurs="0" maxOccurs="1" />
+            <xs:element name="truststore-password" type="xs:string" minOccurs="0" maxOccurs="1" />
+            <xs:element name="authentication-mode" minOccurs="0" maxOccurs="1" default="anonymous">
                 <xs:annotation>
                     <xs:documentation>1-way, 2-way, anonymous</xs:documentation>
                 </xs:annotation>

Modified: branches/as7/pom.xml
===================================================================
--- branches/as7/pom.xml	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/pom.xml	2011-09-12 14:56:06 UTC (rev 3464)
@@ -449,36 +449,19 @@
             <dependency>
                 <groupId>org.jboss.logging</groupId>
                 <artifactId>jboss-logging</artifactId>
-                <version>3.0.0.CR1</version>
+                <version>3.0.0.GA</version>
             </dependency>               
-                     
+            <dependency>
+              <groupId>org.jboss.as</groupId>
+              <artifactId>jboss-as-clustering-jgroups</artifactId>
+              <version>${jbossas-version}</version>
+            </dependency>                      
+            <dependency>
+              <groupId>org.infinispan</groupId>
+              <artifactId>infinispan-core</artifactId>
+              <version>5.0.0.FINAL</version>
+            </dependency>
 			<dependency>
-				<groupId>jgroups</groupId>
-				<artifactId>jgroups</artifactId>
-				<version>2.6.15.GA</version>
-				<scope>provided</scope>
-			</dependency>
-			<dependency>
-				<groupId>org.jboss.cache</groupId>
-				<artifactId>jbosscache-core</artifactId>
-				<version>3.2.5.GA</version>
-                <exclusions>
-                    <exclusion>
-                      <groupId>javax.transaction</groupId>
-                      <artifactId>jta</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>commons-logging</groupId>
-                        <artifactId>commons-logging</artifactId>
-                    </exclusion>       
-                    <exclusion>
-                        <groupId>org.jboss</groupId>
-                        <artifactId>jboss-common-core</artifactId>
-                    </exclusion>                          
-                </exclusions>
-                <scope>provided</scope>                
-			</dependency>
-			<dependency>
 				<groupId>net.sourceforge.saxon</groupId>
 				<artifactId>saxonhe</artifactId>
 				<version>9.2.1.5</version>

Modified: branches/as7/runtime/src/main/java/org/teiid/transport/ODBCSocketListener.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/transport/ODBCSocketListener.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/runtime/src/main/java/org/teiid/transport/ODBCSocketListener.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -21,6 +21,7 @@
  */
 package org.teiid.transport;
 
+import java.net.InetSocketAddress;
 import java.util.Properties;
 
 import org.jboss.netty.channel.ChannelPipeline;
@@ -41,9 +42,9 @@
 	private TeiidDriver driver;
 	private ILogon logonService;
 	
-	public ODBCSocketListener(SocketConfiguration config, StorageManager storageManager, int portOffset, int maxLobSize, ILogon logon) {
+	public ODBCSocketListener(InetSocketAddress address, SocketConfiguration config, StorageManager storageManager, int maxLobSize, ILogon logon) {
 		//the clientserviceregistry isn't actually used by ODBC 
-		super(config, new ClientServiceRegistryImpl(ClientServiceRegistry.Type.ODBC), storageManager, portOffset);
+		super(address, config, new ClientServiceRegistryImpl(ClientServiceRegistry.Type.ODBC), storageManager);
 		this.maxLobSize = maxLobSize;
 		this.driver = new TeiidDriver();
 		this.driver.setEmbeddedProfile(new EmbeddedProfile() {

Modified: branches/as7/runtime/src/main/java/org/teiid/transport/SocketListener.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/transport/SocketListener.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/runtime/src/main/java/org/teiid/transport/SocketListener.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -50,9 +50,8 @@
     private ExecutorService nettyPool;
     private ClientServiceRegistryImpl csr;
     
-    public SocketListener(SocketConfiguration config, ClientServiceRegistryImpl csr, StorageManager storageManager, int portOffset) {
-		this(config.getPortNumber()+portOffset, config.getHostAddress().getHostAddress(), config.getInputBufferSize(), config.getOutputBufferSize(), config.getMaxSocketThreads(), config.getSSLConfiguration(), csr, storageManager);
-        
+    public SocketListener(InetSocketAddress address, SocketConfiguration config, ClientServiceRegistryImpl csr, StorageManager storageManager) {
+		this(address, config.getInputBufferSize(), config.getOutputBufferSize(), config.getMaxSocketThreads(), config.getSSLConfiguration(), csr, storageManager);
 		LogManager.logDetail(LogConstants.CTX_TRANSPORT, RuntimePlugin.Util.getString("SocketTransport.1", new Object[] {config.getHostAddress().getHostAddress(), String.valueOf(config.getPortNumber())})); //$NON-NLS-1$
     }
     
@@ -65,17 +64,14 @@
      * @param bindaddress
      * @param server
      */
-    public SocketListener(int port, String bindAddress, int inputBufferSize,
+    public SocketListener(InetSocketAddress address, int inputBufferSize,
 			int outputBufferSize, int maxWorkers, SSLConfiguration config, ClientServiceRegistryImpl csr, StorageManager storageManager) {
     	this.isClientEncryptionEnabled = config.isClientEncryptionEnabled();
     	this.csr = csr;
-    	if (port < 0 || port > 0xFFFF) {
-            throw new IllegalArgumentException("port out of range:" + port); //$NON-NLS-1$
-        }
 
     	this.nettyPool = Executors.newCachedThreadPool(new NamedThreadFactory("NIO")); //$NON-NLS-1$
         if (LogManager.isMessageToBeRecorded(LogConstants.CTX_TRANSPORT, MessageLevel.DETAIL)) { 
-            LogManager.logDetail(LogConstants.CTX_TRANSPORT, "server = " + bindAddress + "binding to port:" + port); //$NON-NLS-1$ //$NON-NLS-2$
+            LogManager.logDetail(LogConstants.CTX_TRANSPORT, "server = " + address.getAddress() + "binding to port:" + address.getPort()); //$NON-NLS-1$ //$NON-NLS-2$
 		}
         
         if (maxWorkers == 0) {
@@ -95,7 +91,7 @@
         }
         bootstrap.setOption("keepAlive", Boolean.TRUE); //$NON-NLS-1$
         
-        this.serverChanel = bootstrap.bind(new InetSocketAddress(bindAddress, port));
+        this.serverChanel = bootstrap.bind(address);
     }
     
     public int getPort() {

Modified: branches/as7/runtime/src/test/java/org/teiid/transport/TestCommSockets.java
===================================================================
--- branches/as7/runtime/src/test/java/org/teiid/transport/TestCommSockets.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/runtime/src/test/java/org/teiid/transport/TestCommSockets.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -77,7 +77,7 @@
 
 	@Test(expected=CommunicationException.class) public void testFailedConnect() throws Exception {
 		SSLConfiguration config = new SSLConfiguration();
-		listener = new SocketListener(addr.getPort(), addr.getAddress().getHostAddress(),1024, 1024, 1, config, null, BufferManagerFactory.getStandaloneBufferManager());
+		listener = new SocketListener(addr,1024, 1024, 1, config, null, BufferManagerFactory.getStandaloneBufferManager());
 
 		Properties p = new Properties();
 		String url = new TeiidURL(addr.getHostName(), listener.getPort() - 1, false).getAppServerURL();
@@ -182,7 +182,7 @@
 			}, null); 
 			server.registerClientService(FakeService.class, new TestSocketRemoting.FakeServiceImpl(), null);
 			storageManager = new MemoryStorageManager();
-			listener = new SocketListener(addr.getPort(), addr.getAddress().getHostAddress(), 1024, 1024, 1, config, server, storageManager);
+			listener = new SocketListener(addr, 1024, 1024, 1, config, server, storageManager);
 			
 			SocketListenerStats stats = listener.getStats();
 			assertEquals(0, stats.maxSockets);

Modified: branches/as7/runtime/src/test/java/org/teiid/transport/TestFailover.java
===================================================================
--- branches/as7/runtime/src/test/java/org/teiid/transport/TestFailover.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/runtime/src/test/java/org/teiid/transport/TestFailover.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -112,7 +112,7 @@
 
 		}, null); 
 		server.registerClientService(FakeService.class, new TestSocketRemoting.FakeServiceImpl(), null);
-		return new SocketListener(address.getPort(), address.getAddress().getHostAddress(), 1024, 1024, 1, config, server, BufferManagerFactory.getStandaloneBufferManager());
+		return new SocketListener(new InetSocketAddress(address.getAddress().getHostAddress(),address.getPort()), 1024, 1024, 1, config, server, BufferManagerFactory.getStandaloneBufferManager());
 	}
 	
 	@Test public void testFailover() throws Exception {

Modified: branches/as7/test-integration/common/pom.xml
===================================================================
--- branches/as7/test-integration/common/pom.xml	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/test-integration/common/pom.xml	2011-09-12 14:56:06 UTC (rev 3464)
@@ -20,15 +20,16 @@
   			<artifactId>h2</artifactId>
   			<version>1.2.147</version>
 		</dependency>
+        <dependency>
+          <groupId>org.jboss.as</groupId>
+          <artifactId>jboss-as-clustering-jgroups</artifactId>
+          <scope>provided</scope>
+        </dependency>         
 		<dependency>
   			<artifactId>teiid-cache-jbosscache</artifactId>
 			<groupId>org.jboss.teiid</groupId>
 		</dependency>
 		<dependency>
-			<groupId>jgroups</groupId>
-			<artifactId>jgroups</artifactId>
-		</dependency>
-		<dependency>
             <groupId>commons-logging</groupId>
             <artifactId>commons-logging</artifactId>
 		</dependency>

Modified: branches/as7/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViewReplication.java
===================================================================
--- branches/as7/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViewReplication.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViewReplication.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -34,6 +34,8 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import org.jboss.as.clustering.jgroups.ChannelFactory;
+import org.jgroups.Channel;
 import org.jgroups.JChannelFactory;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -124,12 +126,20 @@
 	private FakeServer createServer() throws Exception {
 		FakeServer server = new FakeServer();
 		
-		JGroupsObjectReplicator jor = new JGroupsObjectReplicator();
-        jor.setClusterName("demo");
-        jor.setMultiplexerStack("tcp");
-        JChannelFactory jcf = new JChannelFactory();
-        jcf.setMultiplexerConfig(this.getClass().getClassLoader().getResource("stacks.xml")); //$NON-NLS-1$
-        jor.setChannelFactory(jcf);
+		JGroupsObjectReplicator jor = new JGroupsObjectReplicator("demo") {
+			@Override
+			public ChannelFactory getChannelFactory() {
+				return new ChannelFactory() {
+					@Override
+					public Channel createChannel(String id) throws Exception {
+				        JChannelFactory jcf = new JChannelFactory();
+				        jcf.setMultiplexerConfig(this.getClass().getClassLoader().getResource("stacks.xml")); //$NON-NLS-1$
+				        return jcf.createMultiplexerChannel("tcp", id);
+					}
+				};
+			}
+			
+		};
 
 		server.setReplicator(jor);
     	HashMap<String, Collection<FunctionMethod>> udfs = new HashMap<String, Collection<FunctionMethod>>();

Modified: branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestJDBCSocketTransport.java
===================================================================
--- branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestJDBCSocketTransport.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestJDBCSocketTransport.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -57,7 +57,7 @@
 		server.setUseCallingThread(false);
 		server.deployVDB("parts", UnitTestUtil.getTestDataPath() + "/PartsSupplier.vdb");
 		
-		jdbcTransport = new SocketListener(config, server, BufferManagerFactory.getStandaloneBufferManager(), 0);
+		jdbcTransport = new SocketListener(addr, config, server, BufferManagerFactory.getStandaloneBufferManager());
 	}
 	
 	@AfterClass public static void oneTimeTearDown() throws Exception {

Modified: branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestODBCSocketTransport.java
===================================================================
--- branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestODBCSocketTransport.java	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestODBCSocketTransport.java	2011-09-12 14:56:06 UTC (rev 3464)
@@ -129,7 +129,7 @@
 			addr = new InetSocketAddress(0);
 			config.setBindAddress(addr.getHostName());
 			config.setPortNumber(0);
-			odbcTransport = new ODBCSocketListener(config, BufferManagerFactory.getStandaloneBufferManager(), 0, 100000, Mockito.mock(ILogon.class));
+			odbcTransport = new ODBCSocketListener(addr, config, BufferManagerFactory.getStandaloneBufferManager(), 100000, Mockito.mock(ILogon.class));
 			odbcTransport.setMaxBufferSize(1000); //set to a small size to ensure buffering over the limit works
 			FakeServer server = new FakeServer();
 			server.setUseCallingThread(false);

Modified: branches/as7/test-integration/pom.xml
===================================================================
--- branches/as7/test-integration/pom.xml	2011-09-12 14:53:12 UTC (rev 3463)
+++ branches/as7/test-integration/pom.xml	2011-09-12 14:56:06 UTC (rev 3464)
@@ -89,20 +89,6 @@
 			<groupId>javax.transaction</groupId>
                 <artifactId>jta</artifactId>
 		</dependency>
-        <!-- 
-        <dependency>
-            <groupId>org.jboss.deployers</groupId>
-            <artifactId>jboss-deployers-vfs-spi</artifactId>
-            <scope>provided</scope>
-        </dependency> 
-        
-        <dependency>    
-            <groupId>org.jboss.deployers</groupId>
-            <artifactId>jboss-deployers-vfs</artifactId>
-            <scope>provided</scope>
-        </dependency>   		
-         -->
-         
     <dependency>
         <groupId>org.jboss</groupId>
         <artifactId>jboss-vfs</artifactId>



More information about the teiid-commits mailing list