[teiid-commits] teiid SVN: r3305 - in branches/as7: adminshell/src/main/java/org/teiid/adminshell and 37 other directories.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Sun Jul 10 23:06:58 EDT 2011


Author: rareddy
Date: 2011-07-10 23:06:57 -0400 (Sun, 10 Jul 2011)
New Revision: 3305

Added:
   branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/BufferManagerService.java
Removed:
   branches/as7/build/kits/jboss-as7/standalone/configuration/standalone.xml
   branches/as7/client/src/main/java/org/teiid/adminapi/impl/Admin.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidXOMSubsystemDescription.java
   branches/as7/test-integration/db/src/test/java/org/teiid/adminapi/jboss/TestConnectorBindings.java
Modified:
   branches/as7/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java
   branches/as7/api/src/main/java/org/teiid/logging/LogManager.java
   branches/as7/build/assembly/jboss-as7/dist.xml
   branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/api/main/module.xml
   branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/client/main/module.xml
   branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/main/module.xml
   branches/as7/client/pom.xml
   branches/as7/client/src/main/java/org/teiid/adminapi/AdminFactory.java
   branches/as7/client/src/main/java/org/teiid/adminapi/impl/MetadataMapper.java
   branches/as7/client/src/test/java/org/teiid/adminapi/impl/TestRequestMetadata.java
   branches/as7/client/src/test/java/org/teiid/adminapi/impl/TestSessionMetadata.java
   branches/as7/client/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java
   branches/as7/client/src/test/java/org/teiid/adminapi/impl/TestVDBMetaData.java
   branches/as7/connectors/connector-file/pom.xml
   branches/as7/connectors/connector-file/src/main/rar/META-INF/MANIFEST.MF
   branches/as7/connectors/connector-ldap/pom.xml
   branches/as7/connectors/connector-ldap/src/main/rar/META-INF/MANIFEST.MF
   branches/as7/connectors/connector-salesforce/pom.xml
   branches/as7/connectors/connector-salesforce/src/main/rar/META-INF/MANIFEST.MF
   branches/as7/connectors/connector-ws/pom.xml
   branches/as7/connectors/connector-ws/src/main/rar/META-INF/MANIFEST.MF
   branches/as7/engine/src/main/java/org/teiid/cache/CacheConfiguration.java
   branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java
   branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
   branches/as7/jboss-integration/pom.xml
   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/QueryEngineAdd.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineDescription.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineOperationHandler.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/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/jboss-integration/src/test/java/org/teiid/adminapi/jboss/TestAdminObjectBuilder.java
   branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidConfiguration.java
   branches/as7/jboss-integration/src/test/resources/teiid-model-config.txt
   branches/as7/jboss-integration/src/test/resources/teiid-sample-config.xml
   branches/as7/pom.xml
   branches/as7/runtime/pom.xml
   branches/as7/runtime/src/main/java/org/teiid/deployers/VDBDependencyProcessor.java
   branches/as7/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
   branches/as7/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
   branches/as7/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java
   branches/as7/runtime/src/main/java/org/teiid/transport/LocalServerConnection.java
   branches/as7/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java
   branches/as7/runtime/src/test/java/org/teiid/deployers/TestObjectSerializer.java
   branches/as7/runtime/src/test/java/org/teiid/deployers/TestTranslatorUtil.java
   branches/as7/runtime/src/test/java/org/teiid/services/TestMembershipServiceImpl.java
   branches/as7/runtime/src/test/java/org/teiid/services/TestSessionServiceImpl.java
   branches/as7/runtime/src/test/java/org/teiid/transport/TestLogonImpl.java
   branches/as7/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java
Log:
updated to 7.0.0.CR1 compatibility. Fixed for interface and behavior changes

Modified: branches/as7/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java
===================================================================
--- branches/as7/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -64,11 +64,12 @@
 	
 	@Doc(text="Get a named Admin connection to the specified server")
 	public static void connectAsAdmin(
-			@Doc(text = "url - URL in the format \"mm[s]://host:port\"") String url,
+			@Doc(text = "host - hostname") String host,
+			@Doc(text = "port - port") int port,
 			@Doc(text = "username") String username,
 			@Doc(text = "password") String password, 
 			@Doc(text = "connection name") String connectionName) throws AdminException {
-		internalAdmin = AdminFactory.getInstance().createAdmin(username, password.toCharArray(), url);
+		internalAdmin = AdminFactory.getInstance().createAdmin(host, port, username, password.toCharArray());
 		currentName = connectionName;
 		Admin old = connections.put(connectionName, internalAdmin);
 		if (old != null) {
@@ -81,8 +82,7 @@
 	@SuppressWarnings("nls")
 	public static void connectAsAdmin() throws AdminException {
 		loadConnectionProperties();
-		connectAsAdmin(p.getProperty("admin.url", "mm://localhost:31443"), p.getProperty("admin.user", "admin"), 
-				p.getProperty("admin.password", "admin"), "conn-" + connectionCount++);
+		connectAsAdmin(p.getProperty("admin.host", "localhost"), Integer.parseInt(p.getProperty("admin.port", "9990")), p.getProperty("admin.user", "admin"), p.getProperty("admin.password", "admin"), "conn-" + connectionCount++);
 	}
 
 	static void loadConnectionProperties() {

Modified: branches/as7/api/src/main/java/org/teiid/logging/LogManager.java
===================================================================
--- branches/as7/api/src/main/java/org/teiid/logging/LogManager.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/api/src/main/java/org/teiid/logging/LogManager.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -396,4 +396,12 @@
                                              final int level) {
         return Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), interfaces, new LoggingProxy(instance, loggingContext, level));
     }
+    
+    public static Object createLoggingProxy(final String loggingContext,
+            final Object instance,
+            final Class<?>[] interfaces,
+            final int level,
+            ClassLoader classLoader) {
+    		return Proxy.newProxyInstance(classLoader, interfaces, new LoggingProxy(instance, loggingContext, level));
+    }
 }

Modified: branches/as7/build/assembly/jboss-as7/dist.xml
===================================================================
--- branches/as7/build/assembly/jboss-as7/dist.xml	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/build/assembly/jboss-as7/dist.xml	2011-07-11 03:06:57 UTC (rev 3305)
@@ -105,6 +105,18 @@
         <outputDirectory>modules/org/jboss/teiid/common-core/main</outputDirectory>
       </binaries>
     </moduleSet>
+
+    <moduleSet>
+      <useAllReactorProjects>true</useAllReactorProjects>
+      <includes>
+        <include>org.jboss.teiid:teiid-api</include>   
+      </includes>
+      <binaries>
+        <includeDependencies>false</includeDependencies>
+        <unpack>false</unpack>
+        <outputDirectory>modules/org/jboss/teiid/api/main</outputDirectory>
+      </binaries>
+    </moduleSet>
     
     <moduleSet>
       <useAllReactorProjects>true</useAllReactorProjects>
@@ -179,7 +191,7 @@
                     <useDefaultExcludes>true</useDefaultExcludes>
                 </dependencySet>
             </dependencySets>          
-          <outputDirectory>standalone/deployments/teiid</outputDirectory>
+          <outputDirectory>standalone/deployments</outputDirectory>
           <fileMode>0644</fileMode>
         </binaries>
       
@@ -218,7 +230,7 @@
         <useAllReactorProjects>true</useAllReactorProjects>
 
         <includes>
-            <include>org.jboss.teiid.connectors:translator-loopback/main</include>
+            <include>org.jboss.teiid.connectors:translator-loopback</include>
         </includes>
 
         <binaries>        
@@ -328,7 +340,7 @@
                     <useDefaultExcludes>true</useDefaultExcludes>
                 </dependencySet>
             </dependencySets>          
-          <outputDirectory>modules/org/jboss/teiid/translator/ws</outputDirectory>
+          <outputDirectory>modules/org/jboss/teiid/translator/ws/main</outputDirectory>
           <fileMode>0644</fileMode>
         </binaries>
       

Modified: branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/api/main/module.xml
===================================================================
--- branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/api/main/module.xml	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/api/main/module.xml	2011-07-11 03:06:57 UTC (rev 3305)
@@ -30,6 +30,8 @@
 
 
     <dependencies>
+        <module name="javax.resource.api"/>
+        <module name="org.jboss.teiid.common-core"/>    
         <module name="org.jboss.teiid.client" />
     </dependencies>
 </module>
\ No newline at end of file

Modified: branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/client/main/module.xml
===================================================================
--- branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/client/main/module.xml	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/client/main/module.xml	2011-07-11 03:06:57 UTC (rev 3305)
@@ -31,5 +31,7 @@
 
     <dependencies>
         <module name="org.jboss.teiid.common-core" />
+        <module name="javax.transaction.api"/>
+        <module name="javax.api"/>
     </dependencies>
 </module>
\ No newline at end of file

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-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/main/module.xml	2011-07-11 03:06:57 UTC (rev 3305)
@@ -25,12 +25,13 @@
 <module xmlns="urn:jboss:module:1.0" name="org.jboss.teiid">
     <resources>
         <resource-root path="teiid-engine-${version}.jar" />
+        <!-- 
         <resource-root path="teiid-cache-jbosscache-${version}.jar" />
+         -->
         <resource-root path="teiid-jboss-integration-${version}.jar" />
         <resource-root path="teiid-metadata-${version}.jar" />
         <resource-root path="teiid-runtime-${version}.jar" />
         <resource-root path="teiid-engine-${version}.jar" />
-        <resource-root path="teiid-engine-${version}.jar" />
         <resource-root path="saxon-9.1.0.8.jar" />
         <resource-root path="saxon-9.1.0.8-dom.jar" />
         <resource-root path="json-simple-1.1.jar" />        
@@ -39,35 +40,27 @@
 
 
     <dependencies>
-        <module name="com.sun.xml.bind"/>
+        <module name="org.jboss.teiid.common-core" />
         <module name="org.jboss.teiid.api" />
+        <module name="org.jboss.teiid.client" />
         <module name="javax.api" />
-        <module name="javax.resource.api" />
-        <module name="javax.transaction.api" />
-        <module name="javax.annotation.api" />
-        <module name="org.jboss.as.controller" />
-        <module name="org.jboss.as.naming" />
-        <module name="org.jboss.as.server" />
-        <module name="org.jboss.as.security" />
-        <module name="org.jboss.as.ee" />
-        <module name="org.jboss.as.threads" />
-        <module name="org.jboss.as.transactions" />
-        <module name="org.jboss.common-core" />
-        <module name="org.jboss.integration.jboss-jca-spi" />
-        <module name="org.jboss.integration.jboss-transaction-spi" />
-        <module name="org.jboss.ironjacamar.api" />
-        <module name="org.jboss.ironjacamar.impl" />
-        <module name="org.jboss.ironjacamar.jdbcadapters" />
-        <module name="org.jboss.jandex" />
-        <module name="org.jboss.jts" />
-        <module name="org.jboss.jts.integration" />
+        <module name="javax.resource.api"/>
         <module name="org.jboss.logging" />
-        <module name="org.jboss.modules" />
+        <module name="org.jboss.as.controller"/>
+        <module name="org.jboss.modules"/>
         <module name="org.jboss.msc" />
         <module name="org.jboss.netty"/>
         <module name="org.jboss.staxmapper" />
-        <module name="org.jboss.threads" />
         <module name="org.jboss.vfs" />
-        <module name="org.picketbox" />
+        <module name="org.picketbox"/>
+        <!-- REMOVE DIRECT DEPENDENCY ON LOG4J, and use jboss logging -->
+        <module name="org.apache.log4j"/>
+        <module name="org.jboss.as.network"/>
+        <module name="org.jboss.as.security"/>
+        <module name="org.jboss.as.server"/>
+        <module name="org.jboss.as.naming"/>
+        <module name="javax.xml.bind.api"/>
+        <module name="javax.transaction.api"/>
     </dependencies>
+
 </module>
\ No newline at end of file

Copied: branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml (from rev 3274, branches/as7/build/kits/jboss-as7/standalone/configuration/standalone.xml)
===================================================================
--- branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml	                        (rev 0)
+++ branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml	2011-07-11 03:06:57 UTC (rev 3305)
@@ -0,0 +1,304 @@
+<!--
+  ~ 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.
+  -->
+
+<server xmlns="urn:jboss:domain:1.0">
+
+    <extensions>
+        <extension module="org.jboss.as.clustering.infinispan"/>
+        <extension module="org.jboss.as.connector"/>
+        <extension module="org.jboss.as.deployment-scanner"/>
+        <extension module="org.jboss.as.ee"/>
+        <extension module="org.jboss.as.ejb3"/>
+        <extension module="org.jboss.as.jaxrs"/>
+        <extension module="org.jboss.as.jmx"/>
+        <extension module="org.jboss.as.jpa"/>
+        <extension module="org.jboss.as.logging"/>
+        <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>
+
+    <management>
+	    <security-realms>
+		    <security-realm name="PropertiesMgmtSecurityRealm">
+			    <authentication>
+				    <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir" />
+			    </authentication>
+		    </security-realm>
+	    </security-realms>
+        <management-interfaces>
+           <native-interface interface="management" port="9999" />
+           <http-interface interface="management" port="9990"/>
+        </management-interfaces>
+    </management>
+
+    <profile>
+        <subsystem xmlns="urn:jboss:domain:logging:1.0">
+            <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>
+                    <validation></validation>
+                    <timeout></timeout>
+                    <statement></statement>
+                </datasource>
+                <drivers>
+                    <driver name="h2" module="com.h2database.h2">
+                        <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
+                    </driver>
+                </drivers>
+            </datasources>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">
+            <deployment-scanner scan-interval="5000" relative-to="jboss.server.base.dir" path="deployments" />
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:ee:1.0" />
+        <subsystem xmlns="urn:jboss:domain:ejb3:1.0" />
+        <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>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
+        <subsystem xmlns="urn:jboss:domain:jca:1.0">
+            <archive-validation enabled="false" />
+            <bean-validation enabled="false" />
+            <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" cache-type="default">
+                    <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">
+            <query-engine>
+                <thread-group-async>teiid-async</thread-group-async>
+                <eventDistributorName>teiid/event-distributor</eventDistributorName>
+                <security-domain>teiid-security</security-domain>
+                <jdbc>
+                    <socket-binding>teiid-jdbc</socket-binding>
+                </jdbc>
+                <odbc>
+                    <socket-binding>teiid-odbc</socket-binding>
+                </odbc>
+            </query-engine>
+        </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">
+            <connector name="http" scheme="http" protocol="HTTP/1.1" socket-binding="http"/>
+            <virtual-server name="localhost" enable-welcome-root="true">
+                <alias name="example.com" />
+            </virtual-server>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:weld:1.0" />
+    </profile>
+
+    <interfaces>
+        <interface name="management">
+            <inet-address value="127.0.0.1"/>
+        </interface>
+        <interface name="public">
+           <inet-address value="127.0.0.1"/>
+        </interface>
+    </interfaces>
+
+    <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>
+
+</server>


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

Deleted: branches/as7/build/kits/jboss-as7/standalone/configuration/standalone.xml
===================================================================
--- branches/as7/build/kits/jboss-as7/standalone/configuration/standalone.xml	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/build/kits/jboss-as7/standalone/configuration/standalone.xml	2011-07-11 03:06:57 UTC (rev 3305)
@@ -1,451 +0,0 @@
-<!--
-  ~ 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.
-  -->
-
-<server name="example"
-        xmlns="urn:jboss:domain:1.0"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="urn:jboss:domain:1.0 jboss_7_0.xsd
-                            urn:jboss:domain:arquillian:1.0 jboss-arquillian.xsd
-                            urn:jboss:domain:connector:1.0 jboss-connector.xsd
-                            urn:jboss:domain:datasources:1.0 jboss-datasources.xsd
-                            urn:jboss:domain:ejb3:1.0 jboss-ejb3.xsd
-                            urn:jboss:domain:ee:1.0 jboss-ee.xsd
-                            urn:jboss:domain:jaxrs:1.0 jboss-jaxrs.xsd
-                            urn:jboss:domain:jmx:1.0 jboss-jmx.xsd
-                            urn:jboss:domain:jpa:1.0 jboss-jpa.xsd
-                            urn:jboss:domain:messaging:1.0 jboss-messaging.xsd
-                            urn:jboss:domain:naming:1.0 jboss-naming.xsd
-                            urn:jboss:domain:osgi:1.0 jboss-osgi.xsd
-                            urn:jboss:domain:remoting:1.0 jboss-remoting.xsd
-                            urn:jboss:domain:resourceadapters:1.0 jboss-resource-adapters.xsd
-                            urn:jboss:domain:sar:1.0 jboss-sar.xsd
-                            urn:jboss:domain:teiid:1.0 jboss-teiid.xsd
-                            urn:jboss:domain:threads:1.0 jboss-threads.xsd
-                            urn:jboss:domain:transactions:1.0 jboss-txn.xsd
-                            urn:jboss:domain:web:1.0 jboss-web.xsd
-                            urn:jboss:domain:deployment-scanner:1.0 jboss-deployment-scanner.xsd
-                            urn:jboss:domain:security:1.0 jboss-security.xsd
-                            urn:jboss:domain:webservices:1.0 jboss-webservices.xsd
-                            urn:jboss:domain:weld:1.0 jboss-weld.xsd">
-
-    <extensions>
-        <extension module="org.jboss.as.arquillian.service"/>
-        <extension module="org.jboss.as.connector"/>
-        <extension module="org.jboss.as.deployment-scanner"/>
-        <extension module="org.jboss.as.ee"/>
-        <extension module="org.jboss.as.ejb3"/>
-        <extension module="org.jboss.as.jaxrs"/>
-        <extension module="org.jboss.as.jmx"/>
-        <extension module="org.jboss.as.jpa"/>
-        <extension module="org.jboss.as.logging"/>
-        <extension module="org.jboss.as.messaging"/>
-        <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.webservices" />
-        <extension module="org.jboss.as.weld" />
-    </extensions>
-
-    <paths>
-       <path name="absolute" path="tmp"/>
-       <path name="relative" path="relative" relative-to="absolute"/>
-    </paths>
-
-    <management-interfaces>
-       <native-interface interface="default" port="9999"/>
-       <http-interface interface="default" port="9990"/>
-    </management-interfaces>
-
-    <profile name="ignore">
-        <subsystem xmlns="urn:jboss:domain:logging:1.0">
-            <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:threads:1.0">
-            <scheduled-thread-pool name="remoting">
-                <max-threads count="10" per-cpu="20"/>
-                <keepalive-time time="10" unit="seconds"/>
-            </scheduled-thread-pool>
-            <bounded-queue-thread-pool name="jca-short-running" 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"/>
-            </bounded-queue-thread-pool>
-            <bounded-queue-thread-pool name="jca-long-running" 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"/>
-            </bounded-queue-thread-pool>
-            <bounded-queue-thread-pool name="ejb3-async" 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"/>
-            </bounded-queue-thread-pool>
-            <bounded-queue-thread-pool name="teiid-async" 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"/>
-            </bounded-queue-thread-pool>            
-        </subsystem>
-        <subsystem xmlns="urn:jboss:domain:arquillian:1.0" />
-        <subsystem xmlns="urn:jboss:domain:ee:1.0" />
-        <subsystem xmlns="urn:jboss:domain:ejb3:1.0" />
-        <subsystem xmlns="urn:jboss:domain:naming: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-domains>
-        </subsystem>
-        <subsystem xmlns="urn:jboss:domain:remoting:1.0" thread-pool="remoting"/>
-        <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:jaxrs:1.0"/>
-        <subsystem xmlns="urn:jboss:domain:jpa:1.0"/>
-        <subsystem xmlns="urn:jboss:domain:sar:1.0"/>
-        <subsystem xmlns="urn:jboss:domain:transactions:1.0">
-            <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
-            <core-environment socket-binding="txn-socket-process-id"/>
-        </subsystem>
-        <subsystem xmlns="urn:jboss:domain:connector:1.0">
-            <archive-validation enabled="false" />
-            <bean-validation enabled="false" />
-            <default-workmanager short-running-thread-pool="jca-short-running" long-running-thread-pool="jca-long-running" />
-        </subsystem>
-        <subsystem xmlns="urn:jboss:domain:datasources:1.0">
-            <datasources>
-                <datasource jndi-name="java:/H2DS" enabled="true" use-java-context="true" pool-name="H2DS">
-                    <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
-                    <driver-class>org.h2.Driver</driver-class>
-                    <driver>org.h2.Driver#1.2</driver>
-                    <pool></pool>
-                    <security>
-                        <user-name>sa</user-name>
-                        <password>sa</password>
-                    </security>
-                    <validation></validation>
-                    <timeout></timeout>
-                    <statement></statement>
-                </datasource>
-            </datasources>
-            <drivers>
-                <driver module="com.h2database.h2"/>
-            </drivers>
-        </subsystem>
-        <subsystem xmlns="urn:jboss:domain:resourceadapters:1.0">
-                <!--  <resource-adapters>
-				  <resource-adapter>
-				    <archive>ra16out.rar</archive>
-				    <connection-definitions>
-				      <connection-definition jndi-name="java:/eis/ra16out-raxml"
-				                             class-name="org.jboss.jca.test.deployers.spec.rars.ra16out.TestManagedConnectionFactory">
-				      </connection-definition>
-				    </connection-definitions>
-				  </resource-adapter>
-				</resource-adapters>-->
-       </subsystem>
-       <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.log4j,
-                org.jboss.as.osgi,
-                </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.log4j;version=1.2,
-                org.jboss.as.osgi.service;version=7.0,
-                org.jboss.osgi.spi.capability;version=1.0,
-                org.jboss.osgi.spi.util;version=1.0,
-                org.jboss.osgi.testing;version=1.0,
-                </property>
-            </properties>
-            <modules>
-                <!-- modules registered with the OSGi layer on startup -->
-                <module identifier="org.jboss.as.arquillian.aggregate"/>
-                <module identifier="org.jboss.logging"/>
-                <!-- bundles installed on startup -->
-                <module identifier="org.apache.aries.jmx" start="true"/>
-                <module identifier="org.apache.aries.util"/>
-                <module identifier="org.apache.felix.configadmin" start="true"/>
-                <module identifier="org.jboss.as.osgi.configadmin" start="true"/>
-                <module identifier="org.jboss.osgi.common" start="true"/>
-                <module identifier="org.jboss.osgi.jmx" start="true"/>
-                <module identifier="org.osgi.compendium"/>
-            </modules>
-        </subsystem>
-        <subsystem xmlns="urn:jboss:domain:messaging:1.0">
-            <!-- Default journal file size is 10Mb, reduced here to 100k for faster first boot -->
-            <journal-file-size>102400</journal-file-size>
-            <journal-min-files>2</journal-min-files>
-            <journal-type>NIO</journal-type>
-            <!-- disable messaging persistence -->
-            <persistence-enabled>false</persistence-enabled>
-
-            <connectors>
-               <in-vm-connector name="in-vm" server-id="0" />
-               <netty-connector name="netty" socket-binding="messaging" />
-               <netty-connector name="netty-throughput" socket-binding="messaging-throughput">
-                  <param key="batch-delay" value="50"/>
-               </netty-connector>
-            </connectors>
-
-            <acceptors>
-               <in-vm-acceptor name="in-vm" server-id="0" />
-               <netty-acceptor name="netty" socket-binding="messaging" />
-               <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">
-                  <param key="batch-delay" value="50"/>
-                  <param key="direct-deliver" value="false"/>
-               </netty-acceptor>
-            </acceptors>
-
-            <security-settings>
-               <security-setting match="#">
-                   <permission type="createNonDurableQueue" roles="guest"/>
-                   <permission type="deleteNonDurableQueue" roles="guest"/>
-                    <permission type="consume" roles="guest"/>
-                    <permission type="send" roles="guest"/>
-               </security-setting>
-            </security-settings>
-
-            <address-settings>
-               <!--default for catch all-->
-               <address-setting match="#">
-                  <dead-letter-address>jms.queue.DLQ</dead-letter-address>
-                  <expiry-address>jms.queue.ExpiryQueue</expiry-address>
-                  <redelivery-delay>0</redelivery-delay>
-                  <max-size-bytes>10485760</max-size-bytes>
-                  <message-counter-history-day-limit>10</message-counter-history-day-limit>
-                  <address-full-policy>BLOCK</address-full-policy>
-               </address-setting>
-            </address-settings>
-        </subsystem>
-        <subsystem xmlns="urn:jboss:domain:messaging:jms:1.0">
-            <connection-factory name="InVmConnectionFactory">
-               <connectors>
-                  <connector-ref connector-name="in-vm" backup-connector-name="netty"/>
-               </connectors>
-               <entries>
-                  <entry name="java:/ConnectionFactory" />
-               </entries>
-            </connection-factory>
-            <connection-factory name="RemoteConnectionFactory">
-               <connectors>
-                  <connector-ref connector-name="netty" backup-connector-name="in-vm"/>
-               </connectors>
-               <entries>
-                  <entry name="RemoteConnectionFactory" />
-               </entries>
-            </connection-factory>
-            <queue name="testQueue">
-               <entry name="queue/test" />
-            </queue>
-            <topic name="testTopic">
-               <entry name="topic/test" />
-            </topic>
-        </subsystem>
-        <subsystem xmlns="urn:jboss:domain:web:1.0">
-            <connector name="http" scheme="http" protocol="HTTP/1.1" socket-binding="http"/>
-            <virtual-server name="localhost">
-               <alias name="example.com" />
-            </virtual-server>
-        </subsystem>
-        <subsystem xmlns="urn:jboss:domain:weld:1.0" />
-        <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">
-            <deployment-scanner scan-interval="5000" relative-to="jboss.server.base.dir" path="deployments" />
-        </subsystem>
-        <subsystem xmlns="urn:jboss:domain:webservices:1.0">
-           <configuration>
-              <webServiceHost>localhost</webServiceHost>
-              <modifySOAPAddress>true</modifySOAPAddress>
-              <!-- <webServiceSecurePort>8443</webServiceSecurePort>
-                 <webServicePort>8080</webServicePort> -->
-           </configuration>
-       </subsystem>
-       
-       <subsystem xmlns="urn:jboss:domain:teiid:1.0">
-            <buffer-service>
-                <useDisk>true</useDisk>
-                <diskDirectory>${jboss.server.temp.dir}/teiid</diskDirectory>
-                <processorBatchSize>512</processorBatchSize>
-                <connectorBatchSize>1024</connectorBatchSize>
-                <maxReserveBatchColumns>-1</maxReserveBatchColumns>
-                <maxProcessingBatchesColumns>-1</maxProcessingBatchesColumns>
-                <maxFileSize>2048</maxFileSize>
-                <maxBufferSpace>51200</maxBufferSpace>
-                <maxOpenFiles>64</maxOpenFiles>
-            </buffer-service>
-            <cache-factory class="org.teiid.cache.jboss.ClusterableCacheFactory" enabled="true">
-                <cacheManager>java:TeiidCacheManager</cacheManager>
-                <resultsetCacheName>teiid-resultset-cache</resultsetCacheName>
-            </cache-factory>
-            <resultset-cache-config class="org.teiid.cache.CacheConfiguration" enabled="true">
-                <maxEntries>1024</maxEntries>
-                <maxAgeInSeconds>7200</maxAgeInSeconds>
-                <maxStaleness>60</maxStaleness>
-                <type>EXPIRATION</type>
-                <location>resultset</location>
-            </resultset-cache-config>
-            <preparedplan-cache-config class="org.teiid.cache.CacheConfiguration">
-                <maxEntries>512</maxEntries>
-                <maxAgeInSeconds>28800</maxAgeInSeconds>
-                <maxStaleness>0</maxStaleness>
-            </preparedplan-cache-config>      
-            
-            <runtime-engine jndi-name="teiid/engine-deployer">
-                <thread-group-async>teiid-async</thread-group-async>
-                <maxThreads>64</maxThreads>
-                <maxActivePlans>20</maxActivePlans>
-                <userRequestSourceConcurrency>0</userRequestSourceConcurrency>
-                <timeSliceInMilli>2000</timeSliceInMilli>
-                <maxRowsFetchSize>20480</maxRowsFetchSize>
-                <lobChunkSizeInKB>100</lobChunkSizeInKB>
-                <useDataRoles>true</useDataRoles>
-                <allowCreateTemporaryTablesByDefault>true</allowCreateTemporaryTablesByDefault>
-                <allowFunctionCallsByDefault>true</allowFunctionCallsByDefault>
-                <queryThresholdInSecs>600</queryThresholdInSecs>
-                <maxSourceRows>-1</maxSourceRows>
-                <exceptionOnMaxSourceRows>true</exceptionOnMaxSourceRows>
-                <maxODBCLobSizeAllowed>5242880</maxODBCLobSizeAllowed>
-                <eventDistributorName>teiid/event-distributor</eventDistributorName>
-                <detectingChangeEvents>true</detectingChangeEvents>
-                <securityDomains>teiid-security</securityDomains>
-                <adminSecurityDomain>jmx-console</adminSecurityDomain>
-                <sessionMaxLimit>5000</sessionMaxLimit>
-                <sessionExpirationTimeLimit>0</sessionExpirationTimeLimit>                
-            </runtime-engine>      
-            
-            <jdbc enabled="true">
-                <maxSocketThreads>0</maxSocketThreads>
-                <inputBufferSize>0</inputBufferSize>
-                <outputBufferSize>0</outputBufferSize>
-                <socket-binding>teiid-jdbc</socket-binding>
-            </jdbc>
-            
-            <odbc enabled="true">
-                <maxSocketThreads>0</maxSocketThreads>
-                <inputBufferSize>0</inputBufferSize>
-                <outputBufferSize>0</outputBufferSize>
-                <socket-binding>teiid-odbc</socket-binding>
-            </odbc>     
-       </subsystem>
-    </profile>
-
-    <interfaces>
-        <interface name="default">
-            <inet-address value="127.0.0.1"/>
-        </interface>
-        <interface name="any">
-           <any-address/>
-        </interface>
-        <interface name="complex">
-           <any>
-              <subnet-match value="192.168.0.0/16"/>
-              <public-address/>
-           </any>
-           <not>
-             <site-local-address/>
-           </not>
-           <up/>
-           <multicast/>
-        </interface>
-    </interfaces>
-
-    <socket-binding-group name="standard-sockets" default-interface="default">
-       <socket-binding name="jndi" port="1099"/>
-       <socket-binding name="jmx-connector-registry" port="1090"/>
-       <socket-binding name="jmx-connector-server" port="1091"/>
-       <socket-binding name="http" port="8080"/>
-       <socket-binding name="https" port="8447"/>
-       <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="txn-socket-process-id" port="4714"/>
-       <socket-binding name="messaging" port="5445" />
-       <socket-binding name="messaging-throughput" port="5455"/>
-       <socket-binding name="teiid-jdbc" port="31000"/>
-       <socket-binding name="teiid-odbc" port="35432"/>
-    </socket-binding-group>
-
-    <system-properties>
-        <property name="foo" value="bar"/>
-        <property name="key" value="value"/>
-    </system-properties>
-</server>
-

Modified: branches/as7/client/pom.xml
===================================================================
--- branches/as7/client/pom.xml	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/client/pom.xml	2011-07-11 03:06:57 UTC (rev 3305)
@@ -23,7 +23,17 @@
         <dependency>
             <groupId>org.jboss</groupId>
             <artifactId>jboss-dmr</artifactId>                
-        </dependency>        
+        </dependency>    
+        <dependency>
+            <groupId>org.jboss.as</groupId>
+            <artifactId>jboss-as-controller-client</artifactId>   
+            <scope>provided</scope>
+        </dependency> 
+        <dependency>
+            <groupId>org.jboss.as</groupId>
+            <artifactId>jboss-as-cli</artifactId>
+            <scope>provided</scope>  
+        </dependency>                 
         <!-- 
 		<dependency>
 			<groupId>org.jboss.man</groupId>

Modified: branches/as7/client/src/main/java/org/teiid/adminapi/AdminFactory.java
===================================================================
--- branches/as7/client/src/main/java/org/teiid/adminapi/AdminFactory.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/client/src/main/java/org/teiid/adminapi/AdminFactory.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -22,147 +22,322 @@
 
 package org.teiid.adminapi;
 
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.UnknownHostException;
+import java.util.Collection;
+import java.util.List;
 import java.util.Properties;
+import java.util.Set;
 
-import org.teiid.core.util.PropertiesUtils;
-import org.teiid.jdbc.JDBCPlugin;
-import org.teiid.net.CommunicationException;
-import org.teiid.net.ConnectionException;
-import org.teiid.net.ServerConnection;
-import org.teiid.net.ServerConnectionFactory;
-import org.teiid.net.TeiidURL;
-import org.teiid.net.socket.SocketServerConnectionFactory;
+import javax.security.auth.callback.*;
+import javax.security.sasl.RealmCallback;
+import javax.security.sasl.RealmChoiceCallback;
 
+import org.jboss.as.cli.Util;
+import org.jboss.as.cli.operation.impl.DefaultOperationRequestAddress;
+import org.jboss.as.controller.client.ModelControllerClient;
+import org.teiid.adminapi.VDB.ConnectionType;
 
+
 /** 
  * Singleton factory for class for creating Admin connections to the Teiid
  */
 public class AdminFactory {
+	private static AdminFactory INSTANCE = new AdminFactory();
 	
-    private final class AdminProxy implements InvocationHandler {
-
-    	private Admin admin;
-    	private ServerConnection serverConnection;
-    	private boolean closed;
-    	
-    	public AdminProxy(Properties p) throws ConnectionException, CommunicationException {
-    		this.serverConnection = serverConnectionFactory.getConnection(p);
-    		this.admin = serverConnection.getService(Admin.class);
-		}
-    	
-    	private synchronized Admin getTarget() throws AdminComponentException {
-    		if (closed) {
-    			throw new AdminComponentException(JDBCPlugin.Util.getString("admin_conn_closed")); //$NON-NLS-1$
-    		}
-    		return admin;
-    	}
-    	
-		@Override
-		public Object invoke(Object proxy, Method method, Object[] args)
-				throws Throwable {
-			if (method.getName().equals("close")) { //$NON-NLS-1$
-				close();
-				return null;
-			}
-			if (!method.getDeclaringClass().equals(Admin.class)) {
-				return method.invoke(this, args);
-			}
-			try {
-				return method.invoke(getTarget(), args);
-			} catch (InvocationTargetException e) {
-				throw e.getTargetException();
-			}
-		}
-		
-		public synchronized void close() {
-			if (closed) {
-				return;
-			}
-			this.closed = true;
-			if (serverConnection != null) {
-				serverConnection.close();
-			}
-		}		
-    }
-
-	public static final String DEFAULT_APPLICATION_NAME = "Admin"; //$NON-NLS-1$
-
-    private static AdminFactory instance = new AdminFactory(SocketServerConnectionFactory.getInstance());
-    
-    private ServerConnectionFactory serverConnectionFactory;
-    
-    AdminFactory(ServerConnectionFactory connFactory) {
-    	this.serverConnectionFactory = connFactory;
-    }
-    
-    public static AdminFactory getInstance() {
-        return instance;
-    }
-    
-    
+	public static AdminFactory getInstance() {
+		return INSTANCE;
+	}
     /**
      * Creates a ServerAdmin with the specified connection properties. 
-     * Uses the DEFAULT_APPLICATION_NAME as the application name.
      * @param userName
      * @param password
      * @param serverURL
+     * @param applicationName
      * @return
      * @throws AdminException
      */
-    public Admin createAdmin(String userName,
-                             char[] password,
-                             String serverURL) throws AdminException {
-        
-        return createAdmin(userName, password, serverURL, DEFAULT_APPLICATION_NAME);
-        
+    public Admin createAdmin(String host, int port, String userName, char[] password) throws AdminException {
+        if(host == null) {
+            host = "localhost"; //$NON-NLS-1$
+        }
+
+        if(port < 0) {
+            port = 9990;
+        }
+
+        try {
+            CallbackHandler cbh = new AuthenticationCallbackHandler(userName, password);
+            ModelControllerClient newClient = ModelControllerClient.Factory.create(host, port, cbh);
+
+            List<String> nodeTypes = Util.getNodeTypes(newClient, new DefaultOperationRequestAddress());
+            if (!nodeTypes.isEmpty()) {
+                boolean domainMode = nodeTypes.contains("server-group"); //$NON-NLS-1$ 
+                System.out.println("Connected to " //$NON-NLS-1$ 
+                        + (domainMode ? "domain controller at " : "standalone controller at ") //$NON-NLS-1$ //$NON-NLS-2$
+                        + host + ":" + port); //$NON-NLS-1$ 
+                return new AdminImpl(newClient);
+            } 
+            System.out.println("The controller is not available at " + host + ":" + port); //$NON-NLS-1$ //$NON-NLS-2$
+        } catch (UnknownHostException e) {
+        	System.out.println("Failed to resolve host '" + host + "': " + e.getLocalizedMessage()); //$NON-NLS-1$ //$NON-NLS-2$
+        }
+        return null;
     }
     
-    /**
-     * Creates a ServerAdmin with the specified connection properties. 
-     * @param userName
-     * @param password
-     * @param serverURL
-     * @param applicationName
-     * @return
-     * @throws AdminException
-     */
-    public Admin createAdmin(String userName,
-                                   char[] password,
-                                   String serverURL,
-                                   String applicationName) throws AdminException {
-        
-        if (userName == null || userName.trim().length() == 0) {
-            throw new IllegalArgumentException(JDBCPlugin.Util.getString("invalid_parameter")); //$NON-NLS-1$
+    private class AuthenticationCallbackHandler implements CallbackHandler {
+        private boolean realmShown = false;
+        private String userName = null;
+        private char[] password = null;
+
+        public AuthenticationCallbackHandler(String user, char[] password) {
+        	this.userName = user;
+        	this.password = password;
         }
         
-    	final Properties p = new Properties();
-    	p.setProperty(TeiidURL.CONNECTION.APP_NAME, applicationName);
-    	p.setProperty(TeiidURL.CONNECTION.USER_NAME, userName);
-        if (password != null) {
-        	p.setProperty(TeiidURL.CONNECTION.PASSWORD, new String(password));
+        public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
+            // Special case for anonymous authentication to avoid prompting user for their name.
+            if (callbacks.length == 1 && callbacks[0] instanceof NameCallback) {
+                ((NameCallback)callbacks[0]).setName("anonymous CLI user"); //$NON-NLS-1$
+                return;
+            }
+
+            for (Callback current : callbacks) {
+                if (current instanceof RealmCallback) {
+                    RealmCallback rcb = (RealmCallback) current;
+                    String defaultText = rcb.getDefaultText();
+                    rcb.setText(defaultText); // For now just use the realm suggested.
+                    if (realmShown == false) {
+                        realmShown = true;
+                    }
+                } else if (current instanceof RealmChoiceCallback) {
+                    throw new UnsupportedCallbackException(current, "Realm choice not currently supported."); //$NON-NLS-1$
+                } else if (current instanceof NameCallback) {
+                    NameCallback ncb = (NameCallback) current;
+                    ncb.setName(userName);
+                } else if (current instanceof PasswordCallback) {
+                    PasswordCallback pcb = (PasswordCallback) current;
+                    pcb.setPassword(password);
+                } else {
+                    throw new UnsupportedCallbackException(current);
+                }
+            }
         }
-    	p.setProperty(TeiidURL.CONNECTION.SERVER_URL, serverURL);
-    	return createAdmin(p);
-    }
 
-	public Admin createAdmin(Properties p) throws AdminException {
-		p = PropertiesUtils.clone(p);
-		p.remove(TeiidURL.JDBC.VDB_NAME);
-		p.remove(TeiidURL.JDBC.VDB_VERSION);
-    	p.setProperty(TeiidURL.CONNECTION.ADMIN, Boolean.TRUE.toString());
-    	
-		try {
-			Admin serverAdmin = (Admin)Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[] { Admin.class }, new AdminProxy(p));
-			return serverAdmin;
-		} catch (ConnectionException e) {				
-			throw new AdminComponentException(e);
-		} catch (CommunicationException e) {
-			throw new AdminComponentException(e);
+    }    
+    
+    private class AdminImpl implements Admin{
+    	public AdminImpl (ModelControllerClient connection) {
+    		
+    	}
+
+		@Override
+		public void addDataRoleMapping(String vdbName, int vdbVersion,
+				String dataRole, String mappedRoleName) throws AdminException {
+			// rameshTODO Auto-generated method stub
+			
 		}
+
+		@Override
+		public void assignToModel(String vdbName, int vdbVersion,
+				String modelName, String sourceName, String translatorName,
+				String dsName) throws AdminException {
+			// rameshTODO Auto-generated method stub
+			
+		}
+
+		@Override
+		public void cancelRequest(String sessionId, long executionId)
+				throws AdminException {
+			// rameshTODO Auto-generated method stub
+			
+		}
+
+		@Override
+		public void changeVDBConnectionType(String vdbName, int vdbVersion,
+				ConnectionType type) throws AdminException {
+			// rameshTODO Auto-generated method stub
+			
+		}
+
+		@Override
+		public void clearCache(String cacheType) throws AdminException {
+			// rameshTODO Auto-generated method stub
+			
+		}
+
+		@Override
+		public void clearCache(String cacheType, String vdbName, int vdbVersion)
+				throws AdminException {
+			// rameshTODO Auto-generated method stub
+			
+		}
+
+		@Override
+		public void close() {
+			// rameshTODO Auto-generated method stub
+			
+		}
+
+		@Override
+		public void createDataSource(String deploymentName,
+				String templateName, Properties properties)
+				throws AdminException {
+			// rameshTODO Auto-generated method stub
+			
+		}
+
+		@Override
+		public void deleteDataSource(String deployedName) throws AdminException {
+			// rameshTODO Auto-generated method stub
+			
+		}
+
+		@Override
+		public void deleteVDB(String vdbName, int vdbVersion)
+				throws AdminException {
+			// rameshTODO Auto-generated method stub
+			
+		}
+
+		@Override
+		public void deployVDB(String fileName, InputStream vdb)
+				throws AdminException {
+			// rameshTODO Auto-generated method stub
+			
+		}
+
+		@Override
+		public CacheStatistics getCacheStats(String cacheType)
+				throws AdminException {
+			// rameshTODO Auto-generated method stub
+			return null;
+		}
+
+		@Override
+		public Collection<String> getCacheTypes() throws AdminException {
+			// rameshTODO Auto-generated method stub
+			return null;
+		}
+
+		@Override
+		public Collection<String> getDataSourceNames() throws AdminException {
+			// rameshTODO Auto-generated method stub
+			return null;
+		}
+
+		@Override
+		public Set<String> getDataSourceTemplateNames() throws AdminException {
+			// rameshTODO Auto-generated method stub
+			return null;
+		}
+
+		@Override
+		public Collection<Request> getRequests() throws AdminException {
+			// rameshTODO Auto-generated method stub
+			return null;
+		}
+
+		@Override
+		public Collection<Request> getRequestsForSession(String sessionId)
+				throws AdminException {
+			// rameshTODO Auto-generated method stub
+			return null;
+		}
+
+		@Override
+		public Collection<Session> getSessions() throws AdminException {
+			// rameshTODO Auto-generated method stub
+			return null;
+		}
+
+		@Override
+		public Collection<PropertyDefinition> getTemplatePropertyDefinitions(
+				String templateName) throws AdminException {
+			// rameshTODO Auto-generated method stub
+			return null;
+		}
+
+		@Override
+		public Collection<Transaction> getTransactions() throws AdminException {
+			// rameshTODO Auto-generated method stub
+			return null;
+		}
+
+		@Override
+		public Translator getTranslator(String deployedName)
+				throws AdminException {
+			// rameshTODO Auto-generated method stub
+			return null;
+		}
+
+		@Override
+		public Collection<Translator> getTranslators() throws AdminException {
+			// rameshTODO Auto-generated method stub
+			return null;
+		}
+
+		@Override
+		public VDB getVDB(String vdbName, int vbdVersion) throws AdminException {
+			// rameshTODO Auto-generated method stub
+			return null;
+		}
+
+		@Override
+		public Set<VDB> getVDBs() throws AdminException {
+			// rameshTODO Auto-generated method stub
+			return null;
+		}
+
+		@Override
+		public WorkerPoolStatistics getWorkerPoolStats() throws AdminException {
+			// rameshTODO Auto-generated method stub
+			return null;
+		}
+
+		@Override
+		public void markDataSourceAvailable(String jndiName)
+				throws AdminException {
+			// rameshTODO Auto-generated method stub
+			
+		}
+
+		@Override
+		public void mergeVDBs(String sourceVDBName, int sourceVDBVersion,
+				String targetVDBName, int targetVDBVersion)
+				throws AdminException {
+			// rameshTODO Auto-generated method stub
+			
+		}
+
+		@Override
+		public void removeDataRoleMapping(String vdbName, int vdbVersion,
+				String dataRole, String mappedRoleName) throws AdminException {
+			// rameshTODO Auto-generated method stub
+			
+		}
+
+		@Override
+		public void setAnyAuthenticatedForDataRole(String vdbName,
+				int vdbVersion, String dataRole, boolean anyAuthenticated)
+				throws AdminException {
+			// rameshTODO Auto-generated method stub
+			
+		}
+
+		@Override
+		public void terminateSession(String sessionId) throws AdminException {
+			// rameshTODO Auto-generated method stub
+			
+		}
+
+		@Override
+		public void terminateTransaction(String transactionId)
+				throws AdminException {
+			// rameshTODO Auto-generated method stub
+			
+		}
     }
     
 }

Deleted: branches/as7/client/src/main/java/org/teiid/adminapi/impl/Admin.java
===================================================================
--- branches/as7/client/src/main/java/org/teiid/adminapi/impl/Admin.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/client/src/main/java/org/teiid/adminapi/impl/Admin.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -1,745 +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.adminapi.impl;
-
-import java.io.InputStream;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.deployers.spi.management.deploy.DeploymentManager;
-import org.jboss.managed.api.ComponentType;
-import org.jboss.managed.api.DeploymentTemplateInfo;
-import org.jboss.managed.api.ManagedComponent;
-import org.jboss.managed.api.ManagedObject;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.managed.plugins.DefaultFieldsImpl;
-import org.jboss.managed.plugins.WritethroughManagedPropertyImpl;
-import org.jboss.metatype.api.types.CollectionMetaType;
-import org.jboss.metatype.api.types.EnumMetaType;
-import org.jboss.metatype.api.types.SimpleMetaType;
-import org.jboss.metatype.api.values.CollectionValueSupport;
-import org.jboss.metatype.api.values.MetaValue;
-import org.jboss.metatype.api.values.MetaValueFactory;
-import org.jboss.metatype.api.values.SimpleValue;
-import org.jboss.metatype.api.values.SimpleValueSupport;
-import org.jboss.profileservice.spi.NoSuchDeploymentException;
-import org.jboss.profileservice.spi.ProfileKey;
-import org.jboss.virtual.VFS;
-import org.teiid.adminapi.AdminComponentException;
-import org.teiid.adminapi.AdminException;
-import org.teiid.adminapi.AdminObject;
-import org.teiid.adminapi.AdminProcessingException;
-import org.teiid.adminapi.CacheStatistics;
-import org.teiid.adminapi.PropertyDefinition;
-import org.teiid.adminapi.Request;
-import org.teiid.adminapi.Session;
-import org.teiid.adminapi.Transaction;
-import org.teiid.adminapi.Translator;
-import org.teiid.adminapi.VDB;
-import org.teiid.adminapi.WorkerPoolStatistics;
-import org.teiid.adminapi.VDB.ConnectionType;
-import org.teiid.adminapi.impl.CacheStatisticsMetadata;
-import org.teiid.adminapi.impl.PropertyDefinitionMetadata;
-import org.teiid.adminapi.impl.RequestMetadata;
-import org.teiid.adminapi.impl.SessionMetadata;
-import org.teiid.adminapi.impl.TransactionMetadata;
-import org.teiid.adminapi.impl.TranslatorMetaData;
-import org.teiid.adminapi.impl.VDBMetaData;
-import org.teiid.adminapi.impl.WorkerPoolStatisticsMetadata;
-import org.teiid.deployers.VDBStatusChecker;
-import org.teiid.jboss.IntegrationPlugin;
-
-public class Admin implements org.teiid.adminapi.Admin, Serializable {	
-	private static final String CONNECTOR_PREFIX = "connector-"; //$NON-NLS-1$
-	private static final ProfileKey DEFAULT_PROFILE_KEY = new ProfileKey(ProfileKey.DEFAULT);
-	private static final long serialVersionUID = 7081309086056911304L;
-	private static ComponentType VDBTYPE = new ComponentType("teiid", "vdb");//$NON-NLS-1$ //$NON-NLS-2$
-	private static ComponentType DQPTYPE = new ComponentType("teiid", "dqp");//$NON-NLS-1$ //$NON-NLS-2$	
-	private static String DQPNAME = "RuntimeEngineDeployer"; //$NON-NLS-1$
-	private static ComponentType TRANSLATOR_TYPE = new ComponentType("teiid", "translator");//$NON-NLS-1$ //$NON-NLS-2$
-	
-	private static final String[] DS_TYPES = {"XA", "NoTx", "LocalTx"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-	private static final String[] CF_TYPES = {"NoTx", "Tx"}; //$NON-NLS-1$ //$NON-NLS-2$
-	
-	
-	private ManagementView view;
-	private DeploymentManager deploymentMgr;
-	
-	final private VDBStatusChecker statusChecker;
-	
-	static {
-		VFS.init();
-	}
-	
-	public Admin(ManagementView view, DeploymentManager deployMgr, VDBStatusChecker statusChecker) {
-		this.view = view;
-		this.statusChecker = statusChecker;
-		this.view.load();
-				
-		this.deploymentMgr =  deployMgr;
-        try {
-        	this.deploymentMgr.loadProfile(DEFAULT_PROFILE_KEY);
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-	}
-	
-	private ManagementView getView() throws AdminProcessingException {
-		if (this.view == null) {
-			throw new AdminProcessingException(IntegrationPlugin.Util.getString("admin_connection_closed")); //$NON-NLS-1$
-		}
-		this.view.load();
-		return this.view;
-	}
-	
-	private DeploymentManager getDeploymentManager() throws AdminProcessingException{
-		if (this.deploymentMgr == null) {
-			throw new AdminProcessingException(IntegrationPlugin.Util.getString("admin_connection_closed")); //$NON-NLS-1$
-		}
-		return this.deploymentMgr;
-	}
-	
-	public void close() {
-		this.view = null;
-		this.deploymentMgr = null;
-	}	
-	
-//	private DQPManagement getDQPManagement() throws Exception {
-//		final ManagedComponent mc = getView().getComponent(DQPManagementView.class.getName(), DQPTYPE);	
-//		
-//		return (DQPManagement)Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[] {DQPManagement.class}, new InvocationHandler() {
-//			@Override
-//			public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
-//				
-//				MetaValue value = ManagedUtil.executeOperation(mc, method.getName());
-//				Class returnType = method.getReturnType();
-//				if (returnType.equals(Void.class)) {
-//					return value;
-//				}
-//				return null;
-//			}
-//		});
-//	}
-	
-	@Override
-	public Collection<Translator> getTranslators() throws AdminException {
-		ArrayList<Translator> factories = new ArrayList<Translator>();
-		try {
-			Set<ManagedComponent> mcSet = getView().getComponentsForType(TRANSLATOR_TYPE);
-			for (ManagedComponent mc:mcSet) {
-				factories.add(AdminObjectBuilder.buildAO(mc, TranslatorMetaData.class));
-			}
-		} catch (Exception e) {
-			throw new AdminComponentException(e);
-		}
-		return factories;
-	}
-
-	@Override
-	public Translator getTranslator(String deployedName) throws AdminException {
-		try {
-			ManagedComponent mc = getView().getComponent(deployedName, TRANSLATOR_TYPE);
-			if (mc != null) {
-				return AdminObjectBuilder.buildAO(mc, TranslatorMetaData.class);
-			}
-			return null;
-		} catch(Exception e) {
-			throw new AdminProcessingException(e.getMessage(), e);
-		}
-	}
-
-    boolean matches(String regEx, String value) {
-        regEx = regEx.replaceAll(AdminObject.ESCAPED_WILDCARD, ".*"); //$NON-NLS-1$ 
-        regEx = regEx.replaceAll(AdminObject.ESCAPED_DELIMITER, ""); //$NON-NLS-1$ 
-        return value.matches(regEx);
-    }	
-    
-	@Override
-	public void deployVDB(String fileName, InputStream vdb) throws AdminException {
-		if (!fileName.endsWith(".vdb") && !fileName.endsWith("-vdb.xml")) {//$NON-NLS-1$ //$NON-NLS-2$
-			throw new AdminProcessingException(IntegrationPlugin.Util.getString("bad_vdb_extension")); //$NON-NLS-1$
-		}
-		ManagedUtil.deployArchive(getDeploymentManager(), fileName, vdb, false);
-	}
-
-	
-	@Override
-	public void deleteVDB(String vdbName, int vdbVersion) throws AdminException {
-		ManagedComponent mc = getVDBManagedComponent(vdbName, vdbVersion);
-		if (mc != null) {
-			ManagedUtil.removeArchive(getDeploymentManager(), mc.getDeployment().getName());
-		}
-	}	
-	
-	@Override
-	public VDB getVDB(String vdbName, int vdbVersion) throws AdminException{
-		ManagedComponent mc = getVDBManagedComponent(vdbName, vdbVersion);
-		if (mc != null) {
-			return AdminObjectBuilder.buildAO(mc, VDBMetaData.class);
-		}
-		return null;
-	}
-	
-	private ManagedComponent getVDBManagedComponent(String vdbName, int vdbVersion) throws AdminException{
-		try {
-			Set<ManagedComponent> vdbComponents = getView().getComponentsForType(VDBTYPE);
-			for (ManagedComponent mc: vdbComponents) {
-				String name = ManagedUtil.getSimpleValue(mc, "name", String.class);//$NON-NLS-1$
-			    int version = ManagedUtil.getSimpleValue(mc, "version", Integer.class);//$NON-NLS-1$
-			    if (name.equalsIgnoreCase(vdbName) && version == vdbVersion) {
-			    	return mc;
-			    }
-			}
-			return null;
-		} catch (Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		}	
-	}
-	
-	@Override
-	public Set<VDB> getVDBs() throws AdminException {
-		try {
-			Set<VDB> vdbs = new HashSet<VDB>();
-			Set<ManagedComponent> vdbComponents = getView().getComponentsForType(VDBTYPE);
-			for (ManagedComponent mc: vdbComponents) {
-				vdbs.add(AdminObjectBuilder.buildAO(mc, VDBMetaData.class));
-			}
-			return vdbs;
-		} catch (Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		}
-	}
-		
-	@Override
-	public Collection<Session> getSessions() throws AdminException {
-		try {
-			Collection<Session> sessionList = new ArrayList<Session>();
-			ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);	
-			MetaValue value = ManagedUtil.executeOperation(mc, "getActiveSessions");//$NON-NLS-1$
-			MetaValue[] sessions = ((CollectionValueSupport)value).getElements();
-			for (MetaValue mv:sessions) {
-				sessionList.add((SessionMetadata)MetaValueFactory.getInstance().unwrap(mv, SessionMetadata.class));
-			}
-			return sessionList;
-		} catch (Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		}		
-	}
-	
-	@Override
-	public void terminateSession(String sessionId) throws AdminException {
-		try {
-			ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);	
-			ManagedUtil.executeOperation(mc, "terminateSession", SimpleValueSupport.wrap(sessionId));//$NON-NLS-1$
-		} catch (Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		}     	
-	}	
-	
-	@Override
-    public Collection<Request> getRequests() throws AdminException {
-		try {
-			Collection<Request> requestList = new ArrayList<Request>();
-			ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);	
-			MetaValue value = ManagedUtil.executeOperation(mc, "getRequests");//$NON-NLS-1$
-			MetaValue[] requests = ((CollectionValueSupport)value).getElements();			
-			for (MetaValue mv:requests) {
-				requestList.add((RequestMetadata)MetaValueFactory.getInstance().unwrap(mv, RequestMetadata.class));
-			}
-			return requestList;
-		} catch (Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		}    	
-    }
-    
-	@Override
-    public Collection<Request> getRequestsForSession(String sessionId) throws AdminException {
-		try {
-			Collection<Request> requestList = new ArrayList<Request>();
-			ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);	
-			MetaValue value = ManagedUtil.executeOperation(mc, "getRequestsForSession", SimpleValueSupport.wrap(sessionId));//$NON-NLS-1$
-			MetaValue[] requests = ((CollectionValueSupport)value).getElements();
-			for (MetaValue mv:requests) {
-				requestList.add((RequestMetadata)MetaValueFactory.getInstance().unwrap(mv, RequestMetadata.class));
-			}
-			return requestList;
-		} catch (Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		}     	
-    }
-	
-	@Override
-	public void cancelRequest(String sessionId, long executionId) throws AdminException{
-		try {
-			ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);	
-			ManagedUtil.executeOperation(mc, "cancelRequest", SimpleValueSupport.wrap(sessionId), SimpleValueSupport.wrap(executionId));//$NON-NLS-1$
-		} catch (Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		}     	
-	}
-	
-	@Override
-	public Collection<String> getCacheTypes() throws AdminException {
-		try {
-			Collection<String> requestList = new ArrayList<String>();
-			ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);	
-			MetaValue value = ManagedUtil.executeOperation(mc, "getCacheTypes");//$NON-NLS-1$
-			MetaValue[] requests = ((CollectionValueSupport)value).getElements();
-			for (MetaValue mv:requests) {
-				requestList.add(ManagedUtil.stringValue(mv));
-			}
-			return requestList;
-		} catch (Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		} 
-	}	
-	
-	@Override
-	public void clearCache(String cacheType) throws AdminException{
-		try {
-			ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);	
-			ManagedUtil.executeOperation(mc, "clearCache", SimpleValueSupport.wrap(cacheType));//$NON-NLS-1$
-		} catch (Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		} 		
-	}
-	
-	@Override
-	public void clearCache(String cacheType, String vdbName, int version) throws AdminException{
-		try {
-			ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);	
-			ManagedUtil.executeOperation(mc, "clearCache", SimpleValueSupport.wrap(cacheType), //$NON-NLS-1$
-					SimpleValueSupport.wrap(vdbName), SimpleValueSupport.wrap(version));
-		} catch (Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		} 		
-	}
-	
-	@Override
-	public Collection<Transaction> getTransactions() throws AdminException {
-		try {
-			Collection<Transaction> txnList = new ArrayList<Transaction>();
-			ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);	
-			MetaValue value = ManagedUtil.executeOperation(mc, "getTransactions");//$NON-NLS-1$
-			MetaValue[] requests = ((CollectionValueSupport)value).getElements();
-			for (MetaValue mv:requests) {
-				txnList.add((TransactionMetadata)MetaValueFactory.getInstance().unwrap(mv, TransactionMetadata.class));
-			}
-			return txnList;
-		} catch (Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		}  
-	}	
-	
-	@Override
-	public void terminateTransaction(String xid) throws AdminException {
-		try {
-			ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);	
-			ManagedUtil.executeOperation(mc, "terminateTransaction", MetaValueFactory.getInstance().create(xid));//$NON-NLS-1$
-		} catch (Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		} 	
-	}
-	
-	@Override
-	public WorkerPoolStatistics getWorkerPoolStats() throws AdminException {
-		try {
-			ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);
-			MetaValue value = ManagedUtil.executeOperation(mc, "getWorkerPoolStatistics");//$NON-NLS-1$
-			return (WorkerPoolStatistics)MetaValueFactory.getInstance().unwrap(value, WorkerPoolStatisticsMetadata.class);	
-		} catch (Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		}
-	}	
-	
-	
-	@Override
-	public Collection<PropertyDefinition> getTemplatePropertyDefinitions(String templateName) throws AdminException {
-		
-		DeploymentTemplateInfo info = null;
-		
-		try {
-			
-			try {
-				info = getView().getTemplate(templateName);
-			} catch (Exception e) {
-				// ignore..
-			}
-			
-			if (info == null && !templateName.startsWith(TranslatorMetaData.TRANSLATOR_PREFIX)) {
-				info = getView().getTemplate(TranslatorMetaData.TRANSLATOR_PREFIX+templateName);
-			}
-			if(info == null) {
-				throw new AdminProcessingException(IntegrationPlugin.Util.getString("template_not_found", templateName)); //$NON-NLS-1$
-			}
-			
-			ArrayList<PropertyDefinition> props = new ArrayList<PropertyDefinition>();
-			Map<String, ManagedProperty> propertyMap = info.getProperties();
-			
-			for (ManagedProperty mp:propertyMap.values()) {
-					if (!includeInTemplate(mp)) {
-						continue;
-					}
-					PropertyDefinitionMetadata p = new PropertyDefinitionMetadata();
-					p.setName(mp.getName());
-					p.setDescription(mp.getDescription());
-					p.setDisplayName(mp.getMappedName());
-					if (mp.getDefaultValue() != null) {
-						p.setDefaultValue(((SimpleValueSupport)mp.getDefaultValue()).getValue());
-					}
-					p.setPropertyTypeClassName(mp.getMetaType().getTypeName());
-					p.setModifiable(!mp.isReadOnly());
-					
-					if (mp.getField("masked", Boolean.class) != null) {//$NON-NLS-1$
-						p.setMasked(mp.getField("masked", Boolean.class));//$NON-NLS-1$
-					}
-					else {
-						p.setMasked(false);
-					}
-					
-					if (mp.getField("advanced", Boolean.class) != null) {//$NON-NLS-1$
-						p.setAdvanced(mp.getField("advanced", Boolean.class));//$NON-NLS-1$
-					}
-					else {
-						p.setAdvanced(true);
-					}
-					if (mp.getLegalValues() != null) {
-						HashSet<String> values = new HashSet<String>();
-						for (MetaValue value:mp.getLegalValues()) {
-							values.add(ManagedUtil.stringValue(value));
-						}
-						p.setAllowedValues(values);
-					}
-					
-					p.setRequired(mp.isMandatory());
-					props.add(p);
-			};
-			return props;
-		} catch (NoSuchDeploymentException e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		} catch(Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		}
-	}	
-	
-    private boolean includeInTemplate(ManagedProperty mp) {
-    	Boolean teiidProperty = mp.getField("teiid-property", Boolean.class);//$NON-NLS-1$
-		if ( teiidProperty != null && teiidProperty.booleanValue()) {
-			return true;
-		}
-		if (mp.isMandatory() && mp.getDefaultValue() == null) {
-			return true;
-		}
-		return false;
-	}
-    
-    @Override
-    public void changeVDBConnectionType(String vdbName, int vdbVersion,
-    		ConnectionType type) throws AdminException {
-    	ManagedComponent mc = getVDBManagedComponent(vdbName, vdbVersion);
-		if (mc == null) {
-			throw new AdminProcessingException(IntegrationPlugin.Util.getString("vdb_not_found", vdbName, vdbVersion)); //$NON-NLS-1$
-		}
-		
-    	ManagedProperty connectionTypeProperty = mc.getProperty("connectionType"); //$NON-NLS-1$
-    	if (connectionTypeProperty != null) {
-    		connectionTypeProperty.setValue(ManagedUtil.wrap(new EnumMetaType(ConnectionType.values()), type != null ?type.name():ConnectionType.BY_VERSION.name()));
-    	}
-		
-		try {
-			getView().updateComponent(mc);
-		} catch (Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		}
-    }
-
-	@Override
-	public void assignToModel(String vdbName, int vdbVersion, String modelName, String sourceName, String translatorName, String dsName) throws AdminException {
-		ManagedComponent mc = getVDBManagedComponent(vdbName, vdbVersion);
-		if (mc == null) {
-			throw new AdminProcessingException(IntegrationPlugin.Util.getString("vdb_not_found", vdbName, vdbVersion)); //$NON-NLS-1$
-		}
-		
-		ManagedProperty mp = mc.getProperty("models");//$NON-NLS-1$
-		List<ManagedObject> models = (List<ManagedObject>)MetaValueFactory.getInstance().unwrap(mp.getValue());
-		ManagedObject managedModel = null;
-		if (models != null && !models.isEmpty()) {
-			for(ManagedObject mo:models) {
-				String name = ManagedUtil.getSimpleValue(mo, "name", String.class); //$NON-NLS-1$
-				if (modelName.equals(name)) {
-					managedModel = mo;
-				}
-			}		
-		}
-		
-		if (managedModel == null) {
-			throw new AdminProcessingException(IntegrationPlugin.Util.getString("model_not_found", modelName, vdbName, vdbVersion)); //$NON-NLS-1$
-		}
-		
-        ManagedProperty sourceMappings = managedModel.getProperty("sourceMappings");//$NON-NLS-1$
-        if (sourceMappings != null){
-            List<ManagedObject> mappings = (List<ManagedObject>)MetaValueFactory.getInstance().unwrap(sourceMappings.getValue());
-            for (ManagedObject mo:mappings) {
-                String sName = ManagedUtil.getSimpleValue(mo, "name", String.class);//$NON-NLS-1$
-                if (sName.equals(sourceName)) {
-                	
-                	ManagedProperty translatorProperty = mo.getProperty("translatorName"); //$NON-NLS-1$
-                	if (translatorProperty == null) {
-                		translatorProperty = new WritethroughManagedPropertyImpl(mo, new DefaultFieldsImpl("translatorName")); //$NON-NLS-1$
-                	}
-                	translatorProperty.setValue(ManagedUtil.wrap(SimpleMetaType.STRING, translatorName));
-                	
-                	// set the jndi name for the ds.
-                	ManagedProperty jndiProperty = mo.getProperty("connectionJndiName"); //$NON-NLS-1$
-                	if (jndiProperty == null) {
-                		jndiProperty = new WritethroughManagedPropertyImpl(mo, new DefaultFieldsImpl("connectionJndiName")); //$NON-NLS-1$
-                	}
-                	jndiProperty.setValue(ManagedUtil.wrap(SimpleMetaType.STRING, dsName));
-                }
-            }
-        } else {
-        	//TODO: this can be in the default situation when no source mappings are specified
-        	throw new AdminProcessingException(IntegrationPlugin.Util.getString("sourcename_not_found", sourceName, vdbName, vdbVersion, modelName)); //$NON-NLS-1$
-        }
-        
-		try {
-			getView().updateComponent(mc);
-		} catch (Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		}		        
-	}
-
-	private void manageRoleToDataPolicy(String vdbName, int vdbVersion, String policyName, String role, boolean add)  throws AdminException {
-		ManagedComponent mc = getVDBManagedComponent(vdbName, vdbVersion);
-		if (mc == null) {
-			throw new AdminProcessingException(IntegrationPlugin.Util.getString("vdb_not_found", vdbName, vdbVersion)); //$NON-NLS-1$
-		}
-		
-		ManagedProperty mp = mc.getProperty("dataPolicies");//$NON-NLS-1$
-		List<ManagedObject> policies = (List<ManagedObject>)MetaValueFactory.getInstance().unwrap(mp.getValue());
-		ManagedObject managedPolicy = null;
-		if (policies != null && !policies.isEmpty()) {
-			for(ManagedObject mo:policies) {
-				String name = ManagedUtil.getSimpleValue(mo, "name", String.class); //$NON-NLS-1$
-				if (policyName.equals(name)) {
-					managedPolicy = mo;
-				}
-			}		
-		}
-		
-		if (managedPolicy == null) {
-			throw new AdminProcessingException(IntegrationPlugin.Util.getString("policy_not_found", policyName, vdbName, vdbVersion)); //$NON-NLS-1$
-		}
-		
-		if (role != null) {
-	        ManagedProperty mappedRoleNames = managedPolicy.getProperty("mappedRoleNames");//$NON-NLS-1$
-	        CollectionValueSupport roleCollection = (CollectionValueSupport)mappedRoleNames.getValue();
-	        ArrayList<MetaValue> modifiedRoleNames = new ArrayList<MetaValue>();
-	        if (roleCollection != null) {
-		        MetaValue[] roleNames = roleCollection.getElements();
-		        for (MetaValue mv:roleNames) {
-		        	String existing = (String)((SimpleValueSupport)mv).getValue();
-		        	if (!existing.equals(role)) {
-		        		modifiedRoleNames.add(mv);
-		        	}
-		        }
-	        }
-	        else {
-	        	roleCollection = new CollectionValueSupport(new CollectionMetaType("java.util.List", SimpleMetaType.STRING)); //$NON-NLS-1$
-	        	mappedRoleNames.setValue(roleCollection);
-	        }
-	        
-	        if (add) {
-	        	modifiedRoleNames.add(ManagedUtil.wrap(SimpleMetaType.STRING, role));
-	        }
-	        
-	        roleCollection.setElements(modifiedRoleNames.toArray(new MetaValue[modifiedRoleNames.size()]));
-		} else {
-			ManagedProperty anyAuthenticated = managedPolicy.getProperty("anyAuthenticated");//$NON-NLS-1$
-			anyAuthenticated.setValue(SimpleValueSupport.wrap(add));
-		}
-		
-		try {
-			getView().updateComponent(mc);
-		} catch (Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		}		
-	}
-
-	
-	@Override
-	public void addDataRoleMapping(String vdbName, int vdbVersion, String policyName, String role)  throws AdminException {
-		manageRoleToDataPolicy(vdbName, vdbVersion, policyName, role, true);
-	}
-	
-	@Override
-	public void removeDataRoleMapping(String vdbName, int vdbVersion, String policyName, String role)  throws AdminException{
-		manageRoleToDataPolicy(vdbName, vdbVersion, policyName, role, false);
-	}	
-	
-	@Override
-	public void setAnyAuthenticatedForDataRole(String vdbName, int vdbVersion,
-			String dataRole, boolean anyAuthenticated) throws AdminException {
-		manageRoleToDataPolicy(vdbName, vdbVersion, dataRole, null, anyAuthenticated);
-	}
-
-	@Override
-	public void mergeVDBs(String sourceVDBName, int sourceVDBVersion, String targetVDBName, int targetVDBVersion) throws AdminException {
-		try {
-			ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);	
-			ManagedUtil.executeOperation(mc, "mergeVDBs",  //$NON-NLS-1$
-					SimpleValueSupport.wrap(sourceVDBName), 
-					SimpleValueSupport.wrap(sourceVDBVersion), 
-					SimpleValueSupport.wrap(targetVDBName), 
-					SimpleValueSupport.wrap(targetVDBVersion));
-		} catch (Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		}   		
-	}
-
-	private ManagedComponent getDatasource(String deployedName) throws Exception {
-		ManagedComponent mc = null;
-		for (String type:DS_TYPES) {
-			ComponentType ct = new ComponentType("DataSource", type); //$NON-NLS-1$
-			mc = getView().getComponent(deployedName, ct);
-			if (mc != null) {
-				return mc;
-			}				
-		}		
-		for (String type:CF_TYPES) {
-			ComponentType ct = new ComponentType("ConnectionFactory", type); //$NON-NLS-1$
-			mc = getView().getComponent(deployedName, ct);
-			if (mc != null) {
-				return mc;
-			}				
-		}
-		return mc;
-	}
-	
-	
-	@Override
-	public void createDataSource(String deploymentName, String templateName, Properties properties) throws AdminException {
-		try {
-			ManagedComponent mc = getDatasource(deploymentName);
-			if (mc != null) {
-				throw new AdminProcessingException(IntegrationPlugin.Util.getString("datasource_exists",deploymentName)); //$NON-NLS-1$;	
-			}
-			
-			DeploymentTemplateInfo info = getView().getTemplate(templateName);
-			if(info == null) {
-				throw new AdminProcessingException(IntegrationPlugin.Util.getString("datasource_template_not_found", templateName)); //$NON-NLS-1$
-			}
-			
-			// template properties specific to the template
-			Map<String, ManagedProperty> propertyMap = info.getProperties();
-			
-			// walk through the supplied properties and assign properly to template
-			for (String key:properties.stringPropertyNames()) {
-				ManagedProperty mp = propertyMap.get(key);
-				if (mp != null) {
-					String value = properties.getProperty(key);
-					if (!ManagedUtil.sameValue(mp.getDefaultValue(), value)){
-						mp.setValue(SimpleValueSupport.wrap(value));
-					}
-				}
-			}
-			info.getProperties().get("jndi-name").setValue(SimpleValueSupport.wrap(deploymentName)); //$NON-NLS-1$
-			getView().applyTemplate(deploymentName, info);
-		} catch (NoSuchDeploymentException e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		} catch(Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		} 
-	}
-
-	@Override
-	public void deleteDataSource(String deployedName) throws AdminException {
-		try {
-			ManagedComponent mc = getDatasource(deployedName);
-			if (mc != null) {
-				ManagedUtil.removeArchive(getDeploymentManager(),mc.getDeployment().getName());
-			}
-		} catch (Exception e) {
-			throw new AdminComponentException(e);
-		}
-	}
-
-	@Override
-	public Collection<String> getDataSourceNames() throws AdminException {
-		ArrayList<String> names = new ArrayList<String>();
-		try {
-			for (String type:DS_TYPES) {
-				ComponentType ct = new ComponentType("DataSource", type); //$NON-NLS-1$
-				Set<ManagedComponent> mcs = getView().getComponentsForType(ct);
-				for (ManagedComponent mc:mcs) {
-					names.add(((SimpleValue)mc.getProperty("jndi-name").getValue()).getValue().toString()); //$NON-NLS-1$
-				}
-			}		
-			for (String type:CF_TYPES) {
-				ComponentType ct = new ComponentType("ConnectionFactory", type); //$NON-NLS-1$
-				Set<ManagedComponent> mcs = getView().getComponentsForType(ct);
-				for (ManagedComponent mc:mcs) {
-					names.add(((SimpleValue)mc.getProperty("jndi-name").getValue()).getValue().toString()); //$NON-NLS-1$
-				}			
-			}
-		} catch (Exception e) {
-			throw new AdminComponentException(e);
-		}
-		return names;
-	}
-	
-	@Override
-	public Set<String> getDataSourceTemplateNames() throws AdminException{
-		Set<String> names = getView().getTemplateNames();
-		HashSet<String> matched = new HashSet<String>();
-		for(String name:names) {
-			if (name.startsWith(CONNECTOR_PREFIX)) {
-				matched.add(name);
-			}
-		}
-		return matched;		
-	}
-
-	@Override
-	public CacheStatistics getCacheStats(String cacheType) throws AdminException {
-		try {
-			ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);
-			MetaValue value = ManagedUtil.executeOperation(mc, "getCacheStatistics", SimpleValueSupport.wrap(cacheType));//$NON-NLS-1$
-			return (CacheStatistics)MetaValueFactory.getInstance().unwrap(value, CacheStatisticsMetadata.class);	
-		} catch (Exception e) {
-			throw new AdminComponentException(e.getMessage(), e);
-		}
-	}
-	
-	@Override
-	public void markDataSourceAvailable(String name) throws AdminException {
-		statusChecker.dataSourceAdded(name);
-	}
-}

Modified: branches/as7/client/src/main/java/org/teiid/adminapi/impl/MetadataMapper.java
===================================================================
--- branches/as7/client/src/main/java/org/teiid/adminapi/impl/MetadataMapper.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/client/src/main/java/org/teiid/adminapi/impl/MetadataMapper.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -52,11 +52,10 @@
 	private static final String DATA_POLICIES = "data-policies"; //$NON-NLS-1$
 	
 	
-	public static ModelNode wrap(VDBMetaData vdb) {
+	public static ModelNode wrap(VDBMetaData vdb, ModelNode node) {
 		if (vdb == null) {
 			return null;
 		}
-		ModelNode node = new ModelNode();
 		node.get(ModelNodeConstants.TYPE).set(ModelType.OBJECT);
 			
 		node.get(VDBNAME).set(vdb.getName());
@@ -75,7 +74,7 @@
 		if (properties!= null && !properties.isEmpty()) {
 			ModelNode propsNode = node.get(CHILDREN, PROPERTIES); 
 			for (PropertyMetadata prop:properties) {
-				propsNode.add(PropertyMetaDataMapper.wrap(prop));
+				propsNode.add(PropertyMetaDataMapper.wrap(prop, new ModelNode()));
 			}
 		}
 		
@@ -84,7 +83,7 @@
 		if (models != null && !models.isEmpty()) {
 			ModelNode modelNodes = node.get(CHILDREN, MODELS);		
 			for(ModelMetaData model:models.values()) {
-				modelNodes.add(ModelMetadataMapper.wrap(model));
+				modelNodes.add(ModelMetadataMapper.wrap(model, new ModelNode()));
 			}
 		}
 		
@@ -93,7 +92,7 @@
 		if (translators != null && !translators.isEmpty()) {
 			ModelNode translatorNodes = node.get(CHILDREN, OVERRIDE_TRANSLATORS);
 			for (Translator translator:translators) {
-				translatorNodes.add(VDBTranslatorMetaDataMapper.wrap((VDBTranslatorMetaData)translator));
+				translatorNodes.add(VDBTranslatorMetaDataMapper.wrap((VDBTranslatorMetaData)translator,  new ModelNode()));
 			}
 		}
 		
@@ -102,7 +101,7 @@
 		if (policies != null && !policies.isEmpty()) {
 			ModelNode dataPoliciesNodes = node.get(CHILDREN, DATA_POLICIES);
 			for (DataPolicy policy:policies) {
-				dataPoliciesNodes.add(DataPolicyMetadataMapper.wrap((DataPolicyMetadata)policy));
+				dataPoliciesNodes.add(DataPolicyMetadataMapper.wrap((DataPolicyMetadata)policy,  new ModelNode()));
 			}
 		}
 		return node;
@@ -234,11 +233,10 @@
 		private static final String SOURCE_MAPPINGS = "source-mappings"; //$NON-NLS-1$
 		private static final String VALIDITY_ERRORS = "validity-errors"; //$NON-NLS-1$
 		
-		public static ModelNode wrap(ModelMetaData model) {
+		public static ModelNode wrap(ModelMetaData model, ModelNode node) {
 			if (model == null) {
 				return null;
 			}
-			ModelNode node = new ModelNode();
 			node.get(TYPE).set(ModelType.OBJECT);
 			
 			node.get(MODEL_NAME).set(model.getName());
@@ -255,7 +253,7 @@
 			if (properties!= null && !properties.isEmpty()) {
 				ModelNode propsNode = node.get(CHILDREN, PROPERTIES); 
 				for (PropertyMetadata prop:properties) {
-					propsNode.add(PropertyMetaDataMapper.wrap(prop));
+					propsNode.add(PropertyMetaDataMapper.wrap(prop,  new ModelNode()));
 				}
 			}
 			
@@ -263,7 +261,7 @@
 			if (sources != null && !sources.isEmpty()) {
 				ModelNode sourceMappingNode = node.get(CHILDREN, SOURCE_MAPPINGS);
 				for(SourceMappingMetadata source:sources) {
-					sourceMappingNode.add(SourceMappingMetadataMapper.wrap(source));
+					sourceMappingNode.add(SourceMappingMetadataMapper.wrap(source,  new ModelNode()));
 				}
 			}
 			
@@ -421,12 +419,11 @@
 		private static final String JNDI_NAME = "jndi-name"; //$NON-NLS-1$
 		private static final String TRANSLATOR_NAME = "translator-name"; //$NON-NLS-1$
 		
-		public static ModelNode wrap(SourceMappingMetadata source) {
+		public static ModelNode wrap(SourceMappingMetadata source, ModelNode node) {
 			if (source == null) {
 				return null;
 			}
 			
-			ModelNode node = new ModelNode();
 			node.get(TYPE).set(ModelType.OBJECT);
 			
 			node.get(SOURCE_NAME).set(source.getName());
@@ -471,15 +468,16 @@
 		private static final String PROPERTIES = "properties"; //$NON-NLS-1$
 		private static final String MODULE_NAME = "module-name"; //$NON-NLS-1$
 		
-		public static ModelNode wrap(VDBTranslatorMetaData translator) {
+		public static ModelNode wrap(VDBTranslatorMetaData translator, ModelNode node) {
 			if (translator == null) {
 				return null;
 			}
-			ModelNode node = new ModelNode();
 			node.get(TYPE).set(ModelType.OBJECT);
 			
 			node.get(TRANSLATOR_NAME).set(translator.getName());
-			node.get(BASETYPE).set(translator.getType());
+			if (translator.getType() != null) {
+				node.get(BASETYPE).set(translator.getType());
+			}
 			if (translator.getDescription() != null) {
 				node.get(DESCRIPTION).set(translator.getDescription());
 			}
@@ -492,7 +490,7 @@
 			if (properties!= null && !properties.isEmpty()) {
 				ModelNode propsNode = node.get(CHILDREN, PROPERTIES); 
 				for (PropertyMetadata prop:properties) {
-					propsNode.add(PropertyMetaDataMapper.wrap(prop));
+					propsNode.add(PropertyMetaDataMapper.wrap(prop, new ModelNode()));
 				}
 			}
 			return node;
@@ -549,11 +547,10 @@
 		private static final String PROPERTY_NAME = "property-name"; //$NON-NLS-1$
 		private static final String PROPERTY_VALUE = "property-value"; //$NON-NLS-1$
 		
-		public static ModelNode wrap(PropertyMetadata property) {
+		public static ModelNode wrap(PropertyMetadata property, ModelNode node) {
 			if (property == null) {
 				return null;
 			}			
-			ModelNode node = new ModelNode();
 			node.get(ModelNodeConstants.TYPE).set(ModelType.OBJECT);
 			
 			node.get(PROPERTY_NAME).set(property.getName());
@@ -594,11 +591,10 @@
 		private static final String ALLOW_CREATE_TEMP_TABLES = "allow-create-temp-tables"; //$NON-NLS-1$
 		private static final String ANY_AUTHENTICATED = "any-authenticated"; //$NON-NLS-1$
 		
-		public static ModelNode wrap(DataPolicyMetadata policy) {
+		public static ModelNode wrap(DataPolicyMetadata policy, ModelNode node) {
 			if (policy == null) {
 				return null;
 			}			
-			ModelNode node = new ModelNode();
 			node.get(ModelNodeConstants.TYPE).set(ModelType.OBJECT);
 			
 			node.get(POLICY_NAME).set(policy.getName());
@@ -615,7 +611,7 @@
 			if (permissions != null && !permissions.isEmpty()) {
 				ModelNode permissionNodes = node.get(CHILDREN, DATA_PERMISSIONS); 
 				for (DataPolicy.DataPermission dataPermission:permissions) {
-					permissionNodes.add(PermissionMetaDataMapper.wrap((PermissionMetaData)dataPermission));
+					permissionNodes.add(PermissionMetaDataMapper.wrap((PermissionMetaData)dataPermission,  new ModelNode()));
 				}			
 			}
 			
@@ -699,12 +695,11 @@
 		
 		
 		
-		public static ModelNode wrap(PermissionMetaData permission) {
+		public static ModelNode wrap(PermissionMetaData permission, ModelNode node) {
 			if (permission == null) {
 				return null;
 			}
 			
-			ModelNode node = new ModelNode();
 			node.get(ModelNodeConstants.TYPE).set(ModelType.OBJECT);
 			
 			node.get(RESOURCE_NAME).set(permission.getResourceName());
@@ -775,18 +770,17 @@
 		private static final String TOTAL_ENTRIES = "totalEntries"; //$NON-NLS-1$
 		private static final String REQUEST_COUNT = "requestCount"; //$NON-NLS-1$
 		
-		public static ModelNode wrap(CacheStatisticsMetadata object) {
+		public static ModelNode wrap(CacheStatisticsMetadata object, ModelNode node) {
 			if (object == null)
 				return null;
 			
-			ModelNode cache = new ModelNode();
-			cache.get(ModelNodeConstants.TYPE).set(ModelType.OBJECT);
+			node.get(ModelNodeConstants.TYPE).set(ModelType.OBJECT);
 			
-			cache.get(TOTAL_ENTRIES).set(object.getTotalEntries());
-			cache.get(HITRATIO).set(object.getHitRatio());
-			cache.get(REQUEST_COUNT).set(object.getRequestCount());
+			node.get(TOTAL_ENTRIES).set(object.getTotalEntries());
+			node.get(HITRATIO).set(object.getHitRatio());
+			node.get(REQUEST_COUNT).set(object.getRequestCount());
 			
-			return cache;
+			return node;
 		}
 
 		public static CacheStatisticsMetadata unwrap(ModelNode node) {
@@ -821,27 +815,26 @@
 		private static final String THREAD_STATE = "thread-state"; //$NON-NLS-1$
 		
 		
-		public static ModelNode wrap(RequestMetadata object) {
-			if (object == null) {
+		public static ModelNode wrap(RequestMetadata request, ModelNode node) {
+			if (request == null) {
 				return null;
 			}
-			ModelNode request = new ModelNode();
-			request.get(ModelNodeConstants.TYPE).set(ModelType.OBJECT);
+			node.get(ModelNodeConstants.TYPE).set(ModelType.OBJECT);
 			
-			request.get(EXECUTION_ID).set(object.getExecutionId());
-			request.get(SESSION_ID).set(object.getSessionId());
-			request.get(START_TIME).set(object.getStartTime());
-			request.get(COMMAND).set(object.getCommand());
-			request.get(SOURCE_REQUEST).set(object.sourceRequest());
-			if (object.getNodeId() != null) {
-				request.get(NODE_ID).set(object.getNodeId());
+			node.get(EXECUTION_ID).set(request.getExecutionId());
+			node.get(SESSION_ID).set(request.getSessionId());
+			node.get(START_TIME).set(request.getStartTime());
+			node.get(COMMAND).set(request.getCommand());
+			node.get(SOURCE_REQUEST).set(request.sourceRequest());
+			if (request.getNodeId() != null) {
+				node.get(NODE_ID).set(request.getNodeId());
 			}
-			if (object.getTransactionId() != null) {
-				request.get(TRANSACTION_ID).set(object.getTransactionId());
+			if (request.getTransactionId() != null) {
+				node.get(TRANSACTION_ID).set(request.getTransactionId());
 			}
-			request.get(STATE).set(object.getState().name());
-			request.get(THREAD_STATE).set(object.getThreadState().name());
-			return request;
+			node.get(STATE).set(request.getState().name());
+			node.get(THREAD_STATE).set(request.getThreadState().name());
+			return node;
 		}
 
 		public static RequestMetadata unwrap(ModelNode node) {
@@ -893,11 +886,10 @@
 		private static final String APPLICATION_NAME = "application-name"; //$NON-NLS-1$
 		
 		
-		public static ModelNode wrap(SessionMetadata session) {
+		public static ModelNode wrap(SessionMetadata session, ModelNode node) {
 			if (session == null) {
 				return null;
 			}
-			ModelNode node = new ModelNode();
 			node.get(ModelNodeConstants.TYPE).set(ModelType.OBJECT);
 				
 			if (session.getApplicationName() != null) {
@@ -961,11 +953,10 @@
 		private static final String CREATED_TIME = "txn-created-time"; //$NON-NLS-1$
 		private static final String ASSOCIATED_SESSION = "session-id"; //$NON-NLS-1$
 		
-		public static ModelNode wrap(TransactionMetadata object) {
+		public static ModelNode wrap(TransactionMetadata object, ModelNode transaction) {
 			if (object == null)
 				return null;
 			
-			ModelNode transaction = new ModelNode();
 			transaction.get(ModelNodeConstants.TYPE).set(ModelType.OBJECT);
 			transaction.get(ASSOCIATED_SESSION).set(object.getAssociatedSession());
 			transaction.get(CREATED_TIME).set(object.getCreatedTime());
@@ -1008,22 +999,21 @@
 		private static final String ACTIVE_THREADS = "active-threads"; //$NON-NLS-1$
 		
 		
-		public static ModelNode wrap(WorkerPoolStatisticsMetadata object) {
-			if (object == null)
+		public static ModelNode wrap(WorkerPoolStatisticsMetadata stats, ModelNode node) {
+			if (stats == null)
 				return null;
-			ModelNode transaction = new ModelNode();
-			transaction.get(ModelNodeConstants.TYPE).set(ModelType.OBJECT);
+			node.get(ModelNodeConstants.TYPE).set(ModelType.OBJECT);
 			
-			transaction.get(ACTIVE_THREADS).set(object.getActiveThreads());
-			transaction.get(HIGHEST_ACTIVE_THREADS).set(object.getHighestActiveThreads());
-			transaction.get(TOTAL_COMPLETED).set(object.getTotalCompleted());
-			transaction.get(TOTAL_SUBMITTED).set(object.getTotalSubmitted());
-			transaction.get(QUEUE_NAME).set(object.getQueueName());
-			transaction.get(QUEUED).set(object.getQueued());
-			transaction.get(HIGHEST_QUEUED).set(object.getHighestQueued());
-			transaction.get(MAX_THREADS).set(object.getMaxThreads());
+			node.get(ACTIVE_THREADS).set(stats.getActiveThreads());
+			node.get(HIGHEST_ACTIVE_THREADS).set(stats.getHighestActiveThreads());
+			node.get(TOTAL_COMPLETED).set(stats.getTotalCompleted());
+			node.get(TOTAL_SUBMITTED).set(stats.getTotalSubmitted());
+			node.get(QUEUE_NAME).set(stats.getQueueName());
+			node.get(QUEUED).set(stats.getQueued());
+			node.get(HIGHEST_QUEUED).set(stats.getHighestQueued());
+			node.get(MAX_THREADS).set(stats.getMaxThreads());
 			
-			return transaction;
+			return node;
 		}
 
 		public static WorkerPoolStatisticsMetadata unwrapMetaValue(ModelNode node) {

Modified: branches/as7/client/src/test/java/org/teiid/adminapi/impl/TestRequestMetadata.java
===================================================================
--- branches/as7/client/src/test/java/org/teiid/adminapi/impl/TestRequestMetadata.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/client/src/test/java/org/teiid/adminapi/impl/TestRequestMetadata.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -34,7 +34,7 @@
 	@Test public void testMapping() {
 		RequestMetadata request = buildRequest();
 		
-		ModelNode node = MetadataMapper.RequestMetadataMapper.wrap(request);
+		ModelNode node = MetadataMapper.RequestMetadataMapper.wrap(request, new ModelNode());
 		
 		RequestMetadata actual = MetadataMapper.RequestMetadataMapper.unwrap(node);
 		

Modified: branches/as7/client/src/test/java/org/teiid/adminapi/impl/TestSessionMetadata.java
===================================================================
--- branches/as7/client/src/test/java/org/teiid/adminapi/impl/TestSessionMetadata.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/client/src/test/java/org/teiid/adminapi/impl/TestSessionMetadata.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -42,7 +42,7 @@
 		session.setSecurityContext("auth-domain");
 		session.setUserName("user");
 
-		ModelNode node = MetadataMapper.SessionMetadataMapper.wrap(session);
+		ModelNode node = MetadataMapper.SessionMetadataMapper.wrap(session, new ModelNode());
 		
 		SessionMetadata session1 = MetadataMapper.SessionMetadataMapper.unwrap(node);
 		

Modified: branches/as7/client/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java
===================================================================
--- branches/as7/client/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/client/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -37,7 +37,7 @@
 		tm.setId("tnx-id");
 		tm.setScope("scope");
 		
-		ModelNode node = MetadataMapper.TransactionMetadataMapper.wrap(tm);
+		ModelNode node = MetadataMapper.TransactionMetadataMapper.wrap(tm, new ModelNode());
 		
 		TransactionMetadata tm1 = MetadataMapper.TransactionMetadataMapper.unwrap(node);
 		

Modified: branches/as7/client/src/test/java/org/teiid/adminapi/impl/TestVDBMetaData.java
===================================================================
--- branches/as7/client/src/test/java/org/teiid/adminapi/impl/TestVDBMetaData.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/client/src/test/java/org/teiid/adminapi/impl/TestVDBMetaData.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -217,7 +217,7 @@
 	@Test public void testVDBMetaDataMapper() {
 		VDBMetaData vdb = buildVDB();
 		
-		ModelNode node = MetadataMapper.wrap(vdb);
+		ModelNode node = MetadataMapper.wrap(vdb, new ModelNode());
 		
 		vdb = MetadataMapper.unwrap(node);
 		validateVDB(vdb);

Modified: branches/as7/connectors/connector-file/pom.xml
===================================================================
--- branches/as7/connectors/connector-file/pom.xml	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/connectors/connector-file/pom.xml	2011-07-11 03:06:57 UTC (rev 3305)
@@ -40,6 +40,11 @@
                         <goals>
                             <goal>jar</goal>
                         </goals>
+                        <configuration>
+                          <archive>
+                            <manifestFile>src/main/rar/META-INF/MANIFEST.MF</manifestFile>
+                          </archive>
+                        </configuration>
                     </execution>
                     <execution>
                         <id>deploy_jar</id>

Modified: branches/as7/connectors/connector-file/src/main/rar/META-INF/MANIFEST.MF
===================================================================
--- branches/as7/connectors/connector-file/src/main/rar/META-INF/MANIFEST.MF	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/connectors/connector-file/src/main/rar/META-INF/MANIFEST.MF	2011-07-11 03:06:57 UTC (rev 3305)
@@ -1 +1 @@
-Dependencies: org.jboss.teiid.common-core org.jboss.teiid.api 
+Dependencies: org.jboss.teiid.common-core,org.jboss.teiid.api 

Modified: branches/as7/connectors/connector-ldap/pom.xml
===================================================================
--- branches/as7/connectors/connector-ldap/pom.xml	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/connectors/connector-ldap/pom.xml	2011-07-11 03:06:57 UTC (rev 3305)
@@ -39,6 +39,12 @@
                         <goals>
                             <goal>jar</goal>
                         </goals>
+                        <configuration>
+                          <archive>
+                            <manifestFile>src/main/rar/META-INF/MANIFEST.MF</manifestFile>
+                          </archive>
+                        </configuration>
+                        
                     </execution>
                     <execution>
                         <id>deploy_jar</id>

Modified: branches/as7/connectors/connector-ldap/src/main/rar/META-INF/MANIFEST.MF
===================================================================
--- branches/as7/connectors/connector-ldap/src/main/rar/META-INF/MANIFEST.MF	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/connectors/connector-ldap/src/main/rar/META-INF/MANIFEST.MF	2011-07-11 03:06:57 UTC (rev 3305)
@@ -1 +1 @@
-Dependencies: org.jboss.teiid.common-core org.jboss.teiid.api 
+Dependencies: org.jboss.teiid.common-core,org.jboss.teiid.api 

Modified: branches/as7/connectors/connector-salesforce/pom.xml
===================================================================
--- branches/as7/connectors/connector-salesforce/pom.xml	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/connectors/connector-salesforce/pom.xml	2011-07-11 03:06:57 UTC (rev 3305)
@@ -76,6 +76,11 @@
                         <goals>
                             <goal>jar</goal>
                         </goals>
+                        <configuration>
+                          <archive>
+                            <manifestFile>src/main/rar/META-INF/MANIFEST.MF</manifestFile>
+                          </archive>
+                        </configuration>
                     </execution>
                     <execution>
                         <id>deploy_jar</id>

Modified: branches/as7/connectors/connector-salesforce/src/main/rar/META-INF/MANIFEST.MF
===================================================================
--- branches/as7/connectors/connector-salesforce/src/main/rar/META-INF/MANIFEST.MF	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/connectors/connector-salesforce/src/main/rar/META-INF/MANIFEST.MF	2011-07-11 03:06:57 UTC (rev 3305)
@@ -1 +1 @@
-Dependencies: org.jboss.teiid.common-core org.jboss.teiid.api 
+Dependencies: org.jboss.teiid.common-core,org.jboss.teiid.api 

Modified: branches/as7/connectors/connector-ws/pom.xml
===================================================================
--- branches/as7/connectors/connector-ws/pom.xml	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/connectors/connector-ws/pom.xml	2011-07-11 03:06:57 UTC (rev 3305)
@@ -64,6 +64,11 @@
                         <goals>
                             <goal>jar</goal>
                         </goals>
+                        <configuration>
+                          <archive>
+                            <manifestFile>src/main/rar/META-INF/MANIFEST.MF</manifestFile>
+                          </archive>
+                        </configuration>                        
                     </execution>
                     <execution>
                         <id>deploy_jar</id>

Modified: branches/as7/connectors/connector-ws/src/main/rar/META-INF/MANIFEST.MF
===================================================================
--- branches/as7/connectors/connector-ws/src/main/rar/META-INF/MANIFEST.MF	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/connectors/connector-ws/src/main/rar/META-INF/MANIFEST.MF	2011-07-11 03:06:57 UTC (rev 3305)
@@ -1 +1 @@
-Dependencies: org.jboss.teiid.common-core org.jboss.teiid.api 
+Dependencies: org.jboss.teiid.common-core,org.jboss.teiid.api 

Modified: branches/as7/engine/src/main/java/org/teiid/cache/CacheConfiguration.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/cache/CacheConfiguration.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/engine/src/main/java/org/teiid/cache/CacheConfiguration.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -34,7 +34,6 @@
 	private Policy policy;
 	private int maxage = -1;
 	private int maxEntries = SessionAwareCache.DEFAULT_MAX_SIZE_TOTAL;
-	private boolean enabled = true;
 	private String name;
 	private String location;
 	
@@ -97,12 +96,4 @@
 	public void setLocation(String location) {
 		this.location = location;
 	}	
-	
-	public boolean isEnabled() {
-		return enabled;
-	}
-
-	public void setEnabled(boolean enabled) {
-		this.enabled = enabled;
-	}
 }

Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -115,7 +115,7 @@
 	}
 	
 	public boolean isResultSetCacheEnabled() {
-		return this.resultsetCacheConfig != null && this.resultsetCacheConfig.isEnabled();
+		return this.resultsetCacheConfig != null;
 	}
 	
     /**

Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -684,7 +684,7 @@
         
         //result set cache
         CacheConfiguration rsCacheConfig = config.getResultsetCacheConfig();
-        if (rsCacheConfig != null && rsCacheConfig.isEnabled()) {
+        if (rsCacheConfig != null) {
 			this.rsCache = new SessionAwareCache<CachedResults>(this.cacheFactory, SessionAwareCache.Type.RESULTSET, rsCacheConfig);
 			this.rsCache.setBufferManager(this.bufferManager);
         }

Modified: branches/as7/jboss-integration/pom.xml
===================================================================
--- branches/as7/jboss-integration/pom.xml	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/jboss-integration/pom.xml	2011-07-11 03:06:57 UTC (rev 3305)
@@ -20,15 +20,11 @@
     <dependency>
       <groupId>org.jboss.teiid</groupId>
       <artifactId>teiid-api</artifactId>
+      <scope>provided</scope>
     </dependency>
                
     <dependency>
       <groupId>org.jboss.teiid</groupId>
-      <artifactId>teiid-cache-jbosscache</artifactId>
-    </dependency>
-                    
-    <dependency>
-      <groupId>org.jboss.teiid</groupId>
       <artifactId>teiid-client</artifactId>
       <scope>provided</scope>
     </dependency>
@@ -73,32 +69,25 @@
         <artifactId>jta</artifactId>
         <scope>provided</scope>
     </dependency>
-    <dependency>
-        <groupId>org.jboss</groupId>
-        <artifactId>jboss-common-core</artifactId>
-        <scope>provided</scope>
-    </dependency>     
     
     <dependency>
-        <groupId>org.picketbox</groupId>
-        <artifactId>picketbox</artifactId>
+        <groupId>org.jboss.as</groupId>
+        <artifactId>jboss-as-security</artifactId>
         <scope>provided</scope>
     </dependency>    
+    
     <dependency>
         <groupId>org.jboss.as</groupId>
         <artifactId>jboss-as-server</artifactId>
         <scope>provided</scope>
-    </dependency>     
+    </dependency>
+       
     <dependency>
-        <groupId>org.jboss.as</groupId>
-        <artifactId>jboss-as-connector</artifactId>
+        <groupId>log4j</groupId>
+        <artifactId>log4j</artifactId>
         <scope>provided</scope>
-    </dependency>     
-    <dependency>
-        <groupId>org.jboss.as</groupId>
-        <artifactId>jboss-as-security</artifactId>
-        <scope>provided</scope>
-    </dependency>                            
+    </dependency>
+                          
     <!-- 
     <dependency>
         <groupId>org.jboss</groupId>

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


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

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-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Configuration.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -37,7 +37,6 @@
 	public static final String TRANSLATOR = "translator"; //$NON-NLS-1$
 	
 	// Query-ENGINE
-	public static final String JNDI_NAME = "jndi-name"; //$NON-NLS-1$
 	public static final String ASYNC_THREAD_GROUP = "thread-group-async";//$NON-NLS-1$
 	public static final String MAX_THREADS = "maxThreads";//$NON-NLS-1$
 	public static final String MAX_ACTIVE_PLANS = "maxActivePlans";//$NON-NLS-1$
@@ -54,13 +53,12 @@
 	public static final String MAX_ODBC_LOB_SIZE_ALLOWED = "maxODBCLobSizeAllowed";//$NON-NLS-1$
 	public static final String EVENT_DISTRIBUTOR_NAME = "eventDistributorName";//$NON-NLS-1$
 	public static final String DETECTING_CHANGE_EVENTS = "detectingChangeEvents";//$NON-NLS-1$
-	public static final String JDBC_SECURITY_DOMAIN = "jdbc-security-domain";//$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$
 	public static final String SESSION_EXPIRATION_TIME_LIMIT = "sessions-expiration-timelimit";//$NON-NLS-1$
 	public static final String ALLOW_ENV_FUNCTION = "allow-env-function";//$NON-NLS-1$
 	
 	public static final String USE_DISK = "useDisk";//$NON-NLS-1$
-	public static final String DISK_DIRECTORY = "diskDirectory";//$NON-NLS-1$
 	public static final String PROCESSOR_BATCH_SIZE = "processorBatchSize";//$NON-NLS-1$
 	public static final String CONNECTOR_BATCH_SIZE = "connectorBatchSize";//$NON-NLS-1$
 	public static final String MAX_RESERVE_BATCH_COLUMNS = "maxReserveBatchColumns";//$NON-NLS-1$
@@ -70,7 +68,6 @@
 	public static final String MAX_OPEN_FILES = "maxOpenFiles";//$NON-NLS-1$
 		
 	//cache-config
-	public static final String ENABLED = "enabled";//$NON-NLS-1$
 	public static final String MAX_ENTRIES = "maxEntries";//$NON-NLS-1$
 	public static final String MAX_AGE_IN_SECS = "maxAgeInSeconds";//$NON-NLS-1$
 	public static final String MAX_STALENESS = "maxStaleness";//$NON-NLS-1$
@@ -80,6 +77,7 @@
 	// cache-factory
 	public static final String  CACHE_SERVICE_JNDI_NAME = "cache-service-jndi-name";//$NON-NLS-1$
 	public static final String  RESULTSET_CACHE_NAME = "resultsetCacheName";//$NON-NLS-1$
+	public static final String  CLASS = "class";//$NON-NLS-1$
 	
 	//socket config
 	public static final String MAX_SOCKET_THREAD_SIZE = "maxSocketThreads";//$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-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Element.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -48,7 +48,7 @@
 	MAX_ODBC_LOB_SIZE_ALLOWED_ELEMENT(MAX_ODBC_LOB_SIZE_ALLOWED),
 	EVENT_DISTRIBUTOR_NAME_ELEMENT(EVENT_DISTRIBUTOR_NAME),
 	DETECTING_CHANGE_EVENTS_ELEMENT(DETECTING_CHANGE_EVENTS),
-	JDBC_SECURITY_DOMAIN_ELEMENT(JDBC_SECURITY_DOMAIN),
+	JDBC_SECURITY_DOMAIN_ELEMENT(SECURITY_DOMAIN),
 	MAX_SESSIONS_ALLOWED_ELEMENT(MAX_SESSIONS_ALLOWED),
 	SESSION_EXPIRATION_TIME_LIMIT_ELEMENT(SESSION_EXPIRATION_TIME_LIMIT),
 	ALLOW_ENV_FUNCTION_ELEMENT(ALLOW_ENV_FUNCTION),
@@ -63,7 +63,6 @@
 	
 	// buffer manager
 	USE_DISK_ELEMENT(USE_DISK),
-	DISK_DIRECTORY_ELEMENT(DISK_DIRECTORY),
 	PROCESSOR_BATCH_SIZE_ELEMENT(PROCESSOR_BATCH_SIZE),
 	CONNECTOR_BATCH_SIZE_ELEMENT(CONNECTOR_BATCH_SIZE),
 	MAX_RESERVE_BATCH_COLUMNS_ELEMENT(MAX_RESERVE_BATCH_COLUMNS),
@@ -73,7 +72,6 @@
 	MAX_OPEN_FILES_ELEMENT(MAX_OPEN_FILES),
 	
 	//cache-config
-	ENABLED_ELEMENT(ENABLED),
 	MAX_ENTRIES_ELEMENT(MAX_ENTRIES),
 	MAX_AGE_IN_SECS_ELEMENT(MAX_AGE_IN_SECS),
 	MAX_STALENESS_ELEMENT(MAX_STALENESS),

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-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineAdd.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -21,27 +21,33 @@
  */
 package org.teiid.jboss;
 
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP_ADDR;
-
+import java.util.List;
 import java.util.concurrent.Executor;
 
 import javax.resource.spi.XATerminator;
 import javax.resource.spi.work.WorkManager;
 import javax.transaction.TransactionManager;
 
-import org.jboss.as.controller.*;
-import org.jboss.as.controller.operations.common.Util;
+import org.jboss.as.controller.AbstractBoottimeAddStepHandler;
+import org.jboss.as.controller.OperationContext;
+import org.jboss.as.controller.OperationFailedException;
+import org.jboss.as.controller.ServiceVerificationHandler;
+import org.jboss.as.naming.ManagedReferenceFactory;
+import org.jboss.as.naming.ManagedReferenceInjector;
+import org.jboss.as.naming.NamingStore;
+import org.jboss.as.naming.service.BinderService;
+import org.jboss.as.network.SocketBinding;
 import org.jboss.as.security.plugins.SecurityDomainContext;
-import org.jboss.as.server.BootOperationContext;
-import org.jboss.as.server.BootOperationHandler;
+import org.jboss.as.server.AbstractDeploymentChainStep;
+import org.jboss.as.server.DeploymentProcessorTarget;
 import org.jboss.as.server.deployment.Phase;
-import org.jboss.as.server.services.net.SocketBinding;
+import org.jboss.as.server.services.path.RelativePathService;
 import org.jboss.dmr.ModelNode;
 import org.jboss.msc.inject.ConcurrentMapInjector;
 import org.jboss.msc.service.*;
 import org.teiid.cache.CacheConfiguration;
 import org.teiid.cache.CacheFactory;
-import org.teiid.cache.jboss.ClusterableCacheFactory;
+import org.teiid.cache.DefaultCacheFactory;
 import org.teiid.deployers.*;
 import org.teiid.dqp.internal.datamgr.TranslatorRepository;
 import org.teiid.jboss.deployers.RuntimeEngineDeployer;
@@ -50,183 +56,206 @@
 import org.teiid.query.function.SystemFunctionManager;
 import org.teiid.services.BufferServiceImpl;
 import org.teiid.transport.ClientServiceRegistry;
+import org.teiid.transport.LocalServerConnection;
 import org.teiid.transport.SSLConfiguration;
 import org.teiid.transport.SocketConfiguration;
 
-class QueryEngineAdd implements ModelAddOperationHandler, BootOperationHandler {
+class QueryEngineAdd extends AbstractBoottimeAddStepHandler {
 
 	@Override
-	public OperationResult execute(OperationContext context, ModelNode operation, ResultHandler resultHandler) throws OperationFailedException {
-		final ModelNode modelNode = context.getSubModel();
-		
-		
+	protected void populateModel(ModelNode operation, ModelNode model) {
 		final ModelNode queryEngineNode = operation.require(Configuration.QUERY_ENGINE);
-		modelNode.set(Configuration.QUERY_ENGINE).set(queryEngineNode.clone());
-		
-        RuntimeOperationContext runtime = context.getRuntimeContext();
-        if (runtime != null) {
-            RuntimeTask task = new RuntimeTask() {
-                @Override
-                public void execute(RuntimeTaskContext context) throws OperationFailedException {
-                	
-                	ServiceTarget target = context.getServiceTarget();
-                	
-                	final VDBRepository vdbRepo = buildVDBRepository(queryEngineNode);
-                	JBossLifeCycleListener shutdownListener = new JBossLifeCycleListener();
-                	
-                	//FIXME *******************
-                	ObjectSerializer serializer = new ObjectSerializer("/tmp");
-                	//FIXME *******************
-                	
-                	TranslatorRepository translatorRepo = new TranslatorRepository();
-                	TranslatorRepositoryService translatorService = new TranslatorRepositoryService(translatorRepo);
-                	target.addService(TeiidServiceNames.TRANSLATOR_REPO, translatorService);
-                	
-                	final BufferServiceImpl bufferManager = buildBufferManager(queryEngineNode.get(Configuration.BUFFER_SERVICE));
-                	CacheFactory cacheFactory = getCacheFactory(queryEngineNode.get(Configuration.CACHE_FACORY));
-                	
-                	CacheConfiguration resultsetCache = buildCacheConfig(queryEngineNode.get(Configuration.RESULTSET_CACHE));
-                	CacheConfiguration preparePlanCache = buildCacheConfig(queryEngineNode.get(Configuration.PREPAREDPLAN_CACHE));
-                	
-                	SocketConfiguration jdbc = buildSocketConfiguration(queryEngineNode.get(Configuration.JDBC));
-                	SocketConfiguration odbc = buildSocketConfiguration(queryEngineNode.get(Configuration.ODBC));
-                	
-                	String asyncExecutor = "teiid-async"; //$NON-NLS-1$
-                	if (queryEngineNode.get(Configuration.ASYNC_THREAD_GROUP) != null) {
-                		asyncExecutor = queryEngineNode.get(Configuration.ASYNC_THREAD_GROUP).asString();
-                	}	                	
-                	
-                	// now build the engine
-                	RuntimeEngineDeployer engine = buildQueryEngine(queryEngineNode);
-                	engine.setJdbcSocketConfiguration(jdbc);
-                	engine.setOdbcSocketConfiguration(odbc);
-                	engine.setBufferService(bufferManager);
-                	engine.setVDBRepository(vdbRepo);
-                	engine.setCacheFactory(cacheFactory);
-                	engine.setResultsetCacheConfig(resultsetCache);
-                	engine.setPreparedPlanCacheConfig(preparePlanCache);
-                	engine.setSecurityHelper(new JBossSecurityHelper());
-                	engine.setTranslatorRepository(translatorRepo);
-                	
-                    
-                    ServiceBuilder<ClientServiceRegistry> serviceBuilder = target.addService(TeiidServiceNames.ENGINE, engine);
-                    
-                    serviceBuilder.addDependency(ServiceName.JBOSS.append("connector", "workmanager"), WorkManager.class, engine.workManagerInjector); //$NON-NLS-1$ //$NON-NLS-2$
-                    serviceBuilder.addDependency(ServiceName.JBOSS.append("txn", "XATerminator"), XATerminator.class, engine.xaTerminatorInjector); //$NON-NLS-1$ //$NON-NLS-2$
-                    serviceBuilder.addDependency(ServiceName.JBOSS.append("txn", "TransactionManager"), TransactionManager.class, engine.txnManagerInjector); //$NON-NLS-1$ //$NON-NLS-2$
-                    serviceBuilder.addDependency(ServiceName.JBOSS.append("thread", "executor", asyncExecutor), Executor.class, engine.threadPoolInjector); //$NON-NLS-1$ //$NON-NLS-2$
-                    serviceBuilder.addDependency(ServiceName.JBOSS.append("binding", jdbc.getSocketBinding()), SocketBinding.class, engine.jdbcSocketBindingInjector); //$NON-NLS-1$
-                    serviceBuilder.addDependency(ServiceName.JBOSS.append("binding", odbc.getSocketBinding()), SocketBinding.class, engine.odbcSocketBindingInjector); //$NON-NLS-1$
-                    
-                    // add security domains
-                    String domainNameOrder = queryEngineNode.get(Configuration.JDBC_SECURITY_DOMAIN).asString();
-                    if (domainNameOrder != null && domainNameOrder.trim().length()>0) {
-                    	LogManager.logInfo(LogConstants.CTX_SECURITY, "Security Enabled: true"); //$NON-NLS-1$
-            	        String[] domainNames = domainNameOrder.split(","); //$NON-NLS-1$
-            	        for (String domainName : domainNames) {
-            	            serviceBuilder.addDependency(ServiceName.JBOSS.append("security", "security-domain", domainName), SecurityDomainContext.class, new ConcurrentMapInjector<String,SecurityDomainContext>(engine.securityDomains, domainName)); //$NON-NLS-1$ //$NON-NLS-2$
-            	        }
-                    }
-                    
-                    serviceBuilder.addListener(new AbstractServiceListener<Object>() {
-                    	@Override
-                    	public void serviceStarting(ServiceController<?> serviceController) {
-                    		vdbRepo.start();
-                    		bufferManager.start();
-                        }     
-                        
-                        @Override
-                        public void serviceStopped(ServiceController<?> serviceController) {
-                        	bufferManager.stop();
-                        }
-                        
-                        @Override
-                        public void serviceRemoved(ServiceController<?> serviceController) {
-                            serviceController.removeListener(this);
-                        }                     
-                    });
-                                                                                                 
-            		if (context instanceof BootOperationContext) {
-            			BootOperationContext ctx = (BootOperationContext)context;
-            			ctx.addDeploymentProcessor(Phase.STRUCTURE, Phase.STRUCTURE_WAR_DEPLOYMENT_INIT|0x0001,new VDBStructure());
-            			ctx.addDeploymentProcessor(Phase.PARSE, Phase.PARSE_WEB_DEPLOYMENT|0x0001, new VDBParserDeployer(vdbRepo, serializer));
-            			ctx.addDeploymentProcessor(Phase.DEPENDENCIES, Phase.DEPENDENCIES_WAR_MODULE|0x0001, new VDBDependencyProcessor());
-            			ctx.addDeploymentProcessor(Phase.INSTALL, Phase.INSTALL_WAR_DEPLOYMENT|0x0001, new VDBDeployer(vdbRepo, engine.threadPoolInjector, translatorRepo, serializer, shutdownListener));            			
-            		}                    
-            		
-                    serviceBuilder.setInitialMode(ServiceController.Mode.ACTIVE);
-                    ServiceController<ClientServiceRegistry> controller = serviceBuilder.install();     
-                    ServiceContainer container =  controller.getServiceContainer();
-                    container.addTerminateListener(shutdownListener);
-                }
-            };
-            runtime.setRuntimeTask(task);
-        }
-        
-        // compensating is remove operation
-        final ModelNode address = operation.require(OP_ADDR);
-        BasicOperationResult operationResult = new BasicOperationResult(Util.getResourceRemoveOperation(address));
-        resultHandler.handleResultComplete();
-        return operationResult;
+		model.set(Configuration.QUERY_ENGINE).set(queryEngineNode.clone());
+
 	}
 	
+	@Override
+    protected void performBoottime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
 
+    	final ModelNode queryEngineNode = operation.require(Configuration.QUERY_ENGINE);
+    	ServiceTarget target = context.getServiceTarget();
+    	
+    	final VDBRepository vdbRepo = buildVDBRepository(queryEngineNode);
+    	final JBossLifeCycleListener shutdownListener = new JBossLifeCycleListener();
+    	
+    	//FIXME *******************
+    	final ObjectSerializer serializer = new ObjectSerializer("/tmp");
+    	//FIXME *******************
+    	
+    	final TranslatorRepository translatorRepo = new TranslatorRepository();
+    	TranslatorRepositoryService translatorService = new TranslatorRepositoryService(translatorRepo);
+    	newControllers.add(target.addService(TeiidServiceNames.TRANSLATOR_REPO, translatorService).install());
+
+    	RelativePathService.addService(TeiidServiceNames.BUFFER_DIR, "teiid-buffer", "jboss.server.temp.dir", target); //$NON-NLS-1$ //$NON-NLS-2$
+    	
+    	// TODO: remove verbose service by moving the buffer service from runtime project
+    	final BufferServiceImpl bufferManager = buildBufferManager(queryEngineNode.get(Configuration.BUFFER_SERVICE));
+    	BufferManagerService bufferService = new BufferManagerService(bufferManager);
+    	ServiceBuilder<BufferServiceImpl> bufferServiceBuilder = target.addService(TeiidServiceNames.BUFFER_MGR, bufferService);
+    	bufferServiceBuilder.addDependency(TeiidServiceNames.BUFFER_DIR, String.class, bufferService.pathInjector);
+    	newControllers.add(bufferServiceBuilder.install());
+
+    	CacheFactory cacheFactory = getCacheFactory(queryEngineNode.get(Configuration.CACHE_FACORY));
+    	CacheConfiguration resultsetCache = buildCacheConfig(queryEngineNode.get(Configuration.RESULTSET_CACHE));
+    	CacheConfiguration preparePlanCache = buildCacheConfig(queryEngineNode.get(Configuration.PREPAREDPLAN_CACHE));
+    	
+    	SocketConfiguration jdbc = null;
+    	if (queryEngineNode.hasDefined(Configuration.JDBC)) {
+    		jdbc = buildSocketConfiguration(queryEngineNode.get(Configuration.JDBC));
+    	}
+    	
+    	SocketConfiguration odbc = null;
+    	if (queryEngineNode.hasDefined(Configuration.ODBC)) {
+    		odbc = buildSocketConfiguration(queryEngineNode.get(Configuration.ODBC));
+    	}
+    	
+    	String asyncExecutor = "teiid-async"; //$NON-NLS-1$
+    	if (queryEngineNode.hasDefined(Configuration.ASYNC_THREAD_GROUP)) {
+    		asyncExecutor = queryEngineNode.get(Configuration.ASYNC_THREAD_GROUP).asString();
+    	}	                	
+    	
+    	// now build the engine
+    	final RuntimeEngineDeployer engine = buildQueryEngine(queryEngineNode);
+    	engine.setJdbcSocketConfiguration(jdbc);
+    	engine.setOdbcSocketConfiguration(odbc);
+    	engine.setVDBRepository(vdbRepo);
+    	engine.setCacheFactory(cacheFactory);
+    	engine.setResultsetCacheConfig(resultsetCache);
+    	engine.setPreparedPlanCacheConfig(preparePlanCache);
+    	engine.setSecurityHelper(new JBossSecurityHelper());
+    	engine.setTranslatorRepository(translatorRepo);
+    	
+        
+        ServiceBuilder<ClientServiceRegistry> serviceBuilder = target.addService(TeiidServiceNames.ENGINE, engine);
+        
+        serviceBuilder.addDependency(ServiceName.JBOSS.append("connector", "workmanager"), WorkManager.class, engine.workManagerInjector); //$NON-NLS-1$ //$NON-NLS-2$
+        serviceBuilder.addDependency(ServiceName.JBOSS.append("txn", "XATerminator"), XATerminator.class, engine.xaTerminatorInjector); //$NON-NLS-1$ //$NON-NLS-2$
+        serviceBuilder.addDependency(ServiceName.JBOSS.append("txn", "TransactionManager"), TransactionManager.class, engine.txnManagerInjector); //$NON-NLS-1$ //$NON-NLS-2$
+        serviceBuilder.addDependency(ServiceName.JBOSS.append("thread", "executor", asyncExecutor), Executor.class, engine.threadPoolInjector); //$NON-NLS-1$ //$NON-NLS-2$
+        serviceBuilder.addDependency(TeiidServiceNames.BUFFER_MGR, BufferServiceImpl.class, engine.bufferServiceInjector);
+       
+        if (jdbc != null) {
+        	serviceBuilder.addDependency(ServiceName.JBOSS.append("binding", jdbc.getSocketBinding()), SocketBinding.class, engine.jdbcSocketBindingInjector); //$NON-NLS-1$
+        }
+        
+        if (odbc != null) {
+        	serviceBuilder.addDependency(ServiceName.JBOSS.append("binding", odbc.getSocketBinding()), SocketBinding.class, engine.odbcSocketBindingInjector); //$NON-NLS-1$
+        }
+        
+        // register JNDI Name
+        ServiceName javaContext = ServiceName.JBOSS.append("naming", "context", "java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        BinderService binder = new BinderService(LocalServerConnection.TEIID_RUNTIME);
+        ServiceBuilder<ManagedReferenceFactory> namingBuilder = target.addService(javaContext.append(LocalServerConnection.TEIID_RUNTIME), binder);
+        namingBuilder.addDependency(javaContext, NamingStore.class, binder.getNamingStoreInjector());
+        namingBuilder.addDependency(TeiidServiceNames.ENGINE, RuntimeEngineDeployer.class, new ManagedReferenceInjector<RuntimeEngineDeployer>(binder.getManagedObjectInjector()));
+        namingBuilder.setInitialMode(ServiceController.Mode.ON_DEMAND);
+        newControllers.add(namingBuilder.install());
+        
+        
+        // add security domains
+        if ( queryEngineNode.hasDefined(Configuration.SECURITY_DOMAIN)) {
+	        String domainNameOrder = queryEngineNode.get(Configuration.SECURITY_DOMAIN).asString();
+	        if (domainNameOrder != null && domainNameOrder.trim().length()>0) {
+	        	LogManager.logInfo(LogConstants.CTX_SECURITY, "Security Enabled: true"); //$NON-NLS-1$
+		        String[] domainNames = domainNameOrder.split(","); //$NON-NLS-1$
+		        for (String domainName : domainNames) {
+		        	engine.addSecurityDomain(domainName);
+		            serviceBuilder.addDependency(ServiceName.JBOSS.append("security", "security-domain", domainName), SecurityDomainContext.class, new ConcurrentMapInjector<String,SecurityDomainContext>(engine.securityDomains, domainName)); //$NON-NLS-1$ //$NON-NLS-2$
+		        }
+	        }
+        }
+        
+        serviceBuilder.addListener(new AbstractServiceListener<Object>() {
+            @Override
+            public void transition(ServiceController<?> serviceController, ServiceController.Transition transition) {
+            	
+            	if (transition.equals(ServiceController.Transition.START_INITIATING_to_STARTING)) {
+            		vdbRepo.start();
+            		bufferManager.start();            		
+            	}
+            	
+            	if (transition.equals(ServiceController.Transition.STOPPING_to_DOWN)) {
+            		bufferManager.stop();
+            	}
+            }
+            
+            @Override
+            public void serviceRemoveRequested(ServiceController<?> serviceController) {
+                serviceController.removeListener(this);
+            }                     
+        });
+                  
+        serviceBuilder.setInitialMode(ServiceController.Mode.ACTIVE);
+        ServiceController<ClientServiceRegistry> controller = serviceBuilder.install(); 
+        newControllers.add(controller);
+        ServiceContainer container =  controller.getServiceContainer();
+        container.addTerminateListener(shutdownListener);    	
+    	
+        context.addStep(new AbstractDeploymentChainStep() {
+			@Override
+			public void execute(DeploymentProcessorTarget processorTarget) {
+				processorTarget.addDeploymentProcessor(Phase.STRUCTURE, Phase.STRUCTURE_WAR_DEPLOYMENT_INIT|0x0001,new VDBStructure());
+				processorTarget.addDeploymentProcessor(Phase.PARSE, Phase.PARSE_WEB_DEPLOYMENT|0x0001, new VDBParserDeployer(vdbRepo, serializer));
+				processorTarget.addDeploymentProcessor(Phase.DEPENDENCIES, Phase.DEPENDENCIES_WAR_MODULE|0x0001, new VDBDependencyProcessor());
+				processorTarget.addDeploymentProcessor(Phase.INSTALL, Phase.INSTALL_WAR_DEPLOYMENT|0x0001, new VDBDeployer(vdbRepo, engine.threadPoolInjector, translatorRepo, serializer, shutdownListener));            			
+			}
+        	
+        }, OperationContext.Stage.RUNTIME);
+    }
+
 	
 	private RuntimeEngineDeployer buildQueryEngine(ModelNode node) {
 		RuntimeEngineDeployer engine = new RuntimeEngineDeployer();
 		
-    	if (node.get(Configuration.JNDI_NAME) != null) {
-    		engine.setJndiName(node.get(Configuration.JNDI_NAME).asString());
-    	}	
-    	if (node.get(Configuration.MAX_THREADS) != null) {
+    	if (node.hasDefined(Configuration.MAX_THREADS)) {
     		engine.setMaxThreads(node.get(Configuration.MAX_THREADS).asInt());
     	}
-    	if (node.get(Configuration.MAX_ACTIVE_PLANS) != null) {
+    	if (node.hasDefined(Configuration.MAX_ACTIVE_PLANS)) {
     		engine.setMaxActivePlans(node.get(Configuration.MAX_ACTIVE_PLANS).asInt());
     	}
-    	if (node.get(Configuration.USER_REQUEST_SOURCE_CONCURRENCY) != null) {
+    	if (node.hasDefined(Configuration.USER_REQUEST_SOURCE_CONCURRENCY)) {
     		engine.setUserRequestSourceConcurrency(node.get(Configuration.USER_REQUEST_SOURCE_CONCURRENCY).asInt());
     	}	
-    	if (node.get(Configuration.TIME_SLICE_IN_MILLI) != null) {
+    	if (node.hasDefined(Configuration.TIME_SLICE_IN_MILLI)) {
     		engine.setTimeSliceInMilli(node.get(Configuration.TIME_SLICE_IN_MILLI).asInt());
     	}
-    	if (node.get(Configuration.MAX_ROWS_FETCH_SIZE) != null) {
+    	if (node.hasDefined(Configuration.MAX_ROWS_FETCH_SIZE)) {
     		engine.setMaxRowsFetchSize(node.get(Configuration.MAX_ROWS_FETCH_SIZE).asInt());
     	}
-    	if (node.get(Configuration.LOB_CHUNK_SIZE_IN_KB) != null) {
+    	if (node.hasDefined(Configuration.LOB_CHUNK_SIZE_IN_KB)) {
     		engine.setLobChunkSizeInKB(node.get(Configuration.LOB_CHUNK_SIZE_IN_KB).asInt());
     	}
-    	if (node.get(Configuration.USE_DATA_ROLES) != null) {
+    	if (node.hasDefined(Configuration.USE_DATA_ROLES)) {
     		engine.setUseDataRoles(node.get(Configuration.USE_DATA_ROLES).asBoolean());
     	}
-    	if (node.get(Configuration.ALLOW_CREATE_TEMPORY_TABLES_BY_DEFAULT) != null) {
+    	if (node.hasDefined(Configuration.ALLOW_CREATE_TEMPORY_TABLES_BY_DEFAULT)) {
     		engine.setAllowCreateTemporaryTablesByDefault(node.get(Configuration.ALLOW_CREATE_TEMPORY_TABLES_BY_DEFAULT).asBoolean());
     	}
-    	if (node.get(Configuration.ALLOW_FUNCTION_CALLS_BY_DEFAULT) != null) {
+    	if (node.hasDefined(Configuration.ALLOW_FUNCTION_CALLS_BY_DEFAULT)) {
     		engine.setAllowFunctionCallsByDefault(node.get(Configuration.ALLOW_FUNCTION_CALLS_BY_DEFAULT).asBoolean());
     	}
-    	if (node.get(Configuration.QUERY_THRESHOLD_IN_SECS) != null) {
+    	if (node.hasDefined(Configuration.QUERY_THRESHOLD_IN_SECS)) {
     		engine.setQueryThresholdInSecs(node.get(Configuration.QUERY_THRESHOLD_IN_SECS).asInt());
     	}
-    	if (node.get(Configuration.MAX_SOURCE_ROWS) != null) {
+    	if (node.hasDefined(Configuration.MAX_SOURCE_ROWS)) {
     		engine.setMaxSourceRows(node.get(Configuration.MAX_SOURCE_ROWS).asInt());
     	}
-    	if (node.get(Configuration.EXCEPTION_ON_MAX_SOURCE_ROWS) != null) {
+    	if (node.hasDefined(Configuration.EXCEPTION_ON_MAX_SOURCE_ROWS)) {
     		engine.setExceptionOnMaxSourceRows(node.get(Configuration.EXCEPTION_ON_MAX_SOURCE_ROWS).asBoolean());
     	}
-    	if (node.get(Configuration.MAX_ODBC_LOB_SIZE_ALLOWED) != null) {
+    	if (node.hasDefined(Configuration.MAX_ODBC_LOB_SIZE_ALLOWED)) {
     		engine.setMaxODBCLobSizeAllowed(node.get(Configuration.MAX_ODBC_LOB_SIZE_ALLOWED).asInt());
     	}
-    	if (node.get(Configuration.EVENT_DISTRIBUTOR_NAME) != null) {
+    	if (node.hasDefined(Configuration.EVENT_DISTRIBUTOR_NAME)) {
     		engine.setEventDistributorName(node.get(Configuration.EVENT_DISTRIBUTOR_NAME).asString());
     	}
-    	if (node.get(Configuration.DETECTING_CHANGE_EVENTS) != null) {
+    	if (node.hasDefined(Configuration.DETECTING_CHANGE_EVENTS)) {
     		engine.setDetectingChangeEvents(node.get(Configuration.DETECTING_CHANGE_EVENTS).asBoolean());
     	}	             
-    	if (node.get(Configuration.SESSION_EXPIRATION_TIME_LIMIT) != null) {
+    	if (node.hasDefined(Configuration.SESSION_EXPIRATION_TIME_LIMIT)) {
     		engine.setSessionExpirationTimeLimit(node.get(Configuration.SESSION_EXPIRATION_TIME_LIMIT).asInt());
     	}
-    	if (node.get(Configuration.MAX_SESSIONS_ALLOWED) != null) {
+    	if (node.hasDefined(Configuration.MAX_SESSIONS_ALLOWED)) {
     		engine.setSessionMaxLimit(node.get(Configuration.MAX_SESSIONS_ALLOWED).asInt());
     	}		                	
     	
@@ -236,7 +265,7 @@
 
     private VDBRepository buildVDBRepository(ModelNode node) {
     	SystemFunctionManager systemFunctionManager = new SystemFunctionManager();
-    	if (node.get(Configuration.ALLOW_ENV_FUNCTION) != null) {
+    	if (node.hasDefined(Configuration.ALLOW_ENV_FUNCTION)) {
     		systemFunctionManager.setAllowEnvFunction(node.get(Configuration.ALLOW_ENV_FUNCTION).asBoolean());
     	}
     	else {
@@ -255,73 +284,72 @@
     		return bufferManger;
     	}
     	
-    	if (node.get(Configuration.USE_DISK) != null) {
+    	if (node.hasDefined(Configuration.USE_DISK)) {
     		bufferManger.setUseDisk(node.get(Configuration.USE_DISK).asBoolean());
     	}	                	
-    	if (node.get(Configuration.DISK_DIRECTORY) != null) {
-    		bufferManger.setDiskDirectory(node.get(Configuration.DISK_DIRECTORY).asString());
-    	}	                	
-    	if (node.get(Configuration.PROCESSOR_BATCH_SIZE) != null) {
+    	if (node.hasDefined(Configuration.PROCESSOR_BATCH_SIZE)) {
     		bufferManger.setProcessorBatchSize(node.get(Configuration.PROCESSOR_BATCH_SIZE).asInt());
     	}	
-    	if (node.get(Configuration.CONNECTOR_BATCH_SIZE) != null) {
+    	if (node.hasDefined(Configuration.CONNECTOR_BATCH_SIZE)) {
     		bufferManger.setConnectorBatchSize(node.get(Configuration.CONNECTOR_BATCH_SIZE).asInt());
     	}	
-    	if (node.get(Configuration.MAX_RESERVE_BATCH_COLUMNS) != null) {
+    	if (node.hasDefined(Configuration.MAX_RESERVE_BATCH_COLUMNS)) {
     		bufferManger.setMaxReserveBatchColumns(node.get(Configuration.MAX_RESERVE_BATCH_COLUMNS).asInt());
     	}
-    	if (node.get(Configuration.MAX_PROCESSING_BATCH_COLUMNS) != null) {
+    	if (node.hasDefined(Configuration.MAX_PROCESSING_BATCH_COLUMNS)) {
     		bufferManger.setMaxProcessingBatchesColumns(node.get(Configuration.MAX_PROCESSING_BATCH_COLUMNS).asInt());
     	}	
-    	if (node.get(Configuration.MAX_FILE_SIZE) != null) {
+    	if (node.hasDefined(Configuration.MAX_FILE_SIZE)) {
     		bufferManger.setMaxFileSize(node.get(Configuration.MAX_FILE_SIZE).asInt());
     	}
-    	if (node.get(Configuration.MAX_BUFFER_SPACE) != null) {
+    	if (node.hasDefined(Configuration.MAX_BUFFER_SPACE)) {
     		bufferManger.setMaxBufferSpace(node.get(Configuration.MAX_BUFFER_SPACE).asInt());
     	}
-    	if (node.get(Configuration.MAX_OPEN_FILES) != null) {
+    	if (node.hasDefined(Configuration.MAX_OPEN_FILES)) {
     		bufferManger.setMaxOpenFiles(node.get(Configuration.MAX_OPEN_FILES).asInt());
     	}	                	
     	return bufferManger;
     }
     
     private CacheFactory getCacheFactory(ModelNode node) {
-    	ClusterableCacheFactory cacheFactory = new ClusterableCacheFactory();	
+    	CacheFactory cacheFactory = new DefaultCacheFactory();	
+    	/*
+    	if (node.hasDefined(Configuration.CLASS)) {
+    		String className = node.get(Configuration.CLASS).asString();
+    	}
     	
-    	if (node.get(Configuration.ENABLED) != null) {
+    	if (node.hasDefined(Configuration.ENABLED)) {
     		cacheFactory.setEnabled(node.get(Configuration.ENABLED).asBoolean());
     	}
     	else {
     		cacheFactory.setEnabled(true);
     	}
-    	if (node.get(Configuration.CACHE_SERVICE_JNDI_NAME) != null) {
+    	if (node.hasDefined(Configuration.CACHE_SERVICE_JNDI_NAME)) {
     		cacheFactory.setCacheManager(node.get(Configuration.CACHE_SERVICE_JNDI_NAME).asString());
     	}	                	
-    	if (node.get(Configuration.RESULTSET_CACHE_NAME) != null) {
+    	if (node.hasDefined(Configuration.RESULTSET_CACHE_NAME)) {
     		cacheFactory.setResultsetCacheName(node.get(Configuration.RESULTSET_CACHE_NAME).asString());
-    	}		                	
+    	}
+    	*/		                	
     	return cacheFactory;
     }
     
     private CacheConfiguration buildCacheConfig(ModelNode node) {
     	CacheConfiguration cacheConfig = new CacheConfiguration();
     	
-    	if (node.get(Configuration.ENABLED) != null) {
-    		cacheConfig.setEnabled(node.get(Configuration.ENABLED).asBoolean());
-    	}
-    	if (node.get(Configuration.MAX_ENTRIES) != null) {
+    	if (node.hasDefined(Configuration.MAX_ENTRIES)) {
     		cacheConfig.setMaxEntries(node.get(Configuration.MAX_ENTRIES).asInt());
     	}
-    	if (node.get(Configuration.MAX_AGE_IN_SECS) != null) {
+    	if (node.hasDefined(Configuration.MAX_AGE_IN_SECS)) {
     		cacheConfig.setMaxAgeInSeconds(node.get(Configuration.MAX_AGE_IN_SECS).asInt());
     	}
-    	if (node.get(Configuration.MAX_STALENESS) != null) {
+    	if (node.hasDefined(Configuration.MAX_STALENESS)) {
     		cacheConfig.setMaxStaleness(node.get(Configuration.MAX_STALENESS).asInt());
     	}
-    	if (node.get(Configuration.CACHE_TYPE) != null) {
+    	if (node.hasDefined(Configuration.CACHE_TYPE)) {
     		cacheConfig.setType(node.get(Configuration.CACHE_TYPE).asString());
     	}
-    	if (node.get(Configuration.CACHE_LOCATION) != null) {
+    	if (node.hasDefined(Configuration.CACHE_LOCATION)) {
     		cacheConfig.setLocation(node.get(Configuration.CACHE_LOCATION).asString());
     	}	   	                	
     	return cacheConfig;
@@ -330,62 +358,63 @@
 	private SocketConfiguration buildSocketConfiguration(ModelNode node) {
 		SocketConfiguration socket = new SocketConfiguration();
 		
-    	if (node.get(Configuration.ENABLED) != null) {
-    		socket.setEnabled(node.get(Configuration.ENABLED).asBoolean());
-    	}		
-    	if (node.get(Configuration.SOCKET_BINDING) != null) {
-    		socket.setSocketBinding(node.get(Configuration.SOCKET_BINDING).asString());
-    	}
-    	if (node.get(Configuration.MAX_SOCKET_THREAD_SIZE) != null) {
+		if (node.hasDefined(Configuration.SOCKET_BINDING)) {
+			socket.setSocketBinding(node.require(Configuration.SOCKET_BINDING).asString());
+		}
+		else {
+			throw new IllegalArgumentException(IntegrationPlugin.Util.getString(Configuration.SOCKET_BINDING+".not_defined")); //$NON-NLS-1$
+		}
+
+   		if (node.hasDefined(Configuration.MAX_SOCKET_THREAD_SIZE)) {
     		socket.setMaxSocketThreads(node.get(Configuration.MAX_SOCKET_THREAD_SIZE).asInt());
     	}
-    	if (node.get(Configuration.IN_BUFFER_SIZE) != null) {
+    	if (node.hasDefined(Configuration.IN_BUFFER_SIZE)) {
     		socket.setInputBufferSize(node.get(Configuration.IN_BUFFER_SIZE).asInt());
     	}	
-    	if (node.get(Configuration.OUT_BUFFER_SIZE) != null) {
+    	if (node.hasDefined(Configuration.OUT_BUFFER_SIZE)) {
     		socket.setOutputBufferSize(node.get(Configuration.OUT_BUFFER_SIZE).asInt());
     	}		   
     	
     	SSLConfiguration ssl = new SSLConfiguration();
     	ssl.setAuthenticationMode(SSLConfiguration.ANONYMOUS);
     	
-    	if (node.get(Configuration.SSL) != null) {
+    	if (node.hasDefined(Configuration.SSL)) {
     		ModelNode sslNode = node.get(Configuration.SSL);
     		
-        	if (sslNode.get(Configuration.SSL_MODE) != null) {
+        	if (sslNode.hasDefined(Configuration.SSL_MODE)) {
         		ssl.setMode(sslNode.get(Configuration.SSL_MODE).asString());
         	}
         	
-        	if (sslNode.get(Configuration.KEY_STORE_FILE) != null) {
+        	if (sslNode.hasDefined(Configuration.KEY_STORE_FILE)) {
         		ssl.setKeystoreFilename(sslNode.get(Configuration.KEY_STORE_FILE).asString());
         	}	
         	
-        	if (sslNode.get(Configuration.KEY_STORE_PASSWD) != null) {
+        	if (sslNode.hasDefined(Configuration.KEY_STORE_PASSWD)) {
         		ssl.setKeystorePassword(sslNode.get(Configuration.KEY_STORE_PASSWD).asString());
         	}	
         	
-        	if (sslNode.get(Configuration.KEY_STORE_TYPE) != null) {
+        	if (sslNode.hasDefined(Configuration.KEY_STORE_TYPE)) {
         		ssl.setKeystoreType(sslNode.get(Configuration.KEY_STORE_TYPE).asString());
         	}		
         	
-        	if (sslNode.get(Configuration.SSL_PROTOCOL) != null) {
+        	if (sslNode.hasDefined(Configuration.SSL_PROTOCOL)) {
         		ssl.setSslProtocol(sslNode.get(Configuration.SSL_PROTOCOL).asString());
         	}	
-        	if (sslNode.get(Configuration.KEY_MANAGEMENT_ALG) != null) {
+        	if (sslNode.hasDefined(Configuration.KEY_MANAGEMENT_ALG)) {
         		ssl.setKeymanagementAlgorithm(sslNode.get(Configuration.KEY_MANAGEMENT_ALG).asString());
         	}
-        	if (sslNode.get(Configuration.TRUST_FILE) != null) {
+        	if (sslNode.hasDefined(Configuration.TRUST_FILE)) {
         		ssl.setTruststoreFilename(sslNode.get(Configuration.TRUST_FILE).asString());
         	}
-        	if (sslNode.get(Configuration.TRUST_PASSWD) != null) {
+        	if (sslNode.hasDefined(Configuration.TRUST_PASSWD)) {
         		ssl.setTruststorePassword(sslNode.get(Configuration.TRUST_PASSWD).asString());
         	}
-        	if (sslNode.get(Configuration.AUTH_MODE) != null) {
+        	if (sslNode.hasDefined(Configuration.AUTH_MODE)) {
         		ssl.setAuthenticationMode(sslNode.get(Configuration.AUTH_MODE).asString());
-        	}		                	
+        	}
     	}
+    	socket.setSSLConfiguration(ssl);
     	
-    	socket.setSSLConfiguration(ssl);
 		return socket;
 	}	
 }

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineDescription.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineDescription.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineDescription.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -47,7 +47,6 @@
 	}
 		
 	static void getQueryEngineDescription(ModelNode node, String type, ResourceBundle bundle) {
-		addAttribute(node, Configuration.JNDI_NAME, type, bundle.getString(Configuration.JNDI_NAME+DESC), ModelType.STRING, true, "teiid/engine-deployer"); //$NON-NLS-1$
 		addAttribute(node, Configuration.ASYNC_THREAD_GROUP, type, bundle.getString(Configuration.ASYNC_THREAD_GROUP+DESC), ModelType.STRING, false, "teiid-async"); //$NON-NLS-1$
 		addAttribute(node, Configuration.MAX_THREADS, type, bundle.getString(Configuration.MAX_THREADS+DESC), ModelType.INT, false, "64"); //$NON-NLS-1$
 		addAttribute(node, Configuration.MAX_ACTIVE_PLANS, type, bundle.getString(Configuration.MAX_ACTIVE_PLANS+DESC), ModelType.INT, false, "20"); //$NON-NLS-1$
@@ -66,7 +65,7 @@
 		addAttribute(node, Configuration.DETECTING_CHANGE_EVENTS, type, bundle.getString(Configuration.DETECTING_CHANGE_EVENTS+DESC), ModelType.BOOLEAN, false, "true"); //$NON-NLS-1$
 		
 		//session stuff
-		addAttribute(node, Configuration.JDBC_SECURITY_DOMAIN, type, bundle.getString(Configuration.JDBC_SECURITY_DOMAIN+DESC), ModelType.STRING, false, null);
+		addAttribute(node, Configuration.SECURITY_DOMAIN, type, bundle.getString(Configuration.SECURITY_DOMAIN+DESC), ModelType.STRING, false, null);
 		addAttribute(node, Configuration.MAX_SESSIONS_ALLOWED, type, bundle.getString(Configuration.MAX_SESSIONS_ALLOWED+DESC), ModelType.INT, false, "5000"); //$NON-NLS-1$
 		addAttribute(node, Configuration.SESSION_EXPIRATION_TIME_LIMIT, type, bundle.getString(Configuration.SESSION_EXPIRATION_TIME_LIMIT+DESC), ModelType.INT, false, "0"); //$NON-NLS-1$
 		
@@ -128,14 +127,12 @@
 	}
 	
 	private static void getDistributedCacheDescription(ModelNode node, String type, ResourceBundle bundle) {
-		addAttribute(node, Configuration.ENABLED, type, bundle.getString(Configuration.ENABLED+DESC), ModelType.BOOLEAN, false, "true"); //$NON-NLS-1$
 		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 getBufferDescription(ModelNode node, String type, ResourceBundle bundle) {
 		addAttribute(node, Configuration.USE_DISK, type, bundle.getString(Configuration.USE_DISK+DESC), ModelType.BOOLEAN, false, "true"); //$NON-NLS-1$
-		addAttribute(node, Configuration.DISK_DIRECTORY, type, bundle.getString(Configuration.DISK_DIRECTORY+DESC), ModelType.STRING, true, null); 
 		addAttribute(node, Configuration.PROCESSOR_BATCH_SIZE, type, bundle.getString(Configuration.PROCESSOR_BATCH_SIZE+DESC), ModelType.INT, false, "512"); //$NON-NLS-1$
 		addAttribute(node, Configuration.CONNECTOR_BATCH_SIZE, type, bundle.getString(Configuration.CONNECTOR_BATCH_SIZE+DESC), ModelType.INT, false, "1024"); //$NON-NLS-1$
 		addAttribute(node, Configuration.MAX_RESERVE_BATCH_COLUMNS, type, bundle.getString(Configuration.MAX_RESERVE_BATCH_COLUMNS+DESC), ModelType.INT, false, "-1"); //$NON-NLS-1$
@@ -146,7 +143,6 @@
 	}	
 
 	static void getResultsetCacheDescription(ModelNode node, String type, ResourceBundle bundle) {
-		addAttribute(node, Configuration.ENABLED, type, bundle.getString(Configuration.ENABLED+DESC), ModelType.BOOLEAN, false, "true"); //$NON-NLS-1$
 		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$
 		addAttribute(node, Configuration.MAX_STALENESS, type, bundle.getString(Configuration.MAX_STALENESS+DESC), ModelType.INT, false, "60");//$NON-NLS-1$
@@ -155,7 +151,6 @@
 	}
 	
 	static void getPreparedPalnCacheDescription(ModelNode node, String type, ResourceBundle bundle) {
-		addAttribute(node, Configuration.ENABLED, type, bundle.getString(Configuration.ENABLED+DESC), ModelType.BOOLEAN, false, "true"); //$NON-NLS-1$
 		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$

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-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineOperationHandler.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -35,9 +35,10 @@
 import org.jboss.msc.service.ServiceController;
 import org.teiid.adminapi.AdminException;
 import org.teiid.adminapi.impl.*;
+import org.teiid.adminapi.impl.MetadataMapper.VDBTranslatorMetaDataMapper;
 import org.teiid.jboss.deployers.RuntimeEngineDeployer;
 
-abstract class QueryEngineOperationHandler implements OperationHandler, DescriptionProvider {
+abstract class QueryEngineOperationHandler extends AbstractAddStepHandler implements DescriptionProvider {
 	private static final String DESCRIBE = ".describe"; //$NON-NLS-1$
 	
 	private String operationName; 
@@ -47,25 +48,20 @@
 	}
 	
 	@Override
-	public OperationResult execute(final OperationContext context, final ModelNode operation, final ResultHandler resultHandler) throws OperationFailedException {
-        
-        final RuntimeOperationContext runtimeContext = context.getRuntimeContext();
-        if (runtimeContext != null) {
-            runtimeContext.setRuntimeTask(new RuntimeTask() {
-
-                @Override
-                public void execute(RuntimeTaskContext context) throws OperationFailedException {
-                    ServiceController<?> sc = context.getServiceRegistry().getRequiredService(TeiidServiceNames.ENGINE);
-                    RuntimeEngineDeployer engine = RuntimeEngineDeployer.class.cast(sc.getValue());
-                    
-                    resultHandler.handleResultFragment(ResultHandler.EMPTY_LOCATION, executeOperation(engine, operation));
-                }});
-        }
-
-        resultHandler.handleResultComplete();
-        return new BasicOperationResult();
+	protected void populateModel(final ModelNode operation, final ModelNode model) throws OperationFailedException{
+		
 	}
 	
+	@Override
+    protected void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model,
+            final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> newControllers) throws OperationFailedException {
+		
+        ServiceController<?> sc = context.getServiceRegistry(false).getRequiredService(TeiidServiceNames.ENGINE);
+        RuntimeEngineDeployer engine = RuntimeEngineDeployer.class.cast(sc.getValue());
+        executeOperation(engine, operation, model);
+    }
+	
+		
     @Override
     public ModelNode getModelDescription(final Locale locale) {
         final ResourceBundle bundle = IntegrationPlugin.getResourceBundle(locale);
@@ -88,7 +84,7 @@
     	return bundle.getString(RuntimeEngineDeployer.class.getSimpleName()+"."+this.operationName+"."+parmName+DESCRIBE); //$NON-NLS-1$ //$NON-NLS-2$
     }    
     
-	abstract protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException;
+	abstract protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException;
 	
 	protected void describeParameters(@SuppressWarnings("unused") ModelNode operationNode, @SuppressWarnings("unused")ResourceBundle bundle) {
 	}
@@ -99,10 +95,8 @@
 		super(operationName);
 	}
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException{
-		ModelNode node = new ModelNode();
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException{
 		node.set(engine.getRuntimeVersion());
-		return node;
 	}
 }
 
@@ -111,14 +105,12 @@
 		super(operationName);
 	}
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException{
-		ModelNode node = new ModelNode();
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException{
 		try {
 			node.set(String.valueOf(engine.getActiveSessionsCount()));
 		} catch (AdminException e) {
 			// TODO: handle exception in model node terms 
 		}
-		return node;
 	}
 }
 
@@ -127,19 +119,17 @@
 		super(operationName);
 	}
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException{
-		ModelNode node = new ModelNode();
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException{
 		node.get(TYPE).set(ModelType.LIST);
 		
 		try {
 			Collection<SessionMetadata> sessions = engine.getActiveSessions();
 			for (SessionMetadata session:sessions) {
-				node.add(MetadataMapper.SessionMetadataMapper.wrap(session));
+				node.add(MetadataMapper.SessionMetadataMapper.wrap(session, node.add()));
 			}
 		} catch (AdminException e) {
 			// TODO: handle exception in model node terms 
 		}
-		return node;
 	}
 }
 
@@ -148,15 +138,13 @@
 		super(operationName);
 	}
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException{
-		ModelNode node = new ModelNode();
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException{
 		node.get(TYPE).set(ModelType.LIST);
 		
 		List<RequestMetadata> requests = engine.getRequestsForSession(operation.get(OperationsConstants.SESSION).asString());
 		for (RequestMetadata request:requests) {
-			node.add(MetadataMapper.RequestMetadataMapper.wrap(request));
+			node.add(MetadataMapper.RequestMetadataMapper.wrap(request, node.add()));
 		}
-		return node;
 	}
 	
 	protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
@@ -173,8 +161,7 @@
 		super(operationName);
 	}
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException{
-		ModelNode node = new ModelNode();
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException{
 		node.get(TYPE).set(ModelType.LIST);
 		
 		try {
@@ -182,12 +169,11 @@
 			int vdbVersion = operation.get(OperationsConstants.VDB_VERSION).asInt();
 			List<RequestMetadata> requests = engine.getRequestsUsingVDB(vdbName,vdbVersion);
 			for (RequestMetadata request:requests) {
-				node.add(MetadataMapper.RequestMetadataMapper.wrap(request));
+				node.add(MetadataMapper.RequestMetadataMapper.wrap(request, node.add()));
 			}
 		} catch (AdminException e) {
 			// TODO: handle exception in model node terms 
 		} 
-		return node;
 	}
 	
 	protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
@@ -208,15 +194,13 @@
 		super(operationName);
 	}
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException{
-		ModelNode node = new ModelNode();
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException{
 		node.get(TYPE).set(ModelType.LIST);
 		
 		List<RequestMetadata> requests = engine.getLongRunningRequests();
 		for (RequestMetadata request:requests) {
-			node.add(MetadataMapper.RequestMetadataMapper.wrap(request));
+			node.add(MetadataMapper.RequestMetadataMapper.wrap(request, node.add()));
 		}
-		return node;
 	}
 }
 
@@ -225,10 +209,8 @@
 		super(operationName);
 	}
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException{
-		ModelNode node = new ModelNode();
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException{
 		engine.terminateSession(operation.get(OperationsConstants.SESSION).asString());
-		return node;
 	}
 	
 	protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
@@ -243,14 +225,12 @@
 		super(operationName);
 	}
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException{
-		ModelNode node = new ModelNode();
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException{
 		try {
 			engine.cancelRequest(operation.get(OperationsConstants.SESSION).asString(), operation.get(OperationsConstants.EXECUTION_ID).asLong());
 		} catch (AdminException e) {
 			// TODO: handle exception in model node terms 
 		} 
-		return node;
 	}
 	
 	protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
@@ -269,14 +249,12 @@
 		super(operationName);
 	}
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException {
-		ModelNode node = new ModelNode();
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException {
 		node.get(TYPE).set(ModelType.LIST);
 		Collection<String> types = engine.getCacheTypes();
 		for (String type:types) {
 			node.add(type);
 		}
-		return node;
 	}
 }
 
@@ -286,8 +264,7 @@
 		super(operationName);
 	}
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException {
-		ModelNode node = new ModelNode();
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException {
 		String cacheType = operation.get(OperationsConstants.CACHE_TYPE).asString();
 		
 		if (operation.get(OperationsConstants.VDB_NAME) != null && operation.get(OperationsConstants.VDB_VERSION) != null) {
@@ -298,7 +275,6 @@
 		else {
 			engine.clearCache(cacheType);
 		}
-		return node;
 	}
 	
 	protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
@@ -323,10 +299,10 @@
 		super(operationName);
 	}
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException {
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException {
 		String cacheType = operation.get(OperationsConstants.CACHE_TYPE).asString();
 		CacheStatisticsMetadata stats = engine.getCacheStatistics(cacheType);
-		return MetadataMapper.CacheStatisticsMetadataMapper.wrap(stats);
+		MetadataMapper.CacheStatisticsMetadataMapper.wrap(stats, node);
 	}
 	
 	protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
@@ -342,9 +318,9 @@
 		super(operationName);
 	}
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException {
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException {
 		WorkerPoolStatisticsMetadata stats = engine.getWorkerPoolStatistics();
-		return MetadataMapper.WorkerPoolStatisticsMetadataMapper.wrap(stats);
+		MetadataMapper.WorkerPoolStatisticsMetadataMapper.wrap(stats, node);
 	}
 }
 
@@ -354,17 +330,15 @@
 		super(operationName);
 	}
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException {
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException {
 		Collection<TransactionMetadata> txns = engine.getTransactions();
 		
-		ModelNode node = new ModelNode();
 		node.get(TYPE).set(ModelType.LIST);
 		
 		for (TransactionMetadata txn:txns) {
-			node.add(MetadataMapper.TransactionMetadataMapper.wrap(txn));
+			node.add(MetadataMapper.TransactionMetadataMapper.wrap(txn, node.add()));
 		}
 		
-		return node;
 	}
 }
 
@@ -374,14 +348,13 @@
 		super(operationName);
 	}
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException {
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException {
 		String xid = operation.get(OperationsConstants.XID).asString();
 		try {
 			engine.terminateTransaction(xid);
 		} catch (AdminException e) {
 			// TODO: Handle exception
 		}
-		return new ModelNode();
 	}
 	
 	protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
@@ -397,7 +370,7 @@
 		super(operationName);
 	}
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException {
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException {
 		String sourceVDBName = operation.get(OperationsConstants.SOURCE_VDBNAME).asString();
 		int sourceVDBversion = operation.get(OperationsConstants.SOURCE_VDBVERSION).asInt();
 		String targetVDBName = operation.get(OperationsConstants.TARGET_VDBNAME).asString();
@@ -407,7 +380,6 @@
 		} catch (AdminException e) {
 			throw new OperationFailedException(new ModelNode().set(e.getMessage()));
 		}
-		return new ModelNode();
 	}
 	
 	protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
@@ -435,12 +407,11 @@
 		super(operationName);
 	}
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException {
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException {
 		String vdbName = operation.get(OperationsConstants.VDB_NAME).asString();
 		int vdbVersion = operation.get(OperationsConstants.VDB_VERSION).asInt();
 		String sql = operation.get(OperationsConstants.SQL_QUERY).asString();
 		int timeout = operation.get(OperationsConstants.TIMEOUT_IN_MILLI).asInt();
-		ModelNode node = new ModelNode();
 		try {
 			node.get(TYPE).set(ModelType.LIST);
 			
@@ -461,7 +432,6 @@
 		} catch (AdminException e) {
 			throw new OperationFailedException(new ModelNode().set(e.getMessage()));
 		}
-		return node;
 	}
 	
 	protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
@@ -489,12 +459,12 @@
 		super(operationName);
 	}
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException {
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException {
 		String vdbName = operation.get(OperationsConstants.VDB_NAME).asString();
 		int vdbVersion = operation.get(OperationsConstants.VDB_VERSION).asInt();
 
 		VDBMetaData vdb = engine.getVDB(vdbName, vdbVersion);
-		return MetadataMapper.wrap(vdb);
+		MetadataMapper.wrap(vdb, node);
 	}
 	
 	protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
@@ -514,15 +484,13 @@
 		super(operationName);
 	}
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException {
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException {
 		List<VDBMetaData> vdbs = engine.getVDBs();
-		ModelNode node = new ModelNode();
 		node.get(TYPE).set(ModelType.LIST);
 		
 		for (VDBMetaData vdb:vdbs) {
-			node.add(MetadataMapper.wrap(vdb));
+			node.add(MetadataMapper.wrap(vdb, node.add()));
 		}
-		return node;
 	}
 	
 }
@@ -533,15 +501,13 @@
 		super(operationName);
 	}
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException {
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException {
 		List<VDBTranslatorMetaData> translators = engine.getTranslators();
-		ModelNode node = new ModelNode();
 		node.get(TYPE).set(ModelType.OBJECT);
 		
 		for (VDBTranslatorMetaData t:translators) {
-			node.add(MetadataMapper.VDBTranslatorMetaDataMapper.wrap(t));
+			node.add(MetadataMapper.VDBTranslatorMetaDataMapper.wrap(t, node.add()));
 		}
-		return node;
 	}
 	
 	protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
@@ -558,11 +524,11 @@
 	}
 	
 	@Override
-	protected ModelNode executeOperation(RuntimeEngineDeployer engine, ModelNode operation) throws OperationFailedException {
+	protected void executeOperation(RuntimeEngineDeployer engine, ModelNode operation, ModelNode node) throws OperationFailedException {
 		String translatorName = operation.get(OperationsConstants.TRANSLATOR_NAME).asString();
 		
 		VDBTranslatorMetaData translator = engine.getTranslator(translatorName);
-		return MetadataMapper.VDBTranslatorMetaDataMapper.wrap(translator);
+		MetadataMapper.VDBTranslatorMetaDataMapper.wrap(translator, node);
 	}
 	
 	protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
@@ -570,7 +536,7 @@
 		operationNode.get(REQUEST_PROPERTIES, OperationsConstants.TRANSLATOR_NAME, REQUIRED).set(true);
 		operationNode.get(REQUEST_PROPERTIES, OperationsConstants.TRANSLATOR_NAME, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.TRANSLATOR_NAME));
 		
-		operationNode.get(REPLY_PROPERTIES, TYPE).set(ModelType.OBJECT);
+		VDBTranslatorMetaDataMapper.describe(operationNode.get(REPLY_PROPERTIES));
 		operationNode.get(REPLY_PROPERTIES, DESCRIPTION).set(bundle.getString(getReplyName()));
 	}	
 }
\ No newline at end of file

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-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -34,7 +34,7 @@
 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.ModelNodeRegistration;
+import org.jboss.as.controller.registry.ManagementResourceRegistration;
 import org.jboss.as.controller.registry.AttributeAccess.Storage;
 import org.jboss.dmr.ModelNode;
 import org.jboss.dmr.ModelType;
@@ -73,7 +73,7 @@
 		
 		registration.registerXMLElementWriter(parser);
 		
-		final ModelNodeRegistration subsystem = registration.registerSubsystemModel(new DescriptionProvider() {
+		final ManagementResourceRegistration subsystem = registration.registerSubsystemModel(new DescriptionProvider() {
 			
 			@Override
 			public ModelNode getModelDescription(Locale locale) {
@@ -99,7 +99,7 @@
 		subsystem.registerOperationHandler(ModelDescriptionConstants.ADD, ENGINE_ADD, ENGINE_DESC);
 		//subsystem.registerOperationHandler(ModelDescriptionConstants.DESCRIBE, describe, describe, false);
 		
-        final ModelNodeRegistration translators = subsystem.registerSubModel(PathElement.pathElement(Configuration.TRANSLATOR), new DescriptionProvider() {
+        final ManagementResourceRegistration translators = subsystem.registerSubModel(PathElement.pathElement(Configuration.TRANSLATOR), new DescriptionProvider() {
 			@Override
 			public ModelNode getModelDescription(Locale locale) {
 				final ResourceBundle bundle = IntegrationPlugin.getResourceBundle(locale);

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-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidServiceNames.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -27,6 +27,8 @@
 	public static ServiceName ENGINE = ServiceName.JBOSS.append("teiid", "query-engine");
 	public static ServiceName TRANSLATOR_REPO = ServiceName.JBOSS.append("teiid", "translator-repository");
 	static ServiceName TRANSLATOR_BASE = ServiceName.JBOSS.append("teiid", "translator");
+	public static ServiceName BUFFER_DIR = ServiceName.JBOSS.append("teiid", "buffer.dir");
+	public static ServiceName BUFFER_MGR = ServiceName.JBOSS.append("teiid", "buffer-mgr");
 	
 	public static ServiceName translatorServiceName(String name) {
 		return TRANSLATOR_BASE.append(name);

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-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -191,9 +191,6 @@
 			case USE_DISK_ELEMENT:
 				node.get(reader.getLocalName()).set(Boolean.parseBoolean(reader.getElementText()));
 				break;
-			case DISK_DIRECTORY_ELEMENT:
-				node.get(reader.getLocalName()).set(reader.getElementText());
-				break;
 			case PROCESSOR_BATCH_SIZE_ELEMENT:
 			case CONNECTOR_BATCH_SIZE_ELEMENT:
 			case MAX_RESERVE_BATCH_COLUMNS_ELEMENT:

Deleted: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidXOMSubsystemDescription.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidXOMSubsystemDescription.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidXOMSubsystemDescription.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -1,332 +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.jboss;
-
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ATTRIBUTES;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.CHILDREN;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DEFAULT;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIPTION;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MAX_OCCURS;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MIN_OCCURS;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REQUIRED;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.TYPE;
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-
-import org.jboss.as.controller.descriptions.DescriptionProvider;
-import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
-import org.jboss.dmr.ModelNode;
-import org.jboss.dmr.ModelType;
-import org.teiid.core.TeiidRuntimeException;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-
-import com.sun.xml.xsom.XSAnnotation;
-import com.sun.xml.xsom.XSAttributeDecl;
-import com.sun.xml.xsom.XSAttributeUse;
-import com.sun.xml.xsom.XSComplexType;
-import com.sun.xml.xsom.XSContentType;
-import com.sun.xml.xsom.XSElementDecl;
-import com.sun.xml.xsom.XSFacet;
-import com.sun.xml.xsom.XSModelGroup;
-import com.sun.xml.xsom.XSParticle;
-import com.sun.xml.xsom.XSRestrictionSimpleType;
-import com.sun.xml.xsom.XSSchema;
-import com.sun.xml.xsom.XSSchemaSet;
-import com.sun.xml.xsom.XSSimpleType;
-import com.sun.xml.xsom.XSTerm;
-import com.sun.xml.xsom.parser.AnnotationContext;
-import com.sun.xml.xsom.parser.AnnotationParser;
-import com.sun.xml.xsom.parser.AnnotationParserFactory;
-import com.sun.xml.xsom.parser.XSOMParser;
-
-/**
- * Lot of XSD parsing code is from http://it.toolbox.com/blogs/enterprise-web-solutions/parsing-an-xsd-schema-in-java-32565 
- */
-public class TeiidXOMSubsystemDescription implements DescriptionProvider {
-	
-	
-	@Override
-	public ModelNode getModelDescription(Locale 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());
-        
-        try {
-			XSOMParser parser = new XSOMParser();
-			URL xsdURL = Thread.currentThread().getContextClassLoader().getResource("schema/jboss-teiid.xsd"); //$NON-NLS-1$
-			parser.setAnnotationParser(new AnnotationFactory());
-			parser.parse(xsdURL); 
-			XSSchemaSet schemaSet = parser.getResult();
-			if (schemaSet == null) {
-				throw new TeiidRuntimeException("No Schema parsed");
-			}
-			 XSSchema xsSchema = schemaSet.getSchema(1);
-			 Iterator<XSElementDecl> it = xsSchema.iterateElementDecls();
-			 while (it.hasNext()) {
-				 XSElementDecl element = it.next();
-				 parseElement(null, element, node, false);
-			 }
-		} catch (SAXException e) {
-			throw new TeiidRuntimeException(e);
-		}        
-        
-		return node;
-	}
-
-	public void describeNode(ModelNode node, String type, String name, String description, String dataType, String defaultValue, 
-			SimpleTypeRestriction restriction, boolean required) {
-		node.get(type, name, TYPE).set(getModelType(dataType));
-        node.get(type, name, DESCRIPTION).set(description);
-        node.get(type, name, REQUIRED).set(required);
-        node.get(type, name, MAX_OCCURS).set(1);
-        if (defaultValue != null) {
-        	node.get(type, name, DEFAULT).set(defaultValue);
-        }
-        
-        if (restriction.enumeration != null) {
-        	//TODO:
-        	//node.get(type, name, "allowed").set(Arrays.asList(restriction.enumeration));
-        }
-    }
-	
-
-
-	private void parseElement(XSParticle p, XSElementDecl element, ModelNode node, boolean addChild) {
-		if (element.getType().isComplexType()) {
-			if (addChild) {
-				ModelNode childNode = node.get(CHILDREN, element.getName());
-				childNode.get(TYPE).set(ModelType.OBJECT);
-				childNode.get(DESCRIPTION).set(getDescription(element));
-				childNode.get(REQUIRED).set(false);
-				childNode.get(MAX_OCCURS).set(p.getMaxOccurs());
-				childNode.get(MIN_OCCURS).set(p.getMinOccurs());
-				parseComplexType(element, childNode);
-			}
-			else {
-				parseComplexType(element, node);
-			}
-		 }
-		 else {
-			 String defaultValue =  null;
-			 if (element.getDefaultValue() != null) {
-				 defaultValue = element.getDefaultValue().value;
-			 }
-			 boolean required = false;
-			 XSParticle particle = ((XSContentType)element.getType()).asParticle();
-			 if (particle != null) {
-				 if (particle.getMinOccurs() != 0) {
-					 required = true;
-				 }
-			 }
-			 describeNode(node, ATTRIBUTES, element.getName(), getDescription(element), element.getType().getName(), defaultValue, getRestrictions(element.getType().asSimpleType()), required);
-
-		 }
-	}
-
-	private void parseComplexType(XSElementDecl element, ModelNode node) {	
-		XSComplexType type = element.getType().asComplexType();
-		 Iterator<? extends XSAttributeUse> attrIter =  type.iterateAttributeUses();
-		 while(attrIter.hasNext()) {
-		        XSAttributeDecl attr = attrIter.next().getDecl();
-		        String defaultValue =  null;
-				 if (attr.getDefaultValue() != null) {
-					 defaultValue = attr.getDefaultValue().value;
-				 }		        
-		        describeNode(node, ATTRIBUTES, attr.getName(), attr.getName(), attr.getType().getName(), defaultValue, getRestrictions(attr.getType().asSimpleType()), true);
-		 }
-		 
-		XSContentType contentType = type.getContentType();
-		XSParticle particle = contentType.asParticle();
-		if (particle != null) {
-			XSTerm term = particle.getTerm();
-			if (term.isModelGroup()) {
-				XSModelGroup xsModelGroup = term.asModelGroup();
-				XSParticle[] particles = xsModelGroup.getChildren();
-				for (XSParticle p : particles) {
-					XSTerm pterm = p.getTerm();
-					if (pterm.isElementDecl()) { 												
-						parseElement(p, pterm.asElementDecl(), node, true);
-					}
-				}
-			}
-		}
-	}
-
-	private ModelType getModelType(String type) {
-		if (type == null) {
-			return ModelType.STRING;
-		}
-		if (type.equals("int")) { //$NON-NLS-1$
-			return ModelType.INT;
-		}
-		else if (type.equals("boolean")) { //$NON-NLS-1$
-			return ModelType.BOOLEAN;
-		}
-		return ModelType.STRING;
-	}
-
-	private String getDescription(XSElementDecl element) {
-		String description = element.getName();
-		 XSAnnotation annotation = element.getAnnotation();
-		 if (annotation != null) {
-			 description = (String)annotation.getAnnotation();
-		 }
-		return description;
-	}
-
-
-	private class AnnotationFactory implements AnnotationParserFactory{
-	    @Override
-	    public AnnotationParser create() {
-	        return new XsdAnnotationParser();
-	    }
-	}
-	
-	private class XsdAnnotationParser extends AnnotationParser {
-	    private StringBuilder documentation = new StringBuilder();
-	    @Override
-	    public ContentHandler getContentHandler(AnnotationContext context, String parentElementName, ErrorHandler handler, EntityResolver resolver) {
-	        return new ContentHandler(){
-	            private boolean parsingDocumentation = false;
-	            @Override
-	            public void characters(char[] ch, int start, int length) throws SAXException {
-	                if(parsingDocumentation){
-	                    documentation.append(ch,start,length);
-	                }
-	            }
-	            @Override
-	            public void endElement(String uri, String localName, String name)
-	            throws SAXException {
-	                if(localName.equals("documentation")){ //$NON-NLS-1$
-	                    parsingDocumentation = false;
-	                }
-	            }
-	            @Override
-	            public void startElement(String uri, String localName,String name,
-	            Attributes atts) throws SAXException {
-	                if(localName.equals("documentation")){ //$NON-NLS-1$
-	                    parsingDocumentation = true;
-	                }
-	            }
-				@Override
-				public void endDocument() throws SAXException {
-				}
-				@Override
-				public void endPrefixMapping(String prefix) throws SAXException {
-				}
-				@Override
-				public void ignorableWhitespace(char[] ch, int start, int length)
-						throws SAXException {
-				}
-				@Override
-				public void processingInstruction(String target, String data)
-						throws SAXException {
-				}
-				@Override
-				public void setDocumentLocator(Locator locator) {
-				}
-				@Override
-				public void skippedEntity(String name) throws SAXException {
-				}
-				@Override
-				public void startDocument() throws SAXException {
-				}
-				@Override
-				public void startPrefixMapping(String prefix, String uri) throws SAXException {
-				}
-	        };
-	    }
-	    @Override
-	    public Object getResult(Object existing) {
-	        return documentation.toString().trim();
-	    }
-	}
-	
-	public class SimpleTypeRestriction{
-	    public String[] enumeration = null;
-	    public String maxValue = null;
-	    public String minValue = null;
-	    public String length = null;
-	    public String maxLength = null;
-	    public String minLength = null;
-	    public String pattern = null;
-	    public String totalDigits = null;
-	}
-
-	private SimpleTypeRestriction getRestrictions(XSSimpleType xsSimpleType){
-		SimpleTypeRestriction t = new SimpleTypeRestriction();
-	    XSRestrictionSimpleType restriction = xsSimpleType.asRestriction();
-	    if(restriction != null){
-	        List<String> enumeration = new ArrayList<String>();
-	        Iterator<? extends XSFacet> i = restriction.getDeclaredFacets().iterator();
-	        while(i.hasNext()){
-	            XSFacet facet = i.next();
-	            if(facet.getName().equals(XSFacet.FACET_ENUMERATION)){
-	                enumeration.add(facet.getValue().value);
-	            }
-	            if(facet.getName().equals(XSFacet.FACET_MAXINCLUSIVE)){
-	                t.maxValue = facet.getValue().value;
-	            }
-	            if(facet.getName().equals(XSFacet.FACET_MININCLUSIVE)){
-	                t.minValue = facet.getValue().value;
-	            }
-	            if(facet.getName().equals(XSFacet.FACET_MAXEXCLUSIVE)){
-	                t.maxValue = String.valueOf(Integer.parseInt(facet.getValue().value) - 1);
-	            }
-	            if(facet.getName().equals(XSFacet.FACET_MINEXCLUSIVE)){
-	                t.minValue = String.valueOf(Integer.parseInt(facet.getValue().value) + 1);
-	            }
-	            if(facet.getName().equals(XSFacet.FACET_LENGTH)){
-	                t.length = facet.getValue().value;
-	            }
-	            if(facet.getName().equals(XSFacet.FACET_MAXLENGTH)){
-	                t.maxLength = facet.getValue().value;
-	            }
-	            if(facet.getName().equals(XSFacet.FACET_MINLENGTH)){
-	                t.minLength = facet.getValue().value;
-	            }
-	            if(facet.getName().equals(XSFacet.FACET_PATTERN)){
-	                t.pattern = facet.getValue().value;
-	            }
-	            if(facet.getName().equals(XSFacet.FACET_TOTALDIGITS)){
-	                t.totalDigits = facet.getValue().value;
-	            }
-	        }
-	        if(enumeration.size() > 0){
-	            t.enumeration = enumeration.toArray(new String[]{});
-	        }
-	    }
-	    return t;
-	}	
-}

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-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -24,13 +24,13 @@
 import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.*;
 import static org.teiid.jboss.Configuration.addAttribute;
 
+import java.util.List;
 import java.util.Locale;
 import java.util.ResourceBundle;
 import java.util.ServiceLoader;
 
 import org.jboss.as.controller.*;
 import org.jboss.as.controller.descriptions.DescriptionProvider;
-import org.jboss.as.controller.operations.common.Util;
 import org.jboss.dmr.ModelNode;
 import org.jboss.dmr.ModelType;
 import org.jboss.modules.Module;
@@ -46,7 +46,7 @@
 import org.teiid.logging.LogManager;
 import org.teiid.translator.ExecutionFactory;
 
-public class TranslatorAdd implements DescriptionProvider, ModelAddOperationHandler {
+public class TranslatorAdd extends AbstractAddStepHandler implements DescriptionProvider {
 
     @Override
     public ModelNode getModelDescription(final Locale locale) {
@@ -58,56 +58,54 @@
         addAttribute(operation, Configuration.TRANSLATOR_MODULE, REQUEST_PROPERTIES, bundle.getString(Configuration.TRANSLATOR_MODULE+Configuration.DESC), ModelType.STRING, true, null);
         return operation;
     }
-
-    @Override
-    public OperationResult execute(final OperationContext context, final ModelNode operation, final ResultHandler resultHandler) throws OperationFailedException {
+    
+	@Override
+	protected void populateModel(final ModelNode operation, final ModelNode model) throws OperationFailedException{
         final ModelNode address = operation.require(OP_ADDR);
         final PathAddress pathAddress = PathAddress.pathAddress(address);
 
-        final String name = operation.require(Configuration.TRANSLATOR_NAME).asString();
+		final String name = operation.require(Configuration.TRANSLATOR_NAME).asString();
         final String moduleName = operation.require(Configuration.TRANSLATOR_MODULE).asString();
 
-        //Apply to the model
-        final ModelNode model = context.getSubModel();
         model.get(NAME).set(pathAddress.getLastElement().getValue());
         model.get(Configuration.TRANSLATOR_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 {
 
-        if (context.getRuntimeContext() != null) {
-            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
-                @Override
-                public void execute(RuntimeTaskContext context) throws OperationFailedException {
-                    final ServiceTarget target = context.getServiceTarget();
+		final String name = operation.require(Configuration.TRANSLATOR_NAME).asString();
+        final String moduleName = operation.require(Configuration.TRANSLATOR_MODULE).asString();
+		
+        final ServiceTarget target = context.getServiceTarget();
 
-                    final ModuleIdentifier moduleId;
-                    final Module module;
-                    try {
-                        moduleId = ModuleIdentifier.create(moduleName);
-                        module = Module.getCallerModuleLoader().loadModule(moduleId);
-                    } catch (ModuleLoadException e) {
-                        throw new OperationFailedException(e, new ModelNode().set("Failed to load module for translator [" + moduleName + "]"));
-                    }
-                    final ServiceLoader<ExecutionFactory> serviceLoader = module.loadService(ExecutionFactory.class);
-                    if (serviceLoader != null) {
-                    	for (ExecutionFactory ef:serviceLoader) {
-                    		VDBTranslatorMetaData metadata = TranslatorUtil.buildTranslatorMetadata(ef, moduleName);
-                    		if (metadata == null) {
-                    			throw new OperationFailedException( new ModelNode().set("Execution Factory is not valid"));
-                    		}
-                    		LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("translator.added", metadata.getName())); //$NON-NLS-1$
-                    		
-                    		TranslatorService translatorService = new TranslatorService(metadata);
-                    		ServiceBuilder<VDBTranslatorMetaData> builder = target.addService(TeiidServiceNames.translatorServiceName(metadata.getName()), translatorService);
-                    		builder.addDependency(TeiidServiceNames.TRANSLATOR_REPO, TranslatorRepository.class, translatorService.repositoryInjector);
-	                        builder.setInitialMode(ServiceController.Mode.ACTIVE).install();                    		
-                    	}
-                    	resultHandler.handleResultComplete();
-                    }
-                }
-            });
-        } else {
-            resultHandler.handleResultComplete();
+        final ModuleIdentifier moduleId;
+        final Module module;
+        try {
+            moduleId = ModuleIdentifier.create(moduleName);
+            module = Module.getCallerModuleLoader().loadModule(moduleId);
+        } catch (ModuleLoadException e) {
+            throw new OperationFailedException(e, new ModelNode().set(IntegrationPlugin.Util.getString("failed_load_module", moduleName, name))); //$NON-NLS-1$
         }
-        return new BasicOperationResult(Util.getResourceRemoveOperation(address));
-    }
+        final ServiceLoader<ExecutionFactory> serviceLoader = module.loadService(ExecutionFactory.class);
+        if (serviceLoader != null) {
+        	for (ExecutionFactory ef:serviceLoader) {
+        		VDBTranslatorMetaData metadata = TranslatorUtil.buildTranslatorMetadata(ef, moduleName);
+        		if (metadata == null) {
+        			throw new OperationFailedException( new ModelNode().set(IntegrationPlugin.Util.getString("error_adding_translator", name))); //$NON-NLS-1$ 
+        		}
+        		
+        		if (name.equalsIgnoreCase(metadata.getName())) {
+	        		LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("translator.added", metadata.getName())); //$NON-NLS-1$
+	        		
+	        		TranslatorService translatorService = new TranslatorService(metadata);
+	        		ServiceBuilder<VDBTranslatorMetaData> builder = target.addService(TeiidServiceNames.translatorServiceName(metadata.getName()), translatorService);
+	        		builder.addDependency(TeiidServiceNames.TRANSLATOR_REPO, TranslatorRepository.class, translatorService.repositoryInjector);
+	                builder.setInitialMode(ServiceController.Mode.ACTIVE).install();
+        		}
+        	}
+        }
+    }    
 }

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-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorRemove.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -21,54 +21,49 @@
  */
 package org.teiid.jboss;
 
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.*;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIPTION;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OPERATION_NAME;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REMOVE;
 
+import java.util.List;
 import java.util.Locale;
 import java.util.ResourceBundle;
 
-import org.jboss.as.controller.*;
+import org.jboss.as.controller.AbstractAddStepHandler;
+import org.jboss.as.controller.OperationContext;
+import org.jboss.as.controller.OperationFailedException;
+import org.jboss.as.controller.ServiceVerificationHandler;
 import org.jboss.as.controller.descriptions.DescriptionProvider;
-import org.jboss.as.controller.operations.common.Util;
 import org.jboss.dmr.ModelNode;
 import org.jboss.msc.service.ServiceController;
 import org.jboss.msc.service.ServiceRegistry;
 
-public class TranslatorRemove implements DescriptionProvider, ModelAddOperationHandler {
+public class TranslatorRemove extends AbstractAddStepHandler implements DescriptionProvider {
 
 	@Override
 	public ModelNode getModelDescription(Locale locale) {
         final ResourceBundle bundle = IntegrationPlugin.getResourceBundle(locale);
         final ModelNode operation = new ModelNode();
         operation.get(OPERATION_NAME).set(REMOVE);
-        operation.get(DESCRIPTION).set(bundle.getString("translator.add")); //$NON-NLS-1$        
+        operation.get(DESCRIPTION).set(bundle.getString("translator.remove")); //$NON-NLS-1$        
         return operation;
 	}
-
+	
 	@Override
-	public OperationResult execute(final OperationContext context, final ModelNode operation, final ResultHandler resultHandler) throws OperationFailedException {
-        final ModelNode opAddr = operation.require(OP_ADDR);
-
-        // Compensating is add
-        final ModelNode model = context.getSubModel();
-        final String translatorName = model.get(Configuration.TRANSLATOR_NAME).asString();
-
-        final ModelNode compensating = Util.getEmptyOperation(ADD, opAddr);
-        compensating.get(Configuration.TRANSLATOR_NAME).set(translatorName);
-
-        if (context.getRuntimeContext() != null) {
-            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
-                public void execute(final RuntimeTaskContext context) throws OperationFailedException {
-                    final ServiceRegistry registry = context.getServiceRegistry();
-                    final ServiceController<?> controller = registry.getService(TeiidServiceNames.translatorServiceName(translatorName));
-                    if (controller != null) {
-                        controller.setMode(ServiceController.Mode.REMOVE);
-                    }
-                    resultHandler.handleResultComplete();
-                }
-            });
-        } else {
-            resultHandler.handleResultComplete();
+	protected void populateModel(final ModelNode operation, final ModelNode model) throws OperationFailedException {
+		final String translatorName = model.require(Configuration.TRANSLATOR_NAME).asString();
+		model.get(Configuration.TRANSLATOR_NAME).set(translatorName);
+	}
+	
+	@Override
+    protected void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model,
+            final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> newControllers) throws OperationFailedException {
+		
+		final String translatorName = model.require(Configuration.TRANSLATOR_NAME).asString();
+        final ServiceRegistry registry = context.getServiceRegistry(true);
+        final ServiceController<?> controller = registry.getService(TeiidServiceNames.translatorServiceName(translatorName));
+        if (controller != null) {
+            controller.setMode(ServiceController.Mode.REMOVE);
         }
-        return new BasicOperationResult(compensating);
-    }
+	}
 }

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-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -39,8 +39,9 @@
 import javax.security.auth.login.LoginException;
 import javax.transaction.TransactionManager;
 
+import org.jboss.as.network.SocketBinding;
 import org.jboss.as.security.plugins.SecurityDomainContext;
-import org.jboss.as.server.services.net.SocketBinding;
+import org.jboss.modules.Module;
 import org.jboss.msc.service.Service;
 import org.jboss.msc.service.StartContext;
 import org.jboss.msc.service.StopContext;
@@ -90,6 +91,7 @@
 import org.teiid.query.processor.DdlPlan;
 import org.teiid.query.tempdata.TempTableStore;
 import org.teiid.security.SecurityHelper;
+import org.teiid.services.BufferServiceImpl;
 import org.teiid.services.SessionServiceImpl;
 import org.teiid.transport.*;
 import org.teiid.vdb.runtime.VDBKey;
@@ -111,8 +113,6 @@
 	private transient VDBRepository vdbRepository;
 	private transient TranslatorRepository translatorRepository;
 
-	private transient String jndiName;
-
 	private String eventDistributorName;
 	private transient EventDistributor eventDistributor;
     private long sessionMaxLimit = SessionService.DEFAULT_MAX_SESSIONS;
@@ -124,6 +124,7 @@
 	public final InjectedValue<TransactionManager> txnManagerInjector = new InjectedValue<TransactionManager>();
 	public final InjectedValue<Executor> threadPoolInjector = new InjectedValue<Executor>();
 	public final InjectedValue<SocketBinding> jdbcSocketBindingInjector = new InjectedValue<SocketBinding>();
+	public final InjectedValue<BufferServiceImpl> bufferServiceInjector = new InjectedValue<BufferServiceImpl>();
 	public final InjectedValue<SocketBinding> odbcSocketBindingInjector = new InjectedValue<SocketBinding>();
 	public final ConcurrentMap<String, SecurityDomainContext> securityDomains = new ConcurrentHashMap<String, SecurityDomainContext>();
 	private LinkedList<String> securityDomainNames = new LinkedList<String>();
@@ -151,22 +152,30 @@
 		setXATerminator(xaTerminatorInjector.getValue());
 		setTransactionManager(txnManagerInjector.getValue());
 		
-		this.sessionService = new SessionServiceImpl(this.securityDomainNames, this.securityDomains);
+		this.sessionService = new SessionServiceImpl();
+		if (!this.securityDomainNames.isEmpty()) {
+			this.sessionService.setSecurityDomains(this.securityDomainNames, this.securityDomains);			
+		}
 		this.sessionService.setSessionExpirationTimeLimit(this.sessionExpirationTimeLimit);
 		this.sessionService.setSessionMaxLimit(this.sessionMaxLimit);
 		this.sessionService.setDqp(this.dqpCore);
 		this.sessionService.setVDBRepository(this.vdbRepository);
 		this.sessionService.start();
 		
+		this.setBufferService(bufferServiceInjector.getValue());
 		
-		this.jdbcSocketConfiguration.setHostAddress(this.jdbcSocketBindingInjector.getValue().getAddress());
-		this.jdbcSocketConfiguration.setPortNumber(this.jdbcSocketBindingInjector.getValue().getPort());
-		this.odbcSocketConfiguration.setHostAddress(this.odbcSocketBindingInjector.getValue().getAddress());
-		this.odbcSocketConfiguration.setPortNumber(this.odbcSocketBindingInjector.getValue().getPort());
+		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()));
 
-		dqpCore.setTransactionService((TransactionService)LogManager.createLoggingProxy(LogConstants.CTX_TXN_LOG, transactionServerImpl, new Class[] {TransactionService.class}, MessageLevel.DETAIL));
-
 		if (this.eventDistributorName != null) {
 			try {
 				InitialContext ic = new InitialContext();
@@ -204,14 +213,14 @@
     	jdbcCsr.registerClientService(ILogon.class, logon, LogConstants.CTX_SECURITY);
     	jdbcCsr.registerClientService(DQP.class, dqpProxy, LogConstants.CTX_DQP);
     	
-    	if (this.jdbcSocketConfiguration.getEnabled()) {
+    	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$
     	} else {
     		LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("socket_not_enabled", "jdbc connections")); //$NON-NLS-1$ //$NON-NLS-2$
     	}
     	
-    	if (this.odbcSocketConfiguration.getEnabled()) {
+    	if (this.odbcSocketConfiguration != null) {
     		this.vdbRepository.odbcEnabled();
 	    	this.odbcSocket = new ODBCSocketListener(this.odbcSocketConfiguration, this.dqpCore.getBufferManager(), offset, getMaxODBCLobSizeAllowed());
 	    	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$
@@ -220,17 +229,7 @@
     	}    	
     	
     	LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("engine_started", getRuntimeVersion(), new Date(System.currentTimeMillis()).toString())); //$NON-NLS-1$
-    	if (jndiName != null) {
-	    	final InitialContext ic ;
-	    	try {
-	    		ic = new InitialContext() ;
-	    		Util.bind(ic, jndiName, this) ;
-	    	} catch (final NamingException ne) {
-	    		// Add jndi_failed to bundle
-	        	LogManager.logError(LogConstants.CTX_RUNTIME, ne, IntegrationPlugin.Util.getString("jndi_failed", new Date(System.currentTimeMillis()).toString())); //$NON-NLS-1$
-	    	}
-    	}
-    	
+
     	// add vdb life cycle listeners
 		this.vdbRepository.addListener(new VDBLifeCycleListener() {
 			
@@ -272,15 +271,6 @@
     
 	@Override
     public void stop(StopContext context) {
-    	if (jndiName != null) {
-	    	final InitialContext ic ;
-	    	try {
-	    		ic = new InitialContext() ;
-	    		Util.unbind(ic, jndiName) ;
-	    	} catch (final NamingException ne) {
-	    	}
-    	}
-    	
     	try {
 	    	this.dqpCore.stop();
     	} catch(TeiidRuntimeException e) {
@@ -361,10 +351,6 @@
 		this.vdbRepository = repo;
 	}
 	
-	public void setJndiName(final String jndiName) {
-		this.jndiName = jndiName ;
-	}
-	
 	@Override
     public List<RequestMetadata> getRequestsForSession(String sessionId) {
 		return this.dqpCore.getRequestsForSession(sessionId);

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-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties	2011-07-11 03:06:57 UTC (rev 3305)
@@ -46,6 +46,10 @@
 distribute_failed=Deploy of the archive failed {0}
 template_not_found=Template not found for {0}
 admin_executing=JOPR admin {0} is executing command {1}
+error_adding_translator=Error loading the Translator {0}. Execution Factory class is not valid class or not defined.
+failed_load_module=Failed to load module {0} for translator {1}
+translator.add=Add Translator
+translator.remove=Remove Translator
 
 DQPCore.unable_to_process_event=Unable to process event.
 translator.added = Teiid translator "{0}" added.
@@ -81,11 +85,11 @@
 maxODBCLobSizeAllowed.describe=Maximum size of lob allowed through ODBC connection in bytes (default 5MB)
 eventDistributorName.describe=The JNDI name of the Teiid Event Distributor
 detectingChangeEvents.describe=Set to true for the engine to detect local change events. Should be disabled if using external change data capture tools. (default true)
-jdbc-security-domain.describe=Comma separated list of domains to be used to login into Teiid using JDBC connection
+security-domain.describe=Comma separated list of domains to be used to login into Teiid
 admin-security-domain.describe=security domain to be used with Admin API (please do not change this, as this should be same as profile service)
 max-sessions-allowed.describe=Maximum number of sessions allowed by the system (default 5000)
 sessions-expiration-timelimit.describe=Max allowed time before the session is terminated by the system, 0 indicates unlimited (default 0)
-allow-env-function=Allow the execution of ENV function. (default false)
+allow-env-function.describe=Allow the execution of ENV function. (default false)
 	
 #buffer-manager
 useDisk.describe=Use disk for buffer management
@@ -179,3 +183,5 @@
 RuntimeEngineDeployer.execute-query.vdb-version.describe=vdb version
 RuntimeEngineDeployer.execute-query.sql-query.describe=sql query to execute
 RuntimeEngineDeployer.execute-query.timeout-in-milli.describe=timeout
+
+socket-binding.not_defined=Teiid socket binding not defined for JDBC or ODBC port.

Modified: branches/as7/jboss-integration/src/main/resources/schema/jboss-teiid.xsd
===================================================================
--- branches/as7/jboss-integration/src/main/resources/schema/jboss-teiid.xsd	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/jboss-integration/src/main/resources/schema/jboss-teiid.xsd	2011-07-11 03:06:57 UTC (rev 3305)
@@ -47,11 +47,6 @@
                     <xs:documentation>Use disk for buffer management</xs:documentation>
                 </xs:annotation>
             </xs:element>
-            <xs:element name="diskDirectory" type="xs:string" minOccurs="0" maxOccurs="1">
-                <xs:annotation>
-                    <xs:documentation>Directory location for the buffer files</xs:documentation>
-                </xs:annotation>
-            </xs:element>
             <xs:element name="processorBatchSize" type="xs:int" minOccurs="0" maxOccurs="1">
                 <xs:annotation>
                     <xs:documentation>The max row count of a batch sent internally within the query processor. Should be &lt;= the connectorBatchSize. (default 512)</xs:documentation>
@@ -103,7 +98,6 @@
                 </xs:annotation>
             </xs:element>
         </xs:sequence>
-        <xs:attribute name="enabled" type="xs:boolean" />
     </xs:complexType>
     <xs:complexType name="cache-config">
         <xs:sequence>
@@ -139,7 +133,6 @@
                 </xs:annotation>
             </xs:element>
         </xs:sequence>
-        <xs:attribute name="enabled" type="xs:boolean" default="true"/>
     </xs:complexType>
     <xs:complexType name="runtime-engine-type">
         <xs:sequence>
@@ -226,16 +219,11 @@
                     <xs:documentation>Set to true for the engine to detect local change events. Should be disabled if using external change data capture tools. (default true)</xs:documentation>
                 </xs:annotation>
             </xs:element>
-            <xs:element name="jdbc-security-domain" type="xs:string" minOccurs="0" maxOccurs="1">
+            <xs:element name="security-domain" type="xs:string" minOccurs="0" maxOccurs="1">
                 <xs:annotation>
-                    <xs:documentation>Comma separated list of domains to be used to login into Teiid using JDBC connection</xs:documentation>
+                    <xs:documentation>Comma separated list of domains to be used to login into Teiid</xs:documentation>
                 </xs:annotation>
             </xs:element>
-            <xs:element name="admin-security-domain" type="xs:string" minOccurs="0" maxOccurs="1">
-                <xs:annotation>
-                    <xs:documentation>Security domain to be used with Admin API</xs:documentation>
-                </xs:annotation>
-            </xs:element>
             <xs:element name="max-sessions-allowed" type="xs:int" minOccurs="0" maxOccurs="1">
                 <xs:annotation>
                     <xs:documentation>Maximum number of sessions allowed by the system (default 5000)</xs:documentation>
@@ -289,7 +277,6 @@
                 </xs:annotation>
             </xs:element>
         </xs:sequence>
-        <xs:attribute name="jndi-name" type="xs:string" />
     </xs:complexType>
 
     <xs:complexType name="socket-config">
@@ -322,7 +309,6 @@
                 </xs:annotation>
             </xs:element>
         </xs:sequence>
-        <xs:attribute name="enabled" type="xs:boolean" default="true"/>
     </xs:complexType>
 
     <xs:complexType name="ssl-config">

Modified: branches/as7/jboss-integration/src/test/java/org/teiid/adminapi/jboss/TestAdminObjectBuilder.java
===================================================================
--- branches/as7/jboss-integration/src/test/java/org/teiid/adminapi/jboss/TestAdminObjectBuilder.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/jboss-integration/src/test/java/org/teiid/adminapi/jboss/TestAdminObjectBuilder.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -21,27 +21,18 @@
  */
 package org.teiid.adminapi.jboss;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-import org.jboss.managed.api.ManagedObject;
-import org.jboss.managed.api.factory.ManagedObjectFactory;
-import org.jboss.managed.plugins.factory.ManagedObjectFactoryBuilder;
+import org.jboss.dmr.ModelNode;
 import org.junit.Test;
 import org.teiid.adminapi.DataPolicy;
 import org.teiid.adminapi.Model;
 import org.teiid.adminapi.Translator;
-import org.teiid.adminapi.impl.DataPolicyMetadata;
-import org.teiid.adminapi.impl.ModelMetaData;
-import org.teiid.adminapi.impl.TranslatorMetaData;
-import org.teiid.adminapi.impl.VDBMetaData;
+import org.teiid.adminapi.impl.*;
 import org.teiid.adminapi.impl.DataPolicyMetadata.PermissionMetaData;
 import org.teiid.translator.ExecutionFactory;
 
@@ -78,7 +69,7 @@
 		
 		vdb.addModel(modelTwo);
 		
-		TranslatorMetaData t1 = new TranslatorMetaData();
+		VDBTranslatorMetaData t1 = new VDBTranslatorMetaData();
 		t1.setName("oracleOverride");
 		t1.setType("oracle");
 		t1.addProperty("my-property", "my-value");
@@ -106,9 +97,8 @@
 		vdb.addDataPolicy(roleOne);
 		
 		// convert to managed object and build the VDB out of MO
-		ManagedObjectFactory mof = ManagedObjectFactoryBuilder.create();
-		ManagedObject mo = mof.initManagedObject(vdb, null, null);
-		vdb = AdminObjectBuilder.buildAO(mo, VDBMetaData.class);
+		ModelNode node = MetadataMapper.wrap(vdb, new ModelNode());
+		vdb = MetadataMapper.unwrap(node);
 		
 		assertEquals("myVDB", vdb.getName()); 
 		assertEquals("vdb description", vdb.getDescription()); 
@@ -172,19 +162,18 @@
 	
 	@Test
 	public void testTranslator() {
-		TranslatorMetaData tm = new TranslatorMetaData();
+		VDBTranslatorMetaData tm = new VDBTranslatorMetaData();
 		
 		tm.setExecutionFactoryClass(ExecutionFactory.class);
 		tm.setName("Oracle");
 		tm.addProperty("ExtensionTranslationClassName", "org.teiid.translator.jdbc.oracle.OracleSQLTranslator");
 		
 		// convert to managed object and build the VDB out of MO
-		ManagedObjectFactory mof = ManagedObjectFactoryBuilder.create();
-		ManagedObject mo = mof.initManagedObject(tm, null, null);
-		tm = AdminObjectBuilder.buildAO(mo, TranslatorMetaData.class);
+		ModelNode node = MetadataMapper.VDBTranslatorMetaDataMapper.wrap(tm, new ModelNode());
+		VDBTranslatorMetaData tm1 = MetadataMapper.VDBTranslatorMetaDataMapper.unwrap(node);
 		
-		assertEquals("Oracle", tm.getName());
-		assertEquals(ExecutionFactory.class.getName(), tm.getPropertyValue(Translator.EXECUTION_FACTORY_CLASS));
-		assertEquals("org.teiid.translator.jdbc.oracle.OracleSQLTranslator", tm.getPropertyValue("ExtensionTranslationClassName"));		
+		assertEquals("Oracle", tm1.getName());
+		assertEquals(ExecutionFactory.class.getName(), tm1.getPropertyValue(Translator.EXECUTION_FACTORY_CLASS));
+		assertEquals("org.teiid.translator.jdbc.oracle.OracleSQLTranslator", tm1.getPropertyValue("ExtensionTranslationClassName"));		
 	}
 }

Modified: branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidConfiguration.java
===================================================================
--- branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidConfiguration.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidConfiguration.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -27,9 +27,9 @@
 
 import java.io.*;
 import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
+import java.util.*;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLInputFactory;
@@ -44,19 +44,22 @@
 import junit.framework.Assert;
 
 import org.jboss.as.controller.*;
-import org.jboss.as.controller.client.OperationBuilder;
 import org.jboss.as.controller.descriptions.DescriptionProvider;
 import org.jboss.as.controller.descriptions.common.CommonProviders;
+import org.jboss.as.controller.operations.common.Util;
 import org.jboss.as.controller.operations.global.GlobalOperationHandlers;
 import org.jboss.as.controller.persistence.ConfigurationPersistenceException;
 import org.jboss.as.controller.persistence.ConfigurationPersister;
 import org.jboss.as.controller.persistence.SubsystemMarshallingContext;
-import org.jboss.as.controller.registry.ModelNodeRegistration;
+import org.jboss.as.controller.registry.ManagementResourceRegistration;
+import org.jboss.as.controller.registry.Resource;
 import org.jboss.dmr.ModelNode;
 import org.jboss.dmr.ModelType;
 import org.jboss.dmr.Property;
+import org.jboss.msc.service.*;
 import org.jboss.staxmapper.XMLElementWriter;
 import org.jboss.staxmapper.XMLMapper;
+import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.teiid.core.util.ObjectConverterUtil;
@@ -66,6 +69,12 @@
 
 @SuppressWarnings("nls")
 public class TestTeiidConfiguration {
+    static final DescriptionProvider NULL_PROVIDER = new DescriptionProvider() {
+        @Override
+        public ModelNode getModelDescription(final Locale locale) {
+            return new ModelNode();
+        }
+    };	
     static ModelNode profileAddress = new ModelNode();
     static {
         profileAddress.add("profile", "test");
@@ -109,7 +118,7 @@
         assertEquals(1, updates.size());
         for (ModelNode update : updates) {
             try {
-                controller.executeForResult(update);
+                executeForResult(update);
             } catch (OperationFailedException e) {
                 throw new RuntimeException(e.getFailureDescription().toString());
             }
@@ -121,38 +130,59 @@
         assertEquals("true", bufferService.require("useDisk").asString());
     }	
     
+    @Test
+    public void testSimpleTeiidConfiguration() throws Exception {
+        List<ModelNode> updates = createSubSystem("<subsystem xmlns=\"urn:jboss:domain:teiid:1.0\">" +
+        		" <query-engine jndi-name=\"teiid/engine-deployer\">" +
+        		" </query-engine>" +
+        		"</subsystem>");
+        assertEquals(1, updates.size());
+        for (ModelNode update : updates) {
+            try {
+                executeForResult(update);
+            } catch (OperationFailedException e) {
+                throw new RuntimeException(e.getFailureDescription().toString());
+            }
+        }
+
+        ModelNode subsystem = model.require("profile").require("test").require("subsystem").require("teiid");
+    }    
     
+    
     private ModelNode model;
-    private TestController controller;
+
+    private ServiceContainer container;
+    private ModelController controller;
+
     @Before
-    public void setup() throws Exception {
-        model = new ModelNode();
-        controller = new TestController();
-        model.get("profile", "test", "subsystem");
+    public void setupController() throws InterruptedException {
+        container = ServiceContainer.Factory.create("test");
+        ServiceTarget target = container.subTarget();
+        ControlledProcessState processState = new ControlledProcessState(true);
+        ModelControllerService svc = new ModelControllerService(container, processState);
+        ServiceBuilder<ModelController> builder = target.addService(ServiceName.of("ModelController"), svc);
+        builder.install();
+        svc.latch.await();
+        controller = svc.getValue();
+        ModelNode setup = Util.getEmptyOperation("setup", new ModelNode());
+        controller.execute(setup, null, null, null);
+        processState.setRunning();
+    }
 
-        final ModelNodeRegistration testProfileRegistration = controller.getRegistry().registerSubModel(PathElement.pathElement("profile", "*"), new DescriptionProvider() {
-
-            @Override
-            public ModelNode getModelDescription(Locale locale) {
-                ModelNode node = new ModelNode();
-                node.get(DESCRIPTION).set("A named set of subsystem configs");
-                node.get(ATTRIBUTES, NAME, TYPE).set(ModelType.STRING);
-                node.get(ATTRIBUTES, NAME, DESCRIPTION).set("The name of the profile");
-                node.get(ATTRIBUTES, NAME, REQUIRED).set(true);
-                node.get(ATTRIBUTES, NAME, MIN_LENGTH).set(1);
-                node.get(CHILDREN, SUBSYSTEM, DESCRIPTION).set("The subsystems that make up the profile");
-                node.get(CHILDREN, SUBSYSTEM, MIN_OCCURS).set(1);
-                node.get(CHILDREN, SUBSYSTEM, MODEL_DESCRIPTION);
-                return node;
+    @After
+    public void shutdownServiceContainer() {
+        if (container != null) {
+            container.shutdown();
+            try {
+                container.awaitTermination(5, TimeUnit.SECONDS);
+            } catch (InterruptedException e) {
+                e.printStackTrace();
             }
-        });
-
-        TestNewExtensionContext context = new TestNewExtensionContext(testProfileRegistration);
-        TeiidExtension extension = new TeiidExtension();
-        extension.initialize(context);
-        Assert.assertNotNull(context.createdRegistration);
-
-    }      
+            finally {
+                container = null;
+            }
+        }
+    }     
 	
     static List<ModelNode> createSubSystem(String xmlContent) throws XMLStreamException {
 
@@ -179,10 +209,10 @@
     }	
     
     static class TestNewExtensionContext implements ExtensionContext {
-        final ModelNodeRegistration testProfileRegistration;
-        ModelNodeRegistration createdRegistration;
+        final ManagementResourceRegistration testProfileRegistration;
+        ManagementResourceRegistration createdRegistration;
 
-        TestNewExtensionContext(ModelNodeRegistration testProfileRegistration) {
+        TestNewExtensionContext(ManagementResourceRegistration testProfileRegistration) {
             this.testProfileRegistration = testProfileRegistration;
         }
 
@@ -190,7 +220,7 @@
         public SubsystemRegistration registerSubsystem(final String name) throws IllegalArgumentException {
             return new SubsystemRegistration() {
                 @Override
-                public ModelNodeRegistration registerSubsystemModel(final DescriptionProvider descriptionProvider) {
+                public ManagementResourceRegistration registerSubsystemModel(final DescriptionProvider descriptionProvider) {
                     if (descriptionProvider == null) {
                         throw new IllegalArgumentException("descriptionProvider is null");
                     }
@@ -200,7 +230,7 @@
                 }
 
                 @Override
-                public ModelNodeRegistration registerDeploymentModel(final DescriptionProvider descriptionProvider) {
+                public ManagementResourceRegistration registerDeploymentModel(final DescriptionProvider descriptionProvider) {
                     throw new IllegalStateException("Not implemented");
                 }
 
@@ -212,69 +242,134 @@
         }
     }
     
-    class TestController extends BasicModelController {
+    private static final DescriptionProvider profileDescriptionProvider = new DescriptionProvider() {
 
-        protected TestController() {
-            super(model, new ConfigurationPersister() {
+        @Override
+        public ModelNode getModelDescription(Locale locale) {
+            ModelNode node = new ModelNode();
+            node.get(DESCRIPTION).set("A named set of subsystem configs");
+            node.get(ATTRIBUTES, NAME, TYPE).set(ModelType.STRING);
+            node.get(ATTRIBUTES, NAME, DESCRIPTION).set("The name of the profile");
+            node.get(ATTRIBUTES, NAME, REQUIRED).set(true);
+            node.get(ATTRIBUTES, NAME, MIN_LENGTH).set(1);
+            node.get(CHILDREN, SUBSYSTEM, DESCRIPTION).set("The subsystems that make up the profile");
+            node.get(CHILDREN, SUBSYSTEM, MIN_OCCURS).set(1);
+            node.get(CHILDREN, SUBSYSTEM, MODEL_DESCRIPTION);
+            return node;
+        }
+    };    
+    
+    public class ModelControllerService extends AbstractControllerService {
+
+        private final CountDownLatch latch = new CountDownLatch(1);
+
+        ModelControllerService(final ServiceContainer serviceContainer, final ControlledProcessState processState) {
+            super(OperationContext.Type.SERVER, new TestConfigurationPersister(), processState, NULL_PROVIDER, null);
+        }
+
+        @Override
+        public void start(StartContext context) throws StartException {
+            super.start(context);
+            latch.countDown();
+        }
+        
+        protected void finishBoot() throws ConfigurationPersistenceException {
+//            controller.finshBoot();
+//            configurationPersister.successfulBoot();
+        }        
+
+        protected void initModel(Resource rootResource, ManagementResourceRegistration rootRegistration) {
+            rootRegistration.registerOperationHandler(READ_RESOURCE_OPERATION, GlobalOperationHandlers.READ_RESOURCE, CommonProviders.READ_RESOURCE_PROVIDER, true);
+            rootRegistration.registerOperationHandler(READ_ATTRIBUTE_OPERATION, GlobalOperationHandlers.READ_ATTRIBUTE, CommonProviders.READ_ATTRIBUTE_PROVIDER, true);
+            rootRegistration.registerOperationHandler(READ_RESOURCE_DESCRIPTION_OPERATION, GlobalOperationHandlers.READ_RESOURCE_DESCRIPTION, CommonProviders.READ_RESOURCE_DESCRIPTION_PROVIDER, true);
+            rootRegistration.registerOperationHandler(READ_CHILDREN_NAMES_OPERATION, GlobalOperationHandlers.READ_CHILDREN_NAMES, CommonProviders.READ_CHILDREN_NAMES_PROVIDER, true);
+            rootRegistration.registerOperationHandler(READ_CHILDREN_TYPES_OPERATION, GlobalOperationHandlers.READ_CHILDREN_TYPES, CommonProviders.READ_CHILDREN_TYPES_PROVIDER, true);
+            rootRegistration.registerOperationHandler(READ_CHILDREN_RESOURCES_OPERATION, GlobalOperationHandlers.READ_CHILDREN_RESOURCES, CommonProviders.READ_CHILDREN_RESOURCES_PROVIDER, true);
+            rootRegistration.registerOperationHandler(READ_OPERATION_NAMES_OPERATION, GlobalOperationHandlers.READ_OPERATION_NAMES, CommonProviders.READ_OPERATION_NAMES_PROVIDER, true);
+            rootRegistration.registerOperationHandler(READ_OPERATION_DESCRIPTION_OPERATION, GlobalOperationHandlers.READ_OPERATION_DESCRIPTION, CommonProviders.READ_OPERATION_PROVIDER, true);
+            rootRegistration.registerOperationHandler(WRITE_ATTRIBUTE_OPERATION, GlobalOperationHandlers.WRITE_ATTRIBUTE, CommonProviders.WRITE_ATTRIBUTE_PROVIDER, true);
+
+            rootRegistration.registerOperationHandler("setup", new OperationStepHandler() {
                 @Override
-                public void store(ModelNode model) throws ConfigurationPersistenceException {
+                public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
+                    context.createResource(PathAddress.EMPTY_ADDRESS.append(PathElement.pathElement("profile", "test")));
+                    context.completeStep();
                 }
+            }, new DescriptionProvider() {
                 @Override
-                public void marshallAsXml(ModelNode model, OutputStream output) throws ConfigurationPersistenceException {
+                public ModelNode getModelDescription(Locale locale) {
+                    return new ModelNode();
                 }
+            });
+
+            ManagementResourceRegistration profileRegistration = rootRegistration.registerSubModel(PathElement.pathElement("profile"), profileDescriptionProvider);
+            TestNewExtensionContext context = new TestNewExtensionContext(profileRegistration);
+            TeiidExtension extension = new TeiidExtension();
+            extension.initialize(context);
+            Assert.assertNotNull(context.createdRegistration);
+        }
+
+    }
+
+    private class TestConfigurationPersister implements ConfigurationPersister{
+
+        @Override
+        public PersistenceResource store(final ModelNode model, Set<PathAddress> affectedAddresses) throws ConfigurationPersistenceException {
+            return new PersistenceResource() {
                 @Override
-                public List<ModelNode> load() throws ConfigurationPersistenceException {
-                    return null;
+                public void commit() {
+                	TestTeiidConfiguration.this.model = model;
                 }
+
                 @Override
-                public void successfulBoot() throws ConfigurationPersistenceException {
+                public void rollback() {
                 }
-                @Override
-                public String snapshot() {
-                    return null;
-                }
-                @Override
-                public SnapshotInfo listSnapshots() {
-                    return NULL_SNAPSHOT_INFO;
-                }
-                @Override
-                public void deleteSnapshot(String name) {
-                }
-            }, new DescriptionProvider() {
-                @Override
-                public ModelNode getModelDescription(Locale locale) {
-                    ModelNode node = new ModelNode();
-                    node.get(DESCRIPTION).set("The root node of the test management API");
-                    node.get(CHILDREN, PROFILE, DESCRIPTION).set("A list of profiles");
-                    node.get(CHILDREN, PROFILE, MIN_OCCURS).set(1);
-                    node.get(CHILDREN, PROFILE, MODEL_DESCRIPTION);
-                    return node;
-                }
-            });
+            };
+        }
 
-            getRegistry().registerOperationHandler(READ_RESOURCE_DESCRIPTION_OPERATION, GlobalOperationHandlers.READ_RESOURCE_DESCRIPTION, CommonProviders.READ_RESOURCE_DESCRIPTION_PROVIDER, true);
+        @Override
+        public void marshallAsXml(ModelNode model, OutputStream output) throws ConfigurationPersistenceException {
         }
 
         @Override
-        protected ModelNodeRegistration getRegistry() {
-            return super.getRegistry();
+        public List<ModelNode> load() throws ConfigurationPersistenceException {
+            return Collections.emptyList();
         }
 
-        /**
-         * Override to get the actual result from the response.
-         */
-        public ModelNode executeForResult(ModelNode operation) throws OperationFailedException {
-            ModelNode rsp = super.execute(OperationBuilder.Factory.create(operation).build());
-            if (FAILED.equals(rsp.get(OUTCOME).asString())) {
-                throw new OperationFailedException(rsp.get(FAILURE_DESCRIPTION));
-            }
-            return rsp.get(RESULT);
+        @Override
+        public void successfulBoot() throws ConfigurationPersistenceException {
         }
+
+        @Override
+        public String snapshot() {
+            return null;
+        }
+
+        @Override
+        public SnapshotInfo listSnapshots() {
+            return NULL_SNAPSHOT_INFO;
+        }
+
+        @Override
+        public void deleteSnapshot(String name) {
+        }
     }
+
+    /**
+     * Override to get the actual result from the response.
+     */
+    public ModelNode executeForResult(ModelNode operation) throws OperationFailedException {
+        ModelNode rsp = controller.execute(operation, null, null, null);
+        if (FAILED.equals(rsp.get(OUTCOME).asString())) {
+            throw new OperationFailedException(rsp.get(FAILURE_DESCRIPTION));
+        }
+        return rsp.get(RESULT);
+    }
     
     @Test
     public void testSubSystemDescription() throws IOException {
-    	QueryEngineDescription tsd = new QueryEngineDescription();
-    	assertEquals(ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-model-config.txt")), tsd.getModelDescription(null).toString());
+    	ModelNode node = new ModelNode();
+    	QueryEngineDescription.getQueryEngineDescription(node, ATTRIBUTES, IntegrationPlugin.getResourceBundle(null));
+    	assertEquals(ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-model-config.txt")), node.toString());
     }
 }

Modified: branches/as7/jboss-integration/src/test/resources/teiid-model-config.txt
===================================================================
--- branches/as7/jboss-integration/src/test/resources/teiid-model-config.txt	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/jboss-integration/src/test/resources/teiid-model-config.txt	2011-07-11 03:06:57 UTC (rev 3305)
@@ -1,678 +1,550 @@
 {
-    "description" => "teiid subsystem",
-    "head-comment-allowed" => true,
-    "tail-comment-allowed" => true,
-    "namespace" => "urn:jboss:domain:teiid:1.0",
-    "children" => {"query-engine" => {
-        "attributes" => {
-            "jndi-name" => {
-                "type" => STRING,
-                "description" => "JNDI name of the Teiid Query Engine",
-                "required" => true,
-                "max-occurs" => 1,
-                "default" => "teiid/engine-deployer"
-            },
-            "maxThreads" => {
-                "type" => INT,
-                "description" => "Process pool maximum thread count. (default 64)",
-                "required" => false,
-                "max-occurs" => 1,
-                "default" => 64
-            },
-            "maxActivePlans" => {
-                "type" => INT,
-                "description" => "Max active plans (default 20).  Increase this value on highly concurrent systems - but ensure that the underlying pools can handle the increased load without timeouts.",
-                "required" => false,
-                "max-occurs" => 1,
-                "default" => 20
-            },
-            "userRequestSourceConcurrency" => {
-                "type" => INT,
-                "description" => "Max source query concurrency per user request (default 0).  0 indicates use the default calculated value based on max active plans and max threads - approximately 2*(max threads)/(max active plans).   ",
-                "required" => false,
-                "max-occurs" => 1,
-                "default" => 0
-            },
-            "timeSliceInMilli" => {
-                "type" => INT,
-                "description" => "Query processor time slice, in milliseconds. (default 2000)",
-                "required" => false,
-                "max-occurs" => 1,
-                "default" => 2000
-            },
-            "maxRowsFetchSize" => {
-                "type" => INT,
-                "description" => "Maximum allowed fetch size, set via JDBC. User requested value ignored above this value. (default 20480)",
-                "required" => false,
-                "max-occurs" => 1,
-                "default" => 20480
-            },
-            "lobChunkSizeInKB" => {
-                "type" => INT,
-                "description" => "The max lob chunk size in KB transferred each time when processing blobs, clobs (100KB default)",
-                "required" => false,
-                "max-occurs" => 1,
-                "default" => 100
-            },
-            "useDataRoles" => {
-                "type" => BOOLEAN,
-                "description" => "Turn on role checking based upon the data roles defined in VDBs. (default true)",
-                "required" => false,
-                "max-occurs" => 1,
-                "default" => true
-            },
-            "allowCreateTemporaryTablesByDefault" => {
-                "type" => BOOLEAN,
-                "description" => "Sets whether temporary table usage is allowed by default with data roles enabled. If false, the user must have a role that grants creates temporary table rights to use temporary tables. (default true)",
-                "required" => false,
-                "max-occurs" => 1,
-                "default" => true
-            },
-            "allowFunctionCallsByDefault" => {
-                "type" => BOOLEAN,
-                "description" => "Sets whether functions may be called by default with data roles enabled. If false, a specific permission must exist to call the function. (default true)",
-                "required" => false,
-                "max-occurs" => 1,
-                "default" => true
-            },
-            "queryThresholdInSecs" => {
-                "type" => INT,
-                "description" => "Long running query threshold, after which a alert can be generated by tooling if configured",
-                "required" => false,
-                "max-occurs" => 1,
-                "default" => 600
-            },
-            "maxSourceRows" => {
-                "type" => INT,
-                "description" => "Maximum rows allowed from a source query. -1 indicates no limit. (default -1)",
-                "required" => false,
-                "max-occurs" => 1,
-                "default" => -1
-            },
-            "exceptionOnMaxSourceRows" => {
-                "type" => BOOLEAN,
-                "description" => "Indicates if an exception should be thrown if the specified value for Maximum Source Rows is exceeded; only up to the maximum rows will be consumed. (default true)",
-                "required" => false,
-                "max-occurs" => 1,
-                "default" => true
-            },
-            "maxODBCLobSizeAllowed" => {
-                "type" => INT,
-                "description" => "Maximum size of lob allowed through ODBC connection in bytes (default 5MB)",
-                "required" => false,
-                "max-occurs" => 1,
-                "default" => 5242880
-            },
-            "eventDistributorName" => {
-                "type" => STRING,
-                "description" => "The JNDI name of the Teiid Event Distributor",
-                "required" => false,
-                "max-occurs" => 1,
-                "default" => "teiid/event-distributor"
-            },
-            "detectingChangeEvents" => {
-                "type" => BOOLEAN,
-                "description" => "Set to true for the engine to detect local change events. Should be disabled if using external change data capture tools. (default true)",
-                "required" => false,
-                "max-occurs" => 1,
-                "default" => true
-            },
-            "jdbc-security-domain" => {
-                "type" => STRING,
-                "description" => "Comma separated list of domains to be used to login into Teiid using JDBC connection",
-                "required" => false,
-                "max-occurs" => 1
-            },
-            "admin-security-domain" => {
-                "type" => STRING,
-                "description" => "security domain to be used with Admin API (please do not change this, as this should be same as profile service)",
-                "required" => false,
-                "max-occurs" => 1
-            },
-            "max-sessions-allowed" => {
-                "type" => INT,
-                "description" => "Maximum number of sessions allowed by the system (default 5000)",
-                "required" => false,
-                "max-occurs" => 1,
-                "default" => 5000
-            },
-            "sessions-expiration-timelimit" => {
-                "type" => INT,
-                "description" => "Max allowed time before the session is terminated by the system, 0 indicates unlimited (default 0)",
-                "required" => false,
-                "max-occurs" => 1,
-                "default" => 0
-            },
-            "allow-env-function" => {
-                "type" => BOOLEAN,
-                "description" => "Allow the execution of ENV function. (default false)",
-                "required" => false,
-                "max-occurs" => 1,
-                "default" => false
-            }            
+    "attributes" => {
+        "jndi-name" => {
+            "type" => STRING,
+            "description" => "JNDI name of the Teiid Query Engine",
+            "required" => true,
+            "max-occurs" => 1,
+            "default" => "teiid/engine-deployer"
         },
-        "children" => {
-            "buffer-service" => {
-                "type" => OBJECT,
-                "description" => "Buffer Manager Configuration",
-                "required" => false,
-                "max-occurs" => 1,
-                "min-occurs" => 1,
-                "attributes" => {
-                    "useDisk" => {
-                        "type" => BOOLEAN,
-                        "description" => "Use disk for buffer management",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => true
-                    },
-                    "diskDirectory" => {
-                        "type" => STRING,
-                        "description" => "Directory location for the buffer files",
-                        "required" => true,
-                        "max-occurs" => 1
-                    },
-                    "processorBatchSize" => {
-                        "type" => INT,
-                        "description" => "The max row count of a batch sent internally within the query processor. Should be <= the connectorBatchSize. (default 512)",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 512
-                    },
-                    "connectorBatchSize" => {
-                        "type" => INT,
-                        "description" => "The max row count of a batch from a connector. Should be even multiple of processorBatchSize. (default 1024)",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 1024
-                    },
-                    "maxReserveBatchColumns" => {
-                        "type" => INT,
-                        "description" => "The number of batch columns to allow in buffer memory. -1 means to automatically calculate a value (default -1). See the admin guide for more.",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => -1
-                    },
-                    "maxProcessingBatchesColumns" => {
-                        "type" => INT,
-                        "description" => "The number of batch columns guaranteed to a processing operation. -1 means to automatically calculate a value (default -1). See the admin guide for more.",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => -1
-                    },
-                    "maxFileSize" => {
-                        "type" => INT,
-                        "description" => "Max File size in MB (default 2GB)",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 2048
-                    },
-                    "maxBufferSpace" => {
-                        "type" => INT,
-                        "description" => "Max storage space, in MB, to be used for buffer files (default 50G)",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 51200
-                    },
-                    "maxOpenFiles" => {
-                        "type" => INT,
-                        "description" => "Max open buffer files (default 64)",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 64
-                    }
+        "thread-group-async" => {
+            "type" => STRING,
+            "description" => "Thread Pool to be used with Asynchronous operations in Teiid",
+            "required" => false,
+            "max-occurs" => 1,
+            "default" => "teiid-async"
+        },
+        "maxThreads" => {
+            "type" => INT,
+            "description" => "Process pool maximum thread count. (default 64)",
+            "required" => false,
+            "max-occurs" => 1,
+            "default" => 64
+        },
+        "maxActivePlans" => {
+            "type" => INT,
+            "description" => "Max active plans (default 20).  Increase this value on highly concurrent systems - but ensure that the underlying pools can handle the increased load without timeouts.",
+            "required" => false,
+            "max-occurs" => 1,
+            "default" => 20
+        },
+        "userRequestSourceConcurrency" => {
+            "type" => INT,
+            "description" => "Max source query concurrency per user request (default 0).  0 indicates use the default calculated value based on max active plans and max threads - approximately 2*(max threads)/(max active plans).   ",
+            "required" => false,
+            "max-occurs" => 1,
+            "default" => 0
+        },
+        "timeSliceInMilli" => {
+            "type" => INT,
+            "description" => "Query processor time slice, in milliseconds. (default 2000)",
+            "required" => false,
+            "max-occurs" => 1,
+            "default" => 2000
+        },
+        "maxRowsFetchSize" => {
+            "type" => INT,
+            "description" => "Maximum allowed fetch size, set via JDBC. User requested value ignored above this value. (default 20480)",
+            "required" => false,
+            "max-occurs" => 1,
+            "default" => 20480
+        },
+        "lobChunkSizeInKB" => {
+            "type" => INT,
+            "description" => "The max lob chunk size in KB transferred each time when processing blobs, clobs (100KB default)",
+            "required" => false,
+            "max-occurs" => 1,
+            "default" => 100
+        },
+        "useDataRoles" => {
+            "type" => BOOLEAN,
+            "description" => "Turn on role checking based upon the data roles defined in VDBs. (default true)",
+            "required" => false,
+            "max-occurs" => 1,
+            "default" => true
+        },
+        "allowCreateTemporaryTablesByDefault" => {
+            "type" => BOOLEAN,
+            "description" => "Sets whether temporary table usage is allowed by default with data roles enabled. If false, the user must have a role that grants creates temporary table rights to use temporary tables. (default true)",
+            "required" => false,
+            "max-occurs" => 1,
+            "default" => true
+        },
+        "allowFunctionCallsByDefault" => {
+            "type" => BOOLEAN,
+            "description" => "Sets whether functions may be called by default with data roles enabled. If false, a specific permission must exist to call the function. (default true)",
+            "required" => false,
+            "max-occurs" => 1,
+            "default" => true
+        },
+        "queryThresholdInSecs" => {
+            "type" => INT,
+            "description" => "Long running query threshold, after which a alert can be generated by tooling if configured",
+            "required" => false,
+            "max-occurs" => 1,
+            "default" => 600
+        },
+        "maxSourceRows" => {
+            "type" => INT,
+            "description" => "Maximum rows allowed from a source query. -1 indicates no limit. (default -1)",
+            "required" => false,
+            "max-occurs" => 1,
+            "default" => -1
+        },
+        "exceptionOnMaxSourceRows" => {
+            "type" => BOOLEAN,
+            "description" => "Indicates if an exception should be thrown if the specified value for Maximum Source Rows is exceeded; only up to the maximum rows will be consumed. (default true)",
+            "required" => false,
+            "max-occurs" => 1,
+            "default" => true
+        },
+        "maxODBCLobSizeAllowed" => {
+            "type" => INT,
+            "description" => "Maximum size of lob allowed through ODBC connection in bytes (default 5MB)",
+            "required" => false,
+            "max-occurs" => 1,
+            "default" => 5242880
+        },
+        "eventDistributorName" => {
+            "type" => STRING,
+            "description" => "The JNDI name of the Teiid Event Distributor",
+            "required" => false,
+            "max-occurs" => 1,
+            "default" => "teiid/event-distributor"
+        },
+        "detectingChangeEvents" => {
+            "type" => BOOLEAN,
+            "description" => "Set to true for the engine to detect local change events. Should be disabled if using external change data capture tools. (default true)",
+            "required" => false,
+            "max-occurs" => 1,
+            "default" => true
+        },
+        "security-domain" => {
+            "type" => STRING,
+            "description" => "Comma separated list of domains to be used to login into Teiid",
+            "required" => false,
+            "max-occurs" => 1
+        },
+        "max-sessions-allowed" => {
+            "type" => INT,
+            "description" => "Maximum number of sessions allowed by the system (default 5000)",
+            "required" => false,
+            "max-occurs" => 1,
+            "default" => 5000
+        },
+        "sessions-expiration-timelimit" => {
+            "type" => INT,
+            "description" => "Max allowed time before the session is terminated by the system, 0 indicates unlimited (default 0)",
+            "required" => false,
+            "max-occurs" => 1,
+            "default" => 0
+        },
+        "allow-env-function" => {
+            "type" => BOOLEAN,
+            "description" => "Allow the execution of ENV function. (default false)",
+            "required" => false,
+            "max-occurs" => 1,
+            "default" => false
+        }
+    },
+    "children" => {
+        "buffer-service" => {
+            "type" => OBJECT,
+            "description" => "Buffer Manager Configuration",
+            "required" => false,
+            "max-occurs" => 1,
+            "min-occurs" => 1,
+            "attributes" => {
+                "useDisk" => {
+                    "type" => BOOLEAN,
+                    "description" => "Use disk for buffer management",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => true
+                },
+                "diskDirectory" => {
+                    "type" => STRING,
+                    "description" => "Directory location for the buffer files",
+                    "required" => true,
+                    "max-occurs" => 1
+                },
+                "processorBatchSize" => {
+                    "type" => INT,
+                    "description" => "The max row count of a batch sent internally within the query processor. Should be <= the connectorBatchSize. (default 512)",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => 512
+                },
+                "connectorBatchSize" => {
+                    "type" => INT,
+                    "description" => "The max row count of a batch from a connector. Should be even multiple of processorBatchSize. (default 1024)",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => 1024
+                },
+                "maxReserveBatchColumns" => {
+                    "type" => INT,
+                    "description" => "The number of batch columns to allow in buffer memory. -1 means to automatically calculate a value (default -1). See the admin guide for more.",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => -1
+                },
+                "maxProcessingBatchesColumns" => {
+                    "type" => INT,
+                    "description" => "The number of batch columns guaranteed to a processing operation. -1 means to automatically calculate a value (default -1). See the admin guide for more.",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => -1
+                },
+                "maxFileSize" => {
+                    "type" => INT,
+                    "description" => "Max File size in MB (default 2GB)",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => 2048
+                },
+                "maxBufferSpace" => {
+                    "type" => INT,
+                    "description" => "Max storage space, in MB, to be used for buffer files (default 50G)",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => 51200
+                },
+                "maxOpenFiles" => {
+                    "type" => INT,
+                    "description" => "Max open buffer files (default 64)",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => 64
                 }
-            },
-            "resultset-cache" => {
-                "type" => OBJECT,
-                "description" => "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",
-                "required" => false,
-                "max-occurs" => 1,
-                "min-occurs" => 1,
-                "attributes" => {
-                    "enabled" => {
-                        "type" => BOOLEAN,
-                        "description" => "enabled",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => true
-                    },
-                    "maxEntries" => {
-                        "type" => INT,
-                        "description" => "Max Entries allowed",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 1024
-                    },
-                    "maxAgeInSeconds" => {
-                        "type" => INT,
-                        "description" => "Max age in seconds",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 7200
-                    },
-                    "maxStaleness" => {
-                        "type" => INT,
-                        "description" => "Max staleness in seconds.  Modifications are based upon data updates -1 indicates no max. (default 60 - 1 minute)",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 60
-                    },
-                    "type" => {
-                        "type" => STRING,
-                        "description" => "Allowed values are LRU, EXPIRATION.   ",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => "EXPIRATION"
-                    },
-                    "location" => {
-                        "type" => STRING,
-                        "description" => "location",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => "resultset"
-                    }
+            }
+        },
+        "resultset-cache" => {
+            "type" => OBJECT,
+            "description" => "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",
+            "required" => false,
+            "max-occurs" => 1,
+            "min-occurs" => 1,
+            "attributes" => {
+                "maxEntries" => {
+                    "type" => INT,
+                    "description" => "Max Entries allowed",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => 1024
+                },
+                "maxAgeInSeconds" => {
+                    "type" => INT,
+                    "description" => "Max age in seconds",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => 7200
+                },
+                "maxStaleness" => {
+                    "type" => INT,
+                    "description" => "Max staleness in seconds.  Modifications are based upon data updates -1 indicates no max. (default 60 - 1 minute)",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => 60
+                },
+                "type" => {
+                    "type" => STRING,
+                    "description" => "Allowed values are LRU, EXPIRATION.   ",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => "EXPIRATION"
+                },
+                "location" => {
+                    "type" => STRING,
+                    "description" => "location",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => "resultset"
                 }
-            },
-            "preparedplan-cache" => {
-                "type" => OBJECT,
-                "description" => "PreparedPlan Cache Configuration",
-                "required" => false,
-                "max-occurs" => 1,
-                "min-occurs" => 1,
-                "attributes" => {
-                    "enabled" => {
-                        "type" => BOOLEAN,
-                        "description" => "enabled",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => true
-                    },
-                    "maxEntries" => {
-                        "type" => INT,
-                        "description" => "Max Entries allowed",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 1024
-                    },
-                    "maxAgeInSeconds" => {
-                        "type" => INT,
-                        "description" => "Max age in seconds",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 7200
-                    },
-                    "maxStaleness" => {
-                        "type" => INT,
-                        "description" => "Max staleness in seconds.  Modifications are based upon data updates -1 indicates no max. (default 60 - 1 minute)",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 60
-                    },
-                    "type" => {
-                        "type" => STRING,
-                        "description" => "Allowed values are LRU, EXPIRATION.   ",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => "EXPIRATION"
-                    },
-                    "location" => {
-                        "type" => STRING,
-                        "description" => "location",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => "resultset"
-                    },
-                    "cache-service-jndi-name" => {
-                        "type" => STRING,
-                        "description" => "cache service for the distributed cache",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => "java:TeiidCacheManager"
-                    },
-                    "resultsetCacheName" => {
-                        "type" => STRING,
-                        "description" => "resultset cache node name",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => "teiid-resultset-cache"
-                    }
+            }
+        },
+        "preparedplan-cache" => {
+            "type" => OBJECT,
+            "description" => "PreparedPlan Cache Configuration",
+            "required" => false,
+            "max-occurs" => 1,
+            "min-occurs" => 1,
+            "attributes" => {
+                "maxEntries" => {
+                    "type" => INT,
+                    "description" => "Max Entries allowed",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => 1024
+                },
+                "maxAgeInSeconds" => {
+                    "type" => INT,
+                    "description" => "Max age in seconds",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => 7200
+                },
+                "maxStaleness" => {
+                    "type" => INT,
+                    "description" => "Max staleness in seconds.  Modifications are based upon data updates -1 indicates no max. (default 60 - 1 minute)",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => 60
+                },
+                "type" => {
+                    "type" => STRING,
+                    "description" => "Allowed values are LRU, EXPIRATION.   ",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => "EXPIRATION"
+                },
+                "location" => {
+                    "type" => STRING,
+                    "description" => "location",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => "resultset"
+                },
+                "cache-service-jndi-name" => {
+                    "type" => STRING,
+                    "description" => "cache service for the distributed cache",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => "java:TeiidCacheManager"
+                },
+                "resultsetCacheName" => {
+                    "type" => STRING,
+                    "description" => "resultset cache node name",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => "teiid-resultset-cache"
                 }
-            },
-            "distributed-cache-factory" => {
-                "type" => OBJECT,
-                "description" => "Distributed Cache Configuration",
-                "required" => false,
-                "max-occurs" => 1,
-                "min-occurs" => 1
-            },
-            "jdbc" => {
-                "type" => OBJECT,
-                "description" => "Remote JDBC Access Configuration ",
-                "required" => false,
-                "max-occurs" => 1,
-                "min-occurs" => 1,
-                "attributes" => {
-                    "enabled" => {
-                        "type" => BOOLEAN,
-                        "description" => "enabled",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => true
-                    },
-                    "maxSocketThreads" => {
-                        "type" => INT,
-                        "description" => "Max number of threads dedicated to initial request processing. Zero indicates the system default of max available processors. (default 0)  Setting this value above the max available processors is not recommended.",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 0
-                    },
-                    "inputBufferSize" => {
-                        "type" => INT,
-                        "description" => "SO_RCVBUF size, 0 indicates that system default should be used (default 0)",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 0
-                    },
-                    "outputBufferSize" => {
-                        "type" => INT,
-                        "description" => "SO_SNDBUF size, 0 indicates that system default should be used (default 0)",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 0
-                    },
-                    "socket-binding" => {
-                        "type" => INT,
-                        "description" => "Socket binding for the profile",
-                        "required" => true,
-                        "max-occurs" => 1
-                    },
-                    "mode" => {
-                        "type" => STRING,
-                        "description" => "can be one of disabled, login, or enabled disabled = no transport or message level security will be used; login = only the login traffic will be encrypted at a message level using 128 bit AES with an ephemerial DH key exchange. No other config values are needed in this mode; enabled = traffic will be secured using this configuration.",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => "login"
-                    },
-                    "keystoreFilename" => {
-                        "type" => STRING,
-                        "description" => "Keystore File Name",
-                        "required" => false,
-                        "max-occurs" => 1
-                    },
-                    "keystorePassword" => {
-                        "type" => STRING,
-                        "description" => "Keystore password",
-                        "required" => false,
-                        "max-occurs" => 1
-                    },
-                    "keystoreType" => {
-                        "type" => STRING,
-                        "description" => "Keystore type",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => "JKS"
-                    },
-                    "sslProtocol" => {
-                        "type" => BOOLEAN,
-                        "description" => "SSL protocol used",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => false
-                    },
-                    "keymanagementAlgorithm" => {
-                        "type" => STRING,
-                        "description" => "Use key management algorithm",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => "false"
-                    },
-                    "truststoreFilename" => {
-                        "type" => STRING,
-                        "description" => "Truststore Name",
-                        "required" => false,
-                        "max-occurs" => 1
-                    },
-                    "truststorePassword" => {
-                        "type" => STRING,
-                        "description" => "Truststore Password",
-                        "required" => false,
-                        "max-occurs" => 1
-                    },
-                    "authenticationMode" => {
-                        "type" => STRING,
-                        "description" => "Authentication Mode (1-way, 2-way, anonymous)",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => "anonymous"
-                    }
+            }
+        },
+        "distributed-cache-factory" => {
+            "type" => OBJECT,
+            "description" => "Distributed Cache Configuration",
+            "required" => false,
+            "max-occurs" => 1,
+            "min-occurs" => 1
+        },
+        "jdbc" => {
+            "type" => OBJECT,
+            "description" => "Remote JDBC Access Configuration ",
+            "required" => false,
+            "max-occurs" => 1,
+            "min-occurs" => 1,
+            "attributes" => {
+                "enabled" => {
+                    "type" => BOOLEAN,
+                    "description" => "enabled",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => true
                 },
-                "children" => {"ssl" => {
-                    "type" => OBJECT,
-                    "description" => "SSL",
+                "maxSocketThreads" => {
+                    "type" => INT,
+                    "description" => "Max number of threads dedicated to initial request processing. Zero indicates the system default of max available processors. (default 0)  Setting this value above the max available processors is not recommended.",
                     "required" => false,
                     "max-occurs" => 1,
-                    "min-occurs" => 0
-                }}
+                    "default" => 0
+                },
+                "inputBufferSize" => {
+                    "type" => INT,
+                    "description" => "SO_RCVBUF size, 0 indicates that system default should be used (default 0)",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => 0
+                },
+                "outputBufferSize" => {
+                    "type" => INT,
+                    "description" => "SO_SNDBUF size, 0 indicates that system default should be used (default 0)",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => 0
+                },
+                "socket-binding" => {
+                    "type" => INT,
+                    "description" => "Socket binding for the profile",
+                    "required" => true,
+                    "max-occurs" => 1
+                },
+                "mode" => {
+                    "type" => STRING,
+                    "description" => "can be one of disabled, login, or enabled disabled = no transport or message level security will be used; login = only the login traffic will be encrypted at a message level using 128 bit AES with an ephemerial DH key exchange. No other config values are needed in this mode; enabled = traffic will be secured using this configuration.",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => "login"
+                },
+                "keystoreFilename" => {
+                    "type" => STRING,
+                    "description" => "Keystore File Name",
+                    "required" => false,
+                    "max-occurs" => 1
+                },
+                "keystorePassword" => {
+                    "type" => STRING,
+                    "description" => "Keystore password",
+                    "required" => false,
+                    "max-occurs" => 1
+                },
+                "keystoreType" => {
+                    "type" => STRING,
+                    "description" => "Keystore type",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => "JKS"
+                },
+                "sslProtocol" => {
+                    "type" => BOOLEAN,
+                    "description" => "SSL protocol used",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => false
+                },
+                "keymanagementAlgorithm" => {
+                    "type" => STRING,
+                    "description" => "Use key management algorithm",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => "false"
+                },
+                "truststoreFilename" => {
+                    "type" => STRING,
+                    "description" => "Truststore Name",
+                    "required" => false,
+                    "max-occurs" => 1
+                },
+                "truststorePassword" => {
+                    "type" => STRING,
+                    "description" => "Truststore Password",
+                    "required" => false,
+                    "max-occurs" => 1
+                },
+                "authenticationMode" => {
+                    "type" => STRING,
+                    "description" => "Authentication Mode (1-way, 2-way, anonymous)",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => "anonymous"
+                }
             },
-            "admin" => {
+            "children" => {"ssl" => {
                 "type" => OBJECT,
-                "description" => "Remote Admin Access Configuration",
+                "description" => "SSL",
                 "required" => false,
                 "max-occurs" => 1,
-                "min-occurs" => 1,
-                "attributes" => {
-                    "enabled" => {
-                        "type" => BOOLEAN,
-                        "description" => "enabled",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => true
-                    },
-                    "maxSocketThreads" => {
-                        "type" => INT,
-                        "description" => "Max number of threads dedicated to initial request processing. Zero indicates the system default of max available processors. (default 0)  Setting this value above the max available processors is not recommended.",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 0
-                    },
-                    "inputBufferSize" => {
-                        "type" => INT,
-                        "description" => "SO_RCVBUF size, 0 indicates that system default should be used (default 0)",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 0
-                    },
-                    "outputBufferSize" => {
-                        "type" => INT,
-                        "description" => "SO_SNDBUF size, 0 indicates that system default should be used (default 0)",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 0
-                    },
-                    "socket-binding" => {
-                        "type" => INT,
-                        "description" => "Socket binding for the profile",
-                        "required" => true,
-                        "max-occurs" => 1
-                    },
-                    "mode" => {
-                        "type" => STRING,
-                        "description" => "can be one of disabled, login, or enabled disabled = no transport or message level security will be used; login = only the login traffic will be encrypted at a message level using 128 bit AES with an ephemerial DH key exchange. No other config values are needed in this mode; enabled = traffic will be secured using this configuration.",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => "login"
-                    },
-                    "keystoreFilename" => {
-                        "type" => STRING,
-                        "description" => "Keystore File Name",
-                        "required" => false,
-                        "max-occurs" => 1
-                    },
-                    "keystorePassword" => {
-                        "type" => STRING,
-                        "description" => "Keystore password",
-                        "required" => false,
-                        "max-occurs" => 1
-                    },
-                    "keystoreType" => {
-                        "type" => STRING,
-                        "description" => "Keystore type",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => "JKS"
-                    },
-                    "sslProtocol" => {
-                        "type" => BOOLEAN,
-                        "description" => "SSL protocol used",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => false
-                    },
-                    "keymanagementAlgorithm" => {
-                        "type" => STRING,
-                        "description" => "Use key management algorithm",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => "false"
-                    },
-                    "truststoreFilename" => {
-                        "type" => STRING,
-                        "description" => "Truststore Name",
-                        "required" => false,
-                        "max-occurs" => 1
-                    },
-                    "truststorePassword" => {
-                        "type" => STRING,
-                        "description" => "Truststore Password",
-                        "required" => false,
-                        "max-occurs" => 1
-                    },
-                    "authenticationMode" => {
-                        "type" => STRING,
-                        "description" => "Authentication Mode (1-way, 2-way, anonymous)",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => "anonymous"
-                    }
+                "min-occurs" => 0
+            }}
+        },
+        "odbc" => {
+            "type" => OBJECT,
+            "description" => "ODBC Access Configuration",
+            "required" => false,
+            "max-occurs" => 1,
+            "min-occurs" => 1,
+            "attributes" => {
+                "enabled" => {
+                    "type" => BOOLEAN,
+                    "description" => "enabled",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => true
                 },
-                "children" => {"ssl" => {
-                    "type" => OBJECT,
-                    "description" => "SSL",
+                "maxSocketThreads" => {
+                    "type" => INT,
+                    "description" => "Max number of threads dedicated to initial request processing. Zero indicates the system default of max available processors. (default 0)  Setting this value above the max available processors is not recommended.",
                     "required" => false,
                     "max-occurs" => 1,
-                    "min-occurs" => 0
-                }}
+                    "default" => 0
+                },
+                "inputBufferSize" => {
+                    "type" => INT,
+                    "description" => "SO_RCVBUF size, 0 indicates that system default should be used (default 0)",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => 0
+                },
+                "outputBufferSize" => {
+                    "type" => INT,
+                    "description" => "SO_SNDBUF size, 0 indicates that system default should be used (default 0)",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => 0
+                },
+                "socket-binding" => {
+                    "type" => INT,
+                    "description" => "Socket binding for the profile",
+                    "required" => true,
+                    "max-occurs" => 1
+                },
+                "mode" => {
+                    "type" => STRING,
+                    "description" => "can be one of disabled, login, or enabled disabled = no transport or message level security will be used; login = only the login traffic will be encrypted at a message level using 128 bit AES with an ephemerial DH key exchange. No other config values are needed in this mode; enabled = traffic will be secured using this configuration.",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => "login"
+                },
+                "keystoreFilename" => {
+                    "type" => STRING,
+                    "description" => "Keystore File Name",
+                    "required" => false,
+                    "max-occurs" => 1
+                },
+                "keystorePassword" => {
+                    "type" => STRING,
+                    "description" => "Keystore password",
+                    "required" => false,
+                    "max-occurs" => 1
+                },
+                "keystoreType" => {
+                    "type" => STRING,
+                    "description" => "Keystore type",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => "JKS"
+                },
+                "sslProtocol" => {
+                    "type" => BOOLEAN,
+                    "description" => "SSL protocol used",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => false
+                },
+                "keymanagementAlgorithm" => {
+                    "type" => STRING,
+                    "description" => "Use key management algorithm",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => "false"
+                },
+                "truststoreFilename" => {
+                    "type" => STRING,
+                    "description" => "Truststore Name",
+                    "required" => false,
+                    "max-occurs" => 1
+                },
+                "truststorePassword" => {
+                    "type" => STRING,
+                    "description" => "Truststore Password",
+                    "required" => false,
+                    "max-occurs" => 1
+                },
+                "authenticationMode" => {
+                    "type" => STRING,
+                    "description" => "Authentication Mode (1-way, 2-way, anonymous)",
+                    "required" => false,
+                    "max-occurs" => 1,
+                    "default" => "anonymous"
+                }
             },
-            "odbc" => {
+            "children" => {"ssl" => {
                 "type" => OBJECT,
-                "description" => "ODBC Access Configuration",
+                "description" => "SSL",
                 "required" => false,
                 "max-occurs" => 1,
-                "min-occurs" => 1,
-                "attributes" => {
-                    "enabled" => {
-                        "type" => BOOLEAN,
-                        "description" => "enabled",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => true
-                    },
-                    "maxSocketThreads" => {
-                        "type" => INT,
-                        "description" => "Max number of threads dedicated to initial request processing. Zero indicates the system default of max available processors. (default 0)  Setting this value above the max available processors is not recommended.",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 0
-                    },
-                    "inputBufferSize" => {
-                        "type" => INT,
-                        "description" => "SO_RCVBUF size, 0 indicates that system default should be used (default 0)",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 0
-                    },
-                    "outputBufferSize" => {
-                        "type" => INT,
-                        "description" => "SO_SNDBUF size, 0 indicates that system default should be used (default 0)",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => 0
-                    },
-                    "socket-binding" => {
-                        "type" => INT,
-                        "description" => "Socket binding for the profile",
-                        "required" => true,
-                        "max-occurs" => 1
-                    },
-                    "mode" => {
-                        "type" => STRING,
-                        "description" => "can be one of disabled, login, or enabled disabled = no transport or message level security will be used; login = only the login traffic will be encrypted at a message level using 128 bit AES with an ephemerial DH key exchange. No other config values are needed in this mode; enabled = traffic will be secured using this configuration.",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => "login"
-                    },
-                    "keystoreFilename" => {
-                        "type" => STRING,
-                        "description" => "Keystore File Name",
-                        "required" => false,
-                        "max-occurs" => 1
-                    },
-                    "keystorePassword" => {
-                        "type" => STRING,
-                        "description" => "Keystore password",
-                        "required" => false,
-                        "max-occurs" => 1
-                    },
-                    "keystoreType" => {
-                        "type" => STRING,
-                        "description" => "Keystore type",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => "JKS"
-                    },
-                    "sslProtocol" => {
-                        "type" => BOOLEAN,
-                        "description" => "SSL protocol used",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => false
-                    },
-                    "keymanagementAlgorithm" => {
-                        "type" => STRING,
-                        "description" => "Use key management algorithm",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => "false"
-                    },
-                    "truststoreFilename" => {
-                        "type" => STRING,
-                        "description" => "Truststore Name",
-                        "required" => false,
-                        "max-occurs" => 1
-                    },
-                    "truststorePassword" => {
-                        "type" => STRING,
-                        "description" => "Truststore Password",
-                        "required" => false,
-                        "max-occurs" => 1
-                    },
-                    "authenticationMode" => {
-                        "type" => STRING,
-                        "description" => "Authentication Mode (1-way, 2-way, anonymous)",
-                        "required" => false,
-                        "max-occurs" => 1,
-                        "default" => "anonymous"
-                    }
-                },
-                "children" => {"ssl" => {
-                    "type" => OBJECT,
-                    "description" => "SSL",
-                    "required" => false,
-                    "max-occurs" => 1,
-                    "min-occurs" => 0
-                }}
-            }
+                "min-occurs" => 0
+            }}
         }
-    }}
+    }
 }
\ No newline at end of file

Modified: branches/as7/jboss-integration/src/test/resources/teiid-sample-config.xml
===================================================================
--- branches/as7/jboss-integration/src/test/resources/teiid-sample-config.xml	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/jboss-integration/src/test/resources/teiid-sample-config.xml	2011-07-11 03:06:57 UTC (rev 3305)
@@ -17,7 +17,7 @@
         <eventDistributorName>teiid/event-distributor</eventDistributorName>
         <detectingChangeEvents>true</detectingChangeEvents>
 
-        <jdbc-security-domain>teiid-security</jdbc-security-domain>
+        <security-domain>teiid-security</security-domain>
         <max-sessions-allowed>5000</max-sessions-allowed>
         <sessions-expiration-timelimit>0</sessions-expiration-timelimit>
         <allow-env-function>false</allow-env-function>
@@ -34,12 +34,12 @@
             <maxOpenFiles>64</maxOpenFiles>
         </buffer-service>
         
-        <distributed-cache-factory enabled="true">
+        <distributed-cache-factory>
             <cache-service-jndi-name>java:TeiidCacheManager</cache-service-jndi-name>
             <resultsetCacheName>teiid-resultset-cache</resultsetCacheName>
         </distributed-cache-factory>
         
-        <resultset-cache enabled="true">
+        <resultset-cache>
             <maxEntries>1024</maxEntries>
             <maxAgeInSeconds>7200</maxAgeInSeconds>
             <maxStaleness>60</maxStaleness>
@@ -53,14 +53,14 @@
             <maxStaleness>0</maxStaleness>
         </preparedplan-cache>
         
-        <jdbc enabled="true">
+        <jdbc>
             <maxSocketThreads>0</maxSocketThreads>
             <inputBufferSize>0</inputBufferSize>
             <outputBufferSize>0</outputBufferSize>
             <socket-binding>teiid-jdbc</socket-binding>
         </jdbc>
 
-        <odbc enabled="true">
+        <odbc>
             <maxSocketThreads>0</maxSocketThreads>
             <inputBufferSize>0</inputBufferSize>
             <outputBufferSize>0</outputBufferSize>

Modified: branches/as7/pom.xml
===================================================================
--- branches/as7/pom.xml	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/pom.xml	2011-07-11 03:06:57 UTC (rev 3305)
@@ -10,7 +10,7 @@
 	<properties>
 		<ant.version>1.7.0</ant.version>
 		<site.url>http://www.jboss.org/teiid</site.url>
-        <jbossas-version>7.0.0.Beta4-SNAPSHOT</jbossas-version>
+        <jbossas-version>7.0.0.CR1</jbossas-version>
 	</properties>
 	<scm>
         <connection>scm:svn:https://anonsvn.jboss.org/repos/teiid/trunk</connection>
@@ -383,18 +383,18 @@
             <dependency>
                 <groupId>org.jboss</groupId>
                 <artifactId>jboss-dmr</artifactId>
-                <version>1.0.0.Beta5</version>
+                <version>1.0.0.Beta6</version>
             </dependency>
             
             <dependency>
                 <groupId>org.jboss.msc</groupId>
                 <artifactId>jboss-msc</artifactId>
-                <version>1.0.0.Beta8</version>
+                <version>1.0.0.CR2</version>
             </dependency> 
             <dependency>
                 <groupId>org.jboss</groupId>
                 <artifactId>jboss-vfs</artifactId>
-                <version>3.0.0.GA</version>
+                <version>3.0.1.GA</version>
                 <exclusions>
                     <exclusion>
                         <groupId>org.jboss.logging</groupId>
@@ -409,7 +409,7 @@
             <dependency>
                 <groupId>org.picketbox</groupId>
                 <artifactId>picketbox</artifactId>
-                <version>4.0.0.Beta3</version>
+                <version>4.0.0.CR1</version>
             </dependency>           
             <dependency>
                 <groupId>org.jboss.as</groupId>
@@ -425,7 +425,17 @@
                 <groupId>org.jboss.as</groupId>
                 <artifactId>jboss-as-security</artifactId>
                 <version>${jbossas-version}</version>
-            </dependency>            
+            </dependency>  
+            <dependency>
+                <groupId>org.jboss.as</groupId>
+                <artifactId>jboss-as-controller-client</artifactId>   
+                <version>${jbossas-version}</version>         
+            </dependency>    
+            <dependency>
+                <groupId>org.jboss.as</groupId>
+                <artifactId>jboss-as-cli</artifactId>  
+                <version>${jbossas-version}</version>          
+            </dependency>      
                      
             <!-- 
 			<dependency>
@@ -506,11 +516,15 @@
 		<module>client</module>
 		<module>engine</module>
 		<module>connectors</module>
+        <!-- 
 		<module>console</module>
+         -->
 		<module>metadata</module>
 		<module>runtime</module>
 		<module>adminshell</module>
+        <!-- 
 		<module>cache-jbosscache</module>
+         -->
 		<module>hibernate-dialect</module>
         <module>jboss-integration</module>
 		<module>test-integration</module>

Modified: branches/as7/runtime/pom.xml
===================================================================
--- branches/as7/runtime/pom.xml	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/runtime/pom.xml	2011-07-11 03:06:57 UTC (rev 3305)
@@ -57,6 +57,7 @@
     <dependency>
         <groupId>org.jboss.netty</groupId>
         <artifactId>netty</artifactId>
+        <scope>provided</scope>
     </dependency>
         
     <dependency>
@@ -64,27 +65,13 @@
         <artifactId>connector-api</artifactId>
         <scope>provided</scope>
     </dependency>
+
     <dependency>
-        <groupId>org.jboss</groupId>
-        <artifactId>jboss-common-core</artifactId>
-        <scope>provided</scope>
-    </dependency> 
-    <!-- This dependecy must be removed later into jboss-integration -->    
-    <dependency>
         <groupId>org.jboss.as</groupId>
-        <artifactId>jboss-as-server</artifactId>
-        <scope>provided</scope>
-    </dependency>
-    <dependency>
-        <groupId>org.jboss</groupId>
-        <artifactId>jboss-vfs</artifactId>
-        <scope>provided</scope>
-    </dependency> 
-    <dependency>
-        <groupId>org.jboss.as</groupId>
         <artifactId>jboss-as-security</artifactId>
         <scope>provided</scope>
-    </dependency>      
+    </dependency> 
+    
     <!-- 
     <dependency>
         <groupId>org.jboss.cache</groupId>

Modified: branches/as7/runtime/src/main/java/org/teiid/deployers/VDBDependencyProcessor.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/deployers/VDBDependencyProcessor.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/runtime/src/main/java/org/teiid/deployers/VDBDependencyProcessor.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -85,7 +85,7 @@
 
 			for (ModelMetaData model: vdb.getModelMetaDatas().values()) {
 				for (String source:model.getSourceNames()) {
-					moduleSpecification.addDependency(new ModuleDependency(moduleLoader, ModuleIdentifier.create(model.getSourceTranslatorName(source)), false, false, false));		
+					moduleSpecification.addLocalDependency(new ModuleDependency(moduleLoader, ModuleIdentifier.create(model.getSourceTranslatorName(source)), false, false, false));		
 				}
 			}
 		} catch (ModuleLoadException e) {

Modified: branches/as7/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -146,8 +146,12 @@
 		deploymentUnit.removeAttachment(TeiidAttachments.UDF_METADATA);
 		deploymentUnit.removeAttachment(TeiidAttachments.METADATA_STORE);
 		
-		// add transformation metadata to the repository.
-		this.vdbRepository.addVDB(deployment, store, visibilityMap, udf, cmr);
+		try {
+			// add transformation metadata to the repository.
+			this.vdbRepository.addVDB(deployment, store, visibilityMap, udf, cmr);
+		} catch (VirtualDatabaseException e) {
+			throw new DeploymentUnitProcessingException(e);
+		}
 		
 		boolean valid = true;
 		synchronized (deployment) {
@@ -260,12 +264,14 @@
 		VDBMetaData deployment = deploymentUnit.getAttachment(TeiidAttachments.VDB_METADATA);
 		VirtualFile file = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot();
 		
-		if (this.vdbRepository != null) {
+		if (this.vdbRepository != null && deployment != null) {
 			this.vdbRepository.removeVDB(deployment.getName(), deployment.getVersion());
+			deployment.setRemoved(true);
 		}
 		
-		deployment.setRemoved(true);
-		deleteMetadataStore(file);
+		if (file != null) {
+			deleteMetadataStore(file);
+		}
 
 		LogManager.logInfo(LogConstants.CTX_RUNTIME, RuntimePlugin.Util.getString("vdb_undeployed", deployment)); //$NON-NLS-1$
 	}

Modified: branches/as7/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/deployers/VDBRepository.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/runtime/src/main/java/org/teiid/deployers/VDBRepository.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -26,7 +26,6 @@
 import java.util.concurrent.ConcurrentSkipListMap;
 import java.util.concurrent.CopyOnWriteArrayList;
 
-import org.jboss.as.server.deployment.DeploymentUnitProcessingException;
 import org.teiid.adminapi.AdminException;
 import org.teiid.adminapi.AdminProcessingException;
 import org.teiid.adminapi.impl.VDBMetaData;
@@ -61,14 +60,14 @@
 		return metadataRepository;
 	}
 	
-	public void addVDB(VDBMetaData vdb, MetadataStoreGroup stores, LinkedHashMap<String, Resource> visibilityMap, UDFMetaData udf, ConnectorManagerRepository cmr) throws DeploymentUnitProcessingException {
+	public void addVDB(VDBMetaData vdb, MetadataStoreGroup stores, LinkedHashMap<String, Resource> visibilityMap, UDFMetaData udf, ConnectorManagerRepository cmr) throws VirtualDatabaseException {
 		if (getVDB(vdb.getName(), vdb.getVersion()) != null) {
-			throw new DeploymentUnitProcessingException(RuntimePlugin.Util.getString("duplicate_vdb", vdb.getName(), vdb.getVersion())); //$NON-NLS-1$
+			throw new VirtualDatabaseException(RuntimePlugin.Util.getString("duplicate_vdb", vdb.getName(), vdb.getVersion())); //$NON-NLS-1$
 		}
 		
 		// get the system VDB metadata store
 		if (this.systemStore == null) {
-			throw new DeploymentUnitProcessingException(RuntimePlugin.Util.getString("system_vdb_load_error")); //$NON-NLS-1$
+			throw new VirtualDatabaseException(RuntimePlugin.Util.getString("system_vdb_load_error")); //$NON-NLS-1$
 		}	
 		
 		if (this.odbcEnabled && odbcStore == null) {

Modified: branches/as7/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -70,9 +70,9 @@
     private Map<String, SessionMetadata> sessionCache = new ConcurrentHashMap<String, SessionMetadata>();
     private Timer sessionMonitor = new Timer("SessionMonitor", true); //$NON-NLS-1$
     private Map<String, SecurityDomainContext> securityDomainMap;
-    private LinkedList<String> securityDomainNames;
-    
-    public SessionServiceImpl(LinkedList<String> domainNames, Map<String, SecurityDomainContext> domains) {
+    private List<String> securityDomainNames;
+        
+    public void setSecurityDomains(List<String> domainNames, Map<String, SecurityDomainContext> domains) {
     	this.securityDomainNames = domainNames;
     	this.securityDomainMap = domains;
     }

Modified: branches/as7/runtime/src/main/java/org/teiid/transport/LocalServerConnection.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/transport/LocalServerConnection.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/runtime/src/main/java/org/teiid/transport/LocalServerConnection.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -49,7 +49,7 @@
 
 
 public class LocalServerConnection implements ServerConnection {
-	private static final String TEIID_RUNTIME = "teiid/engine-deployer"; //$NON-NLS-1$
+	public static final String TEIID_RUNTIME = "teiid/engine-deployer"; //$NON-NLS-1$
 	
 	private LogonResult result;
 	private boolean shutdown;

Modified: branches/as7/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -35,7 +35,6 @@
 	private int portNumber;
 	private InetAddress hostAddress;
 	private SSLConfiguration sslConfiguration;
-	private boolean enabled;
 	private String hostName;
 	private String name;
 	private String socketBinding;
@@ -91,14 +90,6 @@
 		}
 	}
 
-	public boolean getEnabled() {
-		return enabled;
-	}
-
-	public void setEnabled(boolean enabled) {
-		this.enabled = enabled;
-	}
-
 	public int getOutputBufferSize() {
 		return outputBufferSize;
 	}

Modified: branches/as7/runtime/src/test/java/org/teiid/deployers/TestObjectSerializer.java
===================================================================
--- branches/as7/runtime/src/test/java/org/teiid/deployers/TestObjectSerializer.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/runtime/src/test/java/org/teiid/deployers/TestObjectSerializer.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -34,7 +34,7 @@
 public class TestObjectSerializer {
 	
 	@Test public void testLoadSafe() throws Exception {
-		ObjectSerializer os = new ObjectSerializer();
+		ObjectSerializer os = new ObjectSerializer(System.getProperty("java.io.tmpdir"));
 		File f = UnitTestUtil.getTestScratchFile("foo");
 		os.saveAttachment(f, new Long(2));
 		assertNotNull(os.loadAttachment(f, Long.class));

Modified: branches/as7/runtime/src/test/java/org/teiid/deployers/TestTranslatorUtil.java
===================================================================
--- branches/as7/runtime/src/test/java/org/teiid/deployers/TestTranslatorUtil.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/runtime/src/test/java/org/teiid/deployers/TestTranslatorUtil.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -21,10 +21,10 @@
  */
 package org.teiid.deployers;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
 
 import org.junit.Test;
-import org.teiid.adminapi.impl.TranslatorMetaData;
+import org.teiid.adminapi.impl.VDBTranslatorMetaData;
 import org.teiid.translator.ExecutionFactory;
 import org.teiid.translator.Translator;
 import org.teiid.translator.TranslatorProperty;
@@ -34,7 +34,7 @@
 
 	@Test
 	public void testBuildExecutionFactory() throws Exception {
-		TranslatorMetaData tm = new TranslatorMetaData();
+		VDBTranslatorMetaData tm = new VDBTranslatorMetaData();
 		
 		tm.addProperty("MyProperty", "correctly-assigned");
 		tm.setExecutionFactoryClass(MyTranslator.class);
@@ -45,7 +45,7 @@
 	}
 	
 	@Test public void testBuildExecutionFactoryCaseInsensitive() throws Exception {
-		TranslatorMetaData tm = new TranslatorMetaData();
+		VDBTranslatorMetaData tm = new VDBTranslatorMetaData();
 		
 		tm.addProperty("myproperty", "correctly-assigned");
 		tm.setExecutionFactoryClass(MyTranslator.class);

Modified: branches/as7/runtime/src/test/java/org/teiid/services/TestMembershipServiceImpl.java
===================================================================
--- branches/as7/runtime/src/test/java/org/teiid/services/TestMembershipServiceImpl.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/runtime/src/test/java/org/teiid/services/TestMembershipServiceImpl.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -23,22 +23,20 @@
 package org.teiid.services;
 
 import java.security.Principal;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
+import java.util.*;
 
 import javax.security.auth.Subject;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.login.LoginContext;
-import javax.security.auth.login.LoginException;
 
 import junit.framework.TestCase;
 
+import org.jboss.as.security.plugins.SecurityDomainContext;
+import org.jboss.security.AuthenticationManager;
+import org.jboss.security.SimplePrincipal;
 import org.mockito.Mockito;
 import org.teiid.security.Credentials;
 import org.teiid.security.SecurityHelper;
 
-
+ at SuppressWarnings("nls")
 public class TestMembershipServiceImpl extends TestCase {
     
    
@@ -63,28 +61,27 @@
     	SecurityHelper sh = Mockito.mock(SecurityHelper.class);
     	Mockito.stub(sh.getSubjectInContext("passthrough")).toReturn(subject); //$NON-NLS-1$
     	
-        TeiidLoginContext membershipService = new TeiidLoginContext(sh) {
-			public LoginContext createLoginContext(String domain, CallbackHandler handler) throws LoginException {
-        		LoginContext context =  Mockito.mock(LoginContext.class);
-        		return context;
-        	}
-			protected LoginContext createLoginContext(String domain, Subject subject) throws LoginException {
-        		LoginContext context =  Mockito.mock(LoginContext.class);
-        		return context;
-		    }			
-        };
+        TeiidLoginContext membershipService = new TeiidLoginContext(sh);
         return membershipService;
     }
     
        
     public void testAuthenticate() throws Exception {
+    	Credentials credentials = new Credentials("pass1".toCharArray());
         TeiidLoginContext ms = createMembershipService();
         List<String> domains = new ArrayList<String>();
         domains.add("testFile"); //$NON-NLS-1$
-        ms.authenticateUser("user1", new Credentials("pass1".toCharArray()), null, domains, false); //$NON-NLS-1$ //$NON-NLS-2$
+        Map<String, SecurityDomainContext> securityDomainMap = new HashMap<String, SecurityDomainContext>();
+        SecurityDomainContext securityContext = Mockito.mock(SecurityDomainContext.class);
+        AuthenticationManager authManager = Mockito.mock(AuthenticationManager.class);
+        Mockito.stub(authManager.isValid(new SimplePrincipal("user1"), credentials, new Subject())).toReturn(true);
+        Mockito.stub(securityContext.getAuthenticationManager()).toReturn(authManager);
+        securityDomainMap.put("testFile", securityContext); //$NON-NLS-1$
         
-        Mockito.verify(ms.getLoginContext()).login();
+        ms.authenticateUser("user1", credentials, null, domains,securityDomainMap, false); //$NON-NLS-1$ //$NON-NLS-2$
         
+        Mockito.verify(authManager).isValid(new SimplePrincipal("user1"), credentials, new Subject());
+        
         assertEquals("user1 at testFile", ms.getUserName()); //$NON-NLS-1$
     }
     
@@ -93,7 +90,8 @@
         TeiidLoginContext ms = createMembershipService();
         List<String> domains = new ArrayList<String>();
         domains.add("passthrough"); //$NON-NLS-1$
-        ms.authenticateUser("user1", new Credentials("pass1".toCharArray()), null, domains, true); //$NON-NLS-1$ //$NON-NLS-2$
+        Map<String, SecurityDomainContext> securityDomainMap = new HashMap<String, SecurityDomainContext>();
+        ms.authenticateUser("user1", new Credentials("pass1".toCharArray()), null, domains, securityDomainMap, true); //$NON-NLS-1$ //$NON-NLS-2$
         
         assertEquals("alreadylogged at passthrough", ms.getUserName()); //$NON-NLS-1$
     }

Modified: branches/as7/runtime/src/test/java/org/teiid/services/TestSessionServiceImpl.java
===================================================================
--- branches/as7/runtime/src/test/java/org/teiid/services/TestSessionServiceImpl.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/runtime/src/test/java/org/teiid/services/TestSessionServiceImpl.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -3,13 +3,14 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
+import java.util.*;
 
-import javax.security.auth.login.LoginContext;
+import javax.security.auth.Subject;
 import javax.security.auth.login.LoginException;
 
+import org.jboss.as.security.plugins.SecurityDomainContext;
+import org.jboss.security.AuthenticationManager;
+import org.jboss.security.SimplePrincipal;
 import org.junit.Test;
 import org.mockito.Mockito;
 import org.teiid.adminapi.VDB.Status;
@@ -20,8 +21,6 @@
 import org.teiid.dqp.service.SessionServiceException;
 import org.teiid.security.Credentials;
 import org.teiid.security.SecurityHelper;
-import org.teiid.services.TeiidLoginContext;
-import org.teiid.services.SessionServiceImpl;
 
 @SuppressWarnings("nls")
 public class TestSessionServiceImpl {
@@ -29,21 +28,28 @@
 	public void validateSession(boolean securityEnabled) throws Exception {
 		final TeiidLoginContext impl =  Mockito.mock(TeiidLoginContext.class);
 		Mockito.stub(impl.getUserName()).toReturn("steve at somedomain");
-		Mockito.stub(impl.getLoginContext()).toReturn(Mockito.mock(LoginContext.class));
 		final ArrayList<String> domains = new ArrayList<String>();
 		domains.add("somedomain");				
 
 		SessionServiceImpl ssi = new SessionServiceImpl() {
 			@Override
-			protected TeiidLoginContext authenticate(String userName, Credentials credentials, String applicationName, List<String> domains, SecurityHelper helper, boolean passthough)
+			protected TeiidLoginContext authenticate(String userName, Credentials credentials, String applicationName, List<String> domains,  Map<String, SecurityDomainContext> securityDomainMap, SecurityHelper helper, boolean passthough)
 				throws LoginException {
-				impl.authenticateUser(userName, credentials, applicationName, domains, passthough);
+				impl.authenticateUser(userName, credentials, applicationName, domains, securityDomainMap, passthough);
 				return impl;
 			}
 		};
 	
-		ssi.setSecurityDomains("somedomain");
+		Map<String, SecurityDomainContext> securityDomainMap = new HashMap<String, SecurityDomainContext>();
+        SecurityDomainContext securityContext = Mockito.mock(SecurityDomainContext.class);
+        AuthenticationManager authManager = Mockito.mock(AuthenticationManager.class);
+        Credentials credentials = new Credentials("pass1".toCharArray());
+        Mockito.stub(authManager.isValid(new SimplePrincipal("user1"), credentials, new Subject())).toReturn(true);
+        Mockito.stub(securityContext.getAuthenticationManager()).toReturn(authManager);
+        securityDomainMap.put("somedomain", securityContext); //$NON-NLS-1$
 		
+		ssi.setSecurityDomains(Arrays.asList("somedomain"), securityDomainMap);
+		
 		try {
 			ssi.validateSession(String.valueOf(1));
 			fail("exception expected"); //$NON-NLS-1$
@@ -51,9 +57,9 @@
 			
 		}
 		
-		SessionMetadata info = ssi.createSession("steve", null, "foo", new Properties(), false, true); //$NON-NLS-1$ //$NON-NLS-2$
+		SessionMetadata info = ssi.createSession("steve", null, "foo", new Properties(), true); //$NON-NLS-1$ //$NON-NLS-2$
 		if (securityEnabled) {
-			Mockito.verify(impl).authenticateUser("steve", null, "foo", domains, false); 
+			Mockito.verify(impl).authenticateUser("steve", null, "foo", domains, securityDomainMap, false); 
 		}
 		
 		String id1 = info.getSessionId();

Modified: branches/as7/runtime/src/test/java/org/teiid/transport/TestLogonImpl.java
===================================================================
--- branches/as7/runtime/src/test/java/org/teiid/transport/TestLogonImpl.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/runtime/src/test/java/org/teiid/transport/TestLogonImpl.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -53,7 +53,7 @@
 		session.setSessionId(String.valueOf(1));
 		session.setSessionToken(new SessionToken(1, userName));
 
-		Mockito.stub(ssi.createSession(userName, null, applicationName,p, false, true)).toReturn(session);
+		Mockito.stub(ssi.createSession(userName, null, applicationName,p, true)).toReturn(session);
 
 		LogonImpl impl = new LogonImpl(ssi, "fakeCluster"); //$NON-NLS-1$
 

Modified: branches/as7/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java
===================================================================
--- branches/as7/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -25,7 +25,6 @@
 import java.util.LinkedHashMap;
 import java.util.Properties;
 
-import org.jboss.deployers.spi.DeploymentException;
 import org.mockito.Mockito;
 import org.teiid.adminapi.AdminException;
 import org.teiid.adminapi.VDB;
@@ -38,6 +37,7 @@
 import org.teiid.client.security.ILogon;
 import org.teiid.deployers.MetadataStoreGroup;
 import org.teiid.deployers.VDBRepository;
+import org.teiid.deployers.VirtualDatabaseException;
 import org.teiid.dqp.internal.datamgr.ConnectorManager;
 import org.teiid.dqp.internal.datamgr.ConnectorManagerRepository;
 import org.teiid.dqp.internal.datamgr.FakeTransactionService;
@@ -147,7 +147,7 @@
         	stores.addStore(metadata);
 			this.repo.addVDB(vdbMetaData, stores, entries, null, cmr);
 			this.repo.finishDeployment(vdbName, 1);
-		} catch (DeploymentException e) {
+		} catch (VirtualDatabaseException e) {
 			throw new RuntimeException(e);
 		}
 	}

Deleted: branches/as7/test-integration/db/src/test/java/org/teiid/adminapi/jboss/TestConnectorBindings.java
===================================================================
--- branches/as7/test-integration/db/src/test/java/org/teiid/adminapi/jboss/TestConnectorBindings.java	2011-07-09 00:08:35 UTC (rev 3304)
+++ branches/as7/test-integration/db/src/test/java/org/teiid/adminapi/jboss/TestConnectorBindings.java	2011-07-11 03:06:57 UTC (rev 3305)
@@ -1,387 +0,0 @@
-package org.teiid.adminapi.jboss;
-
-
-import static junit.framework.Assert.*;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.sql.Connection;
-import java.util.Collection;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.teiid.adminapi.Admin;
-import org.teiid.adminapi.AdminException;
-import org.teiid.adminapi.AdminFactory;
-import org.teiid.adminapi.DataPolicy;
-import org.teiid.adminapi.Model;
-import org.teiid.adminapi.PropertyDefinition;
-import org.teiid.adminapi.Request;
-import org.teiid.adminapi.Session;
-import org.teiid.adminapi.Transaction;
-import org.teiid.adminapi.Translator;
-import org.teiid.adminapi.VDB;
-import org.teiid.adminapi.VDB.ConnectionType;
-import org.teiid.core.util.UnitTestUtil;
-
- at Ignore
- at SuppressWarnings("nls")
-public class TestConnectorBindings extends BaseConnection {
-	static ServerDatasourceConnection ds;
-	static Admin admin;
-	private static final String VERSION = "-7.0.0-SNAPSHOT"; 
-	
-	@Before
-	public void setUp() throws Exception {
-		//if (!Bootstrap.getInstance().isStarted()) Bootstrap.getInstance().bootstrap();
-		ds = new ServerDatasourceConnection();
-		//admin = AdminProvider.getRemote( "jnp://localhost:1099", "javaduke", "anotherduke");	
-		admin = AdminFactory.getInstance().createAdmin("admin", "admin".toCharArray(), "mms://127.0.0.1:31443"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-		
-		installVDB();
-	}
-	
-	@After
-	public void tearDown() {
-		admin.close();
-	}
-	
-	//@AfterClass
-	public static void end() throws Exception {
-		admin = AdminFactory.getInstance().createAdmin("admin", "admin".toCharArray(), "mm://localhost:31443"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
-		VDB vdb = admin.getVDB("TransactionsRevisited", 1); //$NON-NLS-1$
-		if (vdb != null) {
-			admin.deleteVDB("TransactionsRevisited", 1); //$NON-NLS-1$
-		}
-		admin.close();
-	}
-	
-	@Test public void testVDBDeploy() throws Exception {
-		
-		VDB vdb = admin.getVDB("TransactionsRevisited", 1); //$NON-NLS-1$
-		if (vdb != null) {
-			admin.deleteVDB("TransactionsRevisited", 1); //$NON-NLS-1$
-		}
-		
-		installVDB();
-		
-		assertNotNull(admin.getVDB("TransactionsRevisited", 1)); //$NON-NLS-1$
-		
-		Set<VDB> vdbs = admin.getVDBs();
-		assertTrue(vdbs.size() >= 1);
-		
-		admin.deleteVDB("TransactionsRevisited", 1); //$NON-NLS-1$
-		
-		assertNull(admin.getVDB("TransactionsRevisited", 1)); //$NON-NLS-1$
-	}
-	
-	@Test
-	public void testChangeConnectionType() throws Exception {
-		VDB vdb = admin.getVDB("TransactionsRevisited", 1);
-		assertNotNull(vdb); //$NON-NLS-1$
-		
-		ConnectionType ct = vdb.getConnectionType();
-		assertEquals(ConnectionType.BY_VERSION, ct);
-		
-		admin.changeVDBConnectionType("TransactionsRevisited", 1, ConnectionType.ANY);
-		
-		vdb = admin.getVDB("TransactionsRevisited", 1);
-		
-		ct = vdb.getConnectionType();
-		assertEquals(ConnectionType.ANY, ct);		
-	}
-
-	@Test public void testGetVDB() throws Exception {
-		VDB vdb = admin.getVDB("TransactionsRevisited", 1);
-		assertNotNull(vdb); //$NON-NLS-1$
-		
-		assertEquals("TransactionsRevisited", vdb.getName());
-		assertEquals(1, vdb.getVersion());
-		assertEquals("A VDB to test transactions", vdb.getDescription());
-		//assertEquals("sample-value", vdb.getPropertyValue("sample"));
-		assertEquals(VDB.Status.INACTIVE, vdb.getStatus());
-
-		// test model
-		List<Model> models = vdb.getModels();
-		assertEquals(4, models.size());
-		Model model = null;
-		for (Model m:models) {
-			if (m.getName().equals("pm1")) {
-				model = m;
-				break;
-			}
-		}
-		assertNotNull(model);
-		assertEquals(Model.Type.PHYSICAL, model.getModelType());
-		assertEquals("sample-value", model.getPropertyValue("sample"));
-		List<String> sourceNames = model.getSourceNames();
-		assertEquals(1, sourceNames.size());
-		assertEquals("mysql", model.getSourceTranslatorName(sourceNames.get(0)));
-		assertEquals("java:mysql-connector-binding", model.getSourceConnectionJndiName(sourceNames.get(0)));
-		assertTrue(model.isSource());
-		//assertTrue(model.isSupportsMultiSourceBindings());
-		assertTrue(model.isVisible());
-		
-		// test data policies
-		List<DataPolicy> policies = vdb.getDataPolicies();
-		assertEquals(1, policies.size());
-		assertEquals("policy1", policies.get(0).getName());
-		assertEquals("roleOne described", policies.get(0).getDescription());
-		
-		List<DataPolicy.DataPermission> permissions = policies.get(0).getPermissions();
-		assertEquals(2, permissions.size());
-		
-		for(DataPolicy.DataPermission permission: permissions) {
-			if (permission.getResourceName().equals("myTable.T1")) {
-				assertTrue(permission.getAllowRead());
-				assertFalse(permission.getAllowCreate());
-				assertFalse(permission.getAllowDelete());
-				assertFalse(permission.getAllowUpdate());				
-			}
-			else if (permission.getResourceName().equals("myTable.T2")) {
-				assertFalse(permission.getAllowRead());
-				assertFalse(permission.getAllowCreate());
-				assertTrue(permission.getAllowDelete());
-				assertFalse(permission.getAllowUpdate());
-			}
-			else {
-				fail("there are only two types of permissions");
-			}
-		}
-		
-	}
-	
-	
-	@Test public void testSessions() throws Exception{
-		Connection c = ds.getConnection("TransactionsRevisited"); // to create the session
-		Collection<Session> sessions = admin.getSessions();
-		
-		int size = sessions.size();
-		assertTrue( size >= 1);
-		
-		Session found = null;
-		for (Session s: sessions) {
-			if (s.getUserName().equals("admin at teiid-security")) {
-				found = s;
-				break;
-			}
-		}
-		
-		assertNotNull(found);
-		
-		admin.terminateSession(found.getSessionId());
-		
-		sessions = admin.getSessions();
-		assertTrue(sessions.size() == (size-1));
-		c.close();
-	}
-	
-	
-	@Test public void testRequests() throws Exception {
-		Runnable work = new Runnable() {
-			public void run() {
-				for (int i = 0; i < 5; i++) {
-					try {
-						execute(ds, "TransactionsRevisited", "select * from pm1.g1"); //$NON-NLS-1$ //$NON-NLS-2$
-					} catch (Exception e) {
-						e.printStackTrace();
-					}
-				}
-			}
-		};
-		Thread t = new Thread(work);
-		t.start();
-		
-		// can not really stop and take reading here..
-		try {
-			Collection<Request> requests = admin.getRequests();
-			assertTrue(requests.size() >= 0);
-		}finally {
-			t.join();
-		}
-		
-		String sessionId = null;
-		Collection<Session> sessions = admin.getSessions();
-		for (Session s:sessions) {
-			sessionId = s.getSessionId();
-		}		
-		
-		t = new Thread(work);
-		t.start();
-		
-		try {
-			Collection<Request> requests = admin.getRequestsForSession(sessionId);
-			assertTrue(requests.size() >= 0);	
-		} finally {
-			t.join();
-		}
-	}
-	
-	@Test
-	public void testCache() throws Exception {
-		Collection<String> caches = admin.getCacheTypes();
-		assertEquals(3, caches.size());
-		
-		admin.clearCache("CODE_TABLE_CACHE"); //$NON-NLS-1$
-	}
-	
-	@Ignore
-	@Test
-	public void testTransactions() throws Exception {
-		Runnable work = new Runnable() {
-			public void run() {
-				try {
-					for (int i = 0; i < 10; i++) {
-						int v = i+200;
-						execute(ds, "TransactionsRevisited", "insert into vm.g1 (pm1e1, pm1e2, pm2e1, pm2e2) values("+v+",'"+v+"',"+v+",'"+v+"')"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
-					}
-					execute(ds, "TransactionsRevisited", "delete from vm.g1 where pm1e1 >= 200"); //$NON-NLS-1$ //$NON-NLS-2$
-				} catch (Exception e) {
-					e.printStackTrace();
-				}
-			}
-		};
-		
-		Thread t = new Thread(work);
-		t.start();
-		Thread.sleep(2000);
-		try {
-			Collection<Transaction> txns = admin.getTransactions();
-			assertTrue(txns.size() >= 0);
-		} finally {
-			t.join();
-		}
-	}
-
-	private static void installVDB() throws AdminException, FileNotFoundException {
-		VDB vdb = admin.getVDB("TransactionsRevisited", 1); //$NON-NLS-1$
-		if (vdb == null) {
-			File f = UnitTestUtil.getTestDataFile("TransactionsRevisited.vdb"); //$NON-NLS-1$
-			FileInputStream fis = new FileInputStream(f);
-			admin.deployVDB(f.getName(), fis);
-			try {
-				fis.close();
-			} catch (IOException e) {
-			}
-		}
-	}
-	
-	@Test
-	public void testTranslatorTemplateProperties() throws Exception {
-		Collection<PropertyDefinition> defs = admin.getTemplatePropertyDefinitions("translator-jdbc"+VERSION); //$NON-NLS-1$
-		for (PropertyDefinition pd:defs) {
-			System.out.println(pd.getName()+":"+pd.getPropertyTypeClassName()+":"+pd.getDefaultValue());
-			if (pd.getName().equals("ExtensionTranslationClassName")) { //$NON-NLS-1$
-				assertEquals("Extension SQL Translation Class", pd.getDisplayName()); //$NON-NLS-1$
-				assertEquals(false, pd.isAdvanced());
-				assertEquals(true, pd.isRequired());
-				assertEquals(false, pd.isMasked());
-				assertEquals(true, pd.isModifiable());
-				
-				assertEquals(12, pd.getAllowedValues().size());
-				System.out.println(pd.getAllowedValues());
-			}
-		}
-	}
-	
-	@Test
-	public void testGetTemplate() throws Exception {
-		Translator translator = admin.getTranslator("oracle");
-		for (String key:translator.getProperties().stringPropertyNames()) {
-			System.out.println(key+"="+translator.getPropertyValue(key));
-		}
-		assertEquals("org.teiid.translator.jdbc.oracle.OracleSQLTranslator", translator.getPropertyValue("ExtensionTranslationClassName")); //$NON-NLS-1$
-		assertEquals(false, translator.getPropertyValue("XaCapable"));
-	}
-	
-	@Test public void testAssignConnectorBinding() throws Exception {
-		admin.assignToModel("TransactionsRevisited", 1, "pm1", "mysql", "mysql", "jndi:FOO"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
-		
-		boolean checked = false;
-		VDB vdb = admin.getVDB("TransactionsRevisited", 1); //$NON-NLS-1$
-		List<Model> models = vdb.getModels();
-		for (Model model:models) {
-			if (model.getName().equals("pm1")) { //$NON-NLS-1$
-				List<String> sources = model.getSourceNames();
-				for (String source:sources) {
-					if (source.equals("mysql")) { //$NON-NLS-1$
-						assertEquals("jndi:FOO", model.getSourceConnectionJndiName(source)); //$NON-NLS-1$
-						checked = true;
-					}
-				}
-			}
-		}
-		
-		assertTrue("Test not veryfied", checked); //$NON-NLS-1$
-	}
-	
-	
-	@Test public void testAddRoleNames() throws Exception {
-		installVDB();
-		admin.addDataRoleMapping("TransactionsRevisited", 1, "policy1", "managers"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		
-		VDB vdb = admin.getVDB("TransactionsRevisited", 1); //$NON-NLS-1$
-		List<DataPolicy> policies = vdb.getDataPolicies();
-		assertTrue (!policies.isEmpty());
-		for (DataPolicy policy:policies) {
-			if (policy.getName().equals("policy1")) { //$NON-NLS-1$
-				List<String> sources = policy.getMappedRoleNames();
-				assertTrue(sources.contains("managers"));
-			}
-		}
-		
-		// remove the role
-		admin.removeDataRoleMapping("TransactionsRevisited", 1, "policy1", "managers");
-		
-		vdb = admin.getVDB("TransactionsRevisited", 1); //$NON-NLS-1$
-		policies = vdb.getDataPolicies();
-		assertTrue (!policies.isEmpty());
-		
-		for (DataPolicy policy:policies) {
-			if (policy.getName().equals("policy1")) { //$NON-NLS-1$
-				List<String> sources = policy.getMappedRoleNames();
-				assertFalse(sources.contains("managers"));
-			}
-		}		
-		
-		// remove non-existent role name
-		admin.removeDataRoleMapping("TransactionsRevisited", 1, "policy1", "FOO");
-	}	
-	
-	@Test
-	public void testCreateDataSource() throws Exception {
-		
-		Properties p = new Properties();
-		p.setProperty("DatabaseName", "txntest");
-		p.setProperty("PortNumber", "3306");
-		p.setProperty("ServerName", "localhost");
-		p.setProperty("additional-ds-properties", "foo=bar, t= x");
-		p.setProperty("user-name", "rareddy");
-		p.setProperty("password", "mm");
-		p.setProperty("xa-datasource-class", "com.mysql.jdbc.jdbc2.optional.MysqlXADataSource");
-		
-		admin.createDataSource("test-mysql","connector-jdbc-xa", p);	 //$NON-NLS-1$ //$NON-NLS-2$
-	}
-	
-	@Test
-	public void testCreateDriverSource() throws Exception {
-		
-		Properties p = new Properties();
-		p.setProperty("connection-url", "jdbc:mysql://localhost:3306/txntest");
-		p.setProperty("additional-connection-properties", "foo=bar, t= x");
-		p.setProperty("user-name", "rareddy");
-		p.setProperty("password", "mm");
-		p.setProperty("driver-class", "com.mysql.jdbc.Driver");
-		
-		admin.createDataSource("test-mysql-driver","connector-jdbc", p);	 //$NON-NLS-1$ //$NON-NLS-2$
-	}
-	
-}



More information about the teiid-commits mailing list