trinidad_mssql_dbpool_extension 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 David Calavera
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,56 @@
1
+ = trinidad-dbpool
2
+
3
+ Trinidad extensions to support database connection pools configured into the Apache Tomcat
4
+ container.
5
+
6
+ == Pools supported
7
+
8
+ * MySql (trinidad_mysql_dbpool_extension)
9
+ * PostgreSQL (trinidad_postgresql_dbpool_extension)
10
+ * Mssql (trinidad_mssql_dbpool_extension)
11
+ * Oracle (trinidad_oracle_dbpool_extension)
12
+
13
+ == Usage
14
+
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:
17
+
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:
32
+
33
+ http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html
34
+
35
+ http://commons.apache.org/dbcp/configuration.html
36
+
37
+ * Configure your rails application to use jndi into the config/database.yml
38
+
39
+ production:
40
+ adapter: jdbc
41
+ jndi: java:/comp/env/jdbc/TestDB
42
+ driver: com.mysql.jdbc.Driver # jdbc driver is mandatory
43
+
44
+ == Note on Patches/Pull Requests
45
+
46
+ * Fork the project.
47
+ * Make your feature addition or bug fix.
48
+ * Add tests for it. This is important so I don't break it in a
49
+ 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
+ * Send me a pull request. Bonus points for topic branches.
53
+
54
+ == Copyright
55
+
56
+ Copyright (c) 2010 David Calavera. See LICENSE for details.
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.3.0
@@ -0,0 +1,3 @@
1
+ require 'trinidad_dbpool'
2
+ require File.expand_path('../../trinidad-libs/jtds-1.2.5', __FILE__)
3
+ require 'trinidad_mssql_dbpool_extension/mssql_webapp_extension'
@@ -0,0 +1,13 @@
1
+ module Trinidad
2
+ module Extensions
3
+ class MssqlDbpoolWebAppExtension < DbpoolWebAppExtension
4
+ def driver_name
5
+ 'net.sourceforge.jtds.jdbc.Driver'
6
+ end
7
+
8
+ def protocol
9
+ 'jdbc:jtds:sqlserver://'
10
+ end
11
+ end
12
+ end
13
+ end
Binary file
metadata ADDED
@@ -0,0 +1,127 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: trinidad_mssql_dbpool_extension
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.3.0
6
+ platform: ruby
7
+ authors:
8
+ - Brian Tatnall
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2011-07-05 00:00:00 -05:00
14
+ default_executable:
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: trinidad_dbpool
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: "0"
25
+ type: :runtime
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ prerelease: false
30
+ requirement: &id002 !ruby/object:Gem::Requirement
31
+ none: false
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: 1.2.9
36
+ type: :development
37
+ version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
39
+ name: mocha
40
+ prerelease: false
41
+ requirement: &id003 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: "0"
47
+ type: :development
48
+ version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
50
+ name: trinidad_dbpool
51
+ prerelease: false
52
+ requirement: &id004 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: "0"
58
+ type: :runtime
59
+ version_requirements: *id004
60
+ - !ruby/object:Gem::Dependency
61
+ name: rspec
62
+ prerelease: false
63
+ requirement: &id005 !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 1.2.9
69
+ type: :development
70
+ version_requirements: *id005
71
+ - !ruby/object:Gem::Dependency
72
+ name: mocha
73
+ prerelease: false
74
+ requirement: &id006 !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: "0"
80
+ type: :development
81
+ version_requirements: *id006
82
+ description: Addon to support Mssql database pools in Trinidad
83
+ email: btatnall@gmail.com
84
+ executables: []
85
+
86
+ extensions: []
87
+
88
+ extra_rdoc_files:
89
+ - LICENSE
90
+ - README.rdoc
91
+ files:
92
+ - LICENSE
93
+ - README.rdoc
94
+ - VERSION
95
+ - lib/trinidad_mssql_dbpool_extension.rb
96
+ - lib/trinidad_mssql_dbpool_extension/mssql_webapp_extension.rb
97
+ - trinidad-libs/jtds-1.2.5.jar
98
+ has_rdoc: true
99
+ homepage: http://github.com/calavera/trinidad-dbpool
100
+ licenses: []
101
+
102
+ post_install_message:
103
+ rdoc_options: []
104
+
105
+ require_paths:
106
+ - lib
107
+ required_ruby_version: !ruby/object:Gem::Requirement
108
+ none: false
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: "0"
113
+ required_rubygems_version: !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: "0"
119
+ requirements: []
120
+
121
+ rubyforge_project:
122
+ rubygems_version: 1.5.1
123
+ signing_key:
124
+ specification_version: 3
125
+ summary: Addon to support Mssql database pools in Trinidad
126
+ test_files: []
127
+