trinidad_postgresql_dbpool_extension 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,13 @@
1
+ == 0.4.0 (2012-05-31)
2
+
3
+ * revised trinidad_generic_dbpool_extension :
4
+ - driver configuration option aliased as driverName
5
+ - new driverPath option for specifying driver jar in configuration
6
+ - allow driverName to be auto resolved when driverPath specified
7
+ * trinidad_postgresql_dbpool_extension with driver updated to 9.1-902
8
+ * trinidad_mysql_dbpool_extension with mysql-connector-j 5.1.20
9
+ * code cleanup, get rid of jeweler, update tomcat-dbcp.jar for trinidad_dbpool
10
+
1
11
  == 0.3.0 (2011-07-01)
2
12
 
3
13
  * Oracle connection pool extension
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009-2012 David Calavera
1
+ Copyright (c) 2012 Team Trinidad and contributors http://github.com/trinidad
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -18,3 +18,8 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
18
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
19
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
20
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
22
+ == JDBC Driver
23
+
24
+ Included JDBC drivers are most likely distributed under different terms than
25
+ those above, please make sure you understand your driver's license terms.
data/README.rdoc CHANGED
@@ -1,45 +1,84 @@
1
1
  = trinidad-dbpool
2
2
 
3
- Trinidad extensions to support database connection pools configured into the Apache Tomcat
4
- container.
3
+ Trinidad extensions to support database connection pooling on top of the
4
+ underlying Apache Tomcat container.
5
5
 
6
- == Pools supported
6
+ Please note, that such pools are usually configured as "global" and thus
7
+ shareable by multiple applications deployed on to of Trinidad server.
7
8
 
8
- * MySql (trinidad_mysql_dbpool_extension)
9
+ == Available Pools
10
+
11
+ * MySQL (trinidad_mysql_dbpool_extension)
9
12
  * PostgreSQL (trinidad_postgresql_dbpool_extension)
10
- * Mssql (trinidad_mssql_dbpool_extension)
13
+ * MS-SQL (trinidad_mssql_dbpool_extension) using (unofficial) jTDS driver
11
14
  * Oracle (trinidad_oracle_dbpool_extension)
15
+ * Generic (trinidad_generic_dbpool_extension) in case your DB ain't supported
12
16
 
13
17
  == Usage
14
18
 
15
- * Install the extension gem, ie: jruby -S gem install trinidad_mysql_dbpool_extension
16
- * Configure the pool into the trinidad's configuration file, ie:
19
+ * Install the gem e.g. `jruby -S gem install trinidad_mysql_dbpool_extension`
20
+ * Configure the pool with Trinidad's configuration file e.g. :
17
21
 
18
- web_apps:
19
- default:
20
- extensions:
21
- mysql_dbpool: # EXTENSION NAME AS KEY
22
- jndi: 'jdbc/TestDB' # jndi name
23
- username: 'root' # database username
24
- password: 'root' # database password
25
- url: 'jdbc:mysql://localhost:3306/javatest' # database url
26
- maxActive: 100 # max nodes actives
27
- maxIdle: 30 # max nodes idles
28
- maxWait: 10000 # max nodes waiting
29
-
30
- _jndi_, _username_, _password_ and _url_ are mandatory, while other
31
- configuration options can be found here:
22
+ web_apps:
23
+ default:
24
+ extensions:
25
+ mysql_dbpool: # EXTENSION NAME AS KEY
26
+ jndi: 'jdbc/TestDB' # JNDI name
27
+ username: 'root' # database username
28
+ password: 'root' # database password
29
+ url: 'localhost:3306/javatest' # database URL (or full jdbc: URL)
30
+ maxActive: 100 # max nodes actives
31
+ maxIdle: 30 # max nodes idles
32
+ maxWait: 10000 # max nodes waiting
33
+
34
+ _jndi_, _username_, _password_ and _url_ are mandatory,
35
+ while other supported configuration options might be found here:
32
36
 
33
37
  http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html
34
38
 
35
39
  http://commons.apache.org/dbcp/configuration.html
36
40
 
37
- * Configure your rails application to use jndi into the config/database.yml
41
+ * Configure your rails application to use JNDI into the config/database.yml
42
+
43
+ production:
44
+ adapter: jdbc
45
+ jndi: java:/comp/env/jdbc/TestDB
46
+ driver: com.mysql.jdbc.Driver # JDBC driver is mandatory here
47
+
48
+ == Generic Pool
49
+
50
+ If there's no "official" pool for your database, or would like to use a
51
+ different version of a JDBC driver for a supported Trinidad pool, this allows
52
+ you to completely customize a pool.
53
+
54
+ NOTE: You will need a JDBC driver for your database, check the driver DB if
55
+ unsure about how to get one http://developers.sun.com/product/jdbc/drivers
56
+
57
+ Sample configuration for a DB2 database :
58
+
59
+ ---
60
+ extensions:
61
+ generic_dbpool: # EXTENSION NAME AS KEY
62
+ jndi: 'jdbc/MyDB' # JNDI name
63
+ url: 'jdbc:db2://127.0.0.1:50000/MYDB' # specify full jdbc: URL
64
+ username: 'mydb' # database username
65
+ password: 'pass' # database password
66
+ driverPath: '/opt/IBM/DB2/db2jcc4.jar' # leave out if it's on class-path
67
+ driverName: com.ibm.db2.jcc.DB2Driver # might resolve from driverPath
68
+
69
+ Beyond standard configuration options there's 2 specific options here :
70
+
71
+ * _driverPath_ should be a path to your JDBC driver archive, if you're using a
72
+ --libs jar folder with trinidad, might leave that out but make sure it's on
73
+ the class-path for each and every deployed application that requires it.
74
+
75
+ Also in case driverPath: is ommited you'll need to specify a driverName: !
38
76
 
39
- production:
40
- adapter: jdbc
41
- jndi: java:/comp/env/jdbc/TestDB
42
- driver: com.mysql.jdbc.Driver # jdbc driver is mandatory
77
+ * _driverName_ the class name implementing the JDBC driver interface, if you're
78
+ not sure check the .jar for a META-INF/services/java.sql.Driver file. If
79
+ present that file contains the class-name and you might leave driverName:
80
+ blank if you specified the jar path using driverPath: but you're going still
81
+ going to need the driver name in your database.yml
43
82
 
44
83
  == Note on Patches/Pull Requests
45
84
 
@@ -47,10 +86,9 @@ http://commons.apache.org/dbcp/configuration.html
47
86
  * Make your feature addition or bug fix.
48
87
  * Add tests for it. This is important so I don't break it in a
49
88
  future version unintentionally.
50
- * Commit, do not mess with rakefile, version, or history.
51
- (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
52
89
  * Send me a pull request. Bonus points for topic branches.
53
90
 
54
91
  == Copyright
55
92
 
56
- Copyright (c) 2010 David Calavera. See LICENSE for details.
93
+ Copyright (c) 2012 [Team Trinidad](https://github.com/trinidad).
94
+ See LICENSE (http://en.wikipedia.org/wiki/MIT_License) for details.
data/Rakefile CHANGED
@@ -31,7 +31,14 @@ def release(gem, version = nil)
31
31
  sh "gem push #{gem_file}"
32
32
  end
33
33
 
34
- all_gems = %W{ dbpool mysql_dbpool_extension postgresql_dbpool_extension mssql_dbpool_extension oracle_dbpool_extension }
34
+ all_gems = %W{
35
+ dbpool
36
+ generic_dbpool_extension
37
+ mysql_dbpool_extension
38
+ postgresql_dbpool_extension
39
+ mssql_dbpool_extension
40
+ oracle_dbpool_extension
41
+ }
35
42
  all_gems.map! { |gem| "trinidad_#{gem}" }
36
43
  all_gems.each do |gem_name|
37
44
  namespace gem_name do
@@ -1,3 +1,3 @@
1
1
  require 'trinidad_dbpool'
2
- require File.expand_path('../../trinidad-libs/postgresql-9.1-902.jdbc4', __FILE__)
2
+ load File.expand_path('../../trinidad-libs/postgresql-9.2-1002.jdbc4.jar', __FILE__)
3
3
  require 'trinidad_postgresql_dbpool_extension/postgresql_webapp_extension'
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: trinidad_postgresql_dbpool_extension
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.0
5
+ version: 0.4.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - David Calavera
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-05-31 00:00:00 Z
13
+ date: 2012-11-29 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: trinidad_dbpool
@@ -57,7 +57,7 @@ extra_rdoc_files:
57
57
  files:
58
58
  - lib/trinidad_postgresql_dbpool_extension.rb
59
59
  - lib/trinidad_postgresql_dbpool_extension/postgresql_webapp_extension.rb
60
- - trinidad-libs/postgresql-9.1-902.jdbc4.jar
60
+ - trinidad-libs/postgresql-9.2-1002.jdbc4.jar
61
61
  - History.txt
62
62
  - LICENSE
63
63
  - README.rdoc
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  requirements: []
86
86
 
87
87
  rubyforge_project:
88
- rubygems_version: 1.8.15
88
+ rubygems_version: 1.8.24
89
89
  signing_key:
90
90
  specification_version: 3
91
91
  summary: Addon to support PostgreSQL database pools in Trinidad