[teiid-commits] teiid SVN: r1016 - in trunk: build/kit-embedded and 15 other directories.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Mon Jun 1 16:13:52 EDT 2009


Author: shawkins
Date: 2009-06-01 16:13:51 -0400 (Mon, 01 Jun 2009)
New Revision: 1016

Modified:
   trunk/build/kit-embedded/deploy.properties
   trunk/build/kit-embedded/examples/portfolio/PortfolioModel/.project
   trunk/build/kit-embedded/examples/portfolio/PortfolioModel/AccountView.xmi
   trunk/build/kit-embedded/examples/portfolio/PortfolioModel/Accounts.xmi
   trunk/build/kit-embedded/examples/portfolio/PortfolioModel/MarketData.xmi
   trunk/build/kit-embedded/examples/portfolio/PortfolioModel/Portfolio.vdb
   trunk/build/kit-embedded/examples/portfolio/customer-schema.sql
   trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCacheFactory.java
   trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedConnectionFactory.java
   trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java
   trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMResultSet.java
   trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMStatement.java
   trunk/client-jdbc/src/main/resources/com/metamatrix/jdbc/i18n.properties
   trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/api/AbstractMMQueryTestCase.java
   trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java
   trunk/connectors/connector-text/src/main/java/com/metamatrix/connector/text/TextConnector.java
   trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
   trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedTransactionService.java
   trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedConnectionFactoryImpl.java
   trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedGuiceModule.java
   trunk/embedded/src/main/java/com/metamatrix/jdbc/transport/LocalServerConnection.java
   trunk/embedded/src/main/resources/deploy.properties
   trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java
   trunk/embedded/src/test/java/com/metamatrix/dqp/service/buffer/TestLocalBufferService.java
   trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java
   trunk/pom.xml
Log:
TEIID-637 TEIID-638 TEIID-639 TEIID-640 TEIID-642 updates to the embedded example, fixes to embedded workspace creation and classloading, partially addressing dqp identity, and updating the text connector to search for data files more.

Modified: trunk/build/kit-embedded/deploy.properties
===================================================================
--- trunk/build/kit-embedded/deploy.properties	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/build/kit-embedded/deploy.properties	2009-06-01 20:13:51 UTC (rev 1016)
@@ -6,7 +6,7 @@
 # Path to the directory where the VDBs are located, or list of VDBS separated by ";"
 vdb.definition=./deploy/
 
-#Log file (optional)
+#Log file (optional) - will be modified to include the instance name, i.e. teiid_1.log 
 dqp.logFile=./log/teiid.log
 
 #Logging level (CRITICAL=1,ERROR=2,WARNING=3,INFO=4,DETAIL=5) (optional: default 3) 
@@ -16,11 +16,5 @@
 #Use of this property is an implicit declaration that each Connector Binding has its own Class Loader.
 dqp.extensions=./extensions/
 
-#Directory to use for resultset buffering 
-dqp.buffer.dir=./work/buffer
-
-#Directory for use by Txn manager (default uses ${user.dir})
-metamatrix.xatxnmgr.txnstore_dir=./work
-
-#temp work space (default uses  ${java.io.temp})
-mm.io.tmpdir=./work
+#Path to instance specific temporary information for caching, buffering, and transactions
+dqp.workdir=./work

Modified: trunk/build/kit-embedded/examples/portfolio/PortfolioModel/.project
===================================================================
--- trunk/build/kit-embedded/examples/portfolio/PortfolioModel/.project	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/build/kit-embedded/examples/portfolio/PortfolioModel/.project	2009-06-01 20:13:51 UTC (rev 1016)
@@ -6,12 +6,12 @@
 	</projects>
 	<buildSpec>
 		<buildCommand>
-			<name>com.metamatrix.modeler.core.modelBuilder</name>
+			<name>org.teiid.designer.core.modelBuilder</name>
 			<arguments>
 			</arguments>
 		</buildCommand>
 	</buildSpec>
 	<natures>
-		<nature>com.metamatrix.modeler.core.modelNature</nature>
+		<nature>org.teiid.designer.core.modelNature</nature>
 	</natures>
 </projectDescription>

Modified: trunk/build/kit-embedded/examples/portfolio/PortfolioModel/AccountView.xmi
===================================================================
--- trunk/build/kit-embedded/examples/portfolio/PortfolioModel/AccountView.xmi	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/build/kit-embedded/examples/portfolio/PortfolioModel/AccountView.xmi	2009-06-01 20:13:51 UTC (rev 1016)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="ASCII"?>
 <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:diagram="http://www.metamatrix.com/metamodels/Diagram" xmlns:mmcore="http://www.metamatrix.com/metamodels/Core" xmlns:relational="http://www.metamatrix.com/metamodels/Relational" xmlns:transformation="http://www.metamatrix.com/metamodels/Transformation">
-  <mmcore:ModelAnnotation xmi:uuid="mmuuid:0ed93040-daa2-1105-b511-c9cb83fb3e5e" primaryMetamodelUri="http://www.metamatrix.com/metamodels/Relational" modelType="VIRTUAL" ProducerName="MetaMatrix" ProducerVersion="5.5">
+  <mmcore:ModelAnnotation xmi:uuid="mmuuid:0ed93040-daa2-1105-b511-c9cb83fb3e5e" primaryMetamodelUri="http://www.metamatrix.com/metamodels/Relational" modelType="VIRTUAL" ProducerName="Teiid Designer" ProducerVersion="6.1.0">
     <modelImports xmi:uuid="mmuuid:c22619c1-db7d-1105-b511-c9cb83fb3e5e" name="Accounts" modelLocation="Accounts.xmi" uuid="mmuuid:077908c0-da11-1105-b511-c9cb83fb3e5e" modelType="PHYSICAL" primaryMetamodelUri="http://www.metamatrix.com/metamodels/Relational"/>
     <modelImports xmi:uuid="mmuuid:c3d158c0-db7d-1105-b511-c9cb83fb3e5e" name="XMLSchema" modelLocation="http://www.w3.org/2001/XMLSchema" modelType="TYPE" primaryMetamodelUri="http://www.eclipse.org/xsd/2002/XSD"/>
     <modelImports xmi:uuid="mmuuid:88b29fc1-db81-1105-b511-c9cb83fb3e5e" name="MarketData" modelLocation="MarketData.xmi" uuid="mmuuid:891f1b80-da34-1105-b511-c9cb83fb3e5e" modelType="PHYSICAL" primaryMetamodelUri="http://www.metamatrix.com/metamodels/Relational"/>
@@ -12,20 +12,20 @@
     </diagram>
     <diagram xmi:uuid="mmuuid:cbfb4d40-db7c-1105-b511-c9cb83fb3e5e" type="transformationDiagramType" target="mmuuid/9b93ab00-db79-1105-b511-c9cb83fb3e5e">
       <diagramEntity xmi:uuid="mmuuid:ccef7140-db7c-1105-b511-c9cb83fb3e5e" modelObject="mmuuid/9b93ab00-db79-1105-b511-c9cb83fb3e5e" xPosition="30" yPosition="50"/>
-      <diagramEntity xmi:uuid="mmuuid:ccfeb380-db7c-1105-b511-c9cb83fb3e5e" name="T" modelObject="mmuuid/fa592480-db79-1105-b511-c9cb83fb3e5e" xPosition="252" yPosition="50"/>
-      <diagramEntity xmi:uuid="mmuuid:c900dc80-db7d-1105-b511-c9cb83fb3e5e" xPosition="302" yPosition="50">
+      <diagramEntity xmi:uuid="mmuuid:ccfeb380-db7c-1105-b511-c9cb83fb3e5e" name="T" modelObject="mmuuid/fa592480-db79-1105-b511-c9cb83fb3e5e" xPosition="276" yPosition="50"/>
+      <diagramEntity xmi:uuid="mmuuid:c900dc80-db7d-1105-b511-c9cb83fb3e5e" xPosition="326" yPosition="50">
         <modelObject href="Accounts.xmi#mmuuid/08c8ba40-da11-1105-b511-c9cb83fb3e5e"/>
       </diagramEntity>
-      <diagramEntity xmi:uuid="mmuuid:55e8a380-db7e-1105-b511-c9cb83fb3e5e" xPosition="518" yPosition="50">
+      <diagramEntity xmi:uuid="mmuuid:55e8a380-db7e-1105-b511-c9cb83fb3e5e" xPosition="561" yPosition="50">
         <modelObject href="Accounts.xmi#mmuuid/0cf4d7c0-da11-1105-b511-c9cb83fb3e5e"/>
       </diagramEntity>
-      <diagramEntity xmi:uuid="mmuuid:f8271000-db7e-1105-b511-c9cb83fb3e5e" xPosition="734" yPosition="50">
+      <diagramEntity xmi:uuid="mmuuid:f8271000-db7e-1105-b511-c9cb83fb3e5e" xPosition="794" yPosition="50">
         <modelObject href="Accounts.xmi#mmuuid/0e078040-da11-1105-b511-c9cb83fb3e5e"/>
       </diagramEntity>
-      <diagramEntity xmi:uuid="mmuuid:fdc1e340-db7f-1105-b511-c9cb83fb3e5e" xPosition="967" yPosition="50">
+      <diagramEntity xmi:uuid="mmuuid:fdc1e340-db7f-1105-b511-c9cb83fb3e5e" xPosition="1053" yPosition="50">
         <modelObject href="Accounts.xmi#mmuuid/104b55c0-da11-1105-b511-c9cb83fb3e5e"/>
       </diagramEntity>
-      <diagramEntity xmi:uuid="mmuuid:8e993e80-db81-1105-b511-c9cb83fb3e5e" xPosition="1199" yPosition="50">
+      <diagramEntity xmi:uuid="mmuuid:8e993e80-db81-1105-b511-c9cb83fb3e5e" xPosition="1309" yPosition="50">
         <modelObject href="MarketData.xmi#mmuuid/c9bda180-da38-1105-b511-c9cb83fb3e5e"/>
       </diagramEntity>
     </diagram>
@@ -46,8 +46,8 @@
   <mmcore:AnnotationContainer xmi:uuid="mmuuid:d0d04840-daa8-1105-b511-c9cb83fb3e5e"/>
   <transformation:TransformationContainer xmi:uuid="mmuuid:d0df8a80-daa8-1105-b511-c9cb83fb3e5e">
     <transformationMappings xsi:type="transformation:SqlTransformationMappingRoot" xmi:uuid="mmuuid:fa592480-db79-1105-b511-c9cb83fb3e5e" outputs="mmuuid/9b93ab00-db79-1105-b511-c9cb83fb3e5e" target="mmuuid/9b93ab00-db79-1105-b511-c9cb83fb3e5e">
-      <helper xsi:type="transformation:SqlTransformation" xmi:uuid="mmuuid:fa77a900-db79-1105-b511-c9cb83fb3e5e" selectSql="SELECT mmuuid:0afd4d80-da11-1105-b511-c9cb83fb3e5e, mmuuid:0d7e2c01-da11-1105-b511-c9cb83fb3e5e, mmuuid:0d7e2c02-da11-1105-b511-c9cb83fb3e5e, mmuuid:0e90d484-da11-1105-b511-c9cb83fb3e5e, mmuuid:10a6e341-da11-1105-b511-c9cb83fb3e5e, mmuuid:10a6e342-da11-1105-b511-c9cb83fb3e5e, mmuuid:022d57c0-da90-1105-b511-c9cb83fb3e5e, (mmuuid:0e90d484-da11-1105-b511-c9cb83fb3e5e * mmuuid:022d57c0-da90-1105-b511-c9cb83fb3e5e) AS CURRENT_VALUE FROM mmuuid:08c8ba40-da11-1105-b511-c9cb83fb3e5e, mmuuid:0cf4d7c0-da11-1105-b511-c9cb83fb3e5e, mmuuid:0e078040-da11-1105-b511-c9cb83fb3e5e, mmuuid:104b55c0-da11-1105-b511-c9cb83fb3e5e, mmuuid:c9bda180-da38-1105-b511-c9cb83fb3e5e WHERE (mmuuid:0b2b1440-da11-1105-b511-c9cb83fb3e5e = mmuuid:0d7e2c00-da11-1105-b511-c9cb83fb3e5e) AND (mmuuid:0afd4d80-da11-1105-b511-c9cb83fb3e5e = mmuuid:0e90d481-da11-1105-b511-c9cb83fb3e5e) AND (mmuui!
 d:0e90d482-da11-1105-b511-c9cb83fb3e5e = mmuuid:10a6e340-da11-1105-b511-c9cb83fb3e5e) AND (mmuuid:10a6e341-da11-1105-b511-c9cb83fb3e5e = mmuuid:fa987b80-da89-1105-b511-c9cb83fb3e5e)">
-        <nested xsi:type="transformation:SqlTransformation" xmi:uuid="mmuuid:fa77a901-db79-1105-b511-c9cb83fb3e5e" selectSql="SELECT Accounts.ACCOUNT.ID, Accounts.CUSTOMER.FIRSTNAME, Accounts.CUSTOMER.LASTNAME, Accounts.HOLDINGS.SHARES_COUNT, Accounts.PRODUCT.SYMBOL, Accounts.PRODUCT.COMPANY_NAME, MarketData.Price.PRICE, (Accounts.HOLDINGS.SHARES_COUNT * MarketData.Price.PRICE) AS CURRENT_VALUE FROM Accounts.ACCOUNT, Accounts.CUSTOMER, Accounts.HOLDINGS, Accounts.PRODUCT, MarketData.Price WHERE (Accounts.ACCOUNT.SSN = Accounts.CUSTOMER.SSN) AND (Accounts.ACCOUNT.ID = Accounts.HOLDINGS.ACCOUNT_ID) AND (Accounts.HOLDINGS.PRODUCT_ID = Accounts.PRODUCT.ID) AND (Accounts.PRODUCT.SYMBOL = MarketData.Price.SYMBOL)"/>
+      <helper xsi:type="transformation:SqlTransformation" xmi:uuid="mmuuid:fa77a900-db79-1105-b511-c9cb83fb3e5e" selectSql="SELECT mmuuid:0afd4d80-da11-1105-b511-c9cb83fb3e5e AS ID, mmuuid:0d7e2c01-da11-1105-b511-c9cb83fb3e5e, mmuuid:0d7e2c02-da11-1105-b511-c9cb83fb3e5e, mmuuid:0e90d484-da11-1105-b511-c9cb83fb3e5e, mmuuid:10a6e341-da11-1105-b511-c9cb83fb3e5e, mmuuid:10a6e342-da11-1105-b511-c9cb83fb3e5e, mmuuid:022d57c0-da90-1105-b511-c9cb83fb3e5e, (mmuuid:0e90d484-da11-1105-b511-c9cb83fb3e5e * mmuuid:022d57c0-da90-1105-b511-c9cb83fb3e5e) AS CURRENT_VALUE FROM mmuuid:08c8ba40-da11-1105-b511-c9cb83fb3e5e, mmuuid:0cf4d7c0-da11-1105-b511-c9cb83fb3e5e, mmuuid:0e078040-da11-1105-b511-c9cb83fb3e5e, mmuuid:104b55c0-da11-1105-b511-c9cb83fb3e5e, mmuuid:c9bda180-da38-1105-b511-c9cb83fb3e5e WHERE (mmuuid:0b2b1440-da11-1105-b511-c9cb83fb3e5e = mmuuid:0d7e2c00-da11-1105-b511-c9cb83fb3e5e) AND (mmuuid:0afd4d80-da11-1105-b511-c9cb83fb3e5e = mmuuid:0e90d481-da11-1105-b511-c9cb83fb3e5e) AND !
 (mmuuid:0e90d482-da11-1105-b511-c9cb83fb3e5e = mmuuid:10a6e340-da11-1105-b511-c9cb83fb3e5e) AND (mmuuid:10a6e341-da11-1105-b511-c9cb83fb3e5e = mmuuid:fa987b80-da89-1105-b511-c9cb83fb3e5e)">
+        <nested xsi:type="transformation:SqlTransformation" xmi:uuid="mmuuid:fa77a901-db79-1105-b511-c9cb83fb3e5e" selectSql="SELECT Accounts.ACCOUNT.ACCOUNT_ID AS ID, Accounts.CUSTOMER.FIRSTNAME, Accounts.CUSTOMER.LASTNAME, Accounts.HOLDINGS.SHARES_COUNT, Accounts.PRODUCT.SYMBOL, Accounts.PRODUCT.COMPANY_NAME, MarketData.Price.PRICE, (Accounts.HOLDINGS.SHARES_COUNT * MarketData.Price.PRICE) AS CURRENT_VALUE FROM Accounts.ACCOUNT, Accounts.CUSTOMER, Accounts.HOLDINGS, Accounts.PRODUCT, MarketData.Price WHERE (Accounts.ACCOUNT.SSN = Accounts.CUSTOMER.SSN) AND (Accounts.ACCOUNT.ACCOUNT_ID = Accounts.HOLDINGS.ACCOUNT_ID) AND (Accounts.HOLDINGS.PRODUCT_ID = Accounts.PRODUCT.ID) AND (Accounts.PRODUCT.SYMBOL = MarketData.Price.SYMBOL)"/>
         <aliases xmi:uuid="mmuuid:c22619c0-db7d-1105-b511-c9cb83fb3e5e" alias="ACCOUNT">
           <aliasedObject href="Accounts.xmi#mmuuid/08c8ba40-da11-1105-b511-c9cb83fb3e5e"/>
         </aliases>
@@ -115,7 +115,7 @@
     </transformationMappings>
   </transformation:TransformationContainer>
   <relational:BaseTable xmi:uuid="mmuuid:9b93ab00-db79-1105-b511-c9cb83fb3e5e" name="CustomerAccount" supportsUpdate="false">
-    <columns xmi:uuid="mmuuid:c3b2d440-db7d-1105-b511-c9cb83fb3e5e" name="ID" fixedLength="true" precision="10" caseSensitive="false" searchability="ALL_EXCEPT_LIKE">
+    <columns xmi:uuid="mmuuid:c3b2d440-db7d-1105-b511-c9cb83fb3e5e" name="ID" fixedLength="true" precision="10" caseSensitive="false" searchability="ALL_EXCEPT_LIKE" uniqueKeys="mmuuid/e433a0e2-2ac2-41e5-b53d-47a231754236">
       <type href="http://www.w3.org/2001/XMLSchema#int"/>
     </columns>
     <columns xmi:uuid="mmuuid:4f1d2300-db7e-1105-b511-c9cb83fb3e5e" name="FIRSTNAME" length="64">
@@ -139,6 +139,7 @@
     <columns xmi:uuid="mmuuid:16d3fbc0-dbd0-1105-b511-c9cb83fb3e5e" name="CURRENT_VALUE">
       <type href="http://www.w3.org/2001/XMLSchema#double"/>
     </columns>
+    <primaryKey xmi:uuid="mmuuid:e433a0e2-2ac2-41e5-b53d-47a231754236" name="CUSTOMERACCOUNT_PK" columns="mmuuid/c3b2d440-db7d-1105-b511-c9cb83fb3e5e"/>
   </relational:BaseTable>
   <relational:Procedure xmi:uuid="mmuuid:36ab0d84-ddbf-1105-b511-c9cb83fb3e5e" name="buyStock" updateCount="ZERO">
     <parameters xmi:uuid="mmuuid:3ee64340-ddc2-1105-b511-c9cb83fb3e5e" name="accountID">

Modified: trunk/build/kit-embedded/examples/portfolio/PortfolioModel/Accounts.xmi
===================================================================
--- trunk/build/kit-embedded/examples/portfolio/PortfolioModel/Accounts.xmi	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/build/kit-embedded/examples/portfolio/PortfolioModel/Accounts.xmi	2009-06-01 20:13:51 UTC (rev 1016)
@@ -1,14 +1,14 @@
 <?xml version="1.0" encoding="ASCII"?>
 <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:diagram="http://www.metamatrix.com/metamodels/Diagram" xmlns:jdbc="http://www.metamatrix.com/metamodels/JDBC" xmlns:mmcore="http://www.metamatrix.com/metamodels/Core" xmlns:relational="http://www.metamatrix.com/metamodels/Relational">
-  <mmcore:ModelAnnotation xmi:uuid="mmuuid:077908c0-da11-1105-b511-c9cb83fb3e5e" primaryMetamodelUri="http://www.metamatrix.com/metamodels/Relational" modelType="PHYSICAL" ProducerName="MetaMatrix" ProducerVersion="5.5">
-    <modelImports xmi:uuid="mmuuid:1bcc4800-da11-1105-b511-c9cb83fb3e5e" name="XMLSchema" modelLocation="http://www.w3.org/2001/XMLSchema" modelType="TYPE" primaryMetamodelUri="http://www.eclipse.org/xsd/2002/XSD"/>
-    <modelImports xmi:uuid="mmuuid:1bfa0ec0-da11-1105-b511-c9cb83fb3e5e" name="SimpleDatatypes-instance" modelLocation="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance" modelType="TYPE" primaryMetamodelUri="http://www.eclipse.org/xsd/2002/XSD"/>
+  <mmcore:ModelAnnotation xmi:uuid="mmuuid:077908c0-da11-1105-b511-c9cb83fb3e5e" primaryMetamodelUri="http://www.metamatrix.com/metamodels/Relational" modelType="PHYSICAL" ProducerName="Teiid Designer" ProducerVersion="6.1.0">
+    <modelImports xmi:uuid="mmuuid:a11d5b47-bc0b-4dc7-ac95-322a2cade68e" name="SimpleDatatypes-instance" modelLocation="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance" modelType="TYPE" primaryMetamodelUri="http://www.eclipse.org/xsd/2002/XSD"/>
+    <modelImports xmi:uuid="mmuuid:5b401a8b-76e1-4ace-a885-80465d678056" name="XMLSchema" modelLocation="http://www.w3.org/2001/XMLSchema" modelType="TYPE" primaryMetamodelUri="http://www.eclipse.org/xsd/2002/XSD"/>
   </mmcore:ModelAnnotation>
   <relational:BaseTable xmi:uuid="mmuuid:08c8ba40-da11-1105-b511-c9cb83fb3e5e" name="ACCOUNT" nameInSource="&quot;ACCOUNT&quot;">
-    <columns xmi:uuid="mmuuid:0afd4d80-da11-1105-b511-c9cb83fb3e5e" name="ID" nameInSource="&quot;ACCOUNT_ID&quot;" nativeType="INTEGER" fixedLength="true" precision="10" caseSensitive="false" searchability="ALL_EXCEPT_LIKE">
+    <columns xmi:uuid="mmuuid:0afd4d80-da11-1105-b511-c9cb83fb3e5e" name="ACCOUNT_ID" nameInSource="&quot;ACCOUNT_ID&quot;" nativeType="INTEGER" fixedLength="true" precision="10" nullable="NO_NULLS" caseSensitive="false" searchability="ALL_EXCEPT_LIKE" uniqueKeys="mmuuid/4b6488b5-f375-4a2d-a27b-359757046afa" indexes="mmuuid/91ad43c4-2b5b-4833-a165-2e597500fa1f">
       <type href="http://www.w3.org/2001/XMLSchema#int"/>
     </columns>
-    <columns xmi:uuid="mmuuid:0b2b1440-da11-1105-b511-c9cb83fb3e5e" name="SSN" nameInSource="&quot;SSN&quot;" nativeType="CHAR" length="10" fixedLength="true">
+    <columns xmi:uuid="mmuuid:0b2b1440-da11-1105-b511-c9cb83fb3e5e" name="SSN" nameInSource="&quot;SSN&quot;" nativeType="CHAR" length="10" fixedLength="true" indexes="mmuuid/716988d5-867c-4bcf-b11a-30acc6d09764" foreignKeys="mmuuid/4d9b9899-f484-42d9-938e-35a1a83bae1d">
       <type href="http://www.w3.org/2001/XMLSchema#string"/>
     </columns>
     <columns xmi:uuid="mmuuid:0b2b1441-da11-1105-b511-c9cb83fb3e5e" name="STATUS" nameInSource="&quot;STATUS&quot;" nativeType="CHAR" length="10" fixedLength="true">
@@ -23,9 +23,11 @@
     <columns xmi:uuid="mmuuid:0b2b1444-da11-1105-b511-c9cb83fb3e5e" name="DATECLOSED" nameInSource="&quot;DATECLOSED&quot;" nativeType="TIMESTAMP" fixedLength="true" precision="26" scale="6" caseSensitive="false" searchability="ALL_EXCEPT_LIKE">
       <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#timestamp"/>
     </columns>
+    <foreignKeys xmi:uuid="mmuuid:4d9b9899-f484-42d9-938e-35a1a83bae1d" name="CUSTOMER_FK" nameInSource="&quot;CUSTOMER_FK&quot;" foreignKeyMultiplicity="UNSPECIFIED" primaryKeyMultiplicity="UNSPECIFIED" columns="mmuuid/0b2b1440-da11-1105-b511-c9cb83fb3e5e" uniqueKey="mmuuid/a58b3060-586b-490b-8197-6dbd064afb43"/>
+    <primaryKey xmi:uuid="mmuuid:4b6488b5-f375-4a2d-a27b-359757046afa" name="ACCOUNT_PK" nameInSource="&quot;ACCOUNT_PK&quot;" columns="mmuuid/0afd4d80-da11-1105-b511-c9cb83fb3e5e" foreignKeys="mmuuid/322606e6-1297-4a49-a6cc-ff9d5807690a"/>
   </relational:BaseTable>
   <relational:BaseTable xmi:uuid="mmuuid:0cf4d7c0-da11-1105-b511-c9cb83fb3e5e" name="CUSTOMER" nameInSource="&quot;CUSTOMER&quot;">
-    <columns xmi:uuid="mmuuid:0d7e2c00-da11-1105-b511-c9cb83fb3e5e" name="SSN" nameInSource="&quot;SSN&quot;" nativeType="CHAR" length="10" fixedLength="true">
+    <columns xmi:uuid="mmuuid:0d7e2c00-da11-1105-b511-c9cb83fb3e5e" name="SSN" nameInSource="&quot;SSN&quot;" nativeType="CHAR" length="10" fixedLength="true" nullable="NO_NULLS" uniqueKeys="mmuuid/a58b3060-586b-490b-8197-6dbd064afb43" indexes="mmuuid/24cf356c-76b0-4da4-9ca7-4664b20c9ef8">
       <type href="http://www.w3.org/2001/XMLSchema#string"/>
     </columns>
     <columns xmi:uuid="mmuuid:0d7e2c01-da11-1105-b511-c9cb83fb3e5e" name="FIRSTNAME" nameInSource="&quot;FIRSTNAME&quot;" nativeType="VARCHAR" length="64">
@@ -52,15 +54,16 @@
     <columns xmi:uuid="mmuuid:0d7e2c08-da11-1105-b511-c9cb83fb3e5e" name="PHONE" nameInSource="&quot;PHONE&quot;" nativeType="VARCHAR" length="15">
       <type href="http://www.w3.org/2001/XMLSchema#string"/>
     </columns>
+    <primaryKey xmi:uuid="mmuuid:a58b3060-586b-490b-8197-6dbd064afb43" name="CUSTOMER_PK" nameInSource="&quot;CUSTOMER_PK&quot;" columns="mmuuid/0d7e2c00-da11-1105-b511-c9cb83fb3e5e" foreignKeys="mmuuid/4d9b9899-f484-42d9-938e-35a1a83bae1d"/>
   </relational:BaseTable>
   <relational:BaseTable xmi:uuid="mmuuid:0e078040-da11-1105-b511-c9cb83fb3e5e" name="HOLDINGS" nameInSource="&quot;HOLDINGS&quot;">
-    <columns xmi:uuid="mmuuid:0e90d480-da11-1105-b511-c9cb83fb3e5e" name="TRANSACTION_ID" nameInSource="&quot;TRANSACTION_ID&quot;" nativeType="INTEGER" fixedLength="true" precision="10" nullable="NO_NULLS" defaultValue="AUTOINCREMENT: start 2000 increment 1" caseSensitive="false" searchability="ALL_EXCEPT_LIKE">
+    <columns xmi:uuid="mmuuid:0e90d480-da11-1105-b511-c9cb83fb3e5e" name="TRANSACTION_ID" nameInSource="&quot;TRANSACTION_ID&quot;" nativeType="INTEGER" fixedLength="true" precision="10" nullable="NO_NULLS" defaultValue="AUTOINCREMENT: start 2000 increment 1" caseSensitive="false" searchability="ALL_EXCEPT_LIKE" uniqueKeys="mmuuid/35680eaa-99d0-41dd-9737-bb8b5276f274" indexes="mmuuid/6178e998-0494-4fa7-8988-8987917480d1">
       <type href="http://www.w3.org/2001/XMLSchema#int"/>
     </columns>
-    <columns xmi:uuid="mmuuid:0e90d481-da11-1105-b511-c9cb83fb3e5e" name="ACCOUNT_ID" nameInSource="&quot;ACCOUNT_ID&quot;" nativeType="INTEGER" fixedLength="true" precision="10" caseSensitive="false" searchability="ALL_EXCEPT_LIKE">
+    <columns xmi:uuid="mmuuid:0e90d481-da11-1105-b511-c9cb83fb3e5e" name="ACCOUNT_ID" nameInSource="&quot;ACCOUNT_ID&quot;" nativeType="INTEGER" fixedLength="true" precision="10" caseSensitive="false" searchability="ALL_EXCEPT_LIKE" indexes="mmuuid/af8532e8-41ae-4d57-a6f3-7a9a7eab67bc" foreignKeys="mmuuid/322606e6-1297-4a49-a6cc-ff9d5807690a">
       <type href="http://www.w3.org/2001/XMLSchema#int"/>
     </columns>
-    <columns xmi:uuid="mmuuid:0e90d482-da11-1105-b511-c9cb83fb3e5e" name="PRODUCT_ID" nameInSource="&quot;PRODUCT_ID&quot;" nativeType="INTEGER" fixedLength="true" precision="10" caseSensitive="false" searchability="ALL_EXCEPT_LIKE">
+    <columns xmi:uuid="mmuuid:0e90d482-da11-1105-b511-c9cb83fb3e5e" name="PRODUCT_ID" nameInSource="&quot;PRODUCT_ID&quot;" nativeType="INTEGER" fixedLength="true" precision="10" caseSensitive="false" searchability="ALL_EXCEPT_LIKE" indexes="mmuuid/cae2ef07-ad18-4231-88bb-e91305822e3f" foreignKeys="mmuuid/3aba1558-eb1b-4cff-ba70-a61df99d7b44">
       <type href="http://www.w3.org/2001/XMLSchema#int"/>
     </columns>
     <columns xmi:uuid="mmuuid:0e90d483-da11-1105-b511-c9cb83fb3e5e" name="PURCHASE_DATE" nameInSource="&quot;PURCHASE_DATE&quot;" nativeType="TIMESTAMP" fixedLength="true" precision="26" scale="6" caseSensitive="false" searchability="ALL_EXCEPT_LIKE">
@@ -69,9 +72,12 @@
     <columns xmi:uuid="mmuuid:0e90d484-da11-1105-b511-c9cb83fb3e5e" name="SHARES_COUNT" nameInSource="&quot;SHARES_COUNT&quot;" nativeType="INTEGER" fixedLength="true" precision="10" caseSensitive="false" searchability="ALL_EXCEPT_LIKE">
       <type href="http://www.w3.org/2001/XMLSchema#int"/>
     </columns>
+    <foreignKeys xmi:uuid="mmuuid:3aba1558-eb1b-4cff-ba70-a61df99d7b44" name="PRODUCT_FK" nameInSource="&quot;PRODUCT_FK&quot;" foreignKeyMultiplicity="UNSPECIFIED" primaryKeyMultiplicity="UNSPECIFIED" columns="mmuuid/0e90d482-da11-1105-b511-c9cb83fb3e5e" uniqueKey="mmuuid/ac6c8a1a-939d-408d-b836-e253cc047fb3"/>
+    <foreignKeys xmi:uuid="mmuuid:322606e6-1297-4a49-a6cc-ff9d5807690a" name="ACCOUNT_FK" nameInSource="&quot;ACCOUNT_FK&quot;" foreignKeyMultiplicity="UNSPECIFIED" primaryKeyMultiplicity="UNSPECIFIED" columns="mmuuid/0e90d481-da11-1105-b511-c9cb83fb3e5e" uniqueKey="mmuuid/4b6488b5-f375-4a2d-a27b-359757046afa"/>
+    <primaryKey xmi:uuid="mmuuid:35680eaa-99d0-41dd-9737-bb8b5276f274" name="HOLDINGS_PK" nameInSource="&quot;HOLDINGS_PK&quot;" columns="mmuuid/0e90d480-da11-1105-b511-c9cb83fb3e5e"/>
   </relational:BaseTable>
   <relational:BaseTable xmi:uuid="mmuuid:104b55c0-da11-1105-b511-c9cb83fb3e5e" name="PRODUCT" nameInSource="&quot;PRODUCT&quot;">
-    <columns xmi:uuid="mmuuid:10a6e340-da11-1105-b511-c9cb83fb3e5e" name="ID" nameInSource="&quot;ID&quot;" nativeType="INTEGER" fixedLength="true" precision="10" caseSensitive="false" searchability="ALL_EXCEPT_LIKE">
+    <columns xmi:uuid="mmuuid:10a6e340-da11-1105-b511-c9cb83fb3e5e" name="ID" nameInSource="&quot;ID&quot;" nativeType="INTEGER" fixedLength="true" precision="10" nullable="NO_NULLS" caseSensitive="false" searchability="ALL_EXCEPT_LIKE" uniqueKeys="mmuuid/ac6c8a1a-939d-408d-b836-e253cc047fb3" indexes="mmuuid/5542d838-24f8-4202-8abe-ad8e43c6e066">
       <type href="http://www.w3.org/2001/XMLSchema#int"/>
     </columns>
     <columns xmi:uuid="mmuuid:10a6e341-da11-1105-b511-c9cb83fb3e5e" name="SYMBOL" nameInSource="&quot;SYMBOL&quot;" nativeType="VARCHAR" length="16">
@@ -80,18 +86,33 @@
     <columns xmi:uuid="mmuuid:10a6e342-da11-1105-b511-c9cb83fb3e5e" name="COMPANY_NAME" nameInSource="&quot;COMPANY_NAME&quot;" nativeType="VARCHAR" length="256">
       <type href="http://www.w3.org/2001/XMLSchema#string"/>
     </columns>
+    <primaryKey xmi:uuid="mmuuid:ac6c8a1a-939d-408d-b836-e253cc047fb3" name="PRODUCT_PK" nameInSource="&quot;PRODUCT_PK&quot;" columns="mmuuid/10a6e340-da11-1105-b511-c9cb83fb3e5e" foreignKeys="mmuuid/3aba1558-eb1b-4cff-ba70-a61df99d7b44"/>
   </relational:BaseTable>
+  <relational:Index xmi:uuid="mmuuid:91ad43c4-2b5b-4833-a165-2e597500fa1f" name="SQL090601093247180" nameInSource="&quot;ACCOUNT&quot;" unique="true" columns="mmuuid/0afd4d80-da11-1105-b511-c9cb83fb3e5e"/>
+  <relational:Index xmi:uuid="mmuuid:716988d5-867c-4bcf-b11a-30acc6d09764" name="SQL090601093247181" nameInSource="&quot;ACCOUNT&quot;" unique="true" columns="mmuuid/0b2b1440-da11-1105-b511-c9cb83fb3e5e"/>
+  <relational:Index xmi:uuid="mmuuid:24cf356c-76b0-4da4-9ca7-4664b20c9ef8" name="SQL090601093247030" nameInSource="&quot;CUSTOMER&quot;" unique="true" columns="mmuuid/0d7e2c00-da11-1105-b511-c9cb83fb3e5e"/>
+  <relational:Index xmi:uuid="mmuuid:6178e998-0494-4fa7-8988-8987917480d1" name="SQL090601093247350" nameInSource="&quot;HOLDINGS&quot;" unique="true" columns="mmuuid/0e90d480-da11-1105-b511-c9cb83fb3e5e"/>
+  <relational:Index xmi:uuid="mmuuid:af8532e8-41ae-4d57-a6f3-7a9a7eab67bc" name="SQL090601093247351" nameInSource="&quot;HOLDINGS&quot;" unique="true" columns="mmuuid/0e90d481-da11-1105-b511-c9cb83fb3e5e"/>
+  <relational:Index xmi:uuid="mmuuid:cae2ef07-ad18-4231-88bb-e91305822e3f" name="SQL090601093247352" nameInSource="&quot;HOLDINGS&quot;" unique="true" columns="mmuuid/0e90d482-da11-1105-b511-c9cb83fb3e5e"/>
+  <relational:Index xmi:uuid="mmuuid:5542d838-24f8-4202-8abe-ad8e43c6e066" name="SQL090601093247280" nameInSource="&quot;PRODUCT&quot;" unique="true" columns="mmuuid/10a6e340-da11-1105-b511-c9cb83fb3e5e"/>
   <mmcore:AnnotationContainer xmi:uuid="mmuuid:07d49640-da11-1105-b511-c9cb83fb3e5e"/>
   <diagram:DiagramContainer xmi:uuid="mmuuid:07f31ac0-da11-1105-b511-c9cb83fb3e5e">
     <diagram xmi:uuid="mmuuid:67acb840-da11-1105-b511-c9cb83fb3e5e" type="packageDiagramType" target="mmuuid/077908c0-da11-1105-b511-c9cb83fb3e5e">
-      <diagramEntity xmi:uuid="mmuuid:6fa965c0-da11-1105-b511-c9cb83fb3e5e" modelObject="mmuuid/08c8ba40-da11-1105-b511-c9cb83fb3e5e" xPosition="476" yPosition="10"/>
-      <diagramEntity xmi:uuid="mmuuid:71ddf900-da11-1105-b511-c9cb83fb3e5e" modelObject="mmuuid/0cf4d7c0-da11-1105-b511-c9cb83fb3e5e" xPosition="243" yPosition="146"/>
-      <diagramEntity xmi:uuid="mmuuid:71ed3b40-da11-1105-b511-c9cb83fb3e5e" modelObject="mmuuid/0e078040-da11-1105-b511-c9cb83fb3e5e" xPosition="10" yPosition="10"/>
-      <diagramEntity xmi:uuid="mmuuid:71ed3b41-da11-1105-b511-c9cb83fb3e5e" modelObject="mmuuid/104b55c0-da11-1105-b511-c9cb83fb3e5e" xPosition="243" yPosition="10"/>
+      <diagramEntity xmi:uuid="mmuuid:6fa965c0-da11-1105-b511-c9cb83fb3e5e" modelObject="mmuuid/08c8ba40-da11-1105-b511-c9cb83fb3e5e" xPosition="30" yPosition="200"/>
+      <diagramEntity xmi:uuid="mmuuid:71ddf900-da11-1105-b511-c9cb83fb3e5e" modelObject="mmuuid/0cf4d7c0-da11-1105-b511-c9cb83fb3e5e" xPosition="358" yPosition="352"/>
+      <diagramEntity xmi:uuid="mmuuid:71ed3b40-da11-1105-b511-c9cb83fb3e5e" modelObject="mmuuid/0e078040-da11-1105-b511-c9cb83fb3e5e" xPosition="345" yPosition="30"/>
+      <diagramEntity xmi:uuid="mmuuid:71ed3b41-da11-1105-b511-c9cb83fb3e5e" modelObject="mmuuid/104b55c0-da11-1105-b511-c9cb83fb3e5e" xPosition="690" yPosition="198"/>
+      <diagramEntity xmi:uuid="mmuuid:30265a0f-b257-488d-9907-4a376c95aafa" modelObject="mmuuid/91ad43c4-2b5b-4833-a165-2e597500fa1f" xPosition="30" yPosition="740"/>
+      <diagramEntity xmi:uuid="mmuuid:356735fa-b594-490d-a4b3-d495d4fa2258" modelObject="mmuuid/716988d5-867c-4bcf-b11a-30acc6d09764" xPosition="30" yPosition="888"/>
+      <diagramEntity xmi:uuid="mmuuid:6368d133-4077-44b5-8418-130988467078" modelObject="mmuuid/24cf356c-76b0-4da4-9ca7-4664b20c9ef8" xPosition="290" yPosition="814"/>
+      <diagramEntity xmi:uuid="mmuuid:0c3b6ea1-ecd5-49e3-b57e-f25ab56ac35d" modelObject="mmuuid/6178e998-0494-4fa7-8988-8987917480d1" xPosition="550" yPosition="740"/>
+      <diagramEntity xmi:uuid="mmuuid:72802e91-f27c-4f65-bbaf-82b7a67fdd1b" modelObject="mmuuid/af8532e8-41ae-4d57-a6f3-7a9a7eab67bc" xPosition="290" yPosition="740"/>
+      <diagramEntity xmi:uuid="mmuuid:489f5aa2-e209-49cb-864e-d18562bda587" modelObject="mmuuid/cae2ef07-ad18-4231-88bb-e91305822e3f" xPosition="550" yPosition="814"/>
+      <diagramEntity xmi:uuid="mmuuid:d0c9e683-7e6e-4356-8da1-93cdbbf102b4" modelObject="mmuuid/5542d838-24f8-4202-8abe-ad8e43c6e066" xPosition="30" yPosition="814"/>
     </diagram>
   </diagram:DiagramContainer>
-  <jdbc:JdbcSource xmi:uuid="mmuuid:68330e00-da0b-1105-b511-c9cb83fb3e5e" name="Accounts" driverName="Apache Derby Network" driverClass="org.apache.derby.jdbc.ClientDriver" url="jdbc:derby://localhost:1527/teiid/accounts">
-    <importSettings xmi:uuid="mmuuid:6c8cf240-da0b-1105-b511-c9cb83fb3e5e" createSchemasInModel="false">
+  <jdbc:JdbcSource xmi:uuid="mmuuid:192a4adc-4b14-4816-b74e-a9ed990adfbb" name="Accounts" driverName="Apache Derby Network" driverClass="org.apache.derby.jdbc.ClientDriver" url="jdbc:derby://localhost:1527/teiid/accounts">
+    <importSettings xmi:uuid="mmuuid:3345b6d3-7ab1-4adb-875f-1ff39724bf06" createSchemasInModel="false">
       <includedSchemaPaths>/APP</includedSchemaPaths>
       <includedTableTypes>SYNONYM</includedTableTypes>
       <includedTableTypes>SYSTEM TABLE</includedTableTypes>

Modified: trunk/build/kit-embedded/examples/portfolio/PortfolioModel/MarketData.xmi
===================================================================
--- trunk/build/kit-embedded/examples/portfolio/PortfolioModel/MarketData.xmi	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/build/kit-embedded/examples/portfolio/PortfolioModel/MarketData.xmi	2009-06-01 20:13:51 UTC (rev 1016)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="ASCII"?>
 <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:diagram="http://www.metamatrix.com/metamodels/Diagram" xmlns:mmcore="http://www.metamatrix.com/metamodels/Core" xmlns:relational="http://www.metamatrix.com/metamodels/Relational">
-  <mmcore:ModelAnnotation xmi:uuid="mmuuid:891f1b80-da34-1105-b511-c9cb83fb3e5e" primaryMetamodelUri="http://www.metamatrix.com/metamodels/Relational" modelType="PHYSICAL" ProducerName="MetaMatrix" ProducerVersion="5.5">
+  <mmcore:ModelAnnotation xmi:uuid="mmuuid:891f1b80-da34-1105-b511-c9cb83fb3e5e" primaryMetamodelUri="http://www.metamatrix.com/metamodels/Relational" modelType="PHYSICAL" ProducerName="Teiid Designer" ProducerVersion="6.1.0">
     <modelImports xmi:uuid="mmuuid:4a2cf640-da8e-1105-b511-c9cb83fb3e5e" name="XMLSchema" modelLocation="http://www.w3.org/2001/XMLSchema" modelType="TYPE" primaryMetamodelUri="http://www.eclipse.org/xsd/2002/XSD"/>
   </mmcore:ModelAnnotation>
   <diagram:DiagramContainer xmi:uuid="mmuuid:b50cd5c0-da34-1105-b511-c9cb83fb3e5e">
@@ -10,11 +10,12 @@
   </diagram:DiagramContainer>
   <mmcore:AnnotationContainer xmi:uuid="mmuuid:a1b03940-da39-1105-b511-c9cb83fb3e5e"/>
   <relational:BaseTable xmi:uuid="mmuuid:c9bda180-da38-1105-b511-c9cb83fb3e5e" name="Price">
-    <columns xmi:uuid="mmuuid:fa987b80-da89-1105-b511-c9cb83fb3e5e" name="SYMBOL">
+    <columns xmi:uuid="mmuuid:fa987b80-da89-1105-b511-c9cb83fb3e5e" name="SYMBOL" uniqueKeys="mmuuid/3ee00405-9eca-4913-9897-f03c77291926">
       <type href="http://www.w3.org/2001/XMLSchema#string"/>
     </columns>
     <columns xmi:uuid="mmuuid:022d57c0-da90-1105-b511-c9cb83fb3e5e" name="PRICE">
       <type href="http://www.w3.org/2001/XMLSchema#double"/>
     </columns>
+    <primaryKey xmi:uuid="mmuuid:3ee00405-9eca-4913-9897-f03c77291926" name="PRICE_PK" nameInSource="" columns="mmuuid/fa987b80-da89-1105-b511-c9cb83fb3e5e"/>
   </relational:BaseTable>
 </xmi:XMI>

Modified: trunk/build/kit-embedded/examples/portfolio/PortfolioModel/Portfolio.vdb
===================================================================
(Binary files differ)

Modified: trunk/build/kit-embedded/examples/portfolio/customer-schema.sql
===================================================================
--- trunk/build/kit-embedded/examples/portfolio/customer-schema.sql	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/build/kit-embedded/examples/portfolio/customer-schema.sql	2009-06-01 20:13:51 UTC (rev 1016)
@@ -11,7 +11,8 @@
    CITY varchar(64),
    STATE varchar(32),
    ZIPCODE varchar(10),
-   PHONE varchar(15)
+   PHONE varchar(15),
+   CONSTRAINT CUSTOMER_PK PRIMARY KEY(SSN)
 );
 
 DROP TABLE ACCOUNT;
@@ -22,14 +23,17 @@
    STATUS char(10),
    TYPE char(10),
    DATEOPENED timestamp,
-   DATECLOSED timestamp
+   DATECLOSED timestamp,
+   CONSTRAINT ACCOUNT_PK PRIMARY KEY(ACCOUNT_ID),
+   CONSTRAINT CUSTOMER_FK FOREIGN KEY (SSN) REFERENCES CUSTOMER (SSN)
 );
 
 DROP TABLE PRODUCT;
 CREATE TABLE PRODUCT (
    ID integer,
    SYMBOL varchar(16),
-   COMPANY_NAME varchar(256)
+   COMPANY_NAME varchar(256),
+   CONSTRAINT PRODUCT_PK PRIMARY KEY(ID)
 );
 
 DROP TABLE HOLDINGS;
@@ -39,7 +43,10 @@
    ACCOUNT_ID integer,
    PRODUCT_ID integer,
    PURCHASE_DATE timestamp,
-   SHARES_COUNT integer
+   SHARES_COUNT integer,
+   CONSTRAINT HOLDINGS_PK PRIMARY KEY (TRANSACTION_ID),
+   CONSTRAINT ACCOUNT_FK FOREIGN KEY (ACCOUNT_ID) REFERENCES ACCOUNT (ACCOUNT_ID),
+   CONSTRAINT PRODUCT_FK FOREIGN KEY (PRODUCT_ID) REFERENCES PRODUCT (ID)
 );
 
 INSERT INTO CUSTOMER (SSN,FIRSTNAME,LASTNAME,ST_ADDRESS,APT_NUMBER,CITY,STATE,ZIPCODE,PHONE) VALUES ('CST01002','Joseph','Smith','1234 Main Street','Apartment 56','New York','New York','10174','(646)555-1776');

Modified: trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCacheFactory.java
===================================================================
--- trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCacheFactory.java	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCacheFactory.java	2009-06-01 20:13:51 UTC (rev 1016)
@@ -43,6 +43,7 @@
 
 import com.google.inject.Inject;
 import com.google.inject.Singleton;
+import com.google.inject.name.Named;
 import com.metamatrix.cache.Cache;
 import com.metamatrix.cache.CacheConfiguration;
 import com.metamatrix.cache.CacheFactory;
@@ -57,11 +58,11 @@
 	private ObjectName jmxName;
 	
 	@Inject
-	public JBossCacheFactory(org.jboss.cache.Cache cacheStore) {
+	public JBossCacheFactory(org.jboss.cache.Cache cacheStore, @Named("ProcessName") String processName) {
 		try {
 			CacheJmxWrapperMBean wrapper = new CacheJmxWrapper(cacheStore);			
 			MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
-			this.jmxName = new ObjectName("Teiid:service=JBossCache,name=cache"); //$NON-NLS-1$
+			this.jmxName = new ObjectName("Teiid["+processName+"]:service=JBossCache,name=cache"); //$NON-NLS-1$ //$NON-NLS-2$
 			mbs.registerMBean(wrapper, this.jmxName);
 			wrapper.create();
 			wrapper.start();

Modified: trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java
===================================================================
--- trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java	2009-06-01 20:13:51 UTC (rev 1016)
@@ -35,8 +35,12 @@
     public static final String USER_DEFINED_FUNCTIONS = "dqp.userDefinedFunctionsFile"; //$NON-NLS-1$
     public static final String COMMON_EXTENSION_CLASPATH = "dqp.extension.CommonClasspath"; //$NON-NLS-1$
     public static final String DQP_KEYSTORE = "dqp.keystore"; //$NON-NLS-1$
+    public static final String DQP_WORKDIR = "dqp.workdir"; //$NON-NLS-1$
+    
+    //derived properties
     public static final String DQP_IDENTITY = "dqp.identity"; //$NON-NLS-1$
     public static final String DQP_TMPDIR = "mm.io.tmpdir"; //$NON-NLS-1$
+    public static final String DQP_WORKSPACE = "dqp.workspacedir"; //$NON-NLS-1$
     
     public interface BufferService {
         /**
@@ -49,15 +53,8 @@
          * or mixed memory and disk access (if true).  Default value is false.
          */
         public static final String DQP_BUFFER_USEDISK = BUFFER_PREFIX + ".usedisk"; //$NON-NLS-1$
-    
+            
         /**
-         * Determines the directory to use if buffer management is using disk.
-         * This property is not used if DQP_BUFFER_USEDISK = true.  Default value
-         * is ".".
-         */
-        public static final String DQP_BUFFER_DIR = BUFFER_PREFIX + ".dir"; //$NON-NLS-1$
-        
-        /**
          * Determines amount of memory to use in-memory before buffering to 
          * disk.  This property is not used if DQP_BUFFER_USEDISK = true.  The 
          * value is in megabytes.  Default value is 32.   

Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedConnectionFactory.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedConnectionFactory.java	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedConnectionFactory.java	2009-06-01 20:13:51 UTC (rev 1016)
@@ -37,12 +37,11 @@
 
     /**
      * Create a Connection to the DQP. This will load a DQP instance if one is not present 
-     * @param bootstrapURL
      * @param properties
      * @return Connection to DQP
      * @throws SQLException
      */
-    public Connection createConnection(URL bootstrapURL, Properties properties) throws SQLException;  
+    public Connection createConnection(Properties properties) throws SQLException;  
     
     /**
      * Shutdown the connection factory, including the DQP and all its existing connections 

Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java	2009-06-01 20:13:51 UTC (rev 1016)
@@ -351,10 +351,9 @@
             String dqpId = getDQPIdentity();
             props.setProperty(DQPEmbeddedProperties.DQP_IDENTITY, dqpId);
             // Create a temporary workspace directory
-            this.workspaceDirectory = createWorkspace(props.getProperty(DQPEmbeddedProperties.DQP_TMPDIR), dqpId);
+            this.workspaceDirectory = createWorkspace(props.getProperty(DQPEmbeddedProperties.DQP_WORKDIR), dqpId);
+            props.setProperty(DQPEmbeddedProperties.DQP_WORKSPACE, this.workspaceDirectory);
             
-            this.classLoader = this.getClass().getClassLoader();
-            
             // a non-delegating class loader will be created from where all third party dependent jars can be loaded
             ArrayList<URL> runtimeClasspathList = new ArrayList<URL>();
             String libLocation = props.getProperty("dqp.lib", "./lib/"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -369,7 +368,7 @@
             }
             
             URL[] dqpClassPath = runtimeClasspathList.toArray(new URL[runtimeClasspathList.size()]);
-            this.classLoader = new PostDelegatingClassLoader(dqpClassPath, Thread.currentThread().getContextClassLoader(), new MetaMatrixURLStreamHandlerFactory());
+            this.classLoader = new PostDelegatingClassLoader(dqpClassPath, this.getClass().getClassLoader(), new MetaMatrixURLStreamHandlerFactory());
             
             String logMsg = BaseDataSource.getResourceMessage("EmbeddedDriver.use_classpath"); //$NON-NLS-1$
             DriverManager.println(logMsg);
@@ -483,7 +482,7 @@
             try {
                 current = Thread.currentThread().getContextClassLoader();             
                 Thread.currentThread().setContextClassLoader(classLoader);            
-                return connectionFactory.createConnection(url, info);            
+                return connectionFactory.createConnection(info);            
             } finally {
                 Thread.currentThread().setContextClassLoader(current);
             }            
@@ -494,10 +493,13 @@
          * @return a JVM level unique identifier
          */
         String getDQPIdentity() {
-            String id = System.getProperty(DQPEmbeddedProperties.DQP_IDENTITY, "0"); //$NON-NLS-1$
-            int identity = Integer.parseInt(id)+1;    
-            id = String.valueOf(identity);
-            return id;
+        	synchronized (System.class) {
+	            String id = System.getProperty(DQPEmbeddedProperties.DQP_IDENTITY, "1"); //$NON-NLS-1$
+	            int identity = Integer.parseInt(id);
+	            System.setProperty(DQPEmbeddedProperties.DQP_IDENTITY, String.valueOf(identity + 1));
+	            id = String.valueOf(identity);
+	            return id;
+        	}
         }        
         
         /**
@@ -515,8 +517,8 @@
 					throw MMSQLException.create(e);
 				}
         	}
-        	String dir = baseDir + identity;
-            System.setProperty(DQPEmbeddedProperties.DQP_TMPDIR, dir); 
+        	String dir = baseDir + "/" + identity; //$NON-NLS-1$
+            System.setProperty(DQPEmbeddedProperties.DQP_TMPDIR, dir + "/temp"); //$NON-NLS-1$S 
 
             File f = new File(dir);
 

Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMResultSet.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMResultSet.java	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMResultSet.java	2009-06-01 20:13:51 UTC (rev 1016)
@@ -30,20 +30,14 @@
 import java.sql.Blob;
 import java.sql.Clob;
 import java.sql.Date;
+import java.sql.NClob;
 import java.sql.Ref;
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
+import java.sql.RowId;
 import java.sql.SQLException;
 import java.sql.SQLWarning;
-//## JDBC4.0-begin ##
-import java.sql.RowId;
-import java.sql.NClob;
 import java.sql.SQLXML;
-//## JDBC4.0-end ##
-
-/*## JDBC3.0-JDK1.5-begin ##
-import com.metamatrix.core.jdbc.SQLXML; 
-## JDBC3.0-JDK1.5-end ##*/
 import java.sql.Time;
 import java.sql.Timestamp;
 import java.util.Calendar;
@@ -106,6 +100,7 @@
     private TimeZone serverTimeZone;
     private Map updatedPlanDescription;
     private ResultsMessage resultsMsg;
+    private int maxFieldSize;
 
 	/**
 	 * Constructor.
@@ -148,6 +143,10 @@
 		}
 	}
 	
+	public void setMaxFieldSize(int maxFieldSize) {
+		this.maxFieldSize = maxFieldSize;
+	}
+	
     /**
      * Close this result set.
      */
@@ -304,12 +303,14 @@
         }
         else if (currentValue instanceof XMLType) {
             currentValue = MMSQLXML.newInstance(new StreamingLobChunckProducer.Factory(this.statement.getDQP(), this.requestID, (Streamable)currentValue), (XMLType) currentValue);
-        }
-        
-        if (currentValue instanceof java.util.Date) {
+        } 
+        else if (currentValue instanceof java.util.Date) {
             return TimestampWithTimezone.create((java.util.Date)currentValue, serverTimeZone, getDefaultCalendar(), currentValue.getClass());
         }
-        
+        else if (maxFieldSize > 0 && currentValue instanceof String) {
+        	String val = (String)currentValue;
+        	currentValue = val.substring(0, Math.min(maxFieldSize/2, val.length()));
+        }
         return currentValue;
     }
 

Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMStatement.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMStatement.java	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMStatement.java	2009-06-01 20:13:51 UTC (rev 1016)
@@ -143,6 +143,7 @@
     private Calendar defaultCalendar;
     /** Max rows to be returned by executing the statement */
     private int maxRows = NO_LIMIT;
+    private int maxFieldSize = NO_LIMIT;
     
     /** SPIN_TIMEOUT determines how responsive asynch operations will be to
      *  statement cancellation, closure, or execution timeouts.  
@@ -405,6 +406,7 @@
 		}
 
 		resultSet = new MMResultSet(resultsMsg, this, null, outParamIndexMap.size());
+		resultSet.setMaxFieldSize(this.maxFieldSize);
 	}
     
     protected void executeSql(String[] commands, boolean isBatchedCommand, Boolean requiresResultSet)
@@ -486,7 +488,7 @@
      * @throws SQLException should never occur.
      */
     public int getMaxFieldSize() throws SQLException {
-        return NO_LIMIT; //there is no maximum
+        return maxFieldSize;
     }
 
     /**
@@ -1086,6 +1088,10 @@
 	}
 
 	public void setMaxFieldSize(int max) throws SQLException {
-		throw SqlUtil.createFeatureNotSupportedException();	
+		checkStatement();
+        if ( max < 0 ) {
+            throw new MMSQLException(JDBCPlugin.Util.getString("MMStatement.Invalid_field_size")); //$NON-NLS-1$
+        }
+		this.maxFieldSize = max;
 	}
 }
\ No newline at end of file

Modified: trunk/client-jdbc/src/main/resources/com/metamatrix/jdbc/i18n.properties
===================================================================
--- trunk/client-jdbc/src/main/resources/com/metamatrix/jdbc/i18n.properties	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/client-jdbc/src/main/resources/com/metamatrix/jdbc/i18n.properties	2009-06-01 20:13:51 UTC (rev 1016)
@@ -60,7 +60,8 @@
 ResultsImpl.Metadata_null=ResultSetMetadata shouldn''t be null.
 MMStatement.Timeout_before_execute=Request timed out before it could execute, change the timeout value and re-execute the request.
 MMStatement.Cancel_before_execute=Request was canceled before it could finish executing.
-MMStatement.Invalid_fetch_size=Fetch size should always be a value of 0 <= fetch size <= max rows.
+MMStatement.Invalid_fetch_size=Fetch size should always be a value of 0 <= fetch size <= max rows.
+MMStatement.Invalid_feild_size=Field size should be >= 0.
 MMStatement.Err_start_auto_txn=Failed automatically creating a transaction for request {0}.
 MMStatement.Err_end_auto_txn=Failed ending automatically started transaction.
 MMStatement.Cancel_before_complete=Statement was canceled before operation completed.

Modified: trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/api/AbstractMMQueryTestCase.java
===================================================================
--- trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/api/AbstractMMQueryTestCase.java	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/api/AbstractMMQueryTestCase.java	2009-06-01 20:13:51 UTC (rev 1016)
@@ -289,36 +289,22 @@
         }    	
     }
     
+    static String read(BufferedReader r) throws IOException {
+    	StringBuffer result = new StringBuffer();
+    	String s = null;
+    	try {
+	    	while ((s = r.readLine()) != null) {
+	    		result.append(s.trim());
+	    		result.append("\n"); //$NON-NLS-1$
+	    	}
+    	} finally {
+    		r.close();
+    	}
+    	return result.toString();
+    }
 
-    int compareResults(BufferedReader resultReader, BufferedReader expectedReader) throws IOException {
-        int lineCount = 0;    
-        while(true) {
-            // Line count
-            lineCount++;
-                
-            String resultLine = resultReader.readLine();
-            String expectedLine = expectedReader.readLine();
-            
-            if (resultLine == null && expectedLine != null) {
-                // more results available
-                fail("More expected result lines available than actual results, line="+lineCount); //$NON-NLS-1$
-                return 1;
-            }
-            else if (resultLine != null && expectedLine == null) {
-                // less results available
-                fail("More actual results are available than expected results, line="+lineCount + "\n" + resultLine); //$NON-NLS-1$ //$NON-NLS-2$
-                return -1;
-            }
-            
-            if (resultLine == null && expectedLine == null) {
-                // matched
-                return 0;
-            }
-
-            resultLine = resultLine.trim();
-            expectedLine = expectedLine.trim();
-            Assert.assertEquals(expectedLine, resultLine);
-        }    
+    void compareResults(BufferedReader resultReader, BufferedReader expectedReader) throws IOException {
+    	assertEquals(read(expectedReader), read(resultReader));
     }
     
     public void printResults() {

Modified: trunk/connectors/connector-text/src/main/java/com/metamatrix/connector/text/TextConnector.java
===================================================================
--- trunk/connectors/connector-text/src/main/java/com/metamatrix/connector/text/TextConnector.java	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/connectors/connector-text/src/main/java/com/metamatrix/connector/text/TextConnector.java	2009-06-01 20:13:51 UTC (rev 1016)
@@ -53,6 +53,7 @@
     private int srcFiles = 0;
     private int srcFileErrs = 0;
     Map metadataProps = new HashMap();
+    private String parentDirectory;
 
     /**
      * Initialization with environment.
@@ -215,7 +216,19 @@
                     srcFileErrs++;
                     throw new ConnectorException(TextPlugin.Util.getString("TextConnection.Text_file_name_is_not_specified_for_the_group___{0}_2", new Object[] {groupName})); //$NON-NLS-1$
                 }
-                checkFile(propertyValue, props, groupName);
+                try {
+                	checkFile(propertyValue, props, groupName);
+                } catch (ConnectorException e) {
+                	if (this.parentDirectory == null) {
+                		throw e;
+                	}
+                	srcFileErrs--;
+            		try {
+            			checkFile(parentDirectory + "/" + propertyValue, props, groupName); //$NON-NLS-1$
+            		} catch (ConnectorException e1) {
+            			throw e;
+            		}
+                }
             } else if (propertyName.equals(TextPropertyNames.HEADER_LINES)) {
                 try {
                     Integer.parseInt(propertyValue);
@@ -310,7 +323,7 @@
             } else if (!descfile.canRead()) {
                 throw new ConnectorException(TextPlugin.Util.getString("TextConnection.Descriptor_file_{0}_found_but_does_not_have_Read_permissions_10", new Object[] {fileLocation})); //$NON-NLS-1$
             }
-
+            this.parentDirectory = descfile.getParent();
             try {
                 br = new BufferedReader(new FileReader(descfile));
 

Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java	2009-06-01 20:13:51 UTC (rev 1016)
@@ -259,18 +259,6 @@
 	}
     
     /** 
-     * @see com.metamatrix.dqp.service.ConfigurationService#getLogFile()
-     * @since 4.3
-     */
-    public URL getLogFile() {
-        String logFile = getUserPreferences().getProperty(DQPEmbeddedProperties.DQP_LOGFILE);
-        if (valid(logFile)) {
-            return getFullyQualifiedPath(logFile); 
-        }
-        return null;
-    }
-
-    /** 
      * @see com.metamatrix.dqp.service.ConfigurationService#getLogLevel()
      * @since 4.3
      */
@@ -817,7 +805,7 @@
         	}
             return urlPaths.toArray(new URL[urlPaths.size()]);
         }
-        return null;
+        return new URL[0];
     }
     
     /**  
@@ -1445,28 +1433,23 @@
     public boolean useDiskBuffering() {
         return Boolean.valueOf(getUserPreferences().getProperty(DQPEmbeddedProperties.BufferService.DQP_BUFFER_USEDISK, "true")).booleanValue(); //$NON-NLS-1$        
     }
-
     
+    public File getWorkDir() {
+        String workDirectory = getUserPreferences().getProperty(DQPEmbeddedProperties.DQP_WORKSPACE);
+        URL bufferURL = getFullyQualifiedPath(workDirectory);
+        File workDir = new File(bufferURL.getPath());
+        workDir.mkdirs();
+        return workDir;
+    }
+    
     /**
      * Get the directory to use for the disk buffering  
      * @return must a return a location; and exist too.
      */
     public File getDiskBufferDirectory() {
-        File bufferDir = null;
-        String bufferDirectory = getUserPreferences().getProperty(DQPEmbeddedProperties.BufferService.DQP_BUFFER_DIR);
-        if (valid(bufferDirectory)) {
-            if (!bufferDirectory.endsWith("/")) { //$NON-NLS-1$
-                bufferDirectory += "/"; //$NON-NLS-1$
-            }
-            bufferDirectory += getInstanceIdenifier();
-            URL bufferURL = getFullyQualifiedPath(bufferDirectory);
-            bufferDir = new File(bufferURL.getPath());
-        }
-        else {            
-            bufferDir = new File(getUserPreferences().getProperty(DQPEmbeddedProperties.DQP_TMPDIR)); 
-        }
+        File bufferDir = new File(getWorkDir(), "buffer"); //$NON-NLS-1$
         
-        // create the buffer directory if not alread exists.
+        // create the buffer directory if not already exists.
         if (!bufferDir.exists()) {
             bufferDir.mkdirs();
         }        

Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedTransactionService.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedTransactionService.java	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedTransactionService.java	2009-06-01 20:13:51 UTC (rev 1016)
@@ -22,7 +22,6 @@
 
 package com.metamatrix.dqp.embedded.services;
 
-import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.Properties;
 
@@ -31,7 +30,6 @@
 import com.google.inject.Inject;
 import com.google.inject.name.Named;
 import com.metamatrix.common.application.exception.ApplicationInitializationException;
-import com.metamatrix.common.protocol.URLHelper;
 import com.metamatrix.common.xa.XATransactionException;
 import com.metamatrix.dqp.embedded.DQPEmbeddedProperties;
 import com.metamatrix.dqp.service.TransactionService;
@@ -48,21 +46,13 @@
     		throws ApplicationInitializationException {
         try {
         	props = new Properties(props);
-            props.put(TransactionService.HOSTNAME, "dqp"); //$NON-NLS-1$
-            props.put(TransactionService.VMNAME, props.getProperty(DQPEmbeddedProperties.DQP_IDENTITY));
-            
-            String dir = props.getProperty(TransactionService.TXN_STORE_DIR);
-            if (dir != null) {
-            	props.setProperty(TXN_STORE_DIR, URLHelper.buildURL(bootstrapURL, dir).getPath());
-            } else {
-            	props.setProperty(TXN_STORE_DIR, props.getProperty(DQPEmbeddedProperties.DQP_TMPDIR));
-            }
+            props.setProperty(TransactionService.HOSTNAME, "dqp"); //$NON-NLS-1$
+            props.setProperty(TransactionService.VMNAME, props.getProperty(DQPEmbeddedProperties.DQP_IDENTITY));
+            props.setProperty(TransactionService.TXN_STORE_DIR, props.getProperty(DQPEmbeddedProperties.DQP_WORKSPACE));
             this.setTransactionProvider(ArjunaTransactionProvider.getInstance(props));
         } catch (XATransactionException e) {
             throw new ApplicationInitializationException(e);
-        } catch (MalformedURLException e) {
-        	throw new ApplicationInitializationException(e);
-		} 
+        } 
     }
     
 }

Modified: trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedConnectionFactoryImpl.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedConnectionFactoryImpl.java	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedConnectionFactoryImpl.java	2009-06-01 20:13:51 UTC (rev 1016)
@@ -72,7 +72,7 @@
     /** 
      * @see com.metamatrix.jdbc.EmbeddedConnectionFactory#createConnection()
      */
-    public Connection createConnection(URL bootstrapURL, Properties props) throws SQLException {
+    public Connection createConnection(Properties props) throws SQLException {
 
     	try {
         	// check for the valid connection properties

Modified: trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedGuiceModule.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedGuiceModule.java	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedGuiceModule.java	2009-06-01 20:13:51 UTC (rev 1016)
@@ -55,8 +55,8 @@
 		bind(Cache.class).toProvider(CacheProvider.class).in(Scopes.SINGLETON);
 		bind(CacheFactory.class).to(JBossCacheFactory.class).in(Scopes.SINGLETON);
 		bindConstant().annotatedWith(Names.named("HostName")).to("embedded"); //$NON-NLS-1$ //$NON-NLS-2$
-		bindConstant().annotatedWith(Names.named("ProcessName")).to("embedded"); //$NON-NLS-1$ //$NON-NLS-2$
-		String workspaceDir = System.getProperty(DQPEmbeddedProperties.DQP_TMPDIR, System.getProperty("java.io.tmpdir")); //$NON-NLS-1$
+		bindConstant().annotatedWith(Names.named("ProcessName")).to(props.getProperty(DQPEmbeddedProperties.DQP_IDENTITY)); //$NON-NLS-1$
+		String workspaceDir = props.getProperty(DQPEmbeddedProperties.DQP_WORKSPACE);
 		bindConstant().annotatedWith(Names.named("WorkspaceDir")).to(workspaceDir); //$NON-NLS-1$
 		this.props.setProperty(DQPEmbeddedProperties.DQP_TMPDIR, workspaceDir);
 		bind(Properties.class).annotatedWith(Names.named("DQPProperties")).toInstance(this.props); //$NON-NLS-1$

Modified: trunk/embedded/src/main/java/com/metamatrix/jdbc/transport/LocalServerConnection.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/jdbc/transport/LocalServerConnection.java	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/embedded/src/main/java/com/metamatrix/jdbc/transport/LocalServerConnection.java	2009-06-01 20:13:51 UTC (rev 1016)
@@ -48,6 +48,7 @@
 	private DQPWorkContext workContext;
 	private ClientSideDQP dqp;
 	private ServerConnectionListener listener;
+	private ClassLoader classLoader;
 
 	public LocalServerConnection(MetaMatrixSessionID sessionId, Properties connectionProperties, ClientSideDQP dqp, ServerConnectionListener listener) {
 		result = new LogonResult(new SessionToken(sessionId, connectionProperties.getProperty(MMURL.CONNECTION.USER_NAME)), connectionProperties, "local"); //$NON-NLS-1$
@@ -65,6 +66,8 @@
 		if (this.listener != null) {
 			this.listener.connectionAdded(this);
 		}
+		
+		this.classLoader = Thread.currentThread().getContextClassLoader();
 	}
 
 	@SuppressWarnings("unchecked")
@@ -72,20 +75,22 @@
 		if (iface != ClientSideDQP.class) {
 			throw new IllegalArgumentException("unknown service"); //$NON-NLS-1$
 		}
-		return (T) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[] {ClientSideDQP.class}, new InvocationHandler() {
+		return (T) Proxy.newProxyInstance(this.classLoader, new Class[] {ClientSideDQP.class}, new InvocationHandler() {
 
 			public Object invoke(Object arg0, Method arg1, Object[] arg2)
 					throws Throwable {
-				
 				if (!isOpen()) {
 					throw ExceptionUtil.convertException(arg1, new MetaMatrixComponentException(JDBCPlugin.Util.getString("LocalTransportHandler.session_inactive"))); //$NON-NLS-1$
 				}
-				
+				ClassLoader current = Thread.currentThread().getContextClassLoader();
+				Thread.currentThread().setContextClassLoader(classLoader);
 				DQPWorkContext.setWorkContext(workContext);
 				try {
 					return arg1.invoke(dqp, arg2);
 				} catch (InvocationTargetException e) {
 					throw e.getTargetException();
+				} finally {
+					Thread.currentThread().setContextClassLoader(current);
 				}
 			}
 		});

Modified: trunk/embedded/src/main/resources/deploy.properties
===================================================================
--- trunk/embedded/src/main/resources/deploy.properties	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/embedded/src/main/resources/deploy.properties	2009-06-01 20:13:51 UTC (rev 1016)
@@ -1,6 +1 @@
-#default properties file for Teiid Embedded
-mm.io.tmpdir=${user.dir}/teiid-workspace/temp
-dqp.extensions=mmfile://${user.dir}/teiid-workspace/extensions
-dqp.logFile=mmfile://${user.dir}/teiid-workspace/teiid-embedded.log
-dqp.logLevel=2
-metamatrix.xatxnmgr.txnstore_dir=${user.dir}/teiid-workspace
\ No newline at end of file
+dqp.workdir=${user.dir}/teiid-work
\ No newline at end of file

Modified: trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java
===================================================================
--- trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java	2009-06-01 20:13:51 UTC (rev 1016)
@@ -286,16 +286,6 @@
         assertNull(service.getVDB("QT_Ora9DS", "1")); //$NON-NLS-1$ //$NON-NLS-2$
     }
     
-    public void testGetLogFile() throws Exception{
-        Properties p = EmbeddedTestUtil.getProperties(); 
-        p.setProperty(DQPEmbeddedProperties.DQP_LOGFILE, "./log/dqp.log"); //$NON-NLS-1$ 
-        p.setProperty(DQPEmbeddedProperties.DQP_LOGLEVEL, "1"); //$NON-NLS-1$ 
-        service.setUserPreferences(p);
-        
-        assertTrue(service.getLogFile().toString().endsWith("/log/dqp.log")); //$NON-NLS-1$
-        assertEquals(service.getLogLevel(), "1");                         //$NON-NLS-1$
-    }
-    
     public void testGetSystemProperties() throws Exception {
         Properties p = EmbeddedTestUtil.getProperties(); 
         service.setUserPreferences(p);

Modified: trunk/embedded/src/test/java/com/metamatrix/dqp/service/buffer/TestLocalBufferService.java
===================================================================
--- trunk/embedded/src/test/java/com/metamatrix/dqp/service/buffer/TestLocalBufferService.java	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/embedded/src/test/java/com/metamatrix/dqp/service/buffer/TestLocalBufferService.java	2009-06-01 20:13:51 UTC (rev 1016)
@@ -46,12 +46,10 @@
 
     public void testMissingRequiredProperties() throws Exception {        
         try {
-            System.setProperty(DQPEmbeddedProperties.DQP_TMPDIR, System.getProperty("java.io.tmpdir")+"/metamatrix/1"); //$NON-NLS-1$ //$NON-NLS-2$ 
-            
             Application r = new Application();
             ConfigurationService cs = new EmbeddedConfigurationService();
             Properties p = EmbeddedTestUtil.getProperties(UnitTestUtil.getTestDataPath() + "/admin/buffertest1.properties"); //$NON-NLS-1$
-            p.setProperty(DQPEmbeddedProperties.DQP_TMPDIR, System.getProperty(DQPEmbeddedProperties.DQP_TMPDIR)); 
+            p.setProperty(DQPEmbeddedProperties.DQP_WORKSPACE, System.getProperty("java.io.tmpdir")+"/metamatrix/1");         //$NON-NLS-1$ //$NON-NLS-2$ 
             cs.initialize(p);
             r.installService(DQPServiceNames.CONFIGURATION_SERVICE, cs);
             EmbeddedBufferService svc = new EmbeddedBufferService();
@@ -74,6 +72,7 @@
         Application r = new Application();
         cs = new EmbeddedConfigurationService();
         Properties p = EmbeddedTestUtil.getProperties(UnitTestUtil.getTestDataPath() + "/admin/buffertest2.properties"); //$NON-NLS-1$
+        p.setProperty(DQPEmbeddedProperties.DQP_WORKSPACE, System.getProperty("java.io.tmpdir")+"/metamatrix/1");         //$NON-NLS-1$ //$NON-NLS-2$ 
         cs.initialize(p);
         r.installService(DQPServiceNames.CONFIGURATION_SERVICE, cs);
         svc = new EmbeddedBufferService();
@@ -85,7 +84,7 @@
         cs.getDiskBufferDirectory();
         assertTrue("Not Directory", cs.getDiskBufferDirectory().isDirectory()); //$NON-NLS-1$
         assertTrue("does not exist", cs.getDiskBufferDirectory().exists()); //$NON-NLS-1$
-        assertTrue("does not end with one", cs.getDiskBufferDirectory().getName().endsWith("1")); //$NON-NLS-1$ //$NON-NLS-2$
+        assertTrue("does not end with one", cs.getDiskBufferDirectory().getParent().endsWith("1")); //$NON-NLS-1$ //$NON-NLS-2$
         assertTrue(cs.useDiskBuffering());
         
         BufferManagerImpl mgr = (BufferManagerImpl) svc.getBufferManager();
@@ -95,12 +94,11 @@
     }
 
     public void testCheckMemPropertyGotSet2() throws Exception {
-        System.setProperty(DQPEmbeddedProperties.DQP_TMPDIR, System.getProperty("java.io.tmpdir")+"/metamatrix/1");         //$NON-NLS-1$ //$NON-NLS-2$ 
         EmbeddedBufferService svc = null;
         Application r = new Application();
         ConfigurationService cs = new EmbeddedConfigurationService();
         Properties p = EmbeddedTestUtil.getProperties(UnitTestUtil.getTestDataPath() + "/admin/buffertest3.properties"); //$NON-NLS-1$
-        p.setProperty(DQPEmbeddedProperties.DQP_TMPDIR, System.getProperty(DQPEmbeddedProperties.DQP_TMPDIR)); 
+        p.setProperty(DQPEmbeddedProperties.DQP_WORKSPACE, System.getProperty("java.io.tmpdir")+"/metamatrix/1");         //$NON-NLS-1$ //$NON-NLS-2$ 
         cs.initialize(p);            
         r.installService(DQPServiceNames.CONFIGURATION_SERVICE, cs);
         svc = new EmbeddedBufferService();

Modified: trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java	2009-06-01 20:13:51 UTC (rev 1016)
@@ -99,12 +99,6 @@
     public URL getUDFFile();
     
     /**
-     * URL to Log file name  
-     * @return URL or null if one not available
-     */
-    public URL getLogFile();
-
-    /**
      * Log Level 
      * @return configured log level or default one supplied.
      */

Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml	2009-06-01 20:06:51 UTC (rev 1015)
+++ trunk/pom.xml	2009-06-01 20:13:51 UTC (rev 1016)
@@ -146,10 +146,6 @@
 							<name>java.io.tmpdir</name>
 							<value>${basedir}/target</value>
 						</property>
-						<property>
-							<name>metamatrix.xatxnmgr.txnstore_dir</name>
-							<value>${basedir}/target</value>
-						</property>
 					</systemProperties>
 				</configuration>
 			</plugin>




More information about the teiid-commits mailing list