Commits

Shantanu Kumar committed 833e566

change dependency OSS-JDBC from 0.1 to 0.3
fix reflection warnings
change dependency Clj-ArgUtil 0.1 to Clj-Miscutil 0.2-SNAPSHOT

Comments (0)

Files changed (5)

 
 # Changes and TODO
 
-- [TODO] Test-cases for untested databases: Oracle, IBM DB2, SQL Server, Sybase
+- [TODO] Test-cases for untested databases:
+  Oracle, IBM DB2, SQL Server, Sybase, Cubrid, SQLite
 
 
-## 0.2 / 2010-Oct-23 (GMT+5:30)
+## 0.3 / 2010-Nov-??
+
+- [TODO] Support for Cubrid database
+- [TODO] Support for SQLite database
+- [TODO] Support for generic databases (accept JDBC URL directly)
+
+
+## 0.2 / 2010-Oct-23
 
 - API for changing connection pool parameters
 - Move database credentials (unit tests) to properties file
 - Supported but not tested: jTDS (MS SQL Server, Sybase)
 
 
-## 0.1 / 2010-Oct-05 (GMT+5:30)
+## 0.1 / 2010-Oct-05
 
 - BasicDataSource with driver classname, JDBC url, username and password
 - Support for validation query
   <groupId>org.bituf</groupId>
   <artifactId>clj-dbcp</artifactId>
   <packaging>jar</packaging>
-  <version>0.2</version>
+  <version>0.3-SNAPSHOT</version>
   <name>Clj-DBCP</name>
   <description>
     Clj-DBCP is a simple Java-6/Clojure wrapper around the Apache DBCP library
     <!-- Test Dependencies -->
     <dependency>
       <groupId>org.bituf</groupId>
-      <artifactId>clj-argutil</artifactId>
-      <version>0.1</version>
+      <artifactId>clj-miscutil</artifactId>
+      <version>0.2-SNAPSHOT</version>
       <scope>test</scope>
     </dependency>
     <dependency><!-- All Open Source JDBC Drivers available via Maven -->
       <groupId>org.bituf</groupId>
       <artifactId>oss-jdbc</artifactId>
-      <version>0.1</version>
+      <version>0.3</version>
       <scope>test</scope>
     </dependency>
     <dependency><!-- Simple-JNDI: Emulate JNDI container -->
       <plugin>
         <groupId>com.theoryinpractise</groupId>
         <artifactId>clojure-maven-plugin</artifactId>
-        <version>1.3.3</version>
+        <version>1.3.6</version>
         <executions>
           <execution>
             <id>compile</id>
           </execution>
         </executions>
         <configuration>
+          <warnOnReflection>true</warnOnReflection>
           <clojureOptions>-Dbasedir=${basedir}</clojureOptions>
           <compileDeclaredNamespaceOnly>true</compileDeclaredNamespaceOnly>
           <sourceDirectories>

src/main/clj/org/bituf/clj_dbcp.clj

   </resource-ref>
   You can fetch this datasource as follows:
     (jndi-datasource \"java:comp/env/jdbc/EmployeeDB\")"
-  ([init-ctx resource-ref-name]
+  ([^javax.naming.Context init-ctx ^String resource-ref-name]
     (.lookup init-ctx resource-ref-name))
   ([resource-ref-name]
     (jndi-datasource

src/test/clj/org/bituf/dbserver_util.clj

 (ns org.bituf.dbserver-util
   "Functions to start and stop embedded database servers."
-  (:use org.bituf.clj-argutil)
-  (:import java.io.PrintWriter))
+  (:import java.io.PrintWriter)
+  (:require
+    [org.bituf.clj-miscutil :as mu]))
+
 
 (defn msg
   [s]
   See also:
     http://publib.boulder.ibm.com/infocenter/cscv/v10r1/index.jsp?topic=/com.ibm.cloudscape.doc/radminembeddedserverex.html
     Short link: http://j.mp/axA6t6"
-  ([host port]
+  ([^String host ^Integer port]
     (let [server (org.apache.derby.drda.NetworkServerControl.
-                   (java.net.InetAddress/getByName host)
+                   ^java.net.InetAddress (java.net.InetAddress/getByName host)
                    port)]
       (msg (format "Starting Derby Server at %s:%d" host port))
       (.start server
 
 (defn stop-derby-server
   "Stop the Derby server"
-  [server]
+  [^org.apache.derby.drda.NetworkServerControl server]
   (.shutdown server))
 
 
 
 (defn stop-h2-server
   "Stop the H2 server"
-  [server]
+  [^org.h2.tools.Server server]
   (.stop server))
 
 
   See also:
     http://www.hsqldb.org/doc/src/org/hsqldb/Server.html"
   ([host port dbnames]
-    (let [dbnames-vec (as-vector dbnames)
+    (let [dbnames-vec (mu/as-vector dbnames)
           dbnames-cnt (take (count dbnames-vec) (iterate #(inc %) 0))
           dbnames-map (zipmap dbnames-cnt dbnames-vec)
           server (org.hsqldb.Server.)]
 
 (defn stop-hsql-server
   "Stop the HSQL server"
-  [server]
+  [^org.hsqldb.Server server]
   (msg "Stopping HSQL Server")
   (.shutdown server))

src/test/clj/org/bituf/test_clj_dbcp.clj

 (ns org.bituf.test-clj-dbcp
   (:use org.bituf.clj-dbcp)
-  (:use org.bituf.clj-argutil)
+  (:use org.bituf.clj-miscutil)
   (:use org.bituf.dbserver-util)
   (:use [clojure.contrib.sql :as sql :only ()])
   (:use clojure.contrib.java-utils)
   (is false msg))
 
 
-(def dbcred (let [props (strkey-to-keyword
+(def dbcred (let [props (str-to-keys
                           (property-map
                             (read-properties "src/test/dbcred.properties")))]
               (println "*** DB-Credentials properties map ***")
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.