Anonymous avatar Anonymous committed 79590de

bump version to 0.2

Comments (0)

Files changed (3)

 
 - [TODO] Test-cases for untested databases: Oracle, IBM DB2, SQL Server, Sybase
 
-## 0.2 / 2010-Oct-14 (GMT+5:30)
 
-- [TODO] API for changing connection pool parameters (as of now it's Java API)
+## 0.2 / 2010-Oct-23 (GMT+5:30)
+
+- API for changing connection pool parameters
 - Move database credentials (unit tests) to properties file
-- JNDI datasource
+- JNDI datasource (but for diagnostics you should use the Clj-ArgUtil library)
 - Supported but not tested: jTDS (MS SQL Server, Sybase)
 
+
 ## 0.1 / 2010-Oct-05 (GMT+5:30)
 
 - BasicDataSource with driver classname, JDBC url, username and password
 -*- markdown -*-
 
-# Clj-DBCP v0.1
+# Clj-DBCP v0.2
 
 Clj-DBCP is a simple Java-6/Clojure wrapper around the Apache DBCP library for
 creating database connection pools and for embedding databases in applications.
 The supported operations are:
 
 * BasicDataSource with driver classname, JDBC url, username and password
-* Support for validation query
+* Support for validation query, setting connection pool parameters
 * Auto-select driver classname and validation query for supported database
 * API for memory/filesystem/network based data sources for embedded databases
 * Supported+tested: Apache Derby, HSQLDB, H2, MySQL, PostgreSQL
-* Supported but not tested: Oracle, IBM DB2
+* Supported but not tested: Oracle, IBM DB2, jTDS (SQL Server, Sybase)
 
 
 ## Usage
       (db2-datasource "localhost" "exampledb" "dbuser" "secret"))
 
 Example usage: see Derby example
+
+
+## Create data source for Microsoft SQL Server database
+
+    (db-spec
+      (sqlserver-datasource "localhost" "exampledb" "dbuser" "secret"))
+
+Example usage: see Derby example
+
+
+## Create data source for Sybase database
+
+    (db-spec
+      (sybase-datasource "localhost" "exampledb" "dbuser" "secret"))
+
+Example usage: see Derby example
+
+
+## Get data source from JNDI (only looked up; must be already connection pooled)
+
+    (db-spec
+      (jndi-datasource "java:comp/env/myDataSource"))
+
+Example usage: see Derby example
+
+
+## Set custom parameters on the datasource
+
+    (db-spec
+      (let [ds (mysql-datasource "localhost" "exampledb" "dbuser" "secret")]
+        ;; set custom validation query
+        (set-validation-query! ds "SELECT 1")
+        ;; set maximum number of active connections on the datasource at a time
+        (set-max-active! ds 15)
+        ;; set minimum and maximum number of idle connections on the datasource
+        (set-min-max-idle! ds 3 8)
+        ds))
   <groupId>org.bituf</groupId>
   <artifactId>clj-dbcp</artifactId>
   <packaging>jar</packaging>
-  <version>0.2-SNAPSHOT</version>
+  <version>0.2</version>
   <name>Clj-DBCP</name>
   <description>
     Clj-DBCP is a simple Java-6/Clojure wrapper around the Apache DBCP library
       <artifactId>commons-dbcp</artifactId>
       <version>1.4</version>
     </dependency>
-    <!-- JDBC Drivers -->
+    <!-- Test Dependencies -->
+    <dependency>
+      <groupId>org.bituf</groupId>
+      <artifactId>clj-argutil</artifactId>
+      <version>0.1</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>
       <scope>test</scope>
     </dependency>
-    <dependency>
+    <dependency><!-- Simple-JNDI: Emulate JNDI container -->
       <groupId>simple-jndi</groupId>
       <artifactId>simple-jndi</artifactId>
       <version>0.11.4</version>
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.