[teiid-commits] teiid SVN: r3505 - in branches/as7: admin/src/main/java/org/teiid/adminapi/impl and 10 other directories.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Wed Sep 28 11:25:17 EDT 2011


Author: rareddy
Date: 2011-09-28 11:25:16 -0400 (Wed, 28 Sep 2011)
New Revision: 3505

Added:
   branches/as7/admin/src/test/resources/parser-test-vdb.xml
   branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidAdminOperations.java
   branches/as7/jboss-integration/src/test/resources/teiid-model-json.txt
Modified:
   branches/as7/admin/src/main/java/org/teiid/adminapi/impl/VDBMetadataParser.java
   branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml
   branches/as7/engine/src/main/java/org/teiid/query/function/FunctionTree.java
   branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.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/ObjectSerializer.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineAdd.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineOperationHandler.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidBootServicesAdd.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemDescribe.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/VDBParserDeployer.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBService.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/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
Log:
TEIID-1720:  Lot of re-arrgangement of the configuration to have a flat model but xml for the persistence form.

Modified: branches/as7/admin/src/main/java/org/teiid/adminapi/impl/VDBMetadataParser.java
===================================================================
--- branches/as7/admin/src/main/java/org/teiid/adminapi/impl/VDBMetadataParser.java	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/admin/src/main/java/org/teiid/adminapi/impl/VDBMetadataParser.java	2011-09-28 15:25:16 UTC (rev 3505)
@@ -21,6 +21,7 @@
  */
 package org.teiid.adminapi.impl;
 
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.*;
@@ -305,9 +306,10 @@
 	    }	    
 	}
 
-	public static void marshell(VDBMetaData vdb, OutputStream out) throws XMLStreamException {
+	public static void marshell(VDBMetaData vdb, OutputStream out) throws XMLStreamException, IOException {
 		XMLStreamWriter writer = XMLOutputFactory.newFactory().createXMLStreamWriter(out);
         
+		writer.writeStartDocument();
 		writer.writeStartElement(Element.VDB.getLocalName());
 		writer.writeAttribute(Element.NAME.getLocalName(), vdb.getName());
 		writer.writeAttribute(Element.VERSION.getLocalName(), String.valueOf(vdb.getVersion()));
@@ -337,6 +339,9 @@
 		// designer only 
 		
 		writer.writeEndElement();
+		writer.writeEndDocument();
+		writer.close();
+		out.close();
 	}
 	
 	private static void writeDataPolicy(XMLStreamWriter writer, DataPolicy dp)  throws XMLStreamException {

Added: branches/as7/admin/src/test/resources/parser-test-vdb.xml
===================================================================
--- branches/as7/admin/src/test/resources/parser-test-vdb.xml	                        (rev 0)
+++ branches/as7/admin/src/test/resources/parser-test-vdb.xml	2011-09-28 15:25:16 UTC (rev 3505)
@@ -0,0 +1,34 @@
+<vdb name="myVDB" version="1">
+    <description>vdb description</description>
+    <property name="vdb-property2" value="vdb-value2"></property>
+    <property name="vdb-property" value="vdb-value"></property>
+    <model name="model-one" type="PHYSICAL" visible="false">
+        <description>model description</description>
+        <property name="model-prop" value="model-value-override"></property>
+        <source name="s1" translator-name="translator" connection-jndi-name="java:mybinding"></source>
+        <validation-error severity="ERROR">There is an error in VDB</validation-error>
+    </model>
+    <model name="model-two" type="VIRTUAL" visible="true">
+        <property name="model-prop" value="model-value"></property>
+        <source name="s1" translator-name="translator" connection-jndi-name="java:binding-one"></source>
+        <source name="s2" translator-name="translator" connection-jndi-name="java:binding-two"></source>
+    </model>
+    <translator name="oracleOverride" type="oracle" description="hello world">
+        <property name="my-property" value="my-value"></property>
+    </translator>
+    <data-role name="roleOne" any-authenticated="false" allow-create-temporary-tables="true">
+        <description>roleOne described</description>
+        <permission>
+            <resource-name>myTable.T1</resource-name>
+            <allow-read>true</allow-read>
+        </permission>
+        <permission>
+            <resource-name>myTable.T2</resource-name>
+            <allow-read>false</allow-read>
+            <allow-delete>true</allow-delete>
+        </permission>
+        <mapped-role-name>ROLE1</mapped-role-name>
+        <mapped-role-name>ROLE2</mapped-role-name>
+    </data-role>
+</vdb>
+


Property changes on: branches/as7/admin/src/test/resources/parser-test-vdb.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Modified: branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml
===================================================================
--- branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml	2011-09-28 15:25:16 UTC (rev 3505)
@@ -106,19 +106,32 @@
                         <password>sa</password>
                     </security>
                 </datasource>
-                <datasource jndi-name="java:/Oracle11_PushDS" pool-name="OracleDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
-                    <connection-url>jdbc:oracle:thin:@englxdbs11.mw.lab.eng.bos.redhat.com:1521:orcl</connection-url>
-                    <driver>oracle</driver>
+                <datasource jndi-name="java:/postgres-ds" pool-name="PostgreDS">
+                    <connection-url>jdbc:postgresql://127.0.0.1:5432/txns</connection-url>
+                    <driver>postgresql-8.3-603.jdbc3.jar</driver>
                     <pool>
                         <prefill>false</prefill>
                         <use-strict-min>false</use-strict-min>
                         <flush-strategy>FailingConnectionOnly</flush-strategy>
                     </pool>
                     <security>
-                        <user-name>bqt2_ro</user-name>
+                        <user-name>rareddy</user-name>
                         <password>mm</password>
                     </security>
-                </datasource>                
+                </datasource>  
+                <datasource jndi-name="java:/mysql-ds" pool-name="mysqlDS">
+                    <connection-url>jdbc:mysql://localhost:3306/txns</connection-url>
+                    <driver>mysql-connector-java-5.1.5.jar</driver>
+                    <pool>
+                        <prefill>false</prefill>
+                        <use-strict-min>false</use-strict-min>
+                        <flush-strategy>FailingConnectionOnly</flush-strategy>
+                    </pool>
+                    <security>
+                        <user-name>rareddy</user-name>
+                        <password>mm</password>
+                    </security>
+                </datasource>                               
                 <drivers>
                     <driver name="h2" module="com.h2database.h2">
                         <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

Modified: branches/as7/engine/src/main/java/org/teiid/query/function/FunctionTree.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/function/FunctionTree.java	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/engine/src/main/java/org/teiid/query/function/FunctionTree.java	2011-09-28 15:25:16 UTC (rev 3505)
@@ -295,7 +295,7 @@
         // Defect 20007 - Ignore the invocation method if pushdown is not required.
         if (validateClass && (method.getPushdown() == PushDown.CAN_PUSHDOWN || method.getPushdown() == PushDown.CANNOT_PUSHDOWN)) {
             try {
-                Class<?> methodClass = source.getInvocationClass(method.getInvocationClass(), method.getClassLoader());
+                Class<?> methodClass = source.getInvocationClass(method.getInvocationClass(), method.getClassLoader()==null?Thread.currentThread().getContextClassLoader():method.getClassLoader());
                 ReflectionHelper helper = new ReflectionHelper(methodClass);
                 try {
                 	invocationMethod = helper.findBestMethodWithSignature(method.getInvocationMethod(), inputTypes);

Modified: branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java	2011-09-28 15:25:16 UTC (rev 3505)
@@ -108,15 +108,15 @@
         ConnectorManagerRepository repo = Mockito.mock(ConnectorManagerRepository.class);
         context.getVDB().addAttchment(ConnectorManagerRepository.class, repo);
         Mockito.stub(repo.getConnectorManager(Mockito.anyString())).toReturn(agds);
-        
-        core = new DQPCore();
-        core.setBufferService(new BufferService() {
+        BufferService bs = new BufferService() {
 			
 			@Override
 			public BufferManager getBufferManager() {
 				return BufferManagerFactory.createBufferManager();
 			}
-		});
+		};
+        core = new DQPCore();
+        core.setBufferService(bs);
         core.setResultsetCache(new SessionAwareCache<CachedResults>(new DefaultCacheFactory(), SessionAwareCache.Type.RESULTSET, new CacheConfiguration()));
         core.setPreparedPlanCache(new SessionAwareCache<PreparedPlan>(new DefaultCacheFactory(), SessionAwareCache.Type.PREPAREDPLAN, new CacheConfiguration()));
         core.setTransactionService(new FakeTransactionService());
@@ -126,7 +126,7 @@
         config.setUserRequestSourceConcurrency(2);
         core.start(config);
         core.getPrepPlanCache().setModTime(1);
-        core.getRsCache().setModTime(1);
+        core.getRsCache().setBufferManager(bs.getBufferManager());
     }
     
     @After public void tearDown() throws Exception {

Modified: branches/as7/jboss-integration/pom.xml
===================================================================
--- branches/as7/jboss-integration/pom.xml	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/jboss-integration/pom.xml	2011-09-28 15:25:16 UTC (rev 3505)
@@ -96,6 +96,12 @@
         <artifactId>jboss-as-server</artifactId>
         <scope>provided</scope>
     </dependency>
+    
+    <dependency>
+        <groupId>org.jboss.as</groupId>
+        <artifactId>jboss-as-subsystem-test</artifactId>
+        <scope>test</scope>
+    </dependency>    
        
     <dependency>
         <groupId>log4j</groupId>

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Configuration.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Configuration.java	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Configuration.java	2011-09-28 15:25:16 UTC (rev 3505)
@@ -82,7 +82,6 @@
 	public static final String IN_BUFFER_SIZE = "input-buffer-size";//$NON-NLS-1$
 	public static final String OUT_BUFFER_SIZE = "output-buffer-size";//$NON-NLS-1$
 	public static final String SOCKET_BINDING = "socket-binding";//$NON-NLS-1$
-	public static final String SOCKET_ENABLED = "enabled";//$NON-NLS-1$
 	public static final String SSL_MODE = "mode";//$NON-NLS-1$
 	public static final String KEY_STORE_FILE = "keystore-name";//$NON-NLS-1$
 	public static final String KEY_STORE_PASSWD = "keystore-password";//$NON-NLS-1$

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Element.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Element.java	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Element.java	2011-09-28 15:25:16 UTC (rev 3505)
@@ -22,18 +22,24 @@
 
 package org.teiid.jboss;
 
+import static org.teiid.jboss.Configuration.*;
+
 import java.util.HashMap;
 import java.util.Map;
-import static org.teiid.jboss.Configuration.*;
 
 enum Element {
     // must be first
     UNKNOWN(null),
 
     // VM wide elements
-    QUERY_ENGINE_ELEMENT(QUERY_ENGINE),
     ASYNC_THREAD_GROUP_ELEMENT(ASYNC_THREAD_GROUP),
+    ALLOW_ENV_FUNCTION_ELEMENT(ALLOW_ENV_FUNCTION),
+    POLICY_DECIDER_MODULE_ELEMENT(POLICY_DECIDER_MODULE),
+	BUFFER_SERVICE_ELEMENT(BUFFER_SERVICE),
+	PREPAREDPLAN_CACHE_ELEMENT(PREPAREDPLAN_CACHE),	
+	RESULTSET_CACHE_ELEMENT(RESULTSET_CACHE),
     OBJECT_REPLICATOR_ELEMENT(OBJECT_REPLICATOR),
+    QUERY_ENGINE_ELEMENT(QUERY_ENGINE),
     	
 	// Query-ENGINE
     ENGINE_NAME_ATTRIBUTE(ENGINE_NAME),
@@ -44,7 +50,6 @@
 	MAX_ROWS_FETCH_SIZE_ELEMENT(MAX_ROWS_FETCH_SIZE),
 	LOB_CHUNK_SIZE_IN_KB_ELEMENT(LOB_CHUNK_SIZE_IN_KB),
 	AUTHORIZATION_VALIDATOR_MODULE_ELEMENT(AUTHORIZATION_VALIDATOR_MODULE),
-	POLICY_DECIDER_MODULE_ELEMENT(POLICY_DECIDER_MODULE),
 	QUERY_THRESHOLD_IN_SECS_ELEMENT(QUERY_THRESHOLD_IN_SECS),
 	MAX_SOURCE_ROWS_ELEMENT(MAX_SOURCE_ROWS),
 	EXCEPTION_ON_MAX_SOURCE_ROWS_ELEMENT(EXCEPTION_ON_MAX_SOURCE_ROWS),
@@ -52,65 +57,82 @@
 	DETECTING_CHANGE_EVENTS_ELEMENT(DETECTING_CHANGE_EVENTS),
 	MAX_SESSIONS_ALLOWED_ELEMENT(MAX_SESSIONS_ALLOWED),
 	SESSION_EXPIRATION_TIME_LIMIT_ELEMENT(SESSION_EXPIRATION_TIME_LIMIT),
-	ALLOW_ENV_FUNCTION_ELEMENT(ALLOW_ENV_FUNCTION),
 	SECURITY_DOMAIN_ELEMENT(SECURITY_DOMAIN),
-	
-	//children
-	BUFFER_SERVICE_ELEMENT(BUFFER_SERVICE),
-	PREPAREDPLAN_CACHE_ELEMENT(PREPAREDPLAN_CACHE),	
-	RESULTSET_CACHE_ELEMENT(RESULTSET_CACHE),
 	JDBC_ELEMENT(JDBC),
 	ODBC_ELEMENT(ODBC),	
 	
 	// buffer manager
-	USE_DISK_ELEMENT(USE_DISK),
-	PROCESSOR_BATCH_SIZE_ELEMENT(PROCESSOR_BATCH_SIZE),
-	CONNECTOR_BATCH_SIZE_ELEMENT(CONNECTOR_BATCH_SIZE),
-	MAX_PROCESSING_KB_ELEMENT(MAX_PROCESSING_KB),
-	MAX_RESERVED_KB_ELEMENT(MAX_RESERVED_KB),
-	MAX_FILE_SIZE_ELEMENT(MAX_FILE_SIZE),
-	MAX_BUFFER_SPACE_ELEMENT(MAX_BUFFER_SPACE),
-	MAX_OPEN_FILES_ELEMENT(MAX_OPEN_FILES),
+	USE_DISK_ELEMENT(USE_DISK, BUFFER_SERVICE),
+	PROCESSOR_BATCH_SIZE_ELEMENT(PROCESSOR_BATCH_SIZE, BUFFER_SERVICE),
+	CONNECTOR_BATCH_SIZE_ELEMENT(CONNECTOR_BATCH_SIZE, BUFFER_SERVICE),
+	MAX_PROCESSING_KB_ELEMENT(MAX_PROCESSING_KB, BUFFER_SERVICE),
+	MAX_RESERVED_KB_ELEMENT(MAX_RESERVED_KB, BUFFER_SERVICE),
+	MAX_FILE_SIZE_ELEMENT(MAX_FILE_SIZE, BUFFER_SERVICE),
+	MAX_BUFFER_SPACE_ELEMENT(MAX_BUFFER_SPACE, BUFFER_SERVICE),
+	MAX_OPEN_FILES_ELEMENT(MAX_OPEN_FILES, BUFFER_SERVICE),
 	
 	//prepared-plan-cache-config
-	MAX_ENTRIES_ELEMENT(MAX_ENTRIES),
-	MAX_AGE_IN_SECS_ELEMENT(MAX_AGE_IN_SECS),
-	MAX_STALENESS_ELEMENT(MAX_STALENESS),
-	ENABLE_ATTRIBUTE(ENABLE),
+	PPC_MAX_ENTRIES_ATTRIBUTE(MAX_ENTRIES, PREPAREDPLAN_CACHE),
+	PPC_MAX_AGE_IN_SECS_ATTRIBUTE(MAX_AGE_IN_SECS, PREPAREDPLAN_CACHE),
+	PPC_MAX_STALENESS_ATTRIBUTE(MAX_STALENESS, PREPAREDPLAN_CACHE),
 	
+	
 	// Object Replicator
-	STACK_ATTRIBUTE(STACK),
-	CLUSTER_NAME_ATTRIBUTE(CLUSTER_NAME),
+	OR_STACK_ATTRIBUTE(STACK, OBJECT_REPLICATOR),
+	OR_CLUSTER_NAME_ATTRIBUTE(CLUSTER_NAME, OBJECT_REPLICATOR),
 	
-	// cache-container
-	NAME_ELEMENT(NAME),
-	CONTAINER_NAME_ELEMENT(CONTAINER_NAME),
+	// Result set cache
+	RSC_ENABLE_ATTRIBUTE(ENABLE, RESULTSET_CACHE),
+	RSC_NAME_ELEMENT(NAME, RESULTSET_CACHE),
+	RSC_CONTAINER_NAME_ELEMENT(CONTAINER_NAME, RESULTSET_CACHE),
+	RSC_MAX_STALENESS_ELEMENT(MAX_STALENESS, RESULTSET_CACHE),
 	
 	//socket config
-	MAX_SOCKET_THREAD_SIZE_ELEMENT(MAX_SOCKET_THREAD_SIZE),
-	IN_BUFFER_SIZE_ELEMENT(IN_BUFFER_SIZE),
-	OUT_BUFFER_SIZE_ELEMENT(OUT_BUFFER_SIZE),
-	SOCKET_BINDING_ELEMENT(SOCKET_BINDING),
-	SSL_MODE_ELEMENT(SSL_MODE),
-	KEY_STORE_FILE_ELEMENT(KEY_STORE_FILE),
-	KEY_STORE_PASSWD_ELEMENT(KEY_STORE_PASSWD),
-	KEY_STORE_TYPE_ELEMENT(KEY_STORE_TYPE),
-	SSL_PROTOCOL_ELEMENT(SSL_PROTOCOL),
-	KEY_MANAGEMENT_ALG_ELEMENT(KEY_MANAGEMENT_ALG),
-	TRUST_FILE_ELEMENT(TRUST_FILE),
-	TRUST_PASSWD_ELEMENT(TRUST_PASSWD),
-	AUTH_MODE_ELEMENT(AUTH_MODE),
-	SSL_ELEMENT(SSL),    
-    
-    // Translator
+	JDBC_MAX_SOCKET_THREAD_SIZE_ATTRIBUTE(MAX_SOCKET_THREAD_SIZE,JDBC),
+	JDBC_IN_BUFFER_SIZE_ATTRIBUTE(IN_BUFFER_SIZE,JDBC),
+	JDBC_OUT_BUFFER_SIZE_ATTRIBUTE(OUT_BUFFER_SIZE,JDBC),
+	JDBC_SOCKET_BINDING_ATTRIBUTE(SOCKET_BINDING,JDBC),
+	
+	JDBC_SSL_ELEMENT(SSL, JDBC),
+	JDBC_SSL_MODE_ELEMENT(SSL_MODE,JDBC,SSL),
+	JDBC_KEY_STORE_FILE_ELEMENT(KEY_STORE_FILE,JDBC,SSL),
+	JDBC_KEY_STORE_PASSWD_ELEMENT(KEY_STORE_PASSWD,JDBC,SSL),
+	JDBC_KEY_STORE_TYPE_ELEMENT(KEY_STORE_TYPE,JDBC,SSL),
+	JDBC_SSL_PROTOCOL_ELEMENT(SSL_PROTOCOL,JDBC,SSL),
+	JDBC_KEY_MANAGEMENT_ALG_ELEMENT(KEY_MANAGEMENT_ALG,JDBC,SSL),
+	JDBC_TRUST_FILE_ELEMENT(TRUST_FILE,JDBC,SSL),
+	JDBC_TRUST_PASSWD_ELEMENT(TRUST_PASSWD,JDBC,SSL),
+	JDBC_AUTH_MODE_ELEMENT(AUTH_MODE,JDBC,SSL),
+	    
+	
+	ODBC_MAX_SOCKET_THREAD_SIZE_ATTRIBUTE(MAX_SOCKET_THREAD_SIZE,ODBC),
+	ODBC_IN_BUFFER_SIZE_ATTRIBUTE(IN_BUFFER_SIZE,ODBC),
+	ODBC_OUT_BUFFER_SIZE_ATTRIBUTE(OUT_BUFFER_SIZE,ODBC),
+	ODBC_SOCKET_BINDING_ATTRIBUTE(SOCKET_BINDING,ODBC),
+	
+	ODBC_SSL_ELEMENT(SSL, ODBC),
+	ODBC_SSL_MODE_ELEMENT(SSL_MODE,ODBC,SSL),
+	ODBC_KEY_STORE_FILE_ELEMENT(KEY_STORE_FILE,ODBC,SSL),
+	ODBC_KEY_STORE_PASSWD_ELEMENT(KEY_STORE_PASSWD,ODBC,SSL),
+	ODBC_KEY_STORE_TYPE_ELEMENT(KEY_STORE_TYPE,ODBC,SSL),
+	ODBC_SSL_PROTOCOL_ELEMENT(SSL_PROTOCOL,ODBC,SSL),
+	ODBC_KEY_MANAGEMENT_ALG_ELEMENT(KEY_MANAGEMENT_ALG,ODBC,SSL),
+	ODBC_TRUST_FILE_ELEMENT(TRUST_FILE,ODBC,SSL),
+	ODBC_TRUST_PASSWD_ELEMENT(TRUST_PASSWD,ODBC,SSL),
+	ODBC_AUTH_MODE_ELEMENT(AUTH_MODE,ODBC,SSL),
+	     
+
+	// Translator
     TRANSLATOR_ELEMENT(TRANSLATOR),
     TRANSLATOR_NAME_ATTRIBUTE(TRANSLATOR_NAME),
     TRANSLATOR_MODULE_ATTRIBUTE(TRANSLATOR_MODULE);
     
     private final String name;
+    private String[] prefix;
 
-    Element(final String name) {
+    Element(final String name, String... prefix) {
         this.name = name;
+        this.prefix = prefix;
     }
 
     /**
@@ -121,20 +143,45 @@
     public String getLocalName() {
         return name;
     }
+    
+    public String getModelName() {
+    	return buildModelName(this.name, this.prefix);
+    }
+    
+    private static String buildModelName(String name, String... prefix) {
+    	if (prefix == null || prefix.length == 0) {
+    		return name;
+    	}
+    	
+    	StringBuilder sb = new StringBuilder();
+        sb.append(prefix[0]);
+        for (int i = 1; i < prefix.length; i++) {
+        	sb.append("-"); //$NON-NLS-1$
+        	sb.append(prefix[i]);
+        }
+        sb.append("-"); //$NON-NLS-1$
+        sb.append(name);
+    	return sb.toString();    	
+    }
+    
+    public String[] getPrefix() {
+    	return this.prefix;
+    }
 
     private static final Map<String, Element> elements;
 
     static {
         final Map<String, Element> map = new HashMap<String, Element>();
         for (Element element : values()) {
-            final String name = element.getLocalName();
+            final String name = element.getModelName();
             if (name != null) map.put(name, element);
         }
         elements = map;
     }
 
-    public static Element forName(String localName) {
-        final Element element = elements.get(localName);
+    public static Element forName(String localName, String... prefix) {
+    	String modelName = buildModelName(localName, prefix);
+        final Element element = elements.get(modelName);
         return element == null ? UNKNOWN : element;
     }
 }

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/ObjectSerializer.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/ObjectSerializer.java	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/ObjectSerializer.java	2011-09-28 15:25:16 UTC (rev 3505)
@@ -122,7 +122,6 @@
 
 	public OutputStream getVdbXmlOutputStream(VDBMetaData vdb) throws IOException {
 		File f = buildVdbXml(vdb);
-		f.mkdirs();
 		return new FileOutputStream(f);
 	}	
 }

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineAdd.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineAdd.java	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineAdd.java	2011-09-28 15:25:16 UTC (rev 3505)
@@ -72,18 +72,13 @@
         node.get(OPERATION_NAME).set(ADD);
         node.get(DESCRIPTION).set("engine.add");  //$NON-NLS-1$
         
-        ModelNode engine = node.get(REQUEST_PROPERTIES, Configuration.QUERY_ENGINE);
-        describeQueryEngine(engine, ATTRIBUTES, bundle);
+        describeQueryEngine(node, REQUEST_PROPERTIES, bundle);
         return node;
 	}
 	
 	@Override
 	protected void populateModel(ModelNode operation, ModelNode model) {
-        final ModelNode address = operation.require(OP_ADDR);
-        final PathAddress pathAddress = PathAddress.pathAddress(address);
-    	final String engineName = pathAddress.getLastElement().getValue();
-
-		populate(engineName, operation, model);
+		populate(operation, model);
 	}
 	
 	@Override
@@ -101,17 +96,14 @@
     	// now build the engine
     	final RuntimeEngineDeployer engine = buildQueryEngine(engineName, operation);
     	engine.setSecurityHelper(new JBossSecurityHelper());
-    	// TODO: none of the caching is configured..
     	
-    	SocketConfiguration jdbc = null;
-    	if (operation.hasDefined(Configuration.JDBC)) {
-    		jdbc = buildSocketConfiguration(operation.get(Configuration.JDBC));
+    	SocketConfiguration jdbc = buildSocketConfiguration(Configuration.JDBC, operation);
+    	if (jdbc != null) {
     		engine.setJdbcSocketConfiguration(jdbc);
     	}
     	
-    	SocketConfiguration odbc = null;
-    	if (operation.hasDefined(Configuration.ODBC)) {
-    		odbc = buildSocketConfiguration(operation.get(Configuration.ODBC));
+    	SocketConfiguration odbc = buildSocketConfiguration(Configuration.ODBC, operation);
+    	if (odbc != null) {
     		engine.setOdbcSocketConfiguration(odbc);
     	}    	
         
@@ -222,64 +214,61 @@
 	}
         
     
-	private SocketConfiguration buildSocketConfiguration(ModelNode node) {
-		SocketConfiguration socket = new SocketConfiguration();
+	private SocketConfiguration buildSocketConfiguration(String prefix, ModelNode node) {
 		
-		if (node.hasDefined(Configuration.SOCKET_BINDING)) {
-			socket.setSocketBinding(node.require(Configuration.SOCKET_BINDING).asString());
+		if (!node.hasDefined(prefix+Configuration.SOCKET_BINDING)) {
+			return null;
 		}
-		else {
-			throw new IllegalArgumentException(IntegrationPlugin.Util.getString(Configuration.SOCKET_BINDING+".not_defined")); //$NON-NLS-1$
-		}
+		
+		SocketConfiguration socket = new SocketConfiguration();
+		socket.setSocketBinding(node.require(prefix+Configuration.SOCKET_BINDING).asString());
 
-   		if (node.hasDefined(Configuration.MAX_SOCKET_THREAD_SIZE)) {
-    		socket.setMaxSocketThreads(node.get(Configuration.MAX_SOCKET_THREAD_SIZE).asInt());
+   		if (node.hasDefined(prefix+Configuration.MAX_SOCKET_THREAD_SIZE)) {
+    		socket.setMaxSocketThreads(node.get(prefix+Configuration.MAX_SOCKET_THREAD_SIZE).asInt());
     	}
-    	if (node.hasDefined(Configuration.IN_BUFFER_SIZE)) {
-    		socket.setInputBufferSize(node.get(Configuration.IN_BUFFER_SIZE).asInt());
+    	if (node.hasDefined(prefix+Configuration.IN_BUFFER_SIZE)) {
+    		socket.setInputBufferSize(node.get(prefix+Configuration.IN_BUFFER_SIZE).asInt());
     	}	
-    	if (node.hasDefined(Configuration.OUT_BUFFER_SIZE)) {
-    		socket.setOutputBufferSize(node.get(Configuration.OUT_BUFFER_SIZE).asInt());
+    	if (node.hasDefined(prefix+Configuration.OUT_BUFFER_SIZE)) {
+    		socket.setOutputBufferSize(node.get(prefix+Configuration.OUT_BUFFER_SIZE).asInt());
     	}		   
     	
     	SSLConfiguration ssl = new SSLConfiguration();
     	ssl.setAuthenticationMode(SSLConfiguration.ANONYMOUS);
     	
-    	if (node.hasDefined(Configuration.SSL)) {
-    		ModelNode sslNode = node.get(Configuration.SSL);
+    	String sslPrefix = prefix+ Configuration.SSL +TeiidBootServicesAdd.DASH;
     		
-        	if (sslNode.hasDefined(Configuration.SSL_MODE)) {
-        		ssl.setMode(sslNode.get(Configuration.SSL_MODE).asString());
-        	}
-        	
-        	if (sslNode.hasDefined(Configuration.KEY_STORE_FILE)) {
-        		ssl.setKeystoreFilename(sslNode.get(Configuration.KEY_STORE_FILE).asString());
-        	}	
-        	
-        	if (sslNode.hasDefined(Configuration.KEY_STORE_PASSWD)) {
-        		ssl.setKeystorePassword(sslNode.get(Configuration.KEY_STORE_PASSWD).asString());
-        	}	
-        	
-        	if (sslNode.hasDefined(Configuration.KEY_STORE_TYPE)) {
-        		ssl.setKeystoreType(sslNode.get(Configuration.KEY_STORE_TYPE).asString());
-        	}		
-        	
-        	if (sslNode.hasDefined(Configuration.SSL_PROTOCOL)) {
-        		ssl.setSslProtocol(sslNode.get(Configuration.SSL_PROTOCOL).asString());
-        	}	
-        	if (sslNode.hasDefined(Configuration.KEY_MANAGEMENT_ALG)) {
-        		ssl.setKeymanagementAlgorithm(sslNode.get(Configuration.KEY_MANAGEMENT_ALG).asString());
-        	}
-        	if (sslNode.hasDefined(Configuration.TRUST_FILE)) {
-        		ssl.setTruststoreFilename(sslNode.get(Configuration.TRUST_FILE).asString());
-        	}
-        	if (sslNode.hasDefined(Configuration.TRUST_PASSWD)) {
-        		ssl.setTruststorePassword(sslNode.get(Configuration.TRUST_PASSWD).asString());
-        	}
-        	if (sslNode.hasDefined(Configuration.AUTH_MODE)) {
-        		ssl.setAuthenticationMode(sslNode.get(Configuration.AUTH_MODE).asString());
-        	}
+    	if (node.hasDefined(sslPrefix+Configuration.SSL_MODE)) {
+    		ssl.setMode(node.get(sslPrefix+Configuration.SSL_MODE).asString());
     	}
+    	
+    	if (node.hasDefined(sslPrefix+Configuration.KEY_STORE_FILE)) {
+    		ssl.setKeystoreFilename(node.get(sslPrefix+Configuration.KEY_STORE_FILE).asString());
+    	}	
+    	
+    	if (node.hasDefined(sslPrefix+Configuration.KEY_STORE_PASSWD)) {
+    		ssl.setKeystorePassword(node.get(sslPrefix+Configuration.KEY_STORE_PASSWD).asString());
+    	}	
+    	
+    	if (node.hasDefined(sslPrefix+Configuration.KEY_STORE_TYPE)) {
+    		ssl.setKeystoreType(node.get(sslPrefix+Configuration.KEY_STORE_TYPE).asString());
+    	}		
+    	
+    	if (node.hasDefined(sslPrefix+Configuration.SSL_PROTOCOL)) {
+    		ssl.setSslProtocol(node.get(sslPrefix+Configuration.SSL_PROTOCOL).asString());
+    	}	
+    	if (node.hasDefined(sslPrefix+Configuration.KEY_MANAGEMENT_ALG)) {
+    		ssl.setKeymanagementAlgorithm(node.get(sslPrefix+Configuration.KEY_MANAGEMENT_ALG).asString());
+    	}
+    	if (node.hasDefined(sslPrefix+Configuration.TRUST_FILE)) {
+    		ssl.setTruststoreFilename(node.get(sslPrefix+Configuration.TRUST_FILE).asString());
+    	}
+    	if (node.hasDefined(sslPrefix+Configuration.TRUST_PASSWD)) {
+    		ssl.setTruststorePassword(node.get(sslPrefix+Configuration.TRUST_PASSWD).asString());
+    	}
+    	if (node.hasDefined(sslPrefix+Configuration.AUTH_MODE)) {
+    		ssl.setAuthenticationMode(node.get(sslPrefix+Configuration.AUTH_MODE).asString());
+    	}
     	socket.setSSLConfiguration(ssl);
     	
 		return socket;
@@ -304,50 +293,34 @@
 		addAttribute(node, Configuration.SESSION_EXPIRATION_TIME_LIMIT, type, bundle.getString(Configuration.SESSION_EXPIRATION_TIME_LIMIT+DESC), ModelType.INT, false, "0"); //$NON-NLS-1$
 		
 		//jdbc
-		ModelNode jdbcSocketNode = node.get(CHILDREN, Configuration.JDBC);
-		jdbcSocketNode.get(TYPE).set(ModelType.OBJECT);
-		jdbcSocketNode.get(DESCRIPTION).set(bundle.getString(Configuration.JDBC+DESC));
-		jdbcSocketNode.get(REQUIRED).set(false);
-		jdbcSocketNode.get(MAX_OCCURS).set(1);
-		jdbcSocketNode.get(MIN_OCCURS).set(1);	
-		describeSocketConfig(jdbcSocketNode, type, bundle);
+		describeSocketConfig(Configuration.JDBC+TeiidBootServicesAdd.DASH, node, type, bundle);
 		
 		//odbc
-		ModelNode odbcSocketNode = node.get(CHILDREN, Configuration.ODBC);
-		odbcSocketNode.get(TYPE).set(ModelType.OBJECT);
-		odbcSocketNode.get(DESCRIPTION).set(bundle.getString(Configuration.ODBC+DESC));
-		odbcSocketNode.get(REQUIRED).set(false);
-		odbcSocketNode.get(MAX_OCCURS).set(1);
-		odbcSocketNode.get(MIN_OCCURS).set(1);	
-		describeSocketConfig(odbcSocketNode, type, bundle);			
+		describeSocketConfig(Configuration.ODBC+TeiidBootServicesAdd.DASH, node, type, bundle);			
 	}
 	
 	
-	private static void describeSocketConfig(ModelNode node, String type, ResourceBundle bundle) {
-		addAttribute(node, Configuration.MAX_SOCKET_THREAD_SIZE, type, bundle.getString(Configuration.MAX_SOCKET_THREAD_SIZE+DESC), ModelType.INT, false, "0"); //$NON-NLS-1$
-		addAttribute(node, Configuration.IN_BUFFER_SIZE, type, bundle.getString(Configuration.IN_BUFFER_SIZE+DESC), ModelType.INT, false, "0"); //$NON-NLS-1$
-		addAttribute(node, Configuration.OUT_BUFFER_SIZE, type, bundle.getString(Configuration.OUT_BUFFER_SIZE+DESC), ModelType.INT, false, "0"); //$NON-NLS-1$
-		addAttribute(node, Configuration.SOCKET_BINDING, type, bundle.getString(Configuration.SOCKET_BINDING+DESC), ModelType.STRING, true, null);
+	private static void describeSocketConfig(String prefix, ModelNode node, String type, ResourceBundle bundle) {
+		addAttribute(node, prefix+Configuration.MAX_SOCKET_THREAD_SIZE, type, bundle.getString(Configuration.MAX_SOCKET_THREAD_SIZE+DESC), ModelType.INT, false, "0"); //$NON-NLS-1$
+		addAttribute(node, prefix+Configuration.IN_BUFFER_SIZE, type, bundle.getString(Configuration.IN_BUFFER_SIZE+DESC), ModelType.INT, false, "0"); //$NON-NLS-1$
+		addAttribute(node, prefix+Configuration.OUT_BUFFER_SIZE, type, bundle.getString(Configuration.OUT_BUFFER_SIZE+DESC), ModelType.INT, false, "0"); //$NON-NLS-1$
+		addAttribute(node, prefix+Configuration.SOCKET_BINDING, type, bundle.getString(Configuration.SOCKET_BINDING+DESC), ModelType.STRING, false, null);
 		
-		ModelNode sslNode = node.get(CHILDREN, Configuration.SSL);
-		sslNode.get(TYPE).set(ModelType.OBJECT);
-		sslNode.get(DESCRIPTION).set(bundle.getString(Configuration.SSL+DESC));
-		sslNode.get(REQUIRED).set(false);
-		sslNode.get(MAX_OCCURS).set(1);
-		sslNode.get(MIN_OCCURS).set(0);
-		addAttribute(node, Configuration.SSL_MODE, type, bundle.getString(Configuration.SSL_MODE+DESC), ModelType.STRING, false, "login");	//$NON-NLS-1$
-		addAttribute(node, Configuration.KEY_STORE_FILE, type, bundle.getString(Configuration.KEY_STORE_FILE+DESC), ModelType.STRING, false, null);	
-		addAttribute(node, Configuration.KEY_STORE_PASSWD, type, bundle.getString(Configuration.KEY_STORE_PASSWD+DESC), ModelType.STRING, false, null);
-		addAttribute(node, Configuration.KEY_STORE_TYPE, type, bundle.getString(Configuration.KEY_STORE_TYPE+DESC), ModelType.STRING, false, "JKS"); //$NON-NLS-1$
-		addAttribute(node, Configuration.SSL_PROTOCOL, type, bundle.getString(Configuration.SSL_PROTOCOL+DESC), ModelType.BOOLEAN, false, "SSLv3");	//$NON-NLS-1$
-		addAttribute(node, Configuration.KEY_MANAGEMENT_ALG, type, bundle.getString(Configuration.KEY_MANAGEMENT_ALG+DESC), ModelType.STRING, false, "false");	//$NON-NLS-1$
-		addAttribute(node, Configuration.TRUST_FILE, type, bundle.getString(Configuration.TRUST_FILE+DESC), ModelType.STRING, false, null);	
-		addAttribute(node, Configuration.TRUST_PASSWD, type, bundle.getString(Configuration.TRUST_PASSWD+DESC), ModelType.STRING, false, null);	
-		addAttribute(node, Configuration.AUTH_MODE, type, bundle.getString(Configuration.AUTH_MODE+DESC), ModelType.STRING, false, "anonymous");	//$NON-NLS-1$
+		String sslPrefix = prefix+Configuration.SSL+TeiidBootServicesAdd.DASH;
+
+		addAttribute(node, sslPrefix+Configuration.SSL_MODE, type, bundle.getString(Configuration.SSL_MODE+DESC), ModelType.STRING, false, "login");	//$NON-NLS-1$
+		addAttribute(node, sslPrefix+Configuration.KEY_STORE_FILE, type, bundle.getString(Configuration.KEY_STORE_FILE+DESC), ModelType.STRING, false, null);	
+		addAttribute(node, sslPrefix+Configuration.KEY_STORE_PASSWD, type, bundle.getString(Configuration.KEY_STORE_PASSWD+DESC), ModelType.STRING, false, null);
+		addAttribute(node, sslPrefix+Configuration.KEY_STORE_TYPE, type, bundle.getString(Configuration.KEY_STORE_TYPE+DESC), ModelType.STRING, false, "JKS"); //$NON-NLS-1$
+		addAttribute(node, sslPrefix+Configuration.SSL_PROTOCOL, type, bundle.getString(Configuration.SSL_PROTOCOL+DESC), ModelType.STRING, false, "SSLv3");	//$NON-NLS-1$
+		addAttribute(node, sslPrefix+Configuration.KEY_MANAGEMENT_ALG, type, bundle.getString(Configuration.KEY_MANAGEMENT_ALG+DESC), ModelType.STRING, false, null);
+		addAttribute(node, sslPrefix+Configuration.TRUST_FILE, type, bundle.getString(Configuration.TRUST_FILE+DESC), ModelType.STRING, false, null);	
+		addAttribute(node, sslPrefix+Configuration.TRUST_PASSWD, type, bundle.getString(Configuration.TRUST_PASSWD+DESC), ModelType.STRING, false, null);	
+		addAttribute(node, sslPrefix+Configuration.AUTH_MODE, type, bundle.getString(Configuration.AUTH_MODE+DESC), ModelType.STRING, false, "anonymous");	//$NON-NLS-1$
 	}	
 	
-	static void populate(String engineName, ModelNode operation, ModelNode model) {
-		model.get(Configuration.ENGINE_NAME).set(engineName);
+	static void populate(ModelNode operation, ModelNode model) {
+		//model.get(Configuration.ENGINE_NAME).set(engineName);
 		
 		if (operation.hasDefined(Configuration.MAX_THREADS)) {
     		model.get(Configuration.MAX_THREADS).set(operation.get(Configuration.MAX_THREADS).asInt());
@@ -395,65 +368,57 @@
     		model.get(Configuration.MAX_SESSIONS_ALLOWED).set(operation.get(Configuration.MAX_SESSIONS_ALLOWED).asInt());
     	}		 
     	
-    	if (operation.hasDefined(Configuration.JDBC)) {
-    		populateSocketConfiguration(operation.get(Configuration.JDBC), model.get(Configuration.JDBC));
-    	}
-    	
-    	if (operation.hasDefined(Configuration.ODBC)) {
-    		populateSocketConfiguration(operation.get(Configuration.ODBC), model.get(Configuration.ODBC));
-    	}     	
+		populateSocketConfiguration(Configuration.JDBC+TeiidBootServicesAdd.DASH, operation, model);
+	
+		populateSocketConfiguration(Configuration.ODBC+TeiidBootServicesAdd.DASH, operation, model);
 	}
 
-	private static void populateSocketConfiguration(ModelNode operation, ModelNode model) {
-		if (operation.hasDefined(Configuration.SOCKET_BINDING)) {
-			model.get(Configuration.SOCKET_BINDING).set(operation.get(Configuration.SOCKET_BINDING).asString());
+	private static void populateSocketConfiguration(String prefix, ModelNode operation, ModelNode model) {
+		if (operation.hasDefined(prefix+Configuration.SOCKET_BINDING)) {
+			model.get(prefix+Configuration.SOCKET_BINDING).set(operation.get(prefix+Configuration.SOCKET_BINDING).asString());
 		}
-   		if (operation.hasDefined(Configuration.MAX_SOCKET_THREAD_SIZE)) {
-    		model.get(Configuration.MAX_SOCKET_THREAD_SIZE).set(operation.get(Configuration.MAX_SOCKET_THREAD_SIZE).asInt());
+   		if (operation.hasDefined(prefix+Configuration.MAX_SOCKET_THREAD_SIZE)) {
+    		model.get(prefix+Configuration.MAX_SOCKET_THREAD_SIZE).set(operation.get(prefix+Configuration.MAX_SOCKET_THREAD_SIZE).asInt());
     	}
-    	if (operation.hasDefined(Configuration.IN_BUFFER_SIZE)) {
-    		model.get(Configuration.IN_BUFFER_SIZE).set(operation.get(Configuration.IN_BUFFER_SIZE).asInt());
+    	if (operation.hasDefined(prefix+Configuration.IN_BUFFER_SIZE)) {
+    		model.get(prefix+Configuration.IN_BUFFER_SIZE).set(operation.get(prefix+Configuration.IN_BUFFER_SIZE).asInt());
     	}	
-    	if (operation.hasDefined(Configuration.OUT_BUFFER_SIZE)) {
-    		model.get(Configuration.OUT_BUFFER_SIZE).set(operation.get(Configuration.OUT_BUFFER_SIZE).asInt());
+    	if (operation.hasDefined(prefix+Configuration.OUT_BUFFER_SIZE)) {
+    		model.get(prefix+Configuration.OUT_BUFFER_SIZE).set(operation.get(prefix+Configuration.OUT_BUFFER_SIZE).asInt());
     	}		   
     	
+    	String sslPrefix = prefix+Configuration.SSL+TeiidBootServicesAdd.DASH;
     	
-    	if (operation.hasDefined(Configuration.SSL)) {
-    		operation = operation.get(Configuration.SSL);
-    		model = model.get(Configuration.SSL);
-    		
-        	if (operation.hasDefined(Configuration.SSL_MODE)) {
-        		model.get(Configuration.SSL_MODE).set(operation.get(Configuration.SSL_MODE).asString());
-        	}
-        	
-        	if (operation.hasDefined(Configuration.KEY_STORE_FILE)) {
-        		model.get(Configuration.KEY_STORE_FILE).set(operation.get(Configuration.KEY_STORE_FILE).asString());
-        	}	
-        	
-        	if (operation.hasDefined(Configuration.KEY_STORE_PASSWD)) {
-        		model.get(Configuration.KEY_STORE_PASSWD).set(operation.get(Configuration.KEY_STORE_PASSWD).asString());
-        	}	
-        	
-        	if (operation.hasDefined(Configuration.KEY_STORE_TYPE)) {
-        		model.get(Configuration.KEY_STORE_TYPE).set(operation.get(Configuration.KEY_STORE_TYPE).asString());
-        	}		
-        	
-        	if (operation.hasDefined(Configuration.SSL_PROTOCOL)) {
-        		model.get(Configuration.SSL_PROTOCOL).set(operation.get(Configuration.SSL_PROTOCOL).asString());
-        	}	
-        	if (operation.hasDefined(Configuration.KEY_MANAGEMENT_ALG)) {
-        		model.get(Configuration.KEY_MANAGEMENT_ALG).set(operation.get(Configuration.KEY_MANAGEMENT_ALG).asString());
-        	}
-        	if (operation.hasDefined(Configuration.TRUST_FILE)) {
-        		model.get(Configuration.TRUST_FILE).set(operation.get(Configuration.TRUST_FILE).asString());
-        	}
-        	if (operation.hasDefined(Configuration.TRUST_PASSWD)) {
-        		model.get(Configuration.TRUST_PASSWD).set(operation.get(Configuration.TRUST_PASSWD).asString());
-        	}
-        	if (operation.hasDefined(Configuration.AUTH_MODE)) {
-        		model.get(Configuration.AUTH_MODE).set(operation.get(Configuration.AUTH_MODE).asString());
-        	}
+    	if (operation.hasDefined(sslPrefix+Configuration.SSL_MODE)) {
+    		model.get(sslPrefix+Configuration.SSL_MODE).set(operation.get(sslPrefix+Configuration.SSL_MODE).asString());
     	}
+    	
+    	if (operation.hasDefined(sslPrefix+Configuration.KEY_STORE_FILE)) {
+    		model.get(sslPrefix+Configuration.KEY_STORE_FILE).set(operation.get(sslPrefix+Configuration.KEY_STORE_FILE).asString());
+    	}	
+    	
+    	if (operation.hasDefined(sslPrefix+Configuration.KEY_STORE_PASSWD)) {
+    		model.get(sslPrefix+Configuration.KEY_STORE_PASSWD).set(operation.get(sslPrefix+Configuration.KEY_STORE_PASSWD).asString());
+    	}	
+    	
+    	if (operation.hasDefined(sslPrefix+Configuration.KEY_STORE_TYPE)) {
+    		model.get(sslPrefix+Configuration.KEY_STORE_TYPE).set(operation.get(sslPrefix+Configuration.KEY_STORE_TYPE).asString());
+    	}		
+    	
+    	if (operation.hasDefined(sslPrefix+Configuration.SSL_PROTOCOL)) {
+    		model.get(sslPrefix+Configuration.SSL_PROTOCOL).set(operation.get(sslPrefix+Configuration.SSL_PROTOCOL).asString());
+    	}	
+    	if (operation.hasDefined(sslPrefix+Configuration.KEY_MANAGEMENT_ALG)) {
+    		model.get(sslPrefix+Configuration.KEY_MANAGEMENT_ALG).set(operation.get(sslPrefix+Configuration.KEY_MANAGEMENT_ALG).asString());
+    	}
+    	if (operation.hasDefined(sslPrefix+Configuration.TRUST_FILE)) {
+    		model.get(sslPrefix+Configuration.TRUST_FILE).set(operation.get(sslPrefix+Configuration.TRUST_FILE).asString());
+    	}
+    	if (operation.hasDefined(sslPrefix+Configuration.TRUST_PASSWD)) {
+    		model.get(sslPrefix+Configuration.TRUST_PASSWD).set(operation.get(sslPrefix+Configuration.TRUST_PASSWD).asString());
+    	}
+    	if (operation.hasDefined(sslPrefix+Configuration.AUTH_MODE)) {
+    		model.get(sslPrefix+Configuration.AUTH_MODE).set(operation.get(sslPrefix+Configuration.AUTH_MODE).asString());
+    	}
 	}	
 }

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineOperationHandler.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineOperationHandler.java	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineOperationHandler.java	2011-09-28 15:25:16 UTC (rev 3505)
@@ -23,10 +23,13 @@
 
 import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.*;
 
+import java.io.IOException;
 import java.util.Collection;
 import java.util.List;
 import java.util.ResourceBundle;
 
+import javax.xml.stream.XMLStreamException;
+
 import org.jboss.as.controller.OperationContext;
 import org.jboss.as.controller.OperationFailedException;
 import org.jboss.as.controller.PathAddress;
@@ -36,7 +39,6 @@
 import org.teiid.adminapi.Admin;
 import org.teiid.adminapi.AdminException;
 import org.teiid.adminapi.AdminProcessingException;
-import org.teiid.adminapi.VDB;
 import org.teiid.adminapi.impl.*;
 import org.teiid.adminapi.impl.VDBMetadataMapper.TransactionMetadataMapper;
 import org.teiid.adminapi.impl.VDBMetadataMapper.VDBTranslatorMetaDataMapper;
@@ -707,12 +709,15 @@
 	}	
 }
 
-abstract class VDBOperations extends BaseOperationHandler<VDBService>{
+abstract class VDBOperations extends BaseOperationHandler<VDBMetaData>{
+	private ObjectSerializer serializer;
+	
 	public VDBOperations(String operationName) {
 		super(operationName);
 	}
+	
 	@Override
-	public VDBService getService(OperationContext context, PathAddress pathAddress, ModelNode operation) throws OperationFailedException {
+	public VDBMetaData getService(OperationContext context, PathAddress pathAddress, ModelNode operation) throws OperationFailedException {
 		if (!operation.hasDefined(OperationsConstants.VDB_NAME)) {
 			throw new OperationFailedException(new ModelNode().set(IntegrationPlugin.Util.getString(OperationsConstants.VDB_NAME+MISSING)));
 		}
@@ -723,8 +728,12 @@
 
 		String vdbName = operation.get(OperationsConstants.VDB_NAME).asString();
 		int vdbVersion = operation.get(OperationsConstants.VDB_VERSION).asInt();
+
+		ServiceController<?> osSvc = context.getServiceRegistry(false).getRequiredService(TeiidServiceNames.OBJECT_SERIALIZER);
+		this.serializer = ObjectSerializer.class.cast(osSvc.getValue());
+		
 		ServiceController<?> sc = context.getServiceRegistry(false).getRequiredService(TeiidServiceNames.vdbServiceName(vdbName, vdbVersion));
-        return VDBService.class.cast(sc.getValue());	
+        return VDBMetaData.class.cast(sc.getValue());	
 	}
 	
 	protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
@@ -736,6 +745,16 @@
 		operationNode.get(REQUEST_PROPERTIES, OperationsConstants.VDB_VERSION, REQUIRED).set(true);
 		operationNode.get(REQUEST_PROPERTIES, OperationsConstants.VDB_VERSION, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.VDB_VERSION));
 	}	
+	
+	protected void save(VDBMetaData vdb) throws AdminProcessingException{
+		try {
+			VDBMetadataParser.marshell(vdb, this.serializer.getVdbXmlOutputStream(vdb));
+		} catch (IOException e) {
+			throw new AdminProcessingException(e);
+		} catch (XMLStreamException e) {
+			throw new AdminProcessingException(e);
+		}
+	}	
 }
 
 class AddDataRole extends VDBOperations {
@@ -745,7 +764,7 @@
 	}
 	
 	@Override
-	protected void executeOperation(OperationContext context, VDBService service, ModelNode operation) throws OperationFailedException {
+	protected void executeOperation(OperationContext context, VDBMetaData vdb, ModelNode operation) throws OperationFailedException {
 		if (!operation.hasDefined(OperationsConstants.DATA_ROLE)) {
 			throw new OperationFailedException(new ModelNode().set(IntegrationPlugin.Util.getString(OperationsConstants.DATA_ROLE+MISSING)));
 		}
@@ -754,11 +773,18 @@
 			throw new OperationFailedException(new ModelNode().set(IntegrationPlugin.Util.getString(OperationsConstants.MAPPED_ROLE+MISSING)));
 		}
 
-		String dataRole = operation.get(OperationsConstants.DATA_ROLE).asString();
+		String policyName = operation.get(OperationsConstants.DATA_ROLE).asString();
 		String mappedRole = operation.get(OperationsConstants.MAPPED_ROLE).asString();
 		
 		try {
-			service.addDataRole(dataRole, mappedRole);
+			DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
+			
+			if (policy == null) {
+				throw new AdminProcessingException(IntegrationPlugin.Util.getString("policy_not_found", policyName, vdb.getName(), vdb.getVersion())); //$NON-NLS-1$
+			}		
+			
+			policy.addMappedRoleName(mappedRole);
+			save(vdb);
 		} catch (AdminProcessingException e) {
 			throw new OperationFailedException(new ModelNode().set(e.getMessage()));
 		}
@@ -785,7 +811,7 @@
 	}
 	
 	@Override
-	protected void executeOperation(OperationContext context, VDBService service, ModelNode operation) throws OperationFailedException {
+	protected void executeOperation(OperationContext context, VDBMetaData vdb, ModelNode operation) throws OperationFailedException {
 		if (!operation.hasDefined(OperationsConstants.DATA_ROLE)) {
 			throw new OperationFailedException(new ModelNode().set(IntegrationPlugin.Util.getString(OperationsConstants.DATA_ROLE+MISSING)));
 		}
@@ -794,11 +820,18 @@
 			throw new OperationFailedException(new ModelNode().set(IntegrationPlugin.Util.getString(OperationsConstants.MAPPED_ROLE+MISSING)));
 		}
 
-		String dataRole = operation.get(OperationsConstants.DATA_ROLE).asString();
+		String policyName = operation.get(OperationsConstants.DATA_ROLE).asString();
 		String mappedRole = operation.get(OperationsConstants.MAPPED_ROLE).asString();
 		
 		try {
-			service.addDataRole(dataRole, mappedRole);
+			DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
+			
+			if (policy == null) {
+				throw new AdminProcessingException(IntegrationPlugin.Util.getString("policy_not_found", policyName, vdb.getName(), vdb.getVersion())); //$NON-NLS-1$
+			}		
+			
+			policy.removeMappedRoleName(mappedRole);
+			save(vdb);
 		} catch (AdminProcessingException e) {
 			throw new OperationFailedException(new ModelNode().set(e.getMessage()));
 		}
@@ -825,15 +858,22 @@
 	}
 	
 	@Override
-	protected void executeOperation(OperationContext context, VDBService service, ModelNode operation) throws OperationFailedException {
+	protected void executeOperation(OperationContext context, VDBMetaData vdb, ModelNode operation) throws OperationFailedException {
 		if (!operation.hasDefined(OperationsConstants.DATA_ROLE)) {
 			throw new OperationFailedException(new ModelNode().set(IntegrationPlugin.Util.getString(OperationsConstants.DATA_ROLE+MISSING)));
 		}
 
-		String dataRole = operation.get(OperationsConstants.DATA_ROLE).asString();
+		String policyName = operation.get(OperationsConstants.DATA_ROLE).asString();
 		
 		try {
-			service.addAnyAuthenticated(dataRole);
+			DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
+			
+			if (policy == null) {
+				throw new AdminProcessingException(IntegrationPlugin.Util.getString("policy_not_found", policyName, vdb.getName(), vdb.getVersion())); //$NON-NLS-1$
+			}		
+			
+			policy.setAnyAuthenticated(true);
+			save(vdb);
 		} catch (AdminProcessingException e) {
 			throw new OperationFailedException(new ModelNode().set(e.getMessage()));
 		}
@@ -857,15 +897,22 @@
 	}
 	
 	@Override
-	protected void executeOperation(OperationContext context, VDBService service, ModelNode operation) throws OperationFailedException {
+	protected void executeOperation(OperationContext context, VDBMetaData vdb, ModelNode operation) throws OperationFailedException {
 		if (!operation.hasDefined(OperationsConstants.DATA_ROLE)) {
 			throw new OperationFailedException(new ModelNode().set(IntegrationPlugin.Util.getString(OperationsConstants.DATA_ROLE+MISSING)));
 		}
 
-		String dataRole = operation.get(OperationsConstants.DATA_ROLE).asString();
+		String policyName = operation.get(OperationsConstants.DATA_ROLE).asString();
 		
 		try {
-			service.removeAnyAuthenticated(dataRole);
+			DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
+			
+			if (policy == null) {
+				throw new AdminProcessingException(IntegrationPlugin.Util.getString("policy_not_found", policyName, vdb.getName(), vdb.getVersion())); //$NON-NLS-1$
+			}		
+			
+			policy.setAnyAuthenticated(false);
+			save(vdb);
 		} catch (AdminProcessingException e) {
 			throw new OperationFailedException(new ModelNode().set(e.getMessage()));
 		}
@@ -888,14 +935,15 @@
 	}
 	
 	@Override
-	protected void executeOperation(OperationContext context, VDBService service, ModelNode operation) throws OperationFailedException {
+	protected void executeOperation(OperationContext context, VDBMetaData vdb, ModelNode operation) throws OperationFailedException {
 		if (!operation.hasDefined(OperationsConstants.CONNECTION_TYPE)) {
 			throw new OperationFailedException(new ModelNode().set(IntegrationPlugin.Util.getString(OperationsConstants.CONNECTION_TYPE+MISSING)));
 		}
 
 		String connectionType = operation.get(OperationsConstants.CONNECTION_TYPE).asString();
 		try {
-			service.changeConnectionType(VDB.ConnectionType.valueOf(connectionType));
+			vdb.setConnectionType(connectionType);
+			save(vdb);
 		} catch (AdminProcessingException e) {
 			throw new OperationFailedException(new ModelNode().set(e.getMessage()));
 		}
@@ -918,7 +966,7 @@
 	}
 	
 	@Override
-	protected void executeOperation(OperationContext context, VDBService service, ModelNode operation) throws OperationFailedException {
+	protected void executeOperation(OperationContext context, VDBMetaData vdb, ModelNode operation) throws OperationFailedException {
 		if (!operation.hasDefined(OperationsConstants.MODEL_NAME)) {
 			throw new OperationFailedException(new ModelNode().set(IntegrationPlugin.Util.getString(OperationsConstants.MODEL_NAME+MISSING)));
 		}
@@ -942,7 +990,19 @@
 		String dsName = operation.get(OperationsConstants.DS_NAME).asString();
 		
 		try {
-			service.assignDatasource(modelName, sourceName, translatorName, dsName);
+			ModelMetaData model = vdb.getModel(modelName);
+			
+			if (model == null) {
+				throw new AdminProcessingException(IntegrationPlugin.Util.getString("model_not_found", modelName, vdb.getName(), vdb.getVersion())); //$NON-NLS-1$
+			}
+			
+			SourceMappingMetadata source = model.getSourceMapping(sourceName);
+			if(source == null) {
+				throw new AdminProcessingException(IntegrationPlugin.Util.getString("source_not_found", sourceName, modelName, vdb.getName(), vdb.getVersion())); //$NON-NLS-1$
+			}
+			source.setTranslatorName(translatorName);
+			source.setConnectionJndiName(dsName);
+			save(vdb);
 		} catch (AdminProcessingException e) {
 			throw new OperationFailedException(new ModelNode().set(e.getMessage()));
 		}

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidBootServicesAdd.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidBootServicesAdd.java	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidBootServicesAdd.java	2011-09-28 15:25:16 UTC (rev 3505)
@@ -63,6 +63,8 @@
 
 class TeiidBootServicesAdd extends AbstractAddStepHandler implements DescriptionProvider {
 
+	static final String DASH = "-"; //$NON-NLS-1$
+
 	@Override
 	public ModelNode getModelDescription(Locale locale) {
         final ResourceBundle bundle = IntegrationPlugin.getResourceBundle(locale);
@@ -81,27 +83,11 @@
 
         addAttribute(node, Configuration.AUTHORIZATION_VALIDATOR_MODULE, type, bundle.getString(Configuration.AUTHORIZATION_VALIDATOR_MODULE+DESC), ModelType.BOOLEAN, false, null);
         addAttribute(node, Configuration.POLICY_DECIDER_MODULE, type, bundle.getString(Configuration.POLICY_DECIDER_MODULE+DESC), ModelType.STRING, false, null);
-        addAttribute(node, Configuration.OBJECT_REPLICATOR, type, bundle.getString(Configuration.OBJECT_REPLICATOR+DESC), ModelType.STRING, false, null);
         
-		ModelNode bufferNode = node.get(CHILDREN, Configuration.BUFFER_SERVICE);
-		bufferNode.get(TYPE).set(ModelType.OBJECT);
-		bufferNode.get(DESCRIPTION).set(bundle.getString(Configuration.BUFFER_SERVICE+DESC));
-		bufferNode.get(REQUIRED).set(false);
-		describeBufferManager(bufferNode, ATTRIBUTES, bundle);		
-        
-		// preparedplan-set-cache
-		ModelNode preparedPlanCacheNode = node.get(CHILDREN, Configuration.PREPAREDPLAN_CACHE);
-		preparedPlanCacheNode.get(TYPE).set(ModelType.OBJECT);
-		preparedPlanCacheNode.get(DESCRIPTION).set(bundle.getString(Configuration.PREPAREDPLAN_CACHE+DESC));
-		preparedPlanCacheNode.get(REQUIRED).set(false);
-		describePreparedPlanCache(preparedPlanCacheNode, ATTRIBUTES, bundle);
-		
-		// result-set-cache
-		ModelNode distributedCacheNode = node.get(CHILDREN, Configuration.RESULTSET_CACHE);
-		distributedCacheNode.get(TYPE).set(ModelType.OBJECT);
-		distributedCacheNode.get(DESCRIPTION).set(bundle.getString(Configuration.RESULTSET_CACHE+DESC));
-		distributedCacheNode.get(REQUIRED).set(false);
-		describeResultsetCache(preparedPlanCacheNode, ATTRIBUTES, bundle);
+        describeObjectReplicator(node, type, bundle);
+		describeBufferManager(node, type, bundle);		
+		describePreparedPlanCache(node, type, bundle);
+		describeResultsetCache(node, type, bundle);
 	}
 
 	@Override
@@ -182,7 +168,7 @@
 
     	// TODO: remove verbose service by moving the buffer service from runtime project
     	newControllers.add(RelativePathService.addService(TeiidServiceNames.BUFFER_DIR, "teiid-buffer", "jboss.server.temp.dir", target)); //$NON-NLS-1$ //$NON-NLS-2$
-    	final BufferServiceImpl bufferManager = buildBufferManager(operation.get(Configuration.BUFFER_SERVICE));
+    	final BufferServiceImpl bufferManager = buildBufferManager(operation);
     	BufferManagerService bufferService = new BufferManagerService(bufferManager);
     	ServiceBuilder<BufferServiceImpl> bufferServiceBuilder = target.addService(TeiidServiceNames.BUFFER_MGR, bufferService);
     	bufferServiceBuilder.addDependency(TeiidServiceNames.BUFFER_DIR, String.class, bufferService.pathInjector);
@@ -230,7 +216,7 @@
     	newControllers.add(target.addService(TeiidServiceNames.CACHE_RESULTSET, resultSetService).install());
     	
     	// prepared-plan cache
-    	final SessionAwareCache<PreparedPlan> preparedPlanCache = buildPreparedPlanCache(operation.get(Configuration.PREPAREDPLAN_CACHE), bufferManager.getBufferManager());
+    	final SessionAwareCache<PreparedPlan> preparedPlanCache = buildPreparedPlanCache(operation, bufferManager.getBufferManager());
     	ValueService<SessionAwareCache<PreparedPlan>> preparedPlanService = new ValueService<SessionAwareCache<PreparedPlan>>(new org.jboss.msc.value.Value<SessionAwareCache<PreparedPlan>>() {
 			@Override
 			public SessionAwareCache<PreparedPlan> getValue() throws IllegalStateException, IllegalArgumentException {
@@ -240,12 +226,11 @@
     	newControllers.add(target.addService(TeiidServiceNames.CACHE_PREPAREDPLAN, preparedPlanService).install());
     	
     	// Object Replicator
-    	if (operation.hasDefined(Configuration.OBJECT_REPLICATOR)) {
-    		ModelNode node = operation.get(Configuration.OBJECT_REPLICATOR);
-    		String stack = node.get(Configuration.STACK).asString();
+    	if (operation.hasDefined(ORC(Configuration.STACK))) {
+    		String stack = operation.get(ORC(Configuration.STACK)).asString();
     		String clusterName = "teiid-rep"; //$NON-NLS-1$ 
-    		if (node.hasDefined(Configuration.CLUSTER_NAME)) {
-    			clusterName = node.get(Configuration.CLUSTER_NAME).asString();
+    		if (operation.hasDefined(ORC(Configuration.CLUSTER_NAME))) {
+    			clusterName = operation.get(ORC(Configuration.CLUSTER_NAME)).asString();
     		}
     		JGroupsObjectReplicatorService replicatorService = new JGroupsObjectReplicatorService(clusterName);
     		replicatorService.setBufferManager(bufferManager.getBufferManager());
@@ -282,17 +267,27 @@
         return services.iterator().next();
     }
 	
-	
+    private static String BS(String name) {
+    	return Configuration.BUFFER_SERVICE+DASH+name;
+    }
 	static void describeBufferManager(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.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_PROCESSING_KB, type, bundle.getString(Configuration.MAX_PROCESSING_KB+DESC), ModelType.INT, false, "-1"); //$NON-NLS-1$
-		addAttribute(node, Configuration.MAX_RESERVED_KB, type, bundle.getString(Configuration.MAX_RESERVED_KB+DESC), ModelType.INT, false, "-1"); //$NON-NLS-1$
-		addAttribute(node, Configuration.MAX_FILE_SIZE, type, bundle.getString(Configuration.MAX_FILE_SIZE+DESC), ModelType.LONG, false, "2048"); //$NON-NLS-1$
-		addAttribute(node, Configuration.MAX_BUFFER_SPACE, type, bundle.getString(Configuration.MAX_BUFFER_SPACE+DESC), ModelType.LONG, false, "51200"); //$NON-NLS-1$
-		addAttribute(node, Configuration.MAX_OPEN_FILES, type, bundle.getString(Configuration.MAX_OPEN_FILES+DESC), ModelType.INT, false, "64"); //$NON-NLS-1$
+		addAttribute(node, BS(Configuration.USE_DISK), type, bundle.getString(Configuration.USE_DISK+DESC), ModelType.BOOLEAN, false, "true"); //$NON-NLS-1$
+		addAttribute(node, BS(Configuration.PROCESSOR_BATCH_SIZE), type, bundle.getString(Configuration.PROCESSOR_BATCH_SIZE+DESC), ModelType.INT, false, "512"); //$NON-NLS-1$
+		addAttribute(node, BS(Configuration.CONNECTOR_BATCH_SIZE), type, bundle.getString(Configuration.CONNECTOR_BATCH_SIZE+DESC), ModelType.INT, false, "1024"); //$NON-NLS-1$
+		addAttribute(node, BS(Configuration.MAX_PROCESSING_KB), type, bundle.getString(Configuration.MAX_PROCESSING_KB+DESC), ModelType.INT, false, "-1"); //$NON-NLS-1$
+		addAttribute(node, BS(Configuration.MAX_RESERVED_KB), type, bundle.getString(Configuration.MAX_RESERVED_KB+DESC), ModelType.INT, false, "-1"); //$NON-NLS-1$
+		addAttribute(node, BS(Configuration.MAX_FILE_SIZE), type, bundle.getString(Configuration.MAX_FILE_SIZE+DESC), ModelType.LONG, false, "2048"); //$NON-NLS-1$
+		addAttribute(node, BS(Configuration.MAX_BUFFER_SPACE), type, bundle.getString(Configuration.MAX_BUFFER_SPACE+DESC), ModelType.LONG, false, "51200"); //$NON-NLS-1$
+		addAttribute(node, BS(Configuration.MAX_OPEN_FILES), type, bundle.getString(Configuration.MAX_OPEN_FILES+DESC), ModelType.INT, false, "64"); //$NON-NLS-1$
 	}	
+		
+    private static String ORC(String name) {
+    	return Configuration.OBJECT_REPLICATOR+DASH+name;
+    }	
+	static void describeObjectReplicator(ModelNode node, String type, ResourceBundle bundle) {
+		addAttribute(node, ORC(Configuration.STACK), type, bundle.getString(Configuration.STACK+DESC), ModelType.STRING, false, null); 
+		addAttribute(node, ORC(Configuration.CLUSTER_NAME), type, bundle.getString(Configuration.CLUSTER_NAME+DESC), ModelType.STRING, false, null);
+	}	
 	
     private BufferServiceImpl  buildBufferManager(ModelNode node) {
     	BufferServiceImpl bufferManger = new BufferServiceImpl();
@@ -301,132 +296,125 @@
     		return bufferManger;
     	}
     	
-    	if (node.hasDefined(Configuration.USE_DISK)) {
-    		bufferManger.setUseDisk(node.get(Configuration.USE_DISK).asBoolean());
+    	if (node.hasDefined(BS(Configuration.USE_DISK))) {
+    		bufferManger.setUseDisk(node.get(BS(Configuration.USE_DISK)).asBoolean());
     	}	                	
-    	if (node.hasDefined(Configuration.PROCESSOR_BATCH_SIZE)) {
-    		bufferManger.setProcessorBatchSize(node.get(Configuration.PROCESSOR_BATCH_SIZE).asInt());
+    	if (node.hasDefined(BS(Configuration.PROCESSOR_BATCH_SIZE))) {
+    		bufferManger.setProcessorBatchSize(node.get(BS(Configuration.PROCESSOR_BATCH_SIZE)).asInt());
     	}	
-    	if (node.hasDefined(Configuration.CONNECTOR_BATCH_SIZE)) {
-    		bufferManger.setConnectorBatchSize(node.get(Configuration.CONNECTOR_BATCH_SIZE).asInt());
+    	if (node.hasDefined(BS(Configuration.CONNECTOR_BATCH_SIZE))) {
+    		bufferManger.setConnectorBatchSize(node.get(BS(Configuration.CONNECTOR_BATCH_SIZE)).asInt());
     	}	
-    	if (node.hasDefined(Configuration.MAX_PROCESSING_KB)) {
-    		bufferManger.setMaxProcessingKb(node.get(Configuration.MAX_PROCESSING_KB).asInt());
+    	if (node.hasDefined(BS(Configuration.MAX_PROCESSING_KB))) {
+    		bufferManger.setMaxProcessingKb(node.get(BS(Configuration.MAX_PROCESSING_KB)).asInt());
     	}
-    	if (node.hasDefined(Configuration.MAX_RESERVED_KB)) {
-    		bufferManger.setMaxReserveKb(node.get(Configuration.MAX_RESERVED_KB).asInt());
+    	if (node.hasDefined(BS(Configuration.MAX_RESERVED_KB))) {
+    		bufferManger.setMaxReserveKb(node.get(BS(Configuration.MAX_RESERVED_KB)).asInt());
     	}
-    	if (node.hasDefined(Configuration.MAX_FILE_SIZE)) {
-    		bufferManger.setMaxFileSize(node.get(Configuration.MAX_FILE_SIZE).asLong());
+    	if (node.hasDefined(BS(Configuration.MAX_FILE_SIZE))) {
+    		bufferManger.setMaxFileSize(node.get(BS(Configuration.MAX_FILE_SIZE)).asLong());
     	}
-    	if (node.hasDefined(Configuration.MAX_BUFFER_SPACE)) {
-    		bufferManger.setMaxBufferSpace(node.get(Configuration.MAX_BUFFER_SPACE).asLong());
+    	if (node.hasDefined(BS(Configuration.MAX_BUFFER_SPACE))) {
+    		bufferManger.setMaxBufferSpace(node.get(BS(Configuration.MAX_BUFFER_SPACE)).asLong());
     	}
-    	if (node.hasDefined(Configuration.MAX_OPEN_FILES)) {
-    		bufferManger.setMaxOpenFiles(node.get(Configuration.MAX_OPEN_FILES).asInt());
+    	if (node.hasDefined(BS(Configuration.MAX_OPEN_FILES))) {
+    		bufferManger.setMaxOpenFiles(node.get(BS(Configuration.MAX_OPEN_FILES)).asInt());
     	}	                	
     	return bufferManger;
     }	
     
     private static void populateBufferManager(ModelNode operation, ModelNode model) {
     	
-    	ModelNode childNode = operation.get(CHILDREN, Configuration.BUFFER_SERVICE);
-    	if (!childNode.isDefined()) {
-    		return;
-    	}
-		if (operation.hasDefined(Configuration.USE_DISK)) {
-			model.get(Configuration.USE_DISK).set(operation.get(Configuration.USE_DISK).asString());
+		if (operation.hasDefined(BS(Configuration.USE_DISK))) {
+			model.get(BS(Configuration.USE_DISK)).set(operation.get(BS(Configuration.USE_DISK)).asString());
 		}
 
-		if (operation.hasDefined(Configuration.PROCESSOR_BATCH_SIZE)) {
-			model.get(Configuration.PROCESSOR_BATCH_SIZE).set(operation.get(Configuration.PROCESSOR_BATCH_SIZE).asString());
+		if (operation.hasDefined(BS(Configuration.PROCESSOR_BATCH_SIZE))) {
+			model.get(BS(Configuration.PROCESSOR_BATCH_SIZE)).set(operation.get(BS(Configuration.PROCESSOR_BATCH_SIZE)).asString());
 		}
-		if (operation.hasDefined(Configuration.CONNECTOR_BATCH_SIZE)) {
-			model.get(Configuration.CONNECTOR_BATCH_SIZE).set(operation.get(Configuration.CONNECTOR_BATCH_SIZE).asString());
+		if (operation.hasDefined(BS(Configuration.CONNECTOR_BATCH_SIZE))) {
+			model.get(BS(Configuration.CONNECTOR_BATCH_SIZE)).set(operation.get(BS(Configuration.CONNECTOR_BATCH_SIZE)).asString());
 		}
-		if (operation.hasDefined(Configuration.MAX_PROCESSING_KB)) {
-			model.get(Configuration.MAX_PROCESSING_KB).set(operation.get(Configuration.MAX_PROCESSING_KB).asString());
+		if (operation.hasDefined(BS(Configuration.MAX_PROCESSING_KB))) {
+			model.get(BS(Configuration.MAX_PROCESSING_KB)).set(operation.get(BS(Configuration.MAX_PROCESSING_KB)).asString());
 		}
-		if (operation.hasDefined(Configuration.MAX_RESERVED_KB)) {
-			model.get(Configuration.MAX_RESERVED_KB).set(operation.get(Configuration.MAX_RESERVED_KB).asString());
+		if (operation.hasDefined(BS(Configuration.MAX_RESERVED_KB))) {
+			model.get(BS(Configuration.MAX_RESERVED_KB)).set(operation.get(BS(Configuration.MAX_RESERVED_KB)).asString());
 		}
-		if (operation.hasDefined(Configuration.MAX_FILE_SIZE)) {
-			model.get(Configuration.MAX_FILE_SIZE).set(operation.get(Configuration.MAX_FILE_SIZE).asString());
+		if (operation.hasDefined(BS(Configuration.MAX_FILE_SIZE))) {
+			model.get(BS(Configuration.MAX_FILE_SIZE)).set(operation.get(BS(Configuration.MAX_FILE_SIZE)).asString());
 		}
-		if (operation.hasDefined(Configuration.MAX_BUFFER_SPACE)) {
-			model.get(Configuration.MAX_BUFFER_SPACE).set(operation.get(Configuration.MAX_BUFFER_SPACE).asString());
+		if (operation.hasDefined(BS(Configuration.MAX_BUFFER_SPACE))) {
+			model.get(BS(Configuration.MAX_BUFFER_SPACE)).set(operation.get(BS(Configuration.MAX_BUFFER_SPACE)).asString());
 		}
-		if (operation.hasDefined(Configuration.MAX_BUFFER_SPACE)) {
-			model.get(Configuration.MAX_BUFFER_SPACE).set(operation.get(Configuration.MAX_BUFFER_SPACE).asString());
+		if (operation.hasDefined(BS(Configuration.MAX_BUFFER_SPACE))) {
+			model.get(BS(Configuration.MAX_BUFFER_SPACE)).set(operation.get(BS(Configuration.MAX_BUFFER_SPACE)).asString());
 		}
-		if (operation.hasDefined(Configuration.MAX_OPEN_FILES)) {
-			model.get(Configuration.MAX_OPEN_FILES).set(operation.get(Configuration.MAX_OPEN_FILES).asString());
+		if (operation.hasDefined(BS(Configuration.MAX_OPEN_FILES))) {
+			model.get(BS(Configuration.MAX_OPEN_FILES)).set(operation.get(BS(Configuration.MAX_OPEN_FILES)).asString());
 		}
     }
     
 	private static void populateResultsetCache(ModelNode operation, ModelNode model) {
-		if (operation.hasDefined(Configuration.RESULTSET_CACHE)) {
-			ModelNode cache = operation.get(Configuration.RESULTSET_CACHE);
-			if (cache.hasDefined(Configuration.NAME)) {
-				model.get(Configuration.RESULTSET_CACHE, Configuration.NAME).set(cache.get(Configuration.NAME).asString());
-			}
-			
-			if (cache.hasDefined(Configuration.CONTAINER_NAME)) {
-				model.get(Configuration.RESULTSET_CACHE, Configuration.CONTAINER_NAME).set(cache.get(Configuration.CONTAINER_NAME).asString());
-			}
+		if (operation.hasDefined(RSC(Configuration.NAME))) {
+			model.get(RSC(Configuration.NAME)).set(operation.get(RSC(Configuration.NAME)).asString());
+		}
+		
+		if (operation.hasDefined(RSC(Configuration.CONTAINER_NAME))) {
+			model.get(RSC(Configuration.CONTAINER_NAME)).set(operation.get(RSC(Configuration.CONTAINER_NAME)).asString());
+		}
 
-			if (cache.hasDefined(Configuration.ENABLE)) {
-				model.get(Configuration.RESULTSET_CACHE, Configuration.ENABLE).set(cache.get(Configuration.ENABLE).asBoolean());
-			}
+		if (operation.hasDefined(RSC(Configuration.ENABLE))) {
+			model.get(RSC(Configuration.ENABLE)).set(operation.get(RSC(Configuration.ENABLE)).asBoolean());
+		}
 
-			if (cache.hasDefined(Configuration.MAX_STALENESS)) {
-				model.get(Configuration.RESULTSET_CACHE, Configuration.MAX_STALENESS).set(cache.get(Configuration.MAX_STALENESS).asInt());
-			}
+		if (operation.hasDefined(RSC(Configuration.MAX_STALENESS))) {
+			model.get(RSC(Configuration.MAX_STALENESS)).set(operation.get(RSC(Configuration.MAX_STALENESS)).asInt());
 		}
 	}    
 	
 	private static void populateObjectReplicator(ModelNode operation, ModelNode model) {
-		if (operation.hasDefined(Configuration.OBJECT_REPLICATOR)) {
-			ModelNode replicator = operation.get(Configuration.OBJECT_REPLICATOR);
-			if (replicator.hasDefined(Configuration.STACK)) {
-				model.get(Configuration.OBJECT_REPLICATOR, Configuration.STACK).set(replicator.get(Configuration.STACK).asString());
-			}
-			
-			if (replicator.hasDefined(Configuration.CLUSTER_NAME)) {
-				model.get(Configuration.OBJECT_REPLICATOR, Configuration.CLUSTER_NAME).set(replicator.get(Configuration.CLUSTER_NAME).asString());
-			}
+		if (operation.hasDefined(ORC(Configuration.STACK))) {
+			model.get(ORC(Configuration.STACK)).set(operation.get(ORC(Configuration.STACK)).asString());
 		}
+		
+		if (operation.hasDefined(ORC(Configuration.CLUSTER_NAME))) {
+			model.get(ORC(Configuration.CLUSTER_NAME)).set(operation.get(ORC(Configuration.CLUSTER_NAME)).asString());
+		}
 	}	
     
 	private static void populatePreparedPlanCache(ModelNode operation, ModelNode model) {
-		if (operation.hasDefined(Configuration.PREPAREDPLAN_CACHE)) {
-			ModelNode cache = operation.get(Configuration.PREPAREDPLAN_CACHE);
-			if (cache.hasDefined(Configuration.MAX_ENTRIES)) {
-	    		model.get(Configuration.MAX_ENTRIES).set(cache.get(Configuration.MAX_ENTRIES).asInt());
-	    	}
-	    	if (cache.hasDefined(Configuration.MAX_AGE_IN_SECS)) {
-	    		model.get(Configuration.MAX_AGE_IN_SECS).set(cache.get(Configuration.MAX_AGE_IN_SECS).asInt());
-	    	}
-	    	if (cache.hasDefined(Configuration.MAX_STALENESS)) {
-	    		model.get(Configuration.MAX_STALENESS).set(cache.get(Configuration.MAX_STALENESS).asInt());
-	    	}
-		}
+		if (operation.hasDefined(PPC(Configuration.MAX_ENTRIES))) {
+    		model.get(PPC(Configuration.MAX_ENTRIES)).set(operation.get(PPC(Configuration.MAX_ENTRIES)).asInt());
+    	}
+    	if (operation.hasDefined(PPC(Configuration.MAX_AGE_IN_SECS))) {
+    		model.get(PPC(Configuration.MAX_AGE_IN_SECS)).set(operation.get(PPC(Configuration.MAX_AGE_IN_SECS)).asInt());
+    	}
+    	if (operation.hasDefined(PPC(Configuration.MAX_STALENESS))) {
+    		model.get(PPC(Configuration.MAX_STALENESS)).set(operation.get(PPC(Configuration.MAX_STALENESS)).asInt());
+    	}
 	}
 
+    private static String RSC(String name) {
+    	return Configuration.RESULTSET_CACHE+DASH+name;
+    }	
 	private static void describeResultsetCache(ModelNode node, String type, ResourceBundle bundle) {
-		addAttribute(node, Configuration.NAME, type, bundle.getString(Configuration.NAME+DESC), ModelType.STRING, false, "resultset"); //$NON-NLS-1$
-		addAttribute(node, Configuration.MAX_STALENESS, type, bundle.getString(Configuration.MAX_STALENESS+DESC), ModelType.INT, false, "60");//$NON-NLS-1$
-		addAttribute(node, Configuration.ENABLE, type, bundle.getString(Configuration.ENABLE+DESC), ModelType.BOOLEAN, false, null);
-		addAttribute(node, Configuration.CONTAINER_NAME, type, bundle.getString(Configuration.CONTAINER_NAME+DESC), ModelType.STRING, false, null);		
+		addAttribute(node, RSC(Configuration.NAME), type, bundle.getString(RSC(Configuration.NAME)+DESC), ModelType.STRING, false, "resultset"); //$NON-NLS-1$
+		addAttribute(node, RSC(Configuration.MAX_STALENESS), type, bundle.getString(Configuration.MAX_STALENESS+DESC), ModelType.INT, false, "60");//$NON-NLS-1$
+		addAttribute(node, RSC(Configuration.ENABLE), type, bundle.getString(Configuration.ENABLE+DESC), ModelType.BOOLEAN, false, null);
+		addAttribute(node, RSC(Configuration.CONTAINER_NAME), type, bundle.getString(Configuration.CONTAINER_NAME+DESC), ModelType.STRING, false, null);		
 	}
 	
+    private static String PPC(String name) {
+    	return Configuration.PREPAREDPLAN_CACHE+DASH+name;
+    }		
 	private static void describePreparedPlanCache(ModelNode node, String type, ResourceBundle bundle) {
-		addAttribute(node, Configuration.MAX_ENTRIES, type, bundle.getString(Configuration.MAX_ENTRIES+DESC), ModelType.INT, false, "512"); //$NON-NLS-1$
-		addAttribute(node, Configuration.MAX_AGE_IN_SECS, type, bundle.getString(Configuration.MAX_AGE_IN_SECS+DESC), ModelType.INT, false, "28800");//$NON-NLS-1$
-		addAttribute(node, Configuration.MAX_STALENESS, type, bundle.getString(Configuration.MAX_STALENESS+DESC), ModelType.INT, false, "0");//$NON-NLS-1$
+		addAttribute(node, PPC(Configuration.MAX_ENTRIES), type, bundle.getString(Configuration.MAX_ENTRIES+DESC), ModelType.INT, false, "512"); //$NON-NLS-1$
+		addAttribute(node, PPC(Configuration.MAX_AGE_IN_SECS), type, bundle.getString(Configuration.MAX_AGE_IN_SECS+DESC), ModelType.INT, false, "28800");//$NON-NLS-1$
+		addAttribute(node, PPC(Configuration.MAX_STALENESS), type, bundle.getString(Configuration.MAX_STALENESS+DESC), ModelType.INT, false, "0");//$NON-NLS-1$
 	}
     
-    private SessionAwareCache<CachedResults> buildResultsetCache(ModelNode operation, BufferManager bufferManager) throws OperationFailedException {
+    private SessionAwareCache<CachedResults> buildResultsetCache(ModelNode operation, BufferManager bufferManager) {
 
     	CacheConfiguration cacheConfig = new CacheConfiguration();
     	// these settings are not really used; they are defined by infinispan
@@ -436,37 +424,33 @@
     	cacheConfig.setLocation("resultset"); //$NON-NLS-1$
     	cacheConfig.setMaxStaleness(60);
     	
-    	if (!operation.hasDefined(Configuration.RESULTSET_CACHE)) {
-       		SessionAwareCache<CachedResults> resultsetCache = new SessionAwareCache<CachedResults>(new DefaultCacheFactory(), SessionAwareCache.Type.RESULTSET, cacheConfig);
-        	resultsetCache.setBufferManager(bufferManager);
-        	return resultsetCache;
-    	}
+    	if (operation.hasDefined(RSC(Configuration.ENABLE))) {
+    		if (!operation.get(RSC(Configuration.ENABLE)).asBoolean()) {
+    			return null;
+    		}
+    	}    	
     	
-    	ModelNode node = operation.get(Configuration.RESULTSET_CACHE);
-    	ClusterableCacheFactory cacheFactory = new ClusterableCacheFactory();
+    	ClusterableCacheFactory cacheFactory = null;
 
-    	if (node.hasDefined(Configuration.CONTAINER_NAME)) {
-    		cacheFactory.setCacheManager(node.get(Configuration.CONTAINER_NAME).asString());
+    	if (operation.hasDefined(RSC(Configuration.CONTAINER_NAME))) {
+    		cacheFactory = new ClusterableCacheFactory();
+    		cacheFactory.setCacheManager(operation.get(RSC(Configuration.CONTAINER_NAME)).asString());
     	}
     	else {
-    		throw new OperationFailedException(new ModelNode().set(IntegrationPlugin.Util.getString("cache-container-name-required"))); //$NON-NLS-1$
+    		SessionAwareCache<CachedResults> resultsetCache = new SessionAwareCache<CachedResults>(new DefaultCacheFactory(), SessionAwareCache.Type.RESULTSET, cacheConfig);
+        	resultsetCache.setBufferManager(bufferManager);
+        	return resultsetCache;    		
     	}
     	
-    	if (node.hasDefined(Configuration.NAME)) {
-    		cacheFactory.setResultsetCacheName(node.get(Configuration.NAME).asString());
+    	if (operation.hasDefined(RSC(Configuration.NAME))) {
+    		cacheFactory.setResultsetCacheName(operation.get(RSC(Configuration.NAME)).asString());
     	}	 
     	else {
     		cacheFactory.setResultsetCacheName("resultset"); //$NON-NLS-1$
     	}
-    	
-    	if (node.hasDefined(Configuration.ENABLE)) {
-    		if (!node.get(Configuration.ENABLE).asBoolean()) {
-    			return null;
-    		}
-    	}
 
-   		if (node.hasDefined(Configuration.MAX_STALENESS)) {
-    		cacheConfig.setMaxStaleness(node.get(Configuration.MAX_STALENESS).asInt());
+   		if (operation.hasDefined(RSC(Configuration.MAX_STALENESS))) {
+    		cacheConfig.setMaxStaleness(operation.get(RSC(Configuration.MAX_STALENESS)).asInt());
     	}
 
    		SessionAwareCache<CachedResults> resultsetCache = new SessionAwareCache<CachedResults>(cacheFactory, SessionAwareCache.Type.RESULTSET, cacheConfig);
@@ -477,22 +461,22 @@
     
     private SessionAwareCache<PreparedPlan> buildPreparedPlanCache(ModelNode node, BufferManager bufferManager) {
     	CacheConfiguration cacheConfig = new CacheConfiguration();
-    	if (node.hasDefined(Configuration.MAX_ENTRIES)) {
-    		cacheConfig.setMaxEntries(node.get(Configuration.MAX_ENTRIES).asInt());
+    	if (node.hasDefined(PPC(Configuration.MAX_ENTRIES))) {
+    		cacheConfig.setMaxEntries(node.get(PPC(Configuration.MAX_ENTRIES)).asInt());
     	}
     	else {
     		cacheConfig.setMaxEntries(512);
     	}
     	
-    	if (node.hasDefined(Configuration.MAX_AGE_IN_SECS)) {
-    		cacheConfig.setMaxAgeInSeconds(node.get(Configuration.MAX_AGE_IN_SECS).asInt());
+    	if (node.hasDefined(PPC(Configuration.MAX_AGE_IN_SECS))) {
+    		cacheConfig.setMaxAgeInSeconds(node.get(PPC(Configuration.MAX_AGE_IN_SECS)).asInt());
     	}
     	else {
     		cacheConfig.setMaxAgeInSeconds(28800);
     	}
     	
-    	if (node.hasDefined(Configuration.MAX_STALENESS)) {
-    		cacheConfig.setMaxStaleness(node.get(Configuration.MAX_STALENESS).asInt());
+    	if (node.hasDefined(PPC(Configuration.MAX_STALENESS))) {
+    		cacheConfig.setMaxStaleness(node.get(PPC(Configuration.MAX_STALENESS)).asInt());
     	}
     	else {
     		cacheConfig.setMaxStaleness(0);

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java	2011-09-28 15:25:16 UTC (rev 3505)
@@ -119,8 +119,12 @@
 		new AddDataRole().register(teiidSubsystem);
 		new RemoveDataRole().register(teiidSubsystem);
 		new AddAnyAuthenticatedDataRole().register(teiidSubsystem);
+		new AssignDataSource().register(teiidSubsystem);
+		new ChangeVDBConnectionType().register(teiidSubsystem);
+		new RemoveAnyAuthenticatedDataRole().register(teiidSubsystem);
 		
 		// engine level admin api handlers
+		new ListRequests().register(engineSubsystem);
 		new ListSessions().register(engineSubsystem);
 		new RequestsPerSession().register(engineSubsystem);
 		new RequestsPerVDB().register(engineSubsystem);

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemDescribe.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemDescribe.java	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemDescribe.java	2011-09-28 15:25:16 UTC (rev 3505)
@@ -81,7 +81,7 @@
                 addOperation.get(OP).set(ADD);
                 addOperation.get(OP_ADDR).set(address);
                 
-                QueryEngineAdd.populate(container.getName(), container.getValue(), addOperation);
+                QueryEngineAdd.populate(container.getValue(), addOperation);
                 
                 result.add(addOperation);
             }
@@ -96,7 +96,7 @@
                 addOperation.get(OP).set(ADD);
                 addOperation.get(OP_ADDR).set(address);
                 
-                TranslatorAdd.populate(container.getName(), container.getValue(), addOperation);
+                TranslatorAdd.populate(container.getValue(), addOperation);
                 
                 result.add(addOperation);
             }

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java	2011-09-28 15:25:16 UTC (rev 3505)
@@ -27,6 +27,8 @@
 import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUBSYSTEM;
 import static org.jboss.as.controller.parsing.ParseUtils.requireNoAttributes;
 
+import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import java.util.Set;
 
@@ -51,68 +53,76 @@
         	return;
         }
         
+        writeElement(writer, Element.ALLOW_ENV_FUNCTION_ELEMENT, node);
         writeElement(writer, Element.ASYNC_THREAD_GROUP_ELEMENT, node);
-        writeElement(writer, Element.ALLOW_ENV_FUNCTION_ELEMENT, node);
-        writeElement(writer, Element.AUTHORIZATION_VALIDATOR_MODULE_ELEMENT, node);
-        writeElement(writer, Element.POLICY_DECIDER_MODULE_ELEMENT, node);
         
-    	if (has(node, Element.BUFFER_SERVICE_ELEMENT.getLocalName())){
+    	if (like(node, Element.BUFFER_SERVICE_ELEMENT)){
     		writer.writeStartElement(Element.BUFFER_SERVICE_ELEMENT.getLocalName());
-    		writeBufferService(writer, node.get(Element.BUFFER_SERVICE_ELEMENT.getLocalName()));
+    		writeBufferService(writer, node);
     		writer.writeEndElement();
     	}
+
+    	writeElement(writer, Element.AUTHORIZATION_VALIDATOR_MODULE_ELEMENT, node);
+        writeElement(writer, Element.POLICY_DECIDER_MODULE_ELEMENT, node);
+
     	
-    	if (has(node, Element.RESULTSET_CACHE_ELEMENT.getLocalName())){
+    	if (like(node, Element.RESULTSET_CACHE_ELEMENT)){
     		writer.writeStartElement(Element.RESULTSET_CACHE_ELEMENT.getLocalName());
-    		writeResultsetCacheConfiguration(writer, node.get(Element.RESULTSET_CACHE_ELEMENT.getLocalName()));
+    		writeResultsetCacheConfiguration(writer, node);
     		writer.writeEndElement();
     	}    	
     	
-    	if (has(node, Element.PREPAREDPLAN_CACHE_ELEMENT.getLocalName())){
+    	if (like(node, Element.PREPAREDPLAN_CACHE_ELEMENT)){
     		writer.writeStartElement(Element.PREPAREDPLAN_CACHE_ELEMENT.getLocalName());
-    		writePreparedPlanCacheConfiguration(writer, node.get(Element.PREPAREDPLAN_CACHE_ELEMENT.getLocalName()));
+    		writePreparedPlanCacheConfiguration(writer, node);
     		writer.writeEndElement();
     	}
     	
-    	if (has(node, Element.OBJECT_REPLICATOR_ELEMENT.getLocalName())){
+    	if (like(node, Element.OBJECT_REPLICATOR_ELEMENT)){
     		writer.writeStartElement(Element.OBJECT_REPLICATOR_ELEMENT.getLocalName());
-    		writeObjectReplicatorConfiguration(writer, node.get(Element.OBJECT_REPLICATOR_ELEMENT.getLocalName()));
+    		writeObjectReplicatorConfiguration(writer, node);
     		writer.writeEndElement();
     	}
     	
-    	Set<String> engines = node.get(Element.QUERY_ENGINE_ELEMENT.getLocalName()).keys();
-    	if (engines != null && !engines.isEmpty()) {
-    		for (String engine:engines) {
-    	        writer.writeStartElement(Element.QUERY_ENGINE_ELEMENT.getLocalName());
-    	        writeQueryEngine(writer, node.get(Element.QUERY_ENGINE_ELEMENT.getLocalName(), engine));
-    	        writer.writeEndElement();    			
-    		}
+    	if (has(node, Element.QUERY_ENGINE_ELEMENT.getLocalName())) {
+	    	ArrayList<String> engines = new ArrayList<String>(node.get(Element.QUERY_ENGINE_ELEMENT.getLocalName()).keys());
+	    	Collections.sort(engines);
+	    	if (!engines.isEmpty()) {
+	    		for (String engine:engines) {
+	    	        writer.writeStartElement(Element.QUERY_ENGINE_ELEMENT.getLocalName());
+	    	        writeQueryEngine(writer, node.get(Element.QUERY_ENGINE_ELEMENT.getLocalName(), engine), engine);
+	    	        writer.writeEndElement();    			
+	    		}
+	    	}
     	}
     	
-    	Set<String> translators = node.get(Element.TRANSLATOR_ELEMENT.getLocalName()).keys();
-    	if (translators != null && !translators.isEmpty()) {
-    		for (String translator:translators) {
-    	        writer.writeStartElement(Element.TRANSLATOR_ELEMENT.getLocalName());
-    	        writeTranslator(writer, node.get(Element.TRANSLATOR_ELEMENT.getLocalName(), translator));
-    	        writer.writeEndElement();    			
-    		}
-    	}        
+    	if (has(node, Element.TRANSLATOR_ELEMENT.getLocalName())) {
+	    	ArrayList<String> translators = new ArrayList<String>(node.get(Element.TRANSLATOR_ELEMENT.getLocalName()).keys());
+	    	Collections.sort(translators);
+	    	if (!translators.isEmpty()) {
+	    		for (String translator:translators) {
+	    	        writer.writeStartElement(Element.TRANSLATOR_ELEMENT.getLocalName());
+	    	        writeTranslator(writer, node.get(Element.TRANSLATOR_ELEMENT.getLocalName(), translator), translator);
+	    	        writer.writeEndElement();    			
+	    		}
+	    	}        
+    	}
         writer.writeEndElement(); // End of subsystem element
     }
     
     private void writeObjectReplicatorConfiguration(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
-    	writeAttribute(writer, Element.STACK_ATTRIBUTE, node);
-    	writeAttribute(writer, Element.CLUSTER_NAME_ATTRIBUTE, node);
+    	writeAttribute(writer, Element.OR_STACK_ATTRIBUTE, node);
+    	writeAttribute(writer, Element.OR_CLUSTER_NAME_ATTRIBUTE, node);
 	}
 
-	private void writeTranslator(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
-    	writeAttribute(writer, Element.TRANSLATOR_NAME_ATTRIBUTE, node);
+	private void writeTranslator(XMLExtendedStreamWriter writer, ModelNode node, String translatorName) throws XMLStreamException {
+    	writer.writeAttribute(Element.TRANSLATOR_NAME_ATTRIBUTE.getLocalName(), translatorName);
     	writeAttribute(writer, Element.TRANSLATOR_MODULE_ATTRIBUTE, node);
     }
     
     // write the elements according to the schema defined.
-    private void writeQueryEngine( XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
-    	writeAttribute(writer, Element.ENGINE_NAME_ATTRIBUTE, node);
+    private void writeQueryEngine( XMLExtendedStreamWriter writer, ModelNode node, String engineName) throws XMLStreamException {
+    	writer.writeAttribute(Element.ENGINE_NAME_ATTRIBUTE.getLocalName(), engineName);
     	
     	writeElement(writer, Element.MAX_THREADS_ELEMENT, node);
     	writeElement(writer, Element.MAX_ACTIVE_PLANS_ELEMENT, node);
@@ -139,45 +149,72 @@
     	
     	    	
     	//jdbc
-    	if (has(node, Element.JDBC_ELEMENT.getLocalName())){
-    		writer.writeStartElement(Element.JDBC_ELEMENT.getLocalName());
-    		writeSocketConfiguration(writer, node.get(Element.JDBC_ELEMENT.getLocalName()));
-    		writer.writeEndElement();
+    	if (like(node, Element.JDBC_ELEMENT)) {
+			writer.writeStartElement(Element.JDBC_ELEMENT.getLocalName());
+			writeJDBCSocketConfiguration(writer, node);
+			writer.writeEndElement();
     	}
     	
     	//odbc
-    	if (has(node, Element.ODBC_ELEMENT.getLocalName())) {
-    		writer.writeStartElement(Element.ODBC_ELEMENT.getLocalName());
-    		writeSocketConfiguration(writer, node.get(Element.ODBC_ELEMENT.getLocalName()));
-    		writer.writeEndElement();
+    	if (like(node, Element.ODBC_ELEMENT)) {
+			writer.writeStartElement(Element.ODBC_ELEMENT.getLocalName());
+			writeODBCSocketConfiguration(writer, node);
+			writer.writeEndElement();
     	}
     }
     
-    private void writeSocketConfiguration(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
-    	writeAttribute(writer, Element.SOCKET_BINDING_ELEMENT, node);
-    	writeElement(writer, Element.MAX_SOCKET_THREAD_SIZE_ELEMENT, node);
-    	writeElement(writer, Element.IN_BUFFER_SIZE_ELEMENT, node);
-    	writeElement(writer, Element.OUT_BUFFER_SIZE_ELEMENT, node);
-    	
-    	if (has(node, Element.SSL_ELEMENT.getLocalName())) {
-    		writer.writeStartElement(Element.SSL_ELEMENT.getLocalName());
-    		writeSSLConfiguration(writer, node.get(Element.SSL_ELEMENT.getLocalName()));
-    		writer.writeEndElement();
+    private void writeJDBCSocketConfiguration(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
+    	writeAttribute(writer, Element.JDBC_SOCKET_BINDING_ATTRIBUTE, node);
+    	writeAttribute(writer, Element.JDBC_MAX_SOCKET_THREAD_SIZE_ATTRIBUTE, node);
+    	writeAttribute(writer, Element.JDBC_IN_BUFFER_SIZE_ATTRIBUTE, node);
+    	writeAttribute(writer, Element.JDBC_OUT_BUFFER_SIZE_ATTRIBUTE, node);
+
+    	// SSL
+    	if (like(node, Element.JDBC_SSL_ELEMENT)) {
+			writer.writeStartElement(Element.JDBC_SSL_ELEMENT.getLocalName());
+			writeJDBCSSLConfiguration(writer, node);
+			writer.writeEndElement();
     	}
 	}
 
-	private void writeSSLConfiguration(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
-		writeElement(writer, Element.SSL_MODE_ELEMENT, node);
-		writeElement(writer, Element.KEY_STORE_FILE_ELEMENT, node);
-		writeElement(writer, Element.KEY_STORE_PASSWD_ELEMENT, node);
-		writeElement(writer, Element.KEY_STORE_TYPE_ELEMENT, node);
-		writeElement(writer, Element.SSL_PROTOCOL_ELEMENT, node);
-		writeElement(writer, Element.TRUST_FILE_ELEMENT, node);
-		writeElement(writer, Element.TRUST_PASSWD_ELEMENT, node);
-		writeElement(writer, Element.AUTH_MODE_ELEMENT, node);    
-		writeElement(writer, Element.KEY_MANAGEMENT_ALG_ELEMENT, node);  
+	private void writeJDBCSSLConfiguration(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
+		writeElement(writer, Element.JDBC_SSL_MODE_ELEMENT, node);
+		writeElement(writer, Element.JDBC_AUTH_MODE_ELEMENT, node);
+		writeElement(writer, Element.JDBC_SSL_PROTOCOL_ELEMENT, node);
+		writeElement(writer, Element.JDBC_KEY_MANAGEMENT_ALG_ELEMENT, node);
+		writeElement(writer, Element.JDBC_KEY_STORE_FILE_ELEMENT, node);
+		writeElement(writer, Element.JDBC_KEY_STORE_PASSWD_ELEMENT, node);
+		writeElement(writer, Element.JDBC_KEY_STORE_TYPE_ELEMENT, node);
+		writeElement(writer, Element.JDBC_TRUST_FILE_ELEMENT, node);
+		writeElement(writer, Element.JDBC_TRUST_PASSWD_ELEMENT, node);
 	}
+	
+    private void writeODBCSocketConfiguration(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
+    	writeAttribute(writer, Element.ODBC_SOCKET_BINDING_ATTRIBUTE, node);
+    	writeAttribute(writer, Element.ODBC_MAX_SOCKET_THREAD_SIZE_ATTRIBUTE, node);
+    	writeAttribute(writer, Element.ODBC_IN_BUFFER_SIZE_ATTRIBUTE, node);
+    	writeAttribute(writer, Element.ODBC_OUT_BUFFER_SIZE_ATTRIBUTE, node);
 
+    	// SSL
+    	if (like(node, Element.ODBC_SSL_ELEMENT)) {
+			writer.writeStartElement(Element.ODBC_SSL_ELEMENT.getLocalName());
+			writeODBCSSLConfiguration(writer, node);
+			writer.writeEndElement();
+    	}
+	}
+
+	private void writeODBCSSLConfiguration(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
+		writeElement(writer, Element.ODBC_SSL_MODE_ELEMENT, node);
+		writeElement(writer, Element.ODBC_AUTH_MODE_ELEMENT, node);
+		writeElement(writer, Element.ODBC_SSL_PROTOCOL_ELEMENT, node);
+		writeElement(writer, Element.ODBC_KEY_MANAGEMENT_ALG_ELEMENT, node);
+		writeElement(writer, Element.ODBC_KEY_STORE_FILE_ELEMENT, node);
+		writeElement(writer, Element.ODBC_KEY_STORE_PASSWD_ELEMENT, node);
+		writeElement(writer, Element.ODBC_KEY_STORE_TYPE_ELEMENT, node);
+		writeElement(writer, Element.ODBC_TRUST_FILE_ELEMENT, node);
+		writeElement(writer, Element.ODBC_TRUST_PASSWD_ELEMENT, node);
+	}	
+
 	private void writeBufferService(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
 		writeElement(writer, Element.USE_DISK_ELEMENT, node);
 		writeElement(writer, Element.PROCESSOR_BATCH_SIZE_ELEMENT, node);
@@ -190,26 +227,38 @@
 	}
 
 	private void writeResultsetCacheConfiguration(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
-		writeAttribute(writer, Element.NAME_ELEMENT, node);
-		writeAttribute(writer, Element.CONTAINER_NAME_ELEMENT, node);
-		writeAttribute(writer, Element.ENABLE_ATTRIBUTE, node);
-		writeAttribute(writer, Element.MAX_STALENESS_ELEMENT, node);
+		writeAttribute(writer, Element.RSC_NAME_ELEMENT, node);
+		writeAttribute(writer, Element.RSC_CONTAINER_NAME_ELEMENT, node);
+		writeAttribute(writer, Element.RSC_ENABLE_ATTRIBUTE, node);
+		writeAttribute(writer, Element.RSC_MAX_STALENESS_ELEMENT, node);
 	}
 
 	private void writePreparedPlanCacheConfiguration(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
-		writeAttribute(writer, Element.MAX_ENTRIES_ELEMENT, node);
-		writeAttribute(writer, Element.MAX_AGE_IN_SECS_ELEMENT, node);
-		writeAttribute(writer, Element.MAX_STALENESS_ELEMENT, node);
+		writeAttribute(writer, Element.PPC_MAX_ENTRIES_ATTRIBUTE, node);
+		writeAttribute(writer, Element.PPC_MAX_AGE_IN_SECS_ATTRIBUTE, node);
+		writeAttribute(writer, Element.PPC_MAX_STALENESS_ATTRIBUTE, node);
 	}
 
 	private boolean has(ModelNode node, String name) {
         return node.has(name) && node.get(name).isDefined();
     }
+	
+	private boolean like(ModelNode node, Element element) {
+		if (node.isDefined()) {			
+			Set<String> keys = node.keys();
+			for (String key:keys) {
+				if (key.startsWith(element.getModelName())) {
+					return true;
+				}
+			}
+		}
+        return false;
+    }
 
     private void writeElement(final XMLExtendedStreamWriter writer, final Element element, final ModelNode node) throws XMLStreamException {
-    	if (has(node, element.getLocalName())) {
+    	if (has(node, element.getModelName())) {
 	        writer.writeStartElement(element.getLocalName());
-	        writer.writeCharacters(node.get(element.getLocalName()).asString());
+	        writer.writeCharacters(node.get(element.getModelName()).asString());
 	        writer.writeEndElement();
     	}
     }     
@@ -223,8 +272,8 @@
     }      
     
     private void writeAttribute(final XMLExtendedStreamWriter writer, final Element element, final ModelNode node) throws XMLStreamException {
-    	if (has(node, element.getLocalName())) {
-	        writer.writeAttribute(element.getLocalName(), node.get(element.getLocalName()).asString());
+    	if (has(node, element.getModelName())) {
+	        writer.writeAttribute(element.getLocalName(), node.get(element.getModelName()).asString());
     	}
     }     
 
@@ -257,27 +306,29 @@
     				case ASYNC_THREAD_GROUP_ELEMENT:
     					bootServices.get(reader.getLocalName()).set(reader.getElementText());
     					break;
-
+    					
+  					// complex types
     				case OBJECT_REPLICATOR_ELEMENT:
-    					bootServices.get(reader.getLocalName()).set(parseObjectReplicator(reader));
+    					parseObjectReplicator(reader, bootServices);
     					break;
     					
-    					// complex types
     				case BUFFER_SERVICE_ELEMENT:
-    					bootServices.get(reader.getLocalName()).set(parseBufferConfiguration(reader));
+    					parseBufferConfiguration(reader, bootServices);
     					break;
     				case PREPAREDPLAN_CACHE_ELEMENT:
-    					bootServices.get(reader.getLocalName()).set(parsePreparedPlanCacheConfiguration(reader));
+    					parsePreparedPlanCacheConfiguration(reader, bootServices);
     					break;
     				case RESULTSET_CACHE_ELEMENT:
-    					bootServices.get(reader.getLocalName()).set(parseResultsetCacheConfiguration(reader));
+    					parseResultsetCacheConfiguration(reader, bootServices);
     					break;
 
                     case QUERY_ENGINE_ELEMENT:
-                        ModelNode engineNode = parseQueryEngine(reader, new ModelNode());
+                        ModelNode engineNode = new ModelNode();
                         
+                        String name = parseQueryEngine(reader, engineNode);
+                        
                         final ModelNode engineAddress = address.clone();
-                        engineAddress.add(Configuration.QUERY_ENGINE, engineNode.require(Configuration.ENGINE_NAME).asString());
+                        engineAddress.add(Configuration.QUERY_ENGINE, name);
                         engineAddress.protect();
                         engineNode.get(OP).set(ADD);
                         engineNode.get(OP_ADDR).set(engineAddress);
@@ -286,10 +337,12 @@
                         break;
                         
                     case TRANSLATOR_ELEMENT:
-                    	ModelNode translatorNode = parseTranslator(reader, new ModelNode());
+                    	ModelNode translatorNode = new ModelNode();
+                    	
+                    	String translatorName = parseTranslator(reader, translatorNode);
 
                         final ModelNode translatorAddress = address.clone();
-                        translatorAddress.add(Configuration.TRANSLATOR, translatorNode.require(Configuration.TRANSLATOR_NAME).asString());
+                        translatorAddress.add(Configuration.TRANSLATOR, translatorName);
                         translatorAddress.protect();
                         
                         translatorNode.get(OP).set(ADD);
@@ -310,26 +363,42 @@
         }  
     }
     
-    private ModelNode parseObjectReplicator(XMLExtendedStreamReader reader) throws XMLStreamException {
-    	ModelNode node = new ModelNode();
+    private ModelNode parseObjectReplicator(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
     	if (reader.getAttributeCount() > 0) {
     		for(int i=0; i<reader.getAttributeCount(); i++) {
     			String attrName = reader.getAttributeLocalName(i);
     			String attrValue = reader.getAttributeValue(i);
-   				node.get(attrName).set(attrValue);	
+    			
+    			Element element = Element.forName(attrName, Configuration.OBJECT_REPLICATOR);
+    			switch(element) {
+    			case OR_STACK_ATTRIBUTE:
+    				node.get(Element.OR_STACK_ATTRIBUTE.getModelName()).set(attrValue);
+    				break;
+    			case OR_CLUSTER_NAME_ATTRIBUTE:
+    				node.get(Element.OR_CLUSTER_NAME_ATTRIBUTE.getModelName()).set(attrValue);
+    				break;
+                default: 
+                    throw ParseUtils.unexpectedElement(reader);
+    			}    			
     		}
     	}
         while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT));
     	return node;
 	}
 
-	private ModelNode parseQueryEngine(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
+	private String parseQueryEngine(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
+    	String engineName = "default"; //$NON-NLS-1$
     	
     	if (reader.getAttributeCount() > 0) {
     		for(int i=0; i<reader.getAttributeCount(); i++) {
     			String attrName = reader.getAttributeLocalName(i);
     			String attrValue = reader.getAttributeValue(i);
-    			node.get(attrName).set(attrValue);
+    			if (attrName.equals(Element.ENGINE_NAME_ATTRIBUTE.getLocalName())) {
+    				engineName = attrValue;
+    			}
+    			else {
+        			node.get(attrName).set(attrValue);
+    			}
     		}
     	}    	
     	
@@ -363,38 +432,47 @@
 					break;
 	
 				case JDBC_ELEMENT:
-					node.get(reader.getLocalName()).set(parseSocketConfiguration(reader));
+					parseJDBCSocketConfiguration(reader, node);
 					break;
 					
 				case ODBC_ELEMENT:
-					node.get(reader.getLocalName()).set(parseSocketConfiguration(reader));
+					parseODBCSocketConfiguration(reader, node);
 					break;                   
                     
                 default: 
                     throw ParseUtils.unexpectedElement(reader);
             }
         }
-    	return node;
+    	return engineName;
     }
     
-    private ModelNode parseBufferConfiguration(XMLExtendedStreamReader reader) throws XMLStreamException {
-    	ModelNode node = new ModelNode();
+    private ModelNode parseBufferConfiguration(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
         while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT)) {
-            Element element = Element.forName(reader.getLocalName());
+            Element element = Element.forName(reader.getLocalName(), Configuration.BUFFER_SERVICE);
 			switch (element) {
 			case USE_DISK_ELEMENT:
-				node.get(reader.getLocalName()).set(Boolean.parseBoolean(reader.getElementText()));
+				node.get(Element.USE_DISK_ELEMENT.getModelName()).set(Boolean.parseBoolean(reader.getElementText()));
 				break;
 			case PROCESSOR_BATCH_SIZE_ELEMENT:
+				node.get(Element.PROCESSOR_BATCH_SIZE_ELEMENT.getModelName()).set(Integer.parseInt(reader.getElementText()));
+				break;
 			case CONNECTOR_BATCH_SIZE_ELEMENT:
+				node.get(Element.CONNECTOR_BATCH_SIZE_ELEMENT.getModelName()).set(Integer.parseInt(reader.getElementText()));
+				break;
 			case MAX_PROCESSING_KB_ELEMENT:
+				node.get(Element.MAX_PROCESSING_KB_ELEMENT.getModelName()).set(Integer.parseInt(reader.getElementText()));
+				break;
 			case MAX_RESERVED_KB_ELEMENT:
+				node.get(Element.MAX_RESERVED_KB_ELEMENT.getModelName()).set(Integer.parseInt(reader.getElementText()));
+				break;
 			case MAX_OPEN_FILES_ELEMENT:
-				node.get(reader.getLocalName()).set(Integer.parseInt(reader.getElementText()));
+				node.get(Element.MAX_OPEN_FILES_ELEMENT.getModelName()).set(Integer.parseInt(reader.getElementText()));
 				break;
-			case MAX_FILE_SIZE_ELEMENT:				
+			case MAX_FILE_SIZE_ELEMENT:
+				node.get(Element.MAX_FILE_SIZE_ELEMENT.getModelName()).set(Long.parseLong(reader.getElementText()));
+				break;
 			case MAX_BUFFER_SPACE_ELEMENT:
-				node.get(reader.getLocalName()).set(Long.parseLong(reader.getElementText()));
+				node.get(Element.MAX_BUFFER_SPACE_ELEMENT.getModelName()).set(Long.parseLong(reader.getElementText()));
 				break;
 			default:
 				throw ParseUtils.unexpectedElement(reader);
@@ -403,73 +481,94 @@
     	return node;
     }
     
-    private ModelNode parsePreparedPlanCacheConfiguration(XMLExtendedStreamReader reader) throws XMLStreamException {
-    	ModelNode node = new ModelNode();
-
+    private ModelNode parsePreparedPlanCacheConfiguration(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
     	if (reader.getAttributeCount() > 0) {
     		for(int i=0; i<reader.getAttributeCount(); i++) {
     			String attrName = reader.getAttributeLocalName(i);
     			String attrValue = reader.getAttributeValue(i);
-    			node.get(attrName).set(attrValue);
+    			Element element = Element.forName(attrName, Configuration.PREPAREDPLAN_CACHE);
+    			switch(element) {
+                case PPC_MAX_ENTRIES_ATTRIBUTE:
+                	node.get(Element.PPC_MAX_ENTRIES_ATTRIBUTE.getModelName()).set(Integer.parseInt(attrValue));
+                	break;
+                	
+                case PPC_MAX_AGE_IN_SECS_ATTRIBUTE:
+                	node.get(Element.PPC_MAX_AGE_IN_SECS_ATTRIBUTE.getModelName()).set(Integer.parseInt(attrValue));
+                	break;
+                	
+                case PPC_MAX_STALENESS_ATTRIBUTE:
+                	node.get(Element.PPC_MAX_STALENESS_ATTRIBUTE.getModelName()).set(Integer.parseInt(attrValue));
+                	break;
+                default: 
+                    throw ParseUtils.unexpectedElement(reader);
+    			}
     		}
     	}    	
- 
-        while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT)) {
-            Element element = Element.forName(reader.getLocalName());
-            switch (element) {
-            case MAX_ENTRIES_ELEMENT:
-            case MAX_AGE_IN_SECS_ELEMENT:
-            case MAX_STALENESS_ELEMENT:
-            	node.get(reader.getLocalName()).set(Integer.parseInt(reader.getElementText()));
-            	break;
-            default: 
-                throw ParseUtils.unexpectedElement(reader);
-            }
-        }
+        while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT));
     	return node;
     }    
     
-    private ModelNode parseResultsetCacheConfiguration(XMLExtendedStreamReader reader) throws XMLStreamException {
-    	ModelNode node = new ModelNode();
-    	
+    private ModelNode parseResultsetCacheConfiguration(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
     	if (reader.getAttributeCount() > 0) {
     		for(int i=0; i<reader.getAttributeCount(); i++) {
     			String attrName = reader.getAttributeLocalName(i);
     			String attrValue = reader.getAttributeValue(i);
-    			if (attrName.equals(Element.ENABLE_ATTRIBUTE.getLocalName())) {
-    				node.get(attrName).set(Boolean.parseBoolean(attrValue));
-    			}
-    			else {
-    				node.get(attrName).set(attrValue);	
-    			}
+    			Element element = Element.forName(attrName, Configuration.RESULTSET_CACHE);
+    			switch(element) {
+    			case RSC_CONTAINER_NAME_ELEMENT:
+    				node.get(Element.RSC_CONTAINER_NAME_ELEMENT.getModelName()).set(attrValue);
+    				break;
+    			case RSC_ENABLE_ATTRIBUTE:
+    				node.get(Element.RSC_ENABLE_ATTRIBUTE.getModelName()).set(Boolean.parseBoolean(attrValue));
+    				break;
+    			case RSC_MAX_STALENESS_ELEMENT:
+    				node.get(Element.RSC_MAX_STALENESS_ELEMENT.getModelName()).set(Integer.parseInt(attrValue));
+    				break;
+    			case RSC_NAME_ELEMENT:
+    				node.get(Element.RSC_NAME_ELEMENT.getModelName()).set(attrValue);
+    				break;
+    			default: 
+                	throw ParseUtils.unexpectedElement(reader);
+    			}    			
     		}
     	}
         while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT));
     	return node;
     }       
     
-    private ModelNode parseSocketConfiguration(XMLExtendedStreamReader reader) throws XMLStreamException {
-    	ModelNode node = new ModelNode();
+    private ModelNode parseJDBCSocketConfiguration(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
 
     	if (reader.getAttributeCount() > 0) {
     		for(int i=0; i<reader.getAttributeCount(); i++) {
     			String attrName = reader.getAttributeLocalName(i);
     			String attrValue = reader.getAttributeValue(i);
-   				node.get(attrName).set(attrValue);
+
+    			Element element = Element.forName(attrName, Configuration.JDBC);
+                switch (element) {
+    			case JDBC_SOCKET_BINDING_ATTRIBUTE:
+    				node.get(Element.JDBC_SOCKET_BINDING_ATTRIBUTE.getModelName()).set(attrValue);
+    				break;
+                case JDBC_MAX_SOCKET_THREAD_SIZE_ATTRIBUTE:
+    				node.get(Element.JDBC_MAX_SOCKET_THREAD_SIZE_ATTRIBUTE.getModelName()).set(Integer.parseInt(attrValue));
+    				break;
+                case JDBC_IN_BUFFER_SIZE_ATTRIBUTE:
+    				node.get(Element.JDBC_IN_BUFFER_SIZE_ATTRIBUTE.getModelName()).set(Integer.parseInt(attrValue));
+    				break;
+                case JDBC_OUT_BUFFER_SIZE_ATTRIBUTE:
+    				node.get(Element.JDBC_OUT_BUFFER_SIZE_ATTRIBUTE.getModelName()).set(Integer.parseInt(attrValue));
+    				break;
+    			default: 
+                	throw ParseUtils.unexpectedElement(reader);
+                }
     		}
     	}    	
  
         while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT)) {
-            Element element = Element.forName(reader.getLocalName());
+            Element element = Element.forName(reader.getLocalName(), Configuration.JDBC);
             switch (element) {
-            case MAX_SOCKET_THREAD_SIZE_ELEMENT:
-            case IN_BUFFER_SIZE_ELEMENT:
-            case OUT_BUFFER_SIZE_ELEMENT:
-            	node.get(reader.getLocalName()).set(Integer.parseInt(reader.getElementText()));
+            case JDBC_SSL_ELEMENT:            	
+            	parseJDBCSSLConfiguration(reader, node);
             	break;
-            case SSL_ELEMENT:            	
-            	node.get(reader.getLocalName()).set(parseSSLConfiguration(reader));
-            	break;
             default: 
                 throw ParseUtils.unexpectedElement(reader);
             }
@@ -477,31 +576,124 @@
     	return node;
     }
     
-    private ModelNode parseSSLConfiguration(XMLExtendedStreamReader reader) throws XMLStreamException {
-    	ModelNode node = new ModelNode();
+    private ModelNode parseODBCSocketConfiguration(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
 
+    	if (reader.getAttributeCount() > 0) {
+    		for(int i=0; i<reader.getAttributeCount(); i++) {
+    			String attrName = reader.getAttributeLocalName(i);
+    			String attrValue = reader.getAttributeValue(i);
+
+    			Element element = Element.forName(attrName, Configuration.ODBC);
+                switch (element) {
+    			case ODBC_SOCKET_BINDING_ATTRIBUTE:
+    				node.get(Element.ODBC_SOCKET_BINDING_ATTRIBUTE.getModelName()).set(attrValue);
+    				break;
+                case ODBC_MAX_SOCKET_THREAD_SIZE_ATTRIBUTE:
+    				node.get(Element.ODBC_MAX_SOCKET_THREAD_SIZE_ATTRIBUTE.getModelName()).set(Integer.parseInt(attrValue));
+    				break;
+                case ODBC_IN_BUFFER_SIZE_ATTRIBUTE:
+    				node.get(Element.ODBC_IN_BUFFER_SIZE_ATTRIBUTE.getModelName()).set(Integer.parseInt(attrValue));
+    				break;
+                case ODBC_OUT_BUFFER_SIZE_ATTRIBUTE:
+    				node.get(Element.ODBC_OUT_BUFFER_SIZE_ATTRIBUTE.getModelName()).set(Integer.parseInt(attrValue));
+    				break;
+    			default: 
+                	throw ParseUtils.unexpectedElement(reader);
+                }
+    		}
+    	}    	
+ 
         while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT)) {
-            Element element = Element.forName(reader.getLocalName());
+            Element element = Element.forName(reader.getLocalName(), Configuration.ODBC);
             switch (element) {
-            case SSL_MODE_ELEMENT:
-            case KEY_STORE_FILE_ELEMENT:
-            case KEY_STORE_PASSWD_ELEMENT:
-            case KEY_STORE_TYPE_ELEMENT:
-            case SSL_PROTOCOL_ELEMENT:
-            case TRUST_FILE_ELEMENT:
-            case TRUST_PASSWD_ELEMENT:
-            case AUTH_MODE_ELEMENT:
-            case KEY_MANAGEMENT_ALG_ELEMENT:
-            	node.get(reader.getLocalName()).set(reader.getElementText());
+            case ODBC_SSL_ELEMENT:            	
+            	parseODBCSSLConfiguration(reader, node);
             	break;
             default: 
                 throw ParseUtils.unexpectedElement(reader);
             }
         }
     	return node;
+    }    
+    
+    private ModelNode parseJDBCSSLConfiguration(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
+        while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT)) {
+            Element element = Element.forName(reader.getLocalName(), Configuration.JDBC, Configuration.SSL);
+            switch (element) {
+            case JDBC_SSL_MODE_ELEMENT:
+            	node.get(Element.JDBC_SSL_MODE_ELEMENT.getModelName()).set(reader.getElementText());
+            	break;
+            case JDBC_KEY_STORE_FILE_ELEMENT:
+            	node.get(Element.JDBC_KEY_STORE_FILE_ELEMENT.getModelName()).set(reader.getElementText());
+            	break;
+            case JDBC_KEY_STORE_PASSWD_ELEMENT:
+            	node.get(Element.JDBC_KEY_STORE_PASSWD_ELEMENT.getModelName()).set(reader.getElementText());
+            	break;
+            case JDBC_KEY_STORE_TYPE_ELEMENT:
+            	node.get(Element.JDBC_KEY_STORE_TYPE_ELEMENT.getModelName()).set(reader.getElementText());
+            	break;
+            case JDBC_SSL_PROTOCOL_ELEMENT:
+            	node.get(Element.JDBC_SSL_PROTOCOL_ELEMENT.getModelName()).set(reader.getElementText());
+            	break;
+            case JDBC_TRUST_FILE_ELEMENT:
+            	node.get(Element.JDBC_TRUST_FILE_ELEMENT.getModelName()).set(reader.getElementText());
+            	break;
+            case JDBC_TRUST_PASSWD_ELEMENT:
+            	node.get(Element.JDBC_TRUST_PASSWD_ELEMENT.getModelName()).set(reader.getElementText());
+            	break;
+            case JDBC_AUTH_MODE_ELEMENT:
+            	node.get(Element.JDBC_AUTH_MODE_ELEMENT.getModelName()).set(reader.getElementText());
+            	break;
+            case JDBC_KEY_MANAGEMENT_ALG_ELEMENT:
+            	node.get(Element.JDBC_KEY_MANAGEMENT_ALG_ELEMENT.getModelName()).set(reader.getElementText());
+            	break;
+            default: 
+                throw ParseUtils.unexpectedElement(reader);
+            }
+        }
+    	return node;
     }
     
-    private ModelNode parseTranslator(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
+    private ModelNode parseODBCSSLConfiguration(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
+        while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT)) {
+            Element element = Element.forName(reader.getLocalName(), Configuration.ODBC, Configuration.SSL);
+            switch (element) {
+            case ODBC_SSL_MODE_ELEMENT:
+            	node.get(Element.ODBC_SSL_MODE_ELEMENT.getModelName()).set(reader.getElementText());
+            	break;
+            case ODBC_KEY_STORE_FILE_ELEMENT:
+            	node.get(Element.ODBC_KEY_STORE_FILE_ELEMENT.getModelName()).set(reader.getElementText());
+            	break;
+            case ODBC_KEY_STORE_PASSWD_ELEMENT:
+            	node.get(Element.ODBC_KEY_STORE_PASSWD_ELEMENT.getModelName()).set(reader.getElementText());
+            	break;
+            case ODBC_KEY_STORE_TYPE_ELEMENT:
+            	node.get(Element.ODBC_KEY_STORE_TYPE_ELEMENT.getModelName()).set(reader.getElementText());
+            	break;
+            case ODBC_SSL_PROTOCOL_ELEMENT:
+            	node.get(Element.ODBC_SSL_PROTOCOL_ELEMENT.getModelName()).set(reader.getElementText());
+            	break;
+            case ODBC_TRUST_FILE_ELEMENT:
+            	node.get(Element.ODBC_TRUST_FILE_ELEMENT.getModelName()).set(reader.getElementText());
+            	break;
+            case ODBC_TRUST_PASSWD_ELEMENT:
+            	node.get(Element.ODBC_TRUST_PASSWD_ELEMENT.getModelName()).set(reader.getElementText());
+            	break;
+            case ODBC_AUTH_MODE_ELEMENT:
+            	node.get(Element.ODBC_AUTH_MODE_ELEMENT.getModelName()).set(reader.getElementText());
+            	break;
+            case ODBC_KEY_MANAGEMENT_ALG_ELEMENT:
+            	node.get(Element.ODBC_KEY_MANAGEMENT_ALG_ELEMENT.getModelName()).set(reader.getElementText());
+            	break;
+            default: 
+                throw ParseUtils.unexpectedElement(reader);
+            }
+        }
+    	return node;
+    }    
+    
+    private String parseTranslator(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
+    	String translatorName = null;
     	if (reader.getAttributeCount() > 0) {
     		for(int i=0; i<reader.getAttributeCount(); i++) {
     			String attrName = reader.getAttributeLocalName(i);
@@ -510,6 +702,8 @@
     			Element element = Element.forName(attrName);
     			switch(element) {
     			case TRANSLATOR_NAME_ATTRIBUTE:
+    				translatorName = attrValue;
+    				break;
     			case TRANSLATOR_MODULE_ATTRIBUTE:
     				node.get(attrName).set(attrValue);
     				break;
@@ -521,6 +715,6 @@
     	while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT)) {
     		throw ParseUtils.unexpectedElement(reader);
     	}
-    	return node;
+    	return translatorName;
     }
 }

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java	2011-09-28 15:25:16 UTC (rev 3505)
@@ -55,22 +55,18 @@
         operation.get(OPERATION_NAME).set(ADD);
         operation.get(DESCRIPTION).set(bundle.getString("translator.add")); //$NON-NLS-1$
         
-        addAttribute(operation, Configuration.TRANSLATOR_MODULE, ATTRIBUTES, bundle.getString(Configuration.TRANSLATOR_MODULE+Configuration.DESC), ModelType.STRING, true, null);
+        addAttribute(operation, Configuration.TRANSLATOR_MODULE, REQUEST_PROPERTIES, bundle.getString(Configuration.TRANSLATOR_MODULE+Configuration.DESC), ModelType.STRING, true, null);
         return operation;
     }
     
 	@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);
-
-        populate(pathAddress.getLastElement().getValue(), operation, model);
+        populate(operation, model);
 	}
 	
-	static void populate(String name, ModelNode operation, ModelNode model) {
+	static void populate(ModelNode operation, ModelNode model) {
 		final String moduleName = operation.require(Configuration.TRANSLATOR_MODULE).asString();
-        model.get(NAME).set(name);
-        model.get(Configuration.TRANSLATOR_MODULE).set(moduleName);		
+		model.get(Configuration.TRANSLATOR_MODULE).set(moduleName);		
 	}
 	
 	@Override

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBParserDeployer.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBParserDeployer.java	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBParserDeployer.java	2011-09-28 15:25:16 UTC (rev 3505)
@@ -143,7 +143,7 @@
 				imf.addEntriesPlusVisibilities(file, vdb);
 					
 				// This time stamp is used to check if the VDB is modified after the metadata is written to disk
-				vdb.addProperty(VDBService.VDB_LASTMODIFIED_TIME, String.valueOf(file.getLastModified()));
+				//vdb.addProperty(VDBService.VDB_LASTMODIFIED_TIME, String.valueOf(file.getLastModified()));
 			}
 			
 			if (udf != null) {

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java	2011-09-28 15:25:16 UTC (rev 3505)
@@ -59,7 +59,6 @@
 import org.teiid.translator.TranslatorException;
 
 class VDBService implements Service<VDBMetaData> {
-	public static final String VDB_LASTMODIFIED_TIME = "VDB_LASTMODIFIED_TIME"; //$NON-NLS-1$
 	private VDBMetaData vdb;
 	private final InjectedValue<VDBRepository> vdbRepositoryInjector = new InjectedValue<VDBRepository>();
 	private final InjectedValue<TranslatorRepository> translatorRepositoryInjector = new InjectedValue<TranslatorRepository>();
@@ -81,10 +80,6 @@
 		// check if this is a VDB with index files, if there are then build the TransformationMetadata
 		UDFMetaData udf = this.vdb.getAttachment(UDFMetaData.class);
 		IndexMetadataFactory indexFactory = this.vdb.getAttachment(IndexMetadataFactory.class);
-		long vdbModifiedTime = -1L;
-		if (vdb.getPropertyValue(VDBService.VDB_LASTMODIFIED_TIME) != null) {
-			vdbModifiedTime = Long.parseLong(vdb.getPropertyValue(VDBService.VDB_LASTMODIFIED_TIME));
-		}
 		
 		// add required connector managers; if they are not already there
 		for (Translator t: this.vdb.getOverrideTranslators()) {
@@ -105,10 +100,11 @@
 		createConnectorManagers(cmr, repo, this.vdb);
 				
 		// check to see if the vdb has been modified when server is down; if it is then clear the old files
-		if (vdbModifiedTime != -1L && getSerializer().isStale(this.vdb, vdbModifiedTime)) {
-			getSerializer().removeAttachments(this.vdb);
-			LogManager.logTrace(LogConstants.CTX_RUNTIME, "VDB ", vdb.getName(), " old cached metadata has been removed"); //$NON-NLS-1$ //$NON-NLS-2$				
-		}
+		// This is no longer required as VDB can not modified in place in deployment directory as they held inside the data dir
+		//if (vdbModifiedTime != -1L && getSerializer().isStale(this.vdb, vdbModifiedTime)) {
+		//	getSerializer().removeAttachments(this.vdb);
+		//	LogManager.logTrace(LogConstants.CTX_RUNTIME, "VDB ", vdb.getName(), " old cached metadata has been removed"); //$NON-NLS-1$ //$NON-NLS-2$				
+		//}
 				
 		boolean asynchLoad = false;
 		boolean preview = this.vdb.isPreview();

Modified: branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
===================================================================
--- branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties	2011-09-28 15:25:16 UTC (rev 3505)
@@ -116,10 +116,15 @@
              Setting this value to LRU will cause cache hint TTL values \
              to be ignored. (default EXPIRATION)
 container-name.describe=Infinispan cache container name            
+resultset-cache-name.describe = Infinispan cache name for resultset
 	
 #cache
 resultset-cache.describe=Resultset cache
 preparedplan-cache.describe=Prepared Plan cache
+
+#object replicator
+stack.describe=JGroups stack name for cache replication channel
+cluster-name.describe=cache channel cluster name for cache replication
 	
 #socket config
 max-socket-threads.describe=Max number of threads dedicated to initial request processing. \
@@ -152,7 +157,7 @@
 translator.describe = Teiid Translators
 translator.add = Add Teiid translator
 translator.remove = Remove Teiid translator
-teiid-boot.add = Teiid boot serviceshitRatio.describe
+teiid-boot.add = Teiid boot services
 
 total-entries.describe = Total entries in Cache
 hit-ratio.describe = Cache Hit ratio

Modified: branches/as7/jboss-integration/src/main/resources/schema/jboss-teiid.xsd
===================================================================
--- branches/as7/jboss-integration/src/main/resources/schema/jboss-teiid.xsd	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/jboss-integration/src/main/resources/schema/jboss-teiid.xsd	2011-09-28 15:25:16 UTC (rev 3505)
@@ -94,11 +94,20 @@
                 </xs:complexType>
             </xs:element>            
         
-            <xs:element name="query-engine" type="runtime-engine-type" maxOccurs="2" minOccurs="1">
+            <xs:element name="query-engine" type="runtime-engine-type" maxOccurs="unbounded" minOccurs="0">
                 <xs:annotation>
                     <xs:documentation>Main Teiid runtime engine configuration</xs:documentation>
                 </xs:annotation>
             </xs:element>
+            <xs:element name="translator" maxOccurs="unbounded" minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>Translators defined in the system</xs:documentation>
+                </xs:annotation>
+                <xs:complexType>
+                    <xs:attribute name="name" type="xs:string" use="required"/>
+                    <xs:attribute name="module" type="xs:string" use="required"/>
+                </xs:complexType>
+            </xs:element>            
         </xs:sequence>
     </xs:complexType>
 
@@ -243,30 +252,30 @@
 
     <xs:complexType name="socket-config">
         <xs:sequence>
-            <xs:element name="max-socket-threads" type="xs:int" minOccurs="0" maxOccurs="1" default="0">
+            <xs:element name="ssl" type="ssl-config" minOccurs="0" maxOccurs="1">
                 <xs:annotation>
-                    <xs:documentation>Max number of threads dedicated to initial request processing.
-                        Zero indicates the system default of max available processors. (default 0)
-                        Setting this value above the max available processors is not recommended.</xs:documentation>
+                    <xs:documentation>SSL Configuration</xs:documentation>
                 </xs:annotation>
             </xs:element>
-            <xs:element name="input-buffer-size" type="xs:int" minOccurs="0" maxOccurs="1" default="0">
+        </xs:sequence>
+        <xs:attribute name="socket-binding" type="xs:string" use="required"/>
+        <xs:attribute name="input-buffer-size" type="xs:int">
                 <xs:annotation>
                     <xs:documentation>SO_RCVBUF size, 0 indicates that system default should be used (default 0) </xs:documentation>
                 </xs:annotation>
-            </xs:element>
-            <xs:element name="output-buffer-size" type="xs:int" minOccurs="0" maxOccurs="1" default="0">
+        </xs:attribute>
+        <xs:attribute name="output-buffer-size" type="xs:string">
                 <xs:annotation>
                     <xs:documentation>SO_SNDBUF size, 0 indicates that system default should be used (default 0)</xs:documentation>
                 </xs:annotation>
-            </xs:element>
-            <xs:element name="ssl" type="ssl-config" minOccurs="0" maxOccurs="1">
+        </xs:attribute>
+        <xs:attribute name="max-socket-threads" type="xs:int">
                 <xs:annotation>
-                    <xs:documentation>SSL Configuration</xs:documentation>
-                </xs:annotation>
-            </xs:element>
-        </xs:sequence>
-        <xs:attribute name="socket-binding" type="xs:string" use="required"/>
+                    <xs:documentation>Max number of threads dedicated to initial request processing.
+                        Zero indicates the system default of max available processors. (default 0)
+                        Setting this value above the max available processors is not recommended.</xs:documentation>
+                </xs:annotation>        
+        </xs:attribute>
     </xs:complexType>
 
     <xs:complexType name="ssl-config">
@@ -288,13 +297,6 @@
                     </xs:restriction>
                 </xs:simpleType>                
             </xs:element>
-            <xs:element name="keystore-name" type="xs:string" minOccurs="0" maxOccurs="1" />
-            <xs:element name="keystore-password" type="xs:string" minOccurs="0" maxOccurs="1" />
-            <xs:element name="keystore-type" type="xs:string" minOccurs="0" maxOccurs="1" />
-            <xs:element name="ssl-protocol" type="xs:string" minOccurs="0" maxOccurs="1" />
-            <xs:element name="keymanagement-algorithm" type="xs:boolean" minOccurs="0" maxOccurs="1" />
-            <xs:element name="truststore-name" type="xs:string" minOccurs="0" maxOccurs="1" />
-            <xs:element name="truststore-password" type="xs:string" minOccurs="0" maxOccurs="1" />
             <xs:element name="authentication-mode" minOccurs="0" maxOccurs="1" default="anonymous">
                 <xs:annotation>
                     <xs:documentation>1-way, 2-way, anonymous</xs:documentation>
@@ -307,6 +309,13 @@
                     </xs:restriction>
                 </xs:simpleType>                                
             </xs:element>
+            <xs:element name="ssl-protocol" type="xs:string" minOccurs="0" maxOccurs="1" />
+            <xs:element name="keymanagement-algorithm" type="xs:string" minOccurs="0" maxOccurs="1" />
+            <xs:element name="keystore-name" type="xs:string" minOccurs="0" maxOccurs="1" />
+            <xs:element name="keystore-password" type="xs:string" minOccurs="0" maxOccurs="1" />
+            <xs:element name="keystore-type" type="xs:string" minOccurs="0" maxOccurs="1" />
+            <xs:element name="truststore-name" type="xs:string" minOccurs="0" maxOccurs="1" />
+            <xs:element name="truststore-password" type="xs:string" minOccurs="0" maxOccurs="1" />
         </xs:sequence>
     </xs:complexType>
 

Added: branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidAdminOperations.java
===================================================================
--- branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidAdminOperations.java	                        (rev 0)
+++ branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidAdminOperations.java	2011-09-28 15:25:16 UTC (rev 3505)
@@ -0,0 +1,207 @@
+package org.teiid.jboss;
+
+import static junit.framework.Assert.assertEquals;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.*;
+import static org.junit.Assert.fail;
+
+import java.io.ByteArrayInputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.net.URL;
+import java.util.List;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.validation.Validator;
+
+import junit.framework.Assert;
+
+import org.jboss.as.controller.OperationContext.Type;
+import org.jboss.as.controller.PathAddress;
+import org.jboss.as.controller.PathElement;
+import org.jboss.as.subsystem.test.AbstractSubsystemTest;
+import org.jboss.as.subsystem.test.AdditionalInitialization;
+import org.jboss.as.subsystem.test.KernelServices;
+import org.jboss.dmr.ModelNode;
+import org.junit.Test;
+import org.teiid.core.util.ObjectConverterUtil;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+ at SuppressWarnings("nls")
+public class TestTeiidAdminOperations extends AbstractSubsystemTest {
+
+	public TestTeiidAdminOperations() {
+		super(TeiidExtension.TEIID_SUBSYSTEM, new TeiidExtension());
+	}
+
+    @Test
+    public void testDescribeHandler() throws Exception {
+        //Parse the subsystem xml and install into the first controller
+        String subsystemXml ="<subsystem xmlns=\"urn:jboss:domain:teiid:1.0\">" +
+        		"<async-thread-group>async</async-thread-group>"+
+        		" <query-engine name=\"default\">" +
+        		" </query-engine>" +
+        		"</subsystem>";
+        KernelServices servicesA = super.installInController(subsystemXml);
+        //Get the model and the describe operations from the first controller
+        ModelNode modelA = servicesA.readWholeModel();
+        String marshalled = servicesA.getPersistedSubsystemXml();
+        
+        ModelNode describeOp = new ModelNode();
+        describeOp.get(OP).set(DESCRIBE);
+        describeOp.get(OP_ADDR).set(
+                PathAddress.pathAddress(
+                        PathElement.pathElement(SUBSYSTEM, TeiidExtension.TEIID_SUBSYSTEM)).toModelNode());
+        List<ModelNode> operations = super.checkResultAndGetContents(servicesA.executeOperation(describeOp)).asList();
+
+
+        //Install the describe options from the first controller into a second controller
+        KernelServices servicesB = super.installInController(operations);
+        ModelNode modelB = servicesB.readWholeModel();
+
+        //Make sure the models from the two controllers are identical
+        super.compare(modelA, modelB);
+    }
+
+    @Test
+    public void testOutputPerisitence() throws Exception {
+    	String subsystemXml = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-sample-config.xml"));
+
+    	String json = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-model-json.txt"));
+    	ModelNode testModel = ModelNode.fromJSONString(json);
+        String triggered = outputModel(testModel);
+
+        KernelServices services = super.installInController(
+                new AdditionalInitialization() {
+                    @Override
+                    protected Type getType() {
+                        return Type.MANAGEMENT;
+                    }
+                },
+                subsystemXml);
+        //Get the model and the persisted xml from the controller
+        ModelNode model = services.readWholeModel();
+        String marshalled = services.getPersistedSubsystemXml();
+
+        System.out.println(marshalled);
+        
+        Assert.assertEquals(marshalled, triggered);
+        Assert.assertEquals(normalizeXML(marshalled), normalizeXML(triggered));
+    }
+    
+    @Test
+    public void testOutputModel() throws Exception {
+    	String subsystemXml = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-sample-config.xml"));
+
+    	String json = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-model-json.txt"));
+    	ModelNode testModel = ModelNode.fromJSONString(json);
+        String triggered = outputModel(testModel);
+
+        KernelServices services = super.installInController(
+                new AdditionalInitialization() {
+                    @Override
+                    protected Type getType() {
+                        return Type.MANAGEMENT;
+                    }
+                },
+                subsystemXml);
+        //Get the model and the persisted xml from the controller
+        ModelNode model = services.readWholeModel();
+        String marshalled = services.getPersistedSubsystemXml();
+
+        Assert.assertEquals(marshalled, triggered);
+        Assert.assertEquals(normalizeXML(marshalled), normalizeXML(triggered));
+    }    
+    
+    @Test
+    public void testSchema() throws Exception {
+    	String subsystemXml = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-sample-config.xml"));
+        KernelServices services = super.installInController(
+                new AdditionalInitialization() {
+                    @Override
+                    protected Type getType() {
+                        return Type.MANAGEMENT;
+                    }
+                },
+                subsystemXml);
+        //Get the model and the persisted xml from the controller
+        ModelNode model = services.readWholeModel();
+        String marshalled = services.getPersistedSubsystemXml();
+
+		URL xsdURL = Thread.currentThread().getContextClassLoader().getResource("schema/jboss-teiid.xsd");
+		
+		SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
+		Schema schema = factory.newSchema(xsdURL);
+		
+		Validator validator = schema.newValidator();
+		Source source = new StreamSource(new ByteArrayInputStream(marshalled.getBytes()));
+		validator.setErrorHandler(new ErrorHandler() {
+			
+			@Override
+			public void warning(SAXParseException exception) throws SAXException {
+				fail(exception.getMessage());
+			}
+			
+			@Override
+			public void fatalError(SAXParseException exception) throws SAXException {
+				fail(exception.getMessage());
+			}
+			
+			@Override
+			public void error(SAXParseException exception) throws SAXException {
+				if (!exception.getMessage().contains("cvc-enumeration-valid") && !exception.getMessage().contains("cvc-type"))
+					fail(exception.getMessage());
+			}
+		});
+		
+		validator.validate(source);
+    }
+    
+    @Test
+    public void testSubSystemDescription() throws IOException {
+    	ModelNode node = new ModelNode();
+    	QueryEngineAdd.describeQueryEngine(node, ATTRIBUTES, IntegrationPlugin.getResourceBundle(null));
+    	assertEquals(ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-model-config.txt")), node.toString());
+    }
+    
+    @Test
+    public void testParseSubsystem() throws Exception {
+        //Parse the subsystem xml into operations
+    	String subsystemXml = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-sample-config.xml"));
+        List<ModelNode> operations = super.parse(subsystemXml);
+
+        ///Check that we have the expected number of operations
+        Assert.assertEquals(5, operations.size());
+
+        //Check that each operation has the correct content
+        ModelNode addSubsystem = operations.get(0);
+        Assert.assertEquals(ADD, addSubsystem.get(OP).asString());
+        PathAddress addr = PathAddress.pathAddress(addSubsystem.get(OP_ADDR));
+        Assert.assertEquals(1, addr.size());
+        PathElement element = addr.getElement(0);
+        Assert.assertEquals(SUBSYSTEM, element.getKey());
+        Assert.assertEquals(TeiidExtension.TEIID_SUBSYSTEM, element.getValue());
+    }
+    
+    @Test
+    public void testOperatrions() throws Exception {
+    	String subsystemXml = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-sample-config.xml"));
+
+    	String json = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-model-json.txt"));
+    	ModelNode testModel = ModelNode.fromJSONString(json);
+        String triggered = outputModel(testModel);
+
+        KernelServices services = super.installInController(
+                new AdditionalInitialization() {
+                    @Override
+                    protected Type getType() {
+                        return Type.MANAGEMENT;
+                    }
+                },
+                subsystemXml);
+    }     
+}


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

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-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidConfiguration.java	2011-09-28 15:25:16 UTC (rev 3505)
@@ -81,7 +81,6 @@
         profileAddress.add("profile", "test");
     }
     
-	@Test
 	public void testValidateSchema() throws Exception {
 		InputStream content = Thread.currentThread().getContextClassLoader().getResourceAsStream("teiid-sample-config.xml");
 		URL xsdURL = Thread.currentThread().getContextClassLoader().getResource("schema/jboss-teiid.xsd");
@@ -113,7 +112,6 @@
 
 	}
 	
-    @Test
     public void testTeiidConfiguration() throws Exception {
         List<ModelNode> updates = createSubSystem(ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-sample-config.xml")));
         assertEquals(3, updates.size());
@@ -371,22 +369,7 @@
         return rsp.get(RESULT);
     }
     
-    public void susbsytemParserDeparser(String xmlContent) throws Exception {
-        XMLMapper xmlMapper = XMLMapper.Factory.create();
-        List<ModelNode> updates = createSubSystem(xmlContent);
-        
-        StringWriter sw = new StringWriter();
-        XMLStreamWriter streamWriter = XMLOutputFactory.newInstance().createXMLStreamWriter(sw);        
-        xmlMapper.deparseDocument(new TeiidSubsystemParser(), new SubsystemMarshallingContext(updates.get(1), new MockXMLExtendedWriter(streamWriter)), streamWriter);
-        
-        System.out.println(sw.toString());
-    }
     
-    //@Test
-    public void testXMLPersistence() throws Exception {
-    	susbsytemParserDeparser(ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-sample-config.xml")));
-    }
-    
     @Test
     public void testSubSystemDescription() throws IOException {
     	ModelNode node = new ModelNode();

Modified: branches/as7/jboss-integration/src/test/resources/teiid-model-config.txt
===================================================================
--- branches/as7/jboss-integration/src/test/resources/teiid-model-config.txt	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/jboss-integration/src/test/resources/teiid-model-config.txt	2011-09-28 15:25:16 UTC (rev 3505)
@@ -1,307 +1,269 @@
-{
-    "attributes" => {
-        "max-threads" => {
-            "type" => INT,
-            "description" => "Process pool maximum thread count. (default 64)",
-            "required" => false,
-            "max-occurs" => 1,
-            "default" => 64
-        },
-        "max-active-plans" => {
-            "type" => INT,
-            "description" => "Max active plans (default 20).  Increase this value on highly concurrent systems - but ensure that the underlying pools can handle the increased load without timeouts.",
-            "required" => false,
-            "max-occurs" => 1,
-            "default" => 20
-        },
-        "thread-count-for-source-concurrency" => {
-            "type" => INT,
-            "description" => "Max source query concurrency per user request (default 0).  0 indicates use the default calculated value based on max active plans and max threads - approximately 2*(max threads)/(max active plans).   ",
-            "required" => false,
-            "max-occurs" => 1,
-            "default" => 0
-        },
-        "time-slice-in-millseconds" => {
-            "type" => INT,
-            "description" => "Query processor time slice, in milliseconds. (default 2000)",
-            "required" => false,
-            "max-occurs" => 1,
-            "default" => 2000
-        },
-        "max-row-fetch-size" => {
-            "type" => INT,
-            "description" => "Maximum allowed fetch size, set via JDBC. User requested value ignored above this value. (default 20480)",
-            "required" => false,
-            "max-occurs" => 1,
-            "default" => 20480
-        },
-        "lob-chunk-size-in-kb" => {
-            "type" => INT,
-            "description" => "The max lob chunk size in KB transferred each time when processing blobs, clobs (100KB default)",
-            "required" => false,
-            "max-occurs" => 1,
-            "default" => 100
-        },
-        "query-threshold-in-seconds" => {
-            "type" => INT,
-            "description" => "Long running query threshold, after which a alert can be generated by tooling if configured",
-            "required" => false,
-            "max-occurs" => 1,
-            "default" => 600
-        },
-        "max-source-rows-allowed" => {
-            "type" => INT,
-            "description" => "Maximum rows allowed from a source query. -1 indicates no limit. (default -1)",
-            "required" => false,
-            "max-occurs" => 1,
-            "default" => -1
-        },
-        "exception-on-max-source-rows" => {
-            "type" => BOOLEAN,
-            "description" => "Indicates if an exception should be thrown if the specified value for Maximum Source Rows is exceeded; only up to the maximum rows will be consumed. (default true)",
-            "required" => false,
-            "max-occurs" => 1,
-            "default" => true
-        },
-        "max-odbc-lob-size-allowed" => {
-            "type" => INT,
-            "description" => "Maximum size of lob allowed through ODBC connection in bytes (default 5MB)",
-            "required" => false,
-            "max-occurs" => 1,
-            "default" => 5242880
-        },
-        "detect-change-events" => {
-            "type" => BOOLEAN,
-            "description" => "Set to true for the engine to detect local change events. Should be disabled if using external change data capture tools. (default true)",
-            "required" => false,
-            "max-occurs" => 1,
-            "default" => true
-        },
-        "security-domain" => {
-            "type" => LIST,
-            "description" => "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
-        }
+{"attributes" => {
+    "max-threads" => {
+        "type" => INT,
+        "description" => "Process pool maximum thread count. (default 64)",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => 64
     },
-    "children" => {
-        "jdbc" => {
-            "type" => OBJECT,
-            "description" => "Remote JDBC Access Configuration ",
-            "required" => false,
-            "max-occurs" => 1,
-            "min-occurs" => 1,
-            "attributes" => {
-                "max-socket-threads" => {
-                    "type" => INT,
-                    "description" => "Max number of threads dedicated to initial request processing. Zero indicates the system default of max available processors. (default 0)  Setting this value above the max available processors is not recommended.",
-                    "required" => false,
-                    "max-occurs" => 1,
-                    "default" => 0
-                },
-                "input-buffer-size" => {
-                    "type" => INT,
-                    "description" => "SO_RCVBUF size, 0 indicates that system default should be used (default 0)",
-                    "required" => false,
-                    "max-occurs" => 1,
-                    "default" => 0
-                },
-                "output-buffer-size" => {
-                    "type" => INT,
-                    "description" => "SO_SNDBUF size, 0 indicates that system default should be used (default 0)",
-                    "required" => false,
-                    "max-occurs" => 1,
-                    "default" => 0
-                },
-                "socket-binding" => {
-                    "type" => STRING,
-                    "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,if the client supports SSL",
-                    "required" => false,
-                    "max-occurs" => 1,
-                    "default" => "login"
-                },
-                "keystore-name" => {
-                    "type" => STRING,
-                    "description" => "Keystore File Name",
-                    "required" => false,
-                    "max-occurs" => 1
-                },
-                "keystore-password" => {
-                    "type" => STRING,
-                    "description" => "Keystore password",
-                    "required" => false,
-                    "max-occurs" => 1
-                },
-                "keystore-type" => {
-                    "type" => STRING,
-                    "description" => "Keystore type",
-                    "required" => false,
-                    "max-occurs" => 1,
-                    "default" => "JKS"
-                },
-                "ssl-protocol" => {
-                    "type" => BOOLEAN,
-                    "description" => "SSL protocol used",
-                    "required" => false,
-                    "max-occurs" => 1,
-                    "default" => false
-                },
-                "keymanagement-algorithm" => {
-                    "type" => STRING,
-                    "description" => "Use key management algorithm",
-                    "required" => false,
-                    "max-occurs" => 1,
-                    "default" => "false"
-                },
-                "truststore-name" => {
-                    "type" => STRING,
-                    "description" => "Truststore Name",
-                    "required" => false,
-                    "max-occurs" => 1
-                },
-                "truststore-password" => {
-                    "type" => STRING,
-                    "description" => "Truststore Password",
-                    "required" => false,
-                    "max-occurs" => 1
-                },
-                "authentication-mode" => {
-                    "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
-            }}
-        },
-        "odbc" => {
-            "type" => OBJECT,
-            "description" => "ODBC Access Configuration",
-            "required" => false,
-            "max-occurs" => 1,
-            "min-occurs" => 1,
-            "attributes" => {
-                "max-socket-threads" => {
-                    "type" => INT,
-                    "description" => "Max number of threads dedicated to initial request processing. Zero indicates the system default of max available processors. (default 0)  Setting this value above the max available processors is not recommended.",
-                    "required" => false,
-                    "max-occurs" => 1,
-                    "default" => 0
-                },
-                "input-buffer-size" => {
-                    "type" => INT,
-                    "description" => "SO_RCVBUF size, 0 indicates that system default should be used (default 0)",
-                    "required" => false,
-                    "max-occurs" => 1,
-                    "default" => 0
-                },
-                "output-buffer-size" => {
-                    "type" => INT,
-                    "description" => "SO_SNDBUF size, 0 indicates that system default should be used (default 0)",
-                    "required" => false,
-                    "max-occurs" => 1,
-                    "default" => 0
-                },
-                "socket-binding" => {
-                    "type" => STRING,
-                    "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,if the client supports SSL",
-                    "required" => false,
-                    "max-occurs" => 1,
-                    "default" => "login"
-                },
-                "keystore-name" => {
-                    "type" => STRING,
-                    "description" => "Keystore File Name",
-                    "required" => false,
-                    "max-occurs" => 1
-                },
-                "keystore-password" => {
-                    "type" => STRING,
-                    "description" => "Keystore password",
-                    "required" => false,
-                    "max-occurs" => 1
-                },
-                "keystore-type" => {
-                    "type" => STRING,
-                    "description" => "Keystore type",
-                    "required" => false,
-                    "max-occurs" => 1,
-                    "default" => "JKS"
-                },
-                "ssl-protocol" => {
-                    "type" => BOOLEAN,
-                    "description" => "SSL protocol used",
-                    "required" => false,
-                    "max-occurs" => 1,
-                    "default" => false
-                },
-                "keymanagement-algorithm" => {
-                    "type" => STRING,
-                    "description" => "Use key management algorithm",
-                    "required" => false,
-                    "max-occurs" => 1,
-                    "default" => "false"
-                },
-                "truststore-name" => {
-                    "type" => STRING,
-                    "description" => "Truststore Name",
-                    "required" => false,
-                    "max-occurs" => 1
-                },
-                "truststore-password" => {
-                    "type" => STRING,
-                    "description" => "Truststore Password",
-                    "required" => false,
-                    "max-occurs" => 1
-                },
-                "authentication-mode" => {
-                    "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
-            }}
-        }
+    "max-active-plans" => {
+        "type" => INT,
+        "description" => "Max active plans (default 20).  Increase this value on highly concurrent systems - but ensure that the underlying pools can handle the increased load without timeouts.",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => 20
+    },
+    "thread-count-for-source-concurrency" => {
+        "type" => INT,
+        "description" => "Max source query concurrency per user request (default 0).  0 indicates use the default calculated value based on max active plans and max threads - approximately 2*(max threads)/(max active plans).   ",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => 0
+    },
+    "time-slice-in-millseconds" => {
+        "type" => INT,
+        "description" => "Query processor time slice, in milliseconds. (default 2000)",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => 2000
+    },
+    "max-row-fetch-size" => {
+        "type" => INT,
+        "description" => "Maximum allowed fetch size, set via JDBC. User requested value ignored above this value. (default 20480)",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => 20480
+    },
+    "lob-chunk-size-in-kb" => {
+        "type" => INT,
+        "description" => "The max lob chunk size in KB transferred each time when processing blobs, clobs (100KB default)",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => 100
+    },
+    "query-threshold-in-seconds" => {
+        "type" => INT,
+        "description" => "Long running query threshold, after which a alert can be generated by tooling if configured",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => 600
+    },
+    "max-source-rows-allowed" => {
+        "type" => INT,
+        "description" => "Maximum rows allowed from a source query. -1 indicates no limit. (default -1)",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => -1
+    },
+    "exception-on-max-source-rows" => {
+        "type" => BOOLEAN,
+        "description" => "Indicates if an exception should be thrown if the specified value for Maximum Source Rows is exceeded; only up to the maximum rows will be consumed. (default true)",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => true
+    },
+    "max-odbc-lob-size-allowed" => {
+        "type" => INT,
+        "description" => "Maximum size of lob allowed through ODBC connection in bytes (default 5MB)",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => 5242880
+    },
+    "detect-change-events" => {
+        "type" => BOOLEAN,
+        "description" => "Set to true for the engine to detect local change events. Should be disabled if using external change data capture tools. (default true)",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => true
+    },
+    "security-domain" => {
+        "type" => LIST,
+        "description" => "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
+    },
+    "jdbc-max-socket-threads" => {
+        "type" => INT,
+        "description" => "Max number of threads dedicated to initial request processing. Zero indicates the system default of max available processors. (default 0)  Setting this value above the max available processors is not recommended.",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => 0
+    },
+    "jdbc-input-buffer-size" => {
+        "type" => INT,
+        "description" => "SO_RCVBUF size, 0 indicates that system default should be used (default 0)",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => 0
+    },
+    "jdbc-output-buffer-size" => {
+        "type" => INT,
+        "description" => "SO_SNDBUF size, 0 indicates that system default should be used (default 0)",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => 0
+    },
+    "jdbc-socket-binding" => {
+        "type" => STRING,
+        "description" => "Socket binding for the profile",
+        "required" => false,
+        "max-occurs" => 1
+    },
+    "jdbc-ssl-mode" => {
+        "type" => STRING,
+        "description" => "can be one of disabled, login, or enabled disabled = no transport or message level security will be used; login = only the login traffic will be encrypted at a message level using 128 bit AES with an ephemerial DH key exchange. No other config values are needed in this mode; enabled = traffic will be secured using this configuration,if the client supports SSL",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => "login"
+    },
+    "jdbc-ssl-keystore-name" => {
+        "type" => STRING,
+        "description" => "Keystore File Name",
+        "required" => false,
+        "max-occurs" => 1
+    },
+    "jdbc-ssl-keystore-password" => {
+        "type" => STRING,
+        "description" => "Keystore password",
+        "required" => false,
+        "max-occurs" => 1
+    },
+    "jdbc-ssl-keystore-type" => {
+        "type" => STRING,
+        "description" => "Keystore type",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => "JKS"
+    },
+    "jdbc-ssl-ssl-protocol" => {
+        "type" => STRING,
+        "description" => "SSL protocol used",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => "SSLv3"
+    },
+    "jdbc-ssl-keymanagement-algorithm" => {
+        "type" => STRING,
+        "description" => "Use key management algorithm",
+        "required" => false,
+        "max-occurs" => 1
+    },
+    "jdbc-ssl-truststore-name" => {
+        "type" => STRING,
+        "description" => "Truststore Name",
+        "required" => false,
+        "max-occurs" => 1
+    },
+    "jdbc-ssl-truststore-password" => {
+        "type" => STRING,
+        "description" => "Truststore Password",
+        "required" => false,
+        "max-occurs" => 1
+    },
+    "jdbc-ssl-authentication-mode" => {
+        "type" => STRING,
+        "description" => "Authentication Mode (1-way, 2-way, anonymous)",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => "anonymous"
+    },
+    "odbc-max-socket-threads" => {
+        "type" => INT,
+        "description" => "Max number of threads dedicated to initial request processing. Zero indicates the system default of max available processors. (default 0)  Setting this value above the max available processors is not recommended.",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => 0
+    },
+    "odbc-input-buffer-size" => {
+        "type" => INT,
+        "description" => "SO_RCVBUF size, 0 indicates that system default should be used (default 0)",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => 0
+    },
+    "odbc-output-buffer-size" => {
+        "type" => INT,
+        "description" => "SO_SNDBUF size, 0 indicates that system default should be used (default 0)",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => 0
+    },
+    "odbc-socket-binding" => {
+        "type" => STRING,
+        "description" => "Socket binding for the profile",
+        "required" => false,
+        "max-occurs" => 1
+    },
+    "odbc-ssl-mode" => {
+        "type" => STRING,
+        "description" => "can be one of disabled, login, or enabled disabled = no transport or message level security will be used; login = only the login traffic will be encrypted at a message level using 128 bit AES with an ephemerial DH key exchange. No other config values are needed in this mode; enabled = traffic will be secured using this configuration,if the client supports SSL",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => "login"
+    },
+    "odbc-ssl-keystore-name" => {
+        "type" => STRING,
+        "description" => "Keystore File Name",
+        "required" => false,
+        "max-occurs" => 1
+    },
+    "odbc-ssl-keystore-password" => {
+        "type" => STRING,
+        "description" => "Keystore password",
+        "required" => false,
+        "max-occurs" => 1
+    },
+    "odbc-ssl-keystore-type" => {
+        "type" => STRING,
+        "description" => "Keystore type",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => "JKS"
+    },
+    "odbc-ssl-ssl-protocol" => {
+        "type" => STRING,
+        "description" => "SSL protocol used",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => "SSLv3"
+    },
+    "odbc-ssl-keymanagement-algorithm" => {
+        "type" => STRING,
+        "description" => "Use key management algorithm",
+        "required" => false,
+        "max-occurs" => 1
+    },
+    "odbc-ssl-truststore-name" => {
+        "type" => STRING,
+        "description" => "Truststore Name",
+        "required" => false,
+        "max-occurs" => 1
+    },
+    "odbc-ssl-truststore-password" => {
+        "type" => STRING,
+        "description" => "Truststore Password",
+        "required" => false,
+        "max-occurs" => 1
+    },
+    "odbc-ssl-authentication-mode" => {
+        "type" => STRING,
+        "description" => "Authentication Mode (1-way, 2-way, anonymous)",
+        "required" => false,
+        "max-occurs" => 1,
+        "default" => "anonymous"
     }
-}
\ No newline at end of file
+}}
\ No newline at end of file

Added: branches/as7/jboss-integration/src/test/resources/teiid-model-json.txt
===================================================================
--- branches/as7/jboss-integration/src/test/resources/teiid-model-json.txt	                        (rev 0)
+++ branches/as7/jboss-integration/src/test/resources/teiid-model-json.txt	2011-09-28 15:25:16 UTC (rev 3505)
@@ -0,0 +1,64 @@
+{"subsystem" : {"teiid" : {
+    "allow-env-function" : "false",
+    "async-thread-group" : "teiid-async",
+    "buffer-service-connector-batch-size" : "1024",
+    "buffer-service-max-buffer-space" : "51200",
+    "buffer-service-max-file-size" : "2048",
+    "buffer-service-max-open-files" : "64",
+    "buffer-service-max-processing-kb" : "-1",
+    "buffer-service-max-reserve-kb" : "-1",
+    "buffer-service-processor-batch-size" : "512",
+    "buffer-service-use-disk" : "true",
+    "object-replicator-cluster-name" : "cluster",
+    "object-replicator-stack" : "stack",
+    "preparedplan-cache-max-age-in-seconds" : 28800,
+    "preparedplan-cache-max-entries" : 512,
+    "preparedplan-cache-max-staleness" : 90,
+    "resultset-cache-container-name" : "container",
+    "resultset-cache-enable" : false,
+    "resultset-cache-max-staleness" : 90,
+    "resultset-cache-name" : "cache",
+    "query-engine" : {
+        "alternate" : {},
+        "default" : {
+            "detect-change-events" : true,
+            "exception-on-max-source-rows" : true,
+            "jdbc-input-buffer-size" : 2,
+            "jdbc-max-socket-threads" : 1,
+            "jdbc-output-buffer-size" : 3,
+            "jdbc-socket-binding" : "teiid-jdbc",
+            "lob-chunk-size-in-kb" : 100,
+            "max-active-plans" : 20,
+            "max-odbc-lob-size-allowed" : 5242880,
+            "max-row-fetch-size" : 20480,
+            "max-sessions-allowed" : 5000,
+            "max-source-rows-allowed" : -1,
+            "max-threads" : 64,
+            "odbc-input-buffer-size" : 2,
+            "odbc-max-socket-threads" : 1,
+            "odbc-output-buffer-size" : 3,
+            "odbc-socket-binding" : "teiid-odbc",
+            "odbc-ssl-authentication-mode" : "1-way",
+            "odbc-ssl-keymanagement-algorithm" : "algo",
+            "odbc-ssl-keystore-name" : "keystore-name",
+            "odbc-ssl-keystore-password" : "keystore passs",
+            "odbc-ssl-keystore-type" : "key store type",
+            "odbc-ssl-mode" : "login",
+            "odbc-ssl-ssl-protocol" : "ssl protocol",
+            "odbc-ssl-truststore-name" : "truststore name",
+            "odbc-ssl-truststore-password" : "trust pass",
+            "query-threshold-in-seconds" : 600,
+            "security-domain" : [
+                "teiid-security",
+                "teiid-security2"
+            ],
+            "sessions-expiration-timelimit" : 0,
+            "thread-count-for-source-concurrency" : 0,
+            "time-slice-in-millseconds" : 2000
+        }
+    },
+    "translator" : {
+        "jdbc-simple" : {"module" : "org.jboss.teiid.translator.jdbc"},
+        "jdbc-ansi" : {"module" : "org.jboss.teiid.translator.jdbc"}
+    }
+}}}
\ No newline at end of file


Property changes on: branches/as7/jboss-integration/src/test/resources/teiid-model-json.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Modified: branches/as7/jboss-integration/src/test/resources/teiid-sample-config.xml
===================================================================
--- branches/as7/jboss-integration/src/test/resources/teiid-sample-config.xml	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/jboss-integration/src/test/resources/teiid-sample-config.xml	2011-09-28 15:25:16 UTC (rev 3505)
@@ -40,19 +40,25 @@
         <max-sessions-allowed>5000</max-sessions-allowed>
         <sessions-expiration-timelimit>0</sessions-expiration-timelimit>
                 
-        <jdbc socket-binding="teiid-jdbc">
-            <max-socket-threads>0</max-socket-threads>
-            <input-buffer-size>0</input-buffer-size>
-            <output-buffer-size>0</output-buffer-size>
-        </jdbc>
+        <jdbc socket-binding="teiid-jdbc" max-socket-threads="1" input-buffer-size="2" output-buffer-size="3"/>
 
-        <odbc socket-binding="teiid-odbc">
-            <max-socket-threads>0</max-socket-threads>
-            <input-buffer-size>0</input-buffer-size>
-            <output-buffer-size>0</output-buffer-size>
+        <odbc socket-binding="teiid-odbc" max-socket-threads="1" input-buffer-size="2" output-buffer-size="3">
+            <ssl>
+                <mode>login</mode>
+                <keystore-name>keystore-name</keystore-name>
+                <keystore-password>keystore passs</keystore-password>
+                <keystore-type>key store type</keystore-type>
+                <ssl-protocol>ssl protocol</ssl-protocol>
+                <keymanagement-algorithm>algo</keymanagement-algorithm>
+                <truststore-name>truststore name</truststore-name>
+                <truststore-password>trust pass</truststore-password>
+                <authentication-mode>1-way</authentication-mode>
+            </ssl>
         </odbc>
     </query-engine>
     
     <query-engine name="alternate"/>
 
+    <translator name="jdbc-simple" module="org.jboss.teiid.translator.jdbc"/>
+    <translator name="jdbc-ansi" module="org.jboss.teiid.translator.jdbc"/>
 </subsystem>
\ No newline at end of file

Modified: branches/as7/pom.xml
===================================================================
--- branches/as7/pom.xml	2011-09-28 03:15:08 UTC (rev 3504)
+++ branches/as7/pom.xml	2011-09-28 15:25:16 UTC (rev 3505)
@@ -455,8 +455,13 @@
               <groupId>org.jboss.as</groupId>
               <artifactId>jboss-as-clustering-jgroups</artifactId>
               <version>${jbossas-version}</version>
-            </dependency>                      
+            </dependency>    
             <dependency>
+                <groupId>org.jboss.as</groupId>
+                <artifactId>jboss-as-subsystem-test</artifactId>
+                <version>${jbossas-version}</version>
+            </dependency>                                
+            <dependency>
               <groupId>org.infinispan</groupId>
               <artifactId>infinispan-core</artifactId>
               <version>5.0.0.FINAL</version>



More information about the teiid-commits mailing list