rjack-jetty 6.1.26.0-java → 7.2.2.0-java

Sign up to get free protection for your applications and to get access to all the features.
data/History.rdoc CHANGED
@@ -1,3 +1,13 @@
1
+ === 7.2.2.0 (2010-12-28)
2
+
3
+ * Update to Jetty 7.2.2. This is major upgrade with broad java package
4
+ name changes, class name changes, and API changes. See
5
+ {Porting to Jetty 7}[http://wiki.eclipse.org/Jetty/Starting/Porting_to_Jetty_7]
6
+ for general details. Some notable changes for gem users:
7
+ * {Handler.handle()}[http://download.eclipse.org/jetty/stable-7/apidocs/org/eclipse/jetty/server/Handler.html#handle%28java.lang.String,%20org.eclipse.jetty.server.Request,%20javax.servlet.http.HttpServletRequest,%20javax.servlet.http.HttpServletResponse%29] interface changed.
8
+ * Context renamed to ServletContextHandler.
9
+ * QueuedThreadPool no longer supports a low_threads (low resource) property.
10
+
1
11
  === 6.1.26.0 (2010-12-28)
2
12
  * Update to Jetty 6.1.26
3
13
 
data/Manifest.txt CHANGED
@@ -14,8 +14,15 @@ test/test_jetty.rb
14
14
  webapps/test/index.html
15
15
  webapps/test/WEB-INF/web.xml
16
16
  webapps/test.war
17
- lib/rjack-jetty/jetty-6.1.26.jar
18
- lib/rjack-jetty/jetty-rewrite-handler-6.1.26.jar
19
- lib/rjack-jetty/jetty-util-6.1.26.jar
17
+ lib/rjack-jetty/jetty-continuation-7.2.2.v20101205.jar
18
+ lib/rjack-jetty/jetty-http-7.2.2.v20101205.jar
19
+ lib/rjack-jetty/jetty-io-7.2.2.v20101205.jar
20
+ lib/rjack-jetty/jetty-rewrite-7.2.2.v20101205.jar
21
+ lib/rjack-jetty/jetty-security-7.2.2.v20101205.jar
22
+ lib/rjack-jetty/jetty-server-7.2.2.v20101205.jar
23
+ lib/rjack-jetty/jetty-servlet-7.2.2.v20101205.jar
24
+ lib/rjack-jetty/jetty-util-7.2.2.v20101205.jar
25
+ lib/rjack-jetty/jetty-webapp-7.2.2.v20101205.jar
26
+ lib/rjack-jetty/jetty-xml-7.2.2.v20101205.jar
20
27
  lib/rjack-jetty/rjack-jetty-1.0.jar
21
- lib/rjack-jetty/servlet-api-2.5-20081211.jar
28
+ lib/rjack-jetty/servlet-api-2.5.jar
data/README.rdoc CHANGED
@@ -75,43 +75,20 @@ permissions and limitations under the License.
75
75
 
76
76
  === Jetty Web Container (Java)
77
77
 
78
- Copyright (c) 1995-2006 Mort Bay Consulting Pty Ltd
79
-
80
- Licensed under the Apache License, Version 2.0 (the "License");
81
- you may not use this file except in compliance with the License.
82
- You may obtain a copy of the License at
83
-
84
- http://www.apache.org/licenses/LICENSE-2.0
85
-
86
- Unless required by applicable law or agreed to in writing, software
87
- distributed under the License is distributed on an "AS IS" BASIS,
88
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
89
- See the License for the specific language governing permissions and
90
- limitations under the License.
78
+ Copyright (c) 1995-2009 Mort Bay Consulting Pty Ltd
91
79
 
92
80
  The Jetty Web Container is Copyright Mort Bay Consulting Pty Ltd
93
- unless otherwise noted. It is licensed under the apache 2.0
94
- license.
81
+ unless otherwise noted. It is dual licensed under the apache 2.0
82
+ license and eclipse 1.0 license. Jetty may be distributed under
83
+ either license.
95
84
 
96
- The javax.servlet package used by Jetty is copyright
97
- Sun Microsystems, Inc and Apache Software Foundation. It is
98
- distributed under the Common Development and Distribution License.
99
- You can obtain a copy of the license at
100
- https://glassfish.dev.java.net/public/CDDLv1.0.html.
85
+ The javax.servlet package used was sourced from the Apache
86
+ Software Foundation and is distributed under the apache 2.0
87
+ license.
101
88
 
102
- The UnixCrypt.java code ~Implements the one way cryptography used by
89
+ The UnixCrypt.java code implements the one way cryptography used by
103
90
  Unix systems for simple password protection. Copyright 1996 Aki Yoshida,
104
91
  modified April 2001 by Iris Van den Broeke, Daniel Deville.
105
92
  Permission to use, copy, modify and distribute UnixCrypt
106
93
  for non-commercial or commercial purposes and without fee is
107
94
  granted provided that the copyright notice appears in all copies.
108
-
109
- The default JSP implementation is provided by the Glassfish JSP engine
110
- from project Glassfish http://glassfish.dev.java.net. Copyright 2005
111
- Sun Microsystems, Inc. and portions Copyright Apache Software Foundation.
112
-
113
- Some portions of the code are Copyright:
114
- 2006 Tim Vernum
115
- 1999 Jason Gilbert.
116
-
117
- The jboss integration module contains some LGPL code.
data/Rakefile CHANGED
@@ -20,9 +20,9 @@ end
20
20
 
21
21
  t.jars =
22
22
  begin
23
- mods = %w{ jetty jetty-util jetty-rewrite-handler }
24
- l = mods.map { |n| "#{n}-#{ Jetty::JETTY_VERSION }.jar" }
25
- l << "servlet-api-#{ Jetty::SERVLET_API_VERSION }-#{ Jetty::SERVLET_API_DATE }.jar"
23
+ mods = %w[ webapp xml servlet security server continuation http io util rewrite ]
24
+ l = mods.map { |n| "jetty-#{n}-#{ Jetty::JETTY_VERSION }.#{ Jetty::JETTY_BUILD }.jar" }
25
+ l << "servlet-api-#{ Jetty::SERVLET_API_VERSION }.jar"
26
26
  l << 'rjack-jetty-1.0.jar'
27
27
  l
28
28
  end
@@ -40,8 +40,8 @@ t.generated_files = 'webapps/test.war'
40
40
  t.assembly_version = 1.0
41
41
 
42
42
  task :check_pom_deps do
43
- t.test_line_match( 'pom.xml',
44
- %r[<version>#{ Jetty::JETTY_VERSION }</version>] )
43
+ v = "#{ Jetty::JETTY_VERSION }.#{ Jetty::JETTY_BUILD }"
44
+ t.test_line_match( 'pom.xml', %r{<version>#{ v }</version>} )
45
45
  end
46
46
  task :check_history_version do
47
47
  t.test_line_match( 'History.rdoc', /^==/, / #{t.version} / )
data/assembly.xml CHANGED
@@ -7,10 +7,17 @@
7
7
  <dependencySets>
8
8
  <dependencySet>
9
9
  <includes>
10
- <include>org.mortbay.jetty:jetty</include>
11
- <include>org.mortbay.jetty:jetty-util</include>
12
- <include>org.mortbay.jetty:jetty-rewrite-handler</include>
13
- <include>org.mortbay.jetty:servlet-api</include>
10
+ <include>org.eclipse.jetty:jetty-servlet</include>
11
+ <include>org.eclipse.jetty:jetty-security</include>
12
+ <include>org.eclipse.jetty:jetty-server</include>
13
+ <include>org.eclipse.jetty:jetty-continuation</include>
14
+ <include>org.eclipse.jetty:jetty-http</include>
15
+ <include>org.eclipse.jetty:jetty-io</include>
16
+ <include>org.eclipse.jetty:jetty-xml</include>
17
+ <include>org.eclipse.jetty:jetty-webapp</include>
18
+ <include>org.eclipse.jetty:jetty-util</include>
19
+ <include>org.eclipse.jetty:jetty-rewrite</include>
20
+ <include>javax.servlet:servlet-api</include>
14
21
  <include>rjack:rjack-jetty</include>
15
22
  </includes>
16
23
  </dependencySet>
data/lib/rjack-jetty.rb CHANGED
@@ -25,31 +25,37 @@ module RJack
25
25
  module Jetty
26
26
 
27
27
  def self.require_jar( name )
28
- require File.join( JETTY_DIR, "#{name}-#{ JETTY_VERSION }.jar" )
28
+ require File.join( JETTY_DIR, "#{name}-#{ JETTY_VERSION }.#{ JETTY_BUILD }.jar" )
29
29
  end
30
30
 
31
- require_jar 'jetty'
31
+ require_jar 'jetty-io'
32
+ require_jar 'jetty-http'
33
+ require_jar 'jetty-continuation'
34
+ require_jar 'jetty-server'
35
+ require_jar 'jetty-security'
36
+ require_jar 'jetty-servlet'
37
+ require_jar 'jetty-xml'
38
+ require_jar 'jetty-webapp'
32
39
  require_jar 'jetty-util'
33
40
 
34
- require File.join( JETTY_DIR,
35
- "servlet-api-#{ SERVLET_API_VERSION }-#{ SERVLET_API_DATE }.jar" )
41
+ require File.join( JETTY_DIR, "servlet-api-#{ SERVLET_API_VERSION }.jar" )
36
42
 
37
- import 'org.mortbay.jetty.Connector'
38
- import 'org.mortbay.jetty.Handler'
39
- import 'org.mortbay.jetty.NCSARequestLog'
40
- import 'org.mortbay.jetty.Server'
41
- import 'org.mortbay.jetty.handler.AbstractHandler'
42
- import 'org.mortbay.jetty.handler.ContextHandler'
43
- import 'org.mortbay.jetty.handler.ContextHandlerCollection'
44
- import 'org.mortbay.jetty.handler.DefaultHandler'
45
- import 'org.mortbay.jetty.handler.HandlerCollection'
46
- import 'org.mortbay.jetty.handler.RequestLogHandler'
47
- import 'org.mortbay.jetty.handler.ResourceHandler'
48
- import 'org.mortbay.jetty.nio.SelectChannelConnector'
49
- import 'org.mortbay.jetty.servlet.Context'
50
- import 'org.mortbay.jetty.servlet.ServletHolder'
51
- import 'org.mortbay.jetty.webapp.WebAppContext'
52
- import 'org.mortbay.thread.QueuedThreadPool'
43
+ import 'org.eclipse.jetty.server.Connector'
44
+ import 'org.eclipse.jetty.server.Handler'
45
+ import 'org.eclipse.jetty.server.NCSARequestLog'
46
+ import 'org.eclipse.jetty.server.Server'
47
+ import 'org.eclipse.jetty.server.handler.AbstractHandler'
48
+ import 'org.eclipse.jetty.server.handler.ContextHandler'
49
+ import 'org.eclipse.jetty.server.handler.ContextHandlerCollection'
50
+ import 'org.eclipse.jetty.server.handler.DefaultHandler'
51
+ import 'org.eclipse.jetty.server.handler.HandlerCollection'
52
+ import 'org.eclipse.jetty.server.handler.RequestLogHandler'
53
+ import 'org.eclipse.jetty.server.handler.ResourceHandler'
54
+ import 'org.eclipse.jetty.server.nio.SelectChannelConnector'
55
+ import 'org.eclipse.jetty.servlet.ServletContextHandler'
56
+ import 'org.eclipse.jetty.servlet.ServletHolder'
57
+ import 'org.eclipse.jetty.webapp.WebAppContext'
58
+ import 'org.eclipse.jetty.util.thread.QueuedThreadPool'
53
59
 
54
60
  # A factory for creating complete org.morbay.jetty.Server
55
61
  # instances. Provides a general purpose facade for setup including
@@ -67,7 +73,7 @@ module RJack
67
73
  # factory.static_contexts[ '/html' ] = '/var/www/html'
68
74
  #
69
75
  # # Implement custom handler and register it.
70
- # import 'org.mortbay.jetty.handler.AbstractHandler'
76
+ # import 'org.eclipse.jetty.handler.AbstractHandler'
71
77
  # class RedirectHandler < AbstractHandler
72
78
  #
73
79
  # def initialize( redirects )
@@ -75,11 +81,11 @@ module RJack
75
81
  # @redirects = redirects
76
82
  # end
77
83
  #
78
- # def handle( target, request, response, dispatch )
84
+ # def handle( target, base_request, request, response )
79
85
  # goto = @redirects[ target ]
80
86
  # unless goto.nil?
81
87
  # response.send_redirect( goto )
82
- # request.handled = true
88
+ # base_request.handled = true
83
89
  # end
84
90
  # end
85
91
  # end
@@ -109,7 +115,7 @@ module RJack
109
115
  #
110
116
  class ServerFactory
111
117
  attr_accessor( :port, :max_idle_time_ms,
112
- :max_threads, :low_threads, :min_threads,
118
+ :max_threads, :min_threads,
113
119
  :static_contexts, :static_welcome_files,
114
120
  :webapp_contexts,
115
121
  :servlet_contexts,
@@ -119,7 +125,6 @@ module RJack
119
125
  def initialize
120
126
  @port = 0 # Use any available port
121
127
  @max_threads = 20
122
- @low_threads = 0 # No low thread threshold
123
128
  @min_threads = nil # Compute from max_threads
124
129
  @max_idle_time_ms = 10000
125
130
  @static_contexts = {}
@@ -148,20 +153,19 @@ module RJack
148
153
  server
149
154
  end
150
155
 
151
- # Return a org.mortbay.thread.ThreadPool implementation.
156
+ # Return a org.eclipse.thread.ThreadPool implementation.
152
157
  #
153
- # This implementation creates a QueuedThreadPool with min_threads
154
- # (default max_threads / 4), any low_threads, and max_threads
158
+ # This implementation creates a QueuedThreadPool with
159
+ # min_threads (default max_threads / 4), and max_threads
155
160
  # (default 20).
156
161
  def create_pool
157
162
  pool = QueuedThreadPool.new
158
163
  pool.min_threads = [ @min_threads || ( @max_threads / 4 ), 1 ].max
159
- pool.low_threads = @low_threads
160
- pool.max_threads = [ @max_threads, 2 ].max
164
+ pool.max_threads = [ @max_threads, 3 ].max
161
165
  pool
162
166
  end
163
167
 
164
- # Return array of org.mortbay.jetty.Connector instances.
168
+ # Return array of org.eclipse.jetty.Connector instances.
165
169
  #
166
170
  # This implementation returns a single SelectChannelConnector
167
171
  # listening to the given port or an auto-selected avaiable
@@ -173,7 +177,7 @@ module RJack
173
177
  [ connector ]
174
178
  end
175
179
 
176
- # Returns an Array of org.mortbay.jetty.Handler instances.
180
+ # Returns an Array of org.eclipse.jetty.Handler instances.
177
181
  #
178
182
  # This implementation concatenates create_pre_handlers and
179
183
  # create_post_handlers.
@@ -181,7 +185,7 @@ module RJack
181
185
  ( create_pre_handlers + create_post_handlers )
182
186
  end
183
187
 
184
- # Returns an Array of "pre" org.mortbay.jetty.Handler instances.
188
+ # Returns an Array of "pre" org.eclipse.jetty.Handler instances.
185
189
  #
186
190
  # This implementation returns an array containing a single
187
191
  # ContextHandlerCollection which itself contains the context
@@ -198,7 +202,7 @@ module RJack
198
202
  end
199
203
  end
200
204
 
201
- # Returns an Array of "post" org.mortbay.jetty.Handler instances.
205
+ # Returns an Array of "post" org.eclipse.jetty.Handler instances.
202
206
  #
203
207
  # This implementation returns a DefaultHandler instance, and any
204
208
  # handler returned by create_request_log_handler.
@@ -231,7 +235,7 @@ module RJack
231
235
  # Set a context of servlets given context_path, a servlets hash
232
236
  # (mapping path to Servlet), and options.
233
237
  def set_context_servlets( context_path, servlets,
234
- options = Context::NO_SESSIONS )
238
+ options = ServletContextHandler::NO_SESSIONS )
235
239
  @servlet_contexts[ context_path ] = [ servlets, options ]
236
240
  end
237
241
 
@@ -239,7 +243,7 @@ module RJack
239
243
  def create_servlet_contexts( context_handler_collection )
240
244
  @servlet_contexts.each do |ctx, s_o|
241
245
  servlets, options = s_o
242
- context = Context.new( context_handler_collection, ctx, options )
246
+ context = ServletContextHandler.new( context_handler_collection, ctx, options )
243
247
  servlets.each do |path, servlet|
244
248
  context.add_servlet( ServletHolder.new( servlet ), path )
245
249
  end
@@ -16,10 +16,10 @@
16
16
 
17
17
  module RJack
18
18
  module Jetty
19
- JETTY_VERSION = '6.1.26'
19
+ JETTY_VERSION = '7.2.2'
20
20
  VERSION = JETTY_VERSION + '.0'
21
+ JETTY_BUILD = 'v20101205'
21
22
  SERVLET_API_VERSION = '2.5'
22
- SERVLET_API_DATE = '20081211'
23
23
 
24
24
  JETTY_DIR = File.dirname( __FILE__ ) # :nodoc:
25
25
  end
Binary file
Binary file
data/pom.xml CHANGED
@@ -10,21 +10,33 @@
10
10
  <dependencies>
11
11
 
12
12
  <dependency>
13
- <groupId>org.mortbay.jetty</groupId>
14
- <artifactId>jetty</artifactId>
15
- <version>6.1.26</version>
13
+ <groupId>org.eclipse.jetty</groupId>
14
+ <artifactId>jetty-servlet</artifactId>
15
+ <version>7.2.2.v20101205</version>
16
16
  </dependency>
17
17
 
18
18
  <dependency>
19
- <groupId>org.mortbay.jetty</groupId>
19
+ <groupId>org.eclipse.jetty</groupId>
20
+ <artifactId>jetty-server</artifactId>
21
+ <version>7.2.2.v20101205</version>
22
+ </dependency>
23
+
24
+ <dependency>
25
+ <groupId>org.eclipse.jetty</groupId>
26
+ <artifactId>jetty-webapp</artifactId>
27
+ <version>7.2.2.v20101205</version>
28
+ </dependency>
29
+
30
+ <dependency>
31
+ <groupId>org.eclipse.jetty</groupId>
20
32
  <artifactId>jetty-util</artifactId>
21
- <version>6.1.26</version>
33
+ <version>7.2.2.v20101205</version>
22
34
  </dependency>
23
35
 
24
36
  <dependency>
25
- <groupId>org.mortbay.jetty</groupId>
26
- <artifactId>jetty-rewrite-handler</artifactId>
27
- <version>6.1.26</version>
37
+ <groupId>org.eclipse.jetty</groupId>
38
+ <artifactId>jetty-rewrite</artifactId>
39
+ <version>7.2.2.v20101205</version>
28
40
  </dependency>
29
41
 
30
42
  </dependencies>
data/test/test_jetty.rb CHANGED
@@ -72,10 +72,10 @@ class TestJetty < Test::Unit::TestCase
72
72
  class TestHandler < AbstractHandler
73
73
  TEST_TEXT = 'test handler text'
74
74
 
75
- def handle( target, request, response, dispatch )
75
+ def handle( target, base_request, request, response )
76
76
  response.content_type = "text/plain"
77
77
  response.writer.write( TEST_TEXT )
78
- request.handled = true
78
+ base_request.handled = true
79
79
  end
80
80
  end
81
81
 
data/webapps/test.war CHANGED
Binary file
metadata CHANGED
@@ -3,11 +3,11 @@ name: rjack-jetty
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
- - 6
7
- - 1
8
- - 26
6
+ - 7
7
+ - 2
8
+ - 2
9
9
  - 0
10
- version: 6.1.26.0
10
+ version: 7.2.2.0
11
11
  platform: java
12
12
  authors:
13
13
  - David Kellum
@@ -92,11 +92,18 @@ files:
92
92
  - webapps/test/index.html
93
93
  - webapps/test/WEB-INF/web.xml
94
94
  - webapps/test.war
95
- - lib/rjack-jetty/jetty-6.1.26.jar
96
- - lib/rjack-jetty/jetty-rewrite-handler-6.1.26.jar
97
- - lib/rjack-jetty/jetty-util-6.1.26.jar
95
+ - lib/rjack-jetty/jetty-continuation-7.2.2.v20101205.jar
96
+ - lib/rjack-jetty/jetty-http-7.2.2.v20101205.jar
97
+ - lib/rjack-jetty/jetty-io-7.2.2.v20101205.jar
98
+ - lib/rjack-jetty/jetty-rewrite-7.2.2.v20101205.jar
99
+ - lib/rjack-jetty/jetty-security-7.2.2.v20101205.jar
100
+ - lib/rjack-jetty/jetty-server-7.2.2.v20101205.jar
101
+ - lib/rjack-jetty/jetty-servlet-7.2.2.v20101205.jar
102
+ - lib/rjack-jetty/jetty-util-7.2.2.v20101205.jar
103
+ - lib/rjack-jetty/jetty-webapp-7.2.2.v20101205.jar
104
+ - lib/rjack-jetty/jetty-xml-7.2.2.v20101205.jar
98
105
  - lib/rjack-jetty/rjack-jetty-1.0.jar
99
- - lib/rjack-jetty/servlet-api-2.5-20081211.jar
106
+ - lib/rjack-jetty/servlet-api-2.5.jar
100
107
  has_rdoc: true
101
108
  homepage: http://rjack.rubyforge.org
102
109
  licenses: []
Binary file
Binary file