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

  • Participants
  • Parent commits a526eef
  • Branches default

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
-  <version>0.2</version>
+  <version>0.3-SNAPSHOT</version>
     Clj-DBCP is a simple Java-6/Clojure wrapper around the Apache DBCP library
     <!-- Test Dependencies -->
-      <artifactId>clj-argutil</artifactId>
-      <version>0.1</version>
+      <artifactId>clj-miscutil</artifactId>
+      <version>0.2-SNAPSHOT</version>
     <dependency><!-- All Open Source JDBC Drivers available via Maven -->
-      <version>0.1</version>
+      <version>0.3</version>
     <dependency><!-- Simple-JNDI: Emulate JNDI container -->
-        <version>1.3.3</version>
+        <version>1.3.6</version>
+          <warnOnReflection>true</warnOnReflection>

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

   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))

File 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
+  (:import
+  (:require
+    [org.bituf.clj-miscutil :as mu]))
 (defn msg
   See also:
     Short link:"
-  ([host port]
+  ([^String host ^Integer port]
     (let [server (org.apache.derby.drda.NetworkServerControl.
-                   ( host)
+                   ^ ( host)
       (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]
+  [^ server]
   (.stop server))
   See also:"
   ([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))

File 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 ()])
   (is false msg))
-(def dbcred (let [props (strkey-to-keyword
+(def dbcred (let [props (str-to-keys
                             (read-properties "src/test/")))]
               (println "*** DB-Credentials properties map ***")