Author: rareddy
Date: 2009-07-15 10:23:42 -0400 (Wed, 15 Jul 2009)
New Revision: 1132
Modified:
trunk/build/kit-embedded/examples/portfolio/java/JDBCClient.java
trunk/build/kit-embedded/examples/portfolio/java/jdbcclient.jar
trunk/build/kit-embedded/examples/portfolio/run.bat
trunk/build/kit-embedded/examples/portfolio/run.sh
Log:
TEIID-259: fixing the JDBC Example with service related changes.
Modified: trunk/build/kit-embedded/examples/portfolio/java/JDBCClient.java
===================================================================
--- trunk/build/kit-embedded/examples/portfolio/java/JDBCClient.java 2009-07-15 14:13:56
UTC (rev 1131)
+++ trunk/build/kit-embedded/examples/portfolio/java/JDBCClient.java 2009-07-15 14:23:42
UTC (rev 1132)
@@ -26,7 +26,8 @@
import java.sql.SQLException;
import java.sql.Statement;
-import com.metamatrix.jdbc.EmbeddedDataSource;
+import org.teiid.jdbc.TeiidDataSource;
+import org.teiid.jdbc.TeiidDriver;
public class JDBCClient {
public static void main(String[] args) throws Exception {
@@ -48,12 +49,15 @@
String url = "jdbc:metamatrix:Portfolio";
Class.forName("org.teiid.jdbc.TeiidDriver");
- return DriverManager.getConnection(url);
+ return DriverManager.getConnection(url,"admin", "teiid");
}
static Connection getDataSourceConnection() throws Exception {
- EmbeddedDataSource ds = new EmbeddedDataSource();
+ TeiidDataSource ds = new TeiidDataSource();
ds.setDatabaseName("Portfolio");
+ ds.setEmbeddedBootstrapFile("classpath:/deploy.properties");
+ ds.setUser("admin");
+ ds.setPassword("teiid");
return ds.getConnection();
}
Modified: trunk/build/kit-embedded/examples/portfolio/java/jdbcclient.jar
===================================================================
(Binary files differ)
Modified: trunk/build/kit-embedded/examples/portfolio/run.bat
===================================================================
--- trunk/build/kit-embedded/examples/portfolio/run.bat 2009-07-15 14:13:56 UTC (rev
1131)
+++ trunk/build/kit-embedded/examples/portfolio/run.bat 2009-07-15 14:23:42 UTC (rev
1132)
@@ -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/patches/*;../../lib/*;../../extensions/*
+set
TEIID_PATH=../../client/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-07-15 14:13:56 UTC (rev 1131)
+++ trunk/build/kit-embedded/examples/portfolio/run.sh 2009-07-15 14:23:42 UTC (rev 1132)
@@ -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/patches/*:../../lib/*:../../extensions/*
+TEIID_PATH=../../client/teiid-${pom.version}-client.jar:../../deploy:../../lib/patches/*:../../lib/*:../../extensions/*
java -cp ${CLIENT_PATH}:${TEIID_PATH} JDBCClient "select * from
CustomerAccount"
Show replies by date