[teiid-commits] teiid SVN: r3498 - in branches/as7: build/kits/jboss-as7/standalone/configuration and 3 other directories.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Wed Sep 14 17:03:49 EDT 2011


Author: rareddy
Date: 2011-09-14 17:03:48 -0400 (Wed, 14 Sep 2011)
New Revision: 3498

Added:
   branches/as7/build/kits/jboss-as7/docs/teiid/datasources/file.xml
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/DynamicVDBRootMountDeployer.java
Removed:
   branches/as7/build/kits/jboss-as7/docs/teiid/datasources/all-drivers.xml
Modified:
   branches/as7/build/kits/jboss-as7/docs/teiid/datasources/h2.xml
   branches/as7/build/kits/jboss-as7/docs/teiid/datasources/oracle.xml
   branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidBootServicesAdd.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBParserDeployer.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java
   branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBStructureDeployer.java
   branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
   branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidConfiguration.java
Log:
TEIID-1720: Changes for dynamic vdb deployment

Deleted: branches/as7/build/kits/jboss-as7/docs/teiid/datasources/all-drivers.xml
===================================================================
--- branches/as7/build/kits/jboss-as7/docs/teiid/datasources/all-drivers.xml	2011-09-14 20:18:16 UTC (rev 3497)
+++ branches/as7/build/kits/jboss-as7/docs/teiid/datasources/all-drivers.xml	2011-09-14 21:03:48 UTC (rev 3498)
@@ -1,8 +0,0 @@
-<drivers>
-    <driver name="h2" module="com.h2database.h2">
-        <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
-    </driver>
-    <driver name="oracle" module="com.oracle">
-        <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
-    </driver>    
-</drivers>
\ No newline at end of file

Added: branches/as7/build/kits/jboss-as7/docs/teiid/datasources/file.xml
===================================================================
--- branches/as7/build/kits/jboss-as7/docs/teiid/datasources/file.xml	                        (rev 0)
+++ branches/as7/build/kits/jboss-as7/docs/teiid/datasources/file.xml	2011-09-14 21:03:48 UTC (rev 3498)
@@ -0,0 +1,31 @@
+<!-- If susbsytem is already defined, only copy the contents under it and edit to suit your needs -->
+<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
+    <resource-adapters>
+        <resource-adapter>
+            <archive>teiid-connector-file.rar</archive>
+            <transaction-support>NoTransaction</transaction-support>
+            <connection-definitions>
+                <connection-definition class-name="org.teiid.resource.adapter.file.FileManagedConnectionFactory" 
+                        jndi-name="java:/fileDS" 
+                        enabled="true" 
+                        use-java-context="true" 
+                        pool-name="teiid-file-ds">
+                        
+                       <!-- Directory where the data files are stored -->
+                      <config-property name="ParentDirectory">/home/rareddy/testing/</config-property>
+                      
+                      <!-- Optional properties -->
+                      
+                      <!-- Set FileMapping to redirect specific relative paths (case sensitive) to alternative locations.
+                           The string value specifies a map in the format key=value(,key=value)*
+                           -->
+                      <!-- <config-property name="FileMapping">file1.txt=fileX.txt,file2.txt=fileY.txt</config-property> -->
+                      
+                      <!-- Set AllowParentPaths to false to disallow .. in paths.
+                           This prevent requesting files that are not contained in the parent directory -->
+                      <config-property name="AllowParentPaths">true</config-property>
+                </connection-definition>
+            </connection-definitions>
+        </resource-adapter>
+    </resource-adapters>
+</subsystem>


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

Modified: branches/as7/build/kits/jboss-as7/docs/teiid/datasources/h2.xml
===================================================================
--- branches/as7/build/kits/jboss-as7/docs/teiid/datasources/h2.xml	2011-09-14 20:18:16 UTC (rev 3497)
+++ branches/as7/build/kits/jboss-as7/docs/teiid/datasources/h2.xml	2011-09-14 21:03:48 UTC (rev 3498)
@@ -1,14 +1,21 @@
-<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="H2DS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
-    <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
-    <driver>h2</driver>
-    <pool>
-        <prefill>false</prefill>
-        <use-strict-min>false</use-strict-min>
-        <flush-strategy>FailingConnectionOnly</flush-strategy>
-    </pool>
-    <security>
-        <user-name>sa</user-name>
-        <password>sa</password>
-    </security>
-</datasource>
+<!-- If susbsytem is already defined, only copy the contents under it and edit to suit your needs -->
+<subsystem xmlns="urn:jboss:domain:datasources:1.0">
+    <datasources>
+        <datasource jndi-name="java:jboss/datasources/ExampleDS" enabled="true" use-java-context="true" pool-name="H2DS">
+            <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
+            <driver>h2</driver>
+            <pool></pool>
+            <security>
+                <user-name>sa</user-name>
+                <password>sa</password>
+            </security>
+        </datasource>
+        <drivers>
+            <driver name="h2" module="com.h2database.h2">
+                <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
+            </driver>
+        </drivers>
+    </datasources>
+</subsystem>
 
+

Modified: branches/as7/build/kits/jboss-as7/docs/teiid/datasources/oracle.xml
===================================================================
--- branches/as7/build/kits/jboss-as7/docs/teiid/datasources/oracle.xml	2011-09-14 20:18:16 UTC (rev 3497)
+++ branches/as7/build/kits/jboss-as7/docs/teiid/datasources/oracle.xml	2011-09-14 21:03:48 UTC (rev 3498)
@@ -1,13 +1,23 @@
-<datasource jndi-name="java:/Oracle11_PushDS" pool-name="OracleDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
-    <connection-url>jdbc:oracle:thin:@englxdbs11.mw.lab.eng.bos.redhat.com:1521:orcl</connection-url>
-    <driver>oracle</driver>
-    <pool>
-        <prefill>false</prefill>
-        <use-strict-min>false</use-strict-min>
-        <flush-strategy>FailingConnectionOnly</flush-strategy>
-    </pool>
-    <security>
-        <user-name>bqt2_ro</user-name>
-        <password>mm</password>
-    </security>
-</datasource>
\ No newline at end of file
+<!-- If susbsytem is already defined, only copy the contents under it and edit to suit your needs -->
+<subsystem xmlns="urn:jboss:domain:datasources:1.0">
+    <datasources>
+        <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:{host}:1521:orcl</connection-url>
+            <driver>oracle</driver>
+            <pool>
+                <prefill>false</prefill>
+                <use-strict-min>false</use-strict-min>
+                <flush-strategy>FailingConnectionOnly</flush-strategy>
+            </pool>
+            <security>
+                <user-name>{user}</user-name>
+                <password>{password}</password>
+            </security>
+        </datasource>                
+        <drivers>
+            <driver name="oracle" module="com.oracle">
+                <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
+            </driver>    
+        </drivers>
+    </datasources>
+</subsystem>

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-14 20:18:16 UTC (rev 3497)
+++ branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml	2011-09-14 21:03:48 UTC (rev 3498)
@@ -34,6 +34,7 @@
         <extension module="org.jboss.as.logging"/>
         <extension module="org.jboss.as.naming"/>
         <extension module="org.jboss.as.osgi"/>
+        <extension module="org.jboss.as.pojo"/>
         <extension module="org.jboss.as.remoting"/>
         <extension module="org.jboss.as.sar"/>
         <extension module="org.jboss.as.security"/>
@@ -196,6 +197,7 @@
             <jpa default-datasource=""/>
         </subsystem>
         <subsystem xmlns="urn:jboss:domain:naming:1.0" />
+        <subsystem xmlns="urn:jboss:domain:pojo:1.0" />
         <subsystem xmlns="urn:jboss:domain:osgi:1.0" activation="lazy">
             <configuration pid="org.apache.felix.webconsole.internal.servlet.OsgiManager">
                 <property name="manager.root">jboss-osgi</property>
@@ -360,20 +362,20 @@
 
     <interfaces>
         <interface name="management">
-            <inet-address value="127.0.0.1"/>
+            <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
         </interface>
         <interface name="public">
-           <inet-address value="127.0.0.1"/>
+           <inet-address value="${jboss.bind.address.public:127.0.0.1}"/>
         </interface>
     </interfaces>
 
     <socket-binding-group name="standard-sockets" default-interface="public">
         <socket-binding name="http" port="8080"/>
         <socket-binding name="https" port="8443"/>
-        <socket-binding name="jmx-connector-registry" port="1090"/>
-        <socket-binding name="jmx-connector-server" port="1091"/>
+        <socket-binding name="jmx-connector-registry" interface="management" port="1090"/>
+        <socket-binding name="jmx-connector-server" interface="management" port="1091"/>
         <socket-binding name="jndi" port="1099"/>
-        <socket-binding name="osgi-http" port="8090"/>
+        <socket-binding name="osgi-http" interface="management" port="8090"/>
         <socket-binding name="remoting" port="4447"/>
         <socket-binding name="txn-recovery-environment" port="4712"/>
         <socket-binding name="txn-status-manager" port="4713"/>

Added: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/DynamicVDBRootMountDeployer.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/DynamicVDBRootMountDeployer.java	                        (rev 0)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/DynamicVDBRootMountDeployer.java	2011-09-14 21:03:48 UTC (rev 3498)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+package org.teiid.jboss;
+
+import java.io.Closeable;
+
+import org.jboss.as.server.deployment.*;
+import org.jboss.as.server.deployment.module.ModuleRootMarker;
+import org.jboss.as.server.deployment.module.ModuleSpecification;
+import org.jboss.as.server.deployment.module.ResourceRoot;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
+
+
+
+class DynamicVDBRootMountDeployer  implements DeploymentUnitProcessor {
+	private static final String DYNAMIC_VDB_STRUCTURE = "-vdb.xml"; //$NON-NLS-1$
+	
+	public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
+        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
+        
+        if(deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT) != null) {
+            return;
+        }
+        
+        final String deploymentName = deploymentUnit.getName();
+        final VirtualFile deploymentContents = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_CONTENTS);
+
+        // internal deployments do not have any contents, so there is nothing to mount
+        if (deploymentContents == null)
+            return;
+        
+        if (deploymentName.endsWith(DYNAMIC_VDB_STRUCTURE)) {
+            // use the contents directly
+            // nothing was mounted
+            final ResourceRoot resourceRoot = new ResourceRoot(deploymentContents, null);
+            ModuleRootMarker.mark(resourceRoot);
+            deploymentUnit.putAttachment(Attachments.DEPLOYMENT_ROOT, resourceRoot);
+            deploymentUnit.putAttachment(Attachments.MODULE_SPECIFICATION, new ModuleSpecification());            
+        }
+    }
+
+    public void undeploy(DeploymentUnit context) {
+        final ResourceRoot resourceRoot = context.removeAttachment(Attachments.DEPLOYMENT_ROOT);
+        if (resourceRoot != null) {
+            final Closeable mountHandle = resourceRoot.getMountHandle();
+            VFSUtils.safeClose(mountHandle);
+        }
+    }
+}


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

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-14 20:18:16 UTC (rev 3497)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidBootServicesAdd.java	2011-09-14 21:03:48 UTC (rev 3498)
@@ -259,6 +259,7 @@
         context.addStep(new AbstractDeploymentChainStep() {
 			@Override
 			public void execute(DeploymentProcessorTarget processorTarget) {
+				processorTarget.addDeploymentProcessor(Phase.STRUCTURE, Phase.STRUCTURE_WAR_DEPLOYMENT_INIT,new DynamicVDBRootMountDeployer());
 				processorTarget.addDeploymentProcessor(Phase.STRUCTURE, Phase.STRUCTURE_WAR_DEPLOYMENT_INIT|0x0001,new VDBStructureDeployer());
 				processorTarget.addDeploymentProcessor(Phase.PARSE, Phase.PARSE_WEB_DEPLOYMENT|0x0001, new VDBParserDeployer());
 				processorTarget.addDeploymentProcessor(Phase.DEPENDENCIES, Phase.DEPENDENCIES_WAR_MODULE|0x0001, new VDBDependencyDeployer());

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java	2011-09-14 20:18:16 UTC (rev 3497)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java	2011-09-14 21:03:48 UTC (rev 3498)
@@ -21,14 +21,17 @@
  */
 package org.teiid.jboss;
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.Executor;
 
-import org.jboss.as.server.deployment.*;
+import org.jboss.as.server.deployment.DeploymentPhaseContext;
+import org.jboss.as.server.deployment.DeploymentUnit;
+import org.jboss.as.server.deployment.DeploymentUnitProcessingException;
+import org.jboss.as.server.deployment.DeploymentUnitProcessor;
 import org.jboss.msc.service.*;
 import org.jboss.msc.service.ServiceBuilder.DependencyType;
 import org.jboss.msc.service.ServiceController.Mode;
-import org.jboss.vfs.VirtualFile;
 import org.teiid.adminapi.Translator;
 import org.teiid.adminapi.impl.ModelMetaData;
 import org.teiid.adminapi.impl.VDBMetaData;
@@ -60,7 +63,7 @@
 		if (!TeiidAttachments.isVDBDeployment(deploymentUnit)) {
 			return;
 		}
-		VirtualFile file = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot();
+		final String deploymentName = deploymentUnit.getName();
 		VDBMetaData deployment = deploymentUnit.getAttachment(TeiidAttachments.VDB_METADATA);
 		
 		// check to see if there is old vdb already deployed.
@@ -85,7 +88,7 @@
 			String type = data.getType();
 			Translator parent = this.translatorRepository.getTranslatorMetaData(type);
 			if ( parent == null) {
-				throw new DeploymentUnitProcessingException(RuntimePlugin.Util.getString("translator_type_not_found", file.getName())); //$NON-NLS-1$
+				throw new DeploymentUnitProcessingException(RuntimePlugin.Util.getString("translator_type_not_found", deploymentName)); //$NON-NLS-1$
 			}
 		}
 				
@@ -105,13 +108,17 @@
 		deploymentUnit.removeAttachment(TeiidAttachments.UDF_METADATA);
 		
 		// build a VDB service
+		ArrayList<String> unAvailableDS = new ArrayList<String>();
 		VDBService vdb = new VDBService(deployment);
 		ServiceBuilder<VDBMetaData> vdbService = context.getServiceTarget().addService(TeiidServiceNames.vdbServiceName(deployment.getName(), deployment.getVersion()), vdb);
-		for (ModelMetaData model:deployment.getModelMetaDatas().values()) {
-			for (String sourceName:model.getSourceNames()) {
-				vdbService.addDependency(DependencyType.OPTIONAL, ServiceName.JBOSS.append("data-source", model.getSourceConnectionJndiName(sourceName)));	//$NON-NLS-1$
-			}
-		}
+//		for (ModelMetaData model:deployment.getModelMetaDatas().values()) {
+//			for (String sourceName:model.getSourceNames()) {
+//				vdbService.addDependency(ServiceName.JBOSS.append("data-source", model.getSourceConnectionJndiName(sourceName)));	//$NON-NLS-1$
+//				if (context.getServiceRegistry().getService(ServiceName.JBOSS.append("data-source", model.getSourceConnectionJndiName(sourceName))) == null) { //$NON-NLS-1$
+//					unAvailableDS.add(model.getSourceConnectionJndiName(sourceName));
+//				}
+//			}
+//		}
 		
 		// adding the translator services is redundant, however if one is removed then it is an issue.
 		for (Translator t: deployment.getOverrideTranslators()) {
@@ -127,6 +134,10 @@
 		vdbService.addDependency(TeiidServiceNames.BUFFER_MGR, BufferServiceImpl.class, vdb.getBufferServiceInjector());
 		vdbService.addDependency(DependencyType.OPTIONAL, TeiidServiceNames.OBJECT_REPLICATOR, ObjectReplicator.class, vdb.getObjectReplicatorInjector());
 		vdbService.setInitialMode(Mode.PASSIVE).install();
+		
+		if (!unAvailableDS.isEmpty()) {
+			LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("vdb-inactive", deployment.getName(), deployment.getVersion(), unAvailableDS)); //$NON-NLS-1$
+		}
 	}
 
 
@@ -140,7 +151,7 @@
         final ServiceController<?> controller = deploymentUnit.getServiceRegistry().getService(TeiidServiceNames.vdbServiceName(deployment.getName(), deployment.getVersion()));
         if (controller != null) {
         	VDBService vdbService = (VDBService)controller.getService();
-        	vdbService.undeployinProgress();
+        	vdbService.undeployInProgress();
         	
             controller.setMode(ServiceController.Mode.REMOVE);
         }

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-14 20:18:16 UTC (rev 3497)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBParserDeployer.java	2011-09-14 21:03:48 UTC (rev 3498)
@@ -58,7 +58,7 @@
 		VirtualFile file = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot();
 
 		if (TeiidAttachments.isDynamicVDB(deploymentUnit)) {
-			parseVDBXML(file, deploymentUnit);			
+			parseVDBXML(file, deploymentUnit).setDynamic(true);			
 		}
 		else {
 			// scan for different files 
@@ -101,11 +101,12 @@
 		}
 	}
 
-	private void parseVDBXML(VirtualFile file, DeploymentUnit deploymentUnit) throws DeploymentUnitProcessingException {
+	private VDBMetaData parseVDBXML(VirtualFile file, DeploymentUnit deploymentUnit) throws DeploymentUnitProcessingException {
 		try {
 			VDBMetaData vdb = VDBMetadataParser.unmarshell(file.openStream());
 			deploymentUnit.putAttachment(TeiidAttachments.VDB_METADATA, vdb);
 			LogManager.logDetail(LogConstants.CTX_RUNTIME,"VDB "+file.getName()+" has been parsed.");  //$NON-NLS-1$ //$NON-NLS-2$
+			return vdb;
 		} catch (XMLStreamException e) {
 			throw new DeploymentUnitProcessingException(e);
 		} catch (IOException e) {

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-14 20:18:16 UTC (rev 3497)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java	2011-09-14 21:03:48 UTC (rev 3498)
@@ -454,7 +454,7 @@
 		return objectReplicatorInjector;
 	}	
 	
-	public void undeployinProgress() {
+	public void undeployInProgress() {
 		this.undeployInProgress = true;
 	}
 }

Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBStructureDeployer.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBStructureDeployer.java	2011-09-14 20:18:16 UTC (rev 3497)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBStructureDeployer.java	2011-09-14 21:03:48 UTC (rev 3498)
@@ -37,12 +37,13 @@
 		
         DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
         
+        String deploymentName = deploymentUnit.getName();
         VirtualFile file = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot();
         if (file == null) {
         	return;
         }
         
-        if(file.getName().toLowerCase().endsWith(VDB_EXTENSION)) {
+        if(deploymentName.endsWith(VDB_EXTENSION)) {
 			VirtualFile metainf = file.getChild("META-INF"); //$NON-NLS-1$
 			if (metainf == null) {
 				return;
@@ -54,7 +55,7 @@
 			// adds a TYPE attachment.
 			TeiidAttachments.setAsVDBDeployment(deploymentUnit);
         }
-        else if (file.getName().toLowerCase().endsWith(DYNAMIC_VDB_STRUCTURE)) {
+        else if (deploymentName.endsWith(DYNAMIC_VDB_STRUCTURE)) {
 	        TeiidAttachments.setAsDynamicVDBDeployment(deploymentUnit);			        	
         }
 	}

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-14 20:18:16 UTC (rev 3497)
+++ branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties	2011-09-14 21:03:48 UTC (rev 3498)
@@ -235,3 +235,6 @@
 translator.removed = Translator "{0}" removed
 translator.failed-to-load = Translator "{0}" not found in the module "{1}" 
 cache-container-name-required=container-name required for the resultset cache configuration
+
+
+vdb-inactive=VDB {0}.{1} deployed in inactive state due to unavailability of data sources {2}
\ No newline at end of file

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-14 20:18:16 UTC (rev 3497)
+++ branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidConfiguration.java	2011-09-14 21:03:48 UTC (rev 3498)
@@ -32,7 +32,10 @@
 import java.util.concurrent.TimeUnit;
 
 import javax.xml.namespace.QName;
-import javax.xml.stream.*;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
 import javax.xml.transform.Source;
 import javax.xml.transform.stream.StreamSource;
 import javax.xml.validation.Schema;
@@ -54,19 +57,12 @@
 import org.jboss.dmr.ModelNode;
 import org.jboss.dmr.ModelType;
 import org.jboss.dmr.Property;
-import org.jboss.modules.Module;
-import org.jboss.modules.ModuleClassLoader;
-import org.jboss.modules.ModuleIdentifier;
-import org.jboss.modules.ModuleLoader;
 import org.jboss.msc.service.*;
 import org.jboss.staxmapper.XMLElementWriter;
 import org.jboss.staxmapper.XMLMapper;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations.Mock;
-import org.mockito.internal.stubbing.Stubber;
 import org.teiid.core.util.ObjectConverterUtil;
 import org.xml.sax.ErrorHandler;
 import org.xml.sax.SAXException;



More information about the teiid-commits mailing list