[teiid-commits] teiid SVN: r986 - in trunk: build/kit-embedded/examples/portfolio and 3 other directories.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Wed May 20 10:33:32 EDT 2009


Author: shawkins
Date: 2009-05-20 10:33:32 -0400 (Wed, 20 May 2009)
New Revision: 986

Added:
   trunk/build/kit-embedded/examples/portfolio/README.txt
Modified:
   trunk/build/assembly/embedded/embedded-dist.xml
   trunk/build/kit-embedded/examples/portfolio/run.bat
   trunk/build/kit-embedded/examples/portfolio/run.sh
   trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java
   trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
   trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties
Log:
TEIID-50 updates to ensure that the arjuna patches are picked up ahead of the arjuna jar.  also added a readme file to the example

Modified: trunk/build/assembly/embedded/embedded-dist.xml
===================================================================
--- trunk/build/assembly/embedded/embedded-dist.xml	2009-05-20 02:53:44 UTC (rev 985)
+++ trunk/build/assembly/embedded/embedded-dist.xml	2009-05-20 14:33:32 UTC (rev 986)
@@ -25,10 +25,21 @@
       <includes>
         <include>*.jar</include>
       </includes>
+      <excludes>
+      	<exclude>teiid-txn-jbossts-${version}.jar</exclude>
+      </excludes>
       <outputDirectory>lib</outputDirectory>      
-    </fileSet>    
+    </fileSet>
     
     <fileSet>
+      <directory>target/distribution/teiid-${version}-embedded-dependencies.dir</directory>
+      <includes>
+        <include>teiid-txn-jbossts-${version}.jar</include>
+      </includes>
+      <outputDirectory>lib/patches</outputDirectory>      
+    </fileSet>      
+    
+    <fileSet>
       <directory>target/distribution/teiid-${version}-connector-dependencies.dir</directory>
       <includes>
         <include>*.jar</include>

Added: trunk/build/kit-embedded/examples/portfolio/README.txt
===================================================================
--- trunk/build/kit-embedded/examples/portfolio/README.txt	                        (rev 0)
+++ trunk/build/kit-embedded/examples/portfolio/README.txt	2009-05-20 14:33:32 UTC (rev 986)
@@ -0,0 +1,11 @@
+Install a recent version of Derby - see http://db.apache.org/derby/derby_downloads.html
+
+Create the example dataset in Derby by running <derby home>/bin/ij customer-schema.sql
+
+Put the <derby home>/lib/derbyclient.jar to the <teiid embedded home>/extensions directory.
+
+Run the demo with run.bat or run.sh.
+
+This will execute the query contained in the run script against a vdb that integrates the
+Derby datasource with file based data contained in the marketdata-price.txt file. 
+


Property changes on: trunk/build/kit-embedded/examples/portfolio/README.txt
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: trunk/build/kit-embedded/examples/portfolio/run.bat
===================================================================
--- trunk/build/kit-embedded/examples/portfolio/run.bat	2009-05-20 02:53:44 UTC (rev 985)
+++ trunk/build/kit-embedded/examples/portfolio/run.bat	2009-05-20 14:33:32 UTC (rev 986)
@@ -2,7 +2,7 @@
 set CLIENT_PATH=java/*;PortfolioModel/
 
 rem Second one for the JARs in Teiid embedded
-set TEIID_PATH=../../teiid-${pom.version}-client.jar;../../deploy;../../lib/*;../../extensions/*
+set TEIID_PATH=../../teiid-${pom.version}-client.jar;../../deploy;../../lib/patches/*;../../lib/*;../../extensions/*
 
 java -cp %CLIENT_PATH%;%TEIID_PATH% JDBCClient "select * from CustomerAccount"
 

Modified: trunk/build/kit-embedded/examples/portfolio/run.sh
===================================================================
--- trunk/build/kit-embedded/examples/portfolio/run.sh	2009-05-20 02:53:44 UTC (rev 985)
+++ trunk/build/kit-embedded/examples/portfolio/run.sh	2009-05-20 14:33:32 UTC (rev 986)
@@ -4,6 +4,6 @@
 CLIENT_PATH=java/*:PortfolioModel/
 
 #Second one for the JARs in Teiid embedded
-TEIID_PATH=../../teiid-${pom.version}-client.jar:../../deploy:../../lib/*:../../extensions/*
+TEIID_PATH=../../teiid-${pom.version}-client.jar:../../deploy:../../lib/patches/*:../../lib/*:../../extensions/*
 
 java -cp ${CLIENT_PATH}:${TEIID_PATH} JDBCClient "select * from CustomerAccount"

Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java	2009-05-20 02:53:44 UTC (rev 985)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java	2009-05-20 14:33:32 UTC (rev 986)
@@ -375,14 +375,22 @@
             // find jars in the "lib" directory; patches is reverse alpaha and not case sensitive so small letters then capitals
             if (!EmbeddedDriver.getDefaultConnectionURL().equals(dqpURL.toString())) {
 	            runtimeClasspathList.addAll(libClassPath(dqpURL, libLocation+"patches/", MMURLConnection.REVERSEALPHA)); //$NON-NLS-1$
-	            runtimeClasspathList.addAll(libClassPath(dqpURL, libLocation, MMURLConnection.DATE));
-
+	            
 	            // check if a specific post delegation rules specified for loading
 	            String postDelgationLibraries  = info.getProperty(POST_DELEGATION_LIBRARIES); 
 	            if (postDelgationLibraries != null) {
 	            	postDelegationClasspathList = resolvePath(dqpURL, libLocation, postDelgationLibraries);
+	            	List<URL> postDelegationPatches = new ArrayList<URL>(runtimeClasspathList);
+	            	postDelegationPatches.retainAll(postDelegationClasspathList);
+	            	postDelegationClasspathList.removeAll(postDelegationPatches);
+	            	postDelegationClasspathList.addAll(0, postDelegationPatches);
+	            }
+	            
+	            runtimeClasspathList.addAll(libClassPath(dqpURL, libLocation, MMURLConnection.DATE));
+	            
+	            if (postDelegationClasspathList != null) {
 	            	runtimeClasspathList.removeAll(postDelegationClasspathList);
-	            }	         
+	            }
             }
             
             URL[] dqpClassPath = runtimeClasspathList.toArray(new URL[runtimeClasspathList.size()]);

Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java	2009-05-20 02:53:44 UTC (rev 985)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java	2009-05-20 14:33:32 UTC (rev 986)
@@ -381,10 +381,11 @@
         	classloader = threadContextLoader;
         } else {
         	env.getProperties().setProperty(ConnectorPropertyNames.USING_CUSTOM_CLASSLOADER, Boolean.TRUE.toString());
-            LogManager.logInfo(DQPPlugin.Util.getString("DataService.useClassloader"), classPath); //$NON-NLS-1$
-
+            
             boolean postDelegation = PropertiesUtils.getBooleanProperty(env.getProperties(), ConnectorPropertyNames.USE_POST_DELEGATION, false);
             
+            LogManager.logInfo(LogConstants.CTX_CONNECTOR, DQPPlugin.Util.getString("ConnectorManager.useClassloader", connectorName, postDelegation, classPath)); //$NON-NLS-1$
+            
             if (postDelegation) {
             	this.classloader = this.clManager.getPostDelegationClassLoader(classPath);
             } else {

Modified: trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties
===================================================================
--- trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties	2009-05-20 02:53:44 UTC (rev 985)
+++ trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties	2009-05-20 14:33:32 UTC (rev 986)
@@ -56,7 +56,8 @@
 ConnectorManagerImpl.Err_get_conn=Error getting connection for cancellation: {0}
 ConnectorManager.cannot_restart=Cannot restart ConnectorManager
 ConnectorManager.cannot_add_to_recovery=Connector ''{0}'' does not support single identity connections, it cannot participate in recovery
-ConnectorManager.asynch_worker_warning=Setting ''{0}'' to false with pooling enabled is not recommended.  If connector threads become exhausted normal execution closure will not be possible.
+ConnectorManager.asynch_worker_warning=Setting ''{0}'' to false with pooling enabled is not recommended.  If connector threads become exhausted normal execution closure will not be possible.
+ConnectorManager.useClassloader=Connector ''{0}'' using post delegation = {1} and classpath {2}
 non_xa_connector=Connector \"{0}\" was configured to support XA transactions, but the connector is not an XAConnector
 no_txn_manager=No Transaction Manger found in the configuration, Failed to start connector \"{0}\"
 Connector_State_not_active=Connector request state is not active for request {0} in Connector {1}




More information about the teiid-commits mailing list