Skip to content

Commit 673dac5

Browse files
committed
Removed outdated references to Servlet 2.3/2.4
1 parent 6892ad4 commit 673dac5

File tree

16 files changed

+84
-59
lines changed

16 files changed

+84
-59
lines changed

spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/support/OpenSessionInViewFilter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -38,7 +38,7 @@
3838
import org.springframework.web.filter.OncePerRequestFilter;
3939

4040
/**
41-
* Servlet 2.3 Filter that binds a Hibernate Session to the thread for the entire
41+
* Servlet Filter that binds a Hibernate Session to the thread for the entire
4242
* processing of the request. Intended for the "Open Session in View" pattern,
4343
* i.e. to allow for lazy loading in web views despite the original transactions
4444
* already being completed.
@@ -98,6 +98,7 @@ protected String getSessionFactoryBeanName() {
9898
return this.sessionFactoryBeanName;
9999
}
100100

101+
101102
/**
102103
* Returns "false" so that the filter may re-bind the opened Hibernate
103104
* {@code Session} to each asynchronously dispatched thread and postpone

spring-orm/src/main/java/org/springframework/orm/hibernate3/support/OpenSessionInViewFilter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -38,7 +38,7 @@
3838
import org.springframework.web.filter.OncePerRequestFilter;
3939

4040
/**
41-
* Servlet 2.3 Filter that binds a Hibernate Session to the thread for the entire
41+
* Servlet Filter that binds a Hibernate Session to the thread for the entire
4242
* processing of the request. Intended for the "Open Session in View" pattern,
4343
* i.e. to allow for lazy loading in web views despite the original transactions
4444
* already being completed.
@@ -164,6 +164,7 @@ protected FlushMode getFlushMode() {
164164
return this.flushMode;
165165
}
166166

167+
167168
/**
168169
* Returns "false" so that the filter may re-bind the opened Hibernate
169170
* {@code Session} to each asynchronously dispatched thread and postpone

spring-orm/src/main/java/org/springframework/orm/jdo/support/OpenPersistenceManagerInViewFilter.java

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,7 +32,7 @@
3232
import org.springframework.web.filter.OncePerRequestFilter;
3333

3434
/**
35-
* Servlet 2.3 Filter that binds a JDO PersistenceManager to the thread for the
35+
* Servlet Filter that binds a JDO PersistenceManager to the thread for the
3636
* entire processing of the request. Intended for the "Open PersistenceManager in
3737
* View" pattern, i.e. to allow for lazy loading in web views despite the
3838
* original transactions already being completed.
@@ -79,6 +79,25 @@ protected String getPersistenceManagerFactoryBeanName() {
7979
}
8080

8181

82+
/**
83+
* Returns "false" so that the filter may re-bind the opened {@code PersistenceManager}
84+
* to each asynchronously dispatched thread and postpone closing it until the very
85+
* last asynchronous dispatch.
86+
*/
87+
@Override
88+
protected boolean shouldNotFilterAsyncDispatch() {
89+
return false;
90+
}
91+
92+
/**
93+
* Returns "false" so that the filter may provide an {@code PersistenceManager}
94+
* to each error dispatches.
95+
*/
96+
@Override
97+
protected boolean shouldNotFilterErrorDispatch() {
98+
return false;
99+
}
100+
82101
@Override
83102
protected void doFilterInternal(
84103
HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)

spring-orm/src/main/java/org/springframework/orm/jpa/support/OpenEntityManagerInViewFilter.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@
3737
import org.springframework.web.filter.OncePerRequestFilter;
3838

3939
/**
40-
* Servlet 2.3 Filter that binds a JPA EntityManager to the thread for the
40+
* Servlet Filter that binds a JPA EntityManager to the thread for the
4141
* entire processing of the request. Intended for the "Open EntityManager in
4242
* View" pattern, i.e. to allow for lazy loading in web views despite the
4343
* original transactions already being completed.
@@ -71,6 +71,7 @@ public class OpenEntityManagerInViewFilter extends OncePerRequestFilter {
7171
*/
7272
public static final String DEFAULT_ENTITY_MANAGER_FACTORY_BEAN_NAME = "entityManagerFactory";
7373

74+
7475
private String entityManagerFactoryBeanName;
7576

7677
private String persistenceUnitName;
@@ -119,10 +120,11 @@ protected String getPersistenceUnitName() {
119120
return this.persistenceUnitName;
120121
}
121122

123+
122124
/**
123-
* Returns "false" so that the filter may re-bind the opened
124-
* {@code EntityManager} to each asynchronously dispatched thread and postpone
125-
* closing it until the very last asynchronous dispatch.
125+
* Returns "false" so that the filter may re-bind the opened {@code EntityManager}
126+
* to each asynchronously dispatched thread and postpone closing it until the very
127+
* last asynchronous dispatch.
126128
*/
127129
@Override
128130
protected boolean shouldNotFilterAsyncDispatch() {

spring-orm/src/main/java/org/springframework/orm/jpa/support/OpenEntityManagerInViewInterceptor.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -43,9 +43,8 @@
4343
* or {@link org.springframework.transaction.jta.JtaTransactionManager} as well
4444
* as for non-transactional read-only execution.
4545
*
46-
* <p>In contrast to {@link OpenEntityManagerInViewFilter}, this interceptor
47-
* is set up in a Spring application context and can thus take advantage of
48-
* bean wiring.
46+
* <p>In contrast to {@link OpenEntityManagerInViewFilter}, this interceptor is set
47+
* up in a Spring application context and can thus take advantage of bean wiring.
4948
*
5049
* @author Juergen Hoeller
5150
* @since 2.0
@@ -67,7 +66,6 @@ public class OpenEntityManagerInViewInterceptor extends EntityManagerFactoryAcce
6766

6867
@Override
6968
public void preHandle(WebRequest request) throws DataAccessException {
70-
7169
String participateAttributeName = getParticipateAttributeName();
7270

7371
WebAsyncManager asyncManager = WebAsyncUtils.getAsyncManager(request);
@@ -78,7 +76,7 @@ public void preHandle(WebRequest request) throws DataAccessException {
7876
}
7977

8078
if (TransactionSynchronizationManager.hasResource(getEntityManagerFactory())) {
81-
// do not modify the EntityManager: just mark the request accordingly
79+
// Do not modify the EntityManager: just mark the request accordingly.
8280
Integer count = (Integer) request.getAttribute(participateAttributeName, WebRequest.SCOPE_REQUEST);
8381
int newCount = (count != null ? count + 1 : 1);
8482
request.setAttribute(getParticipateAttributeName(), newCount, WebRequest.SCOPE_REQUEST);

spring-web/src/main/java/org/springframework/web/context/request/DestructionCallbackBindingListener.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,8 +21,8 @@
2121
import javax.servlet.http.HttpSessionBindingListener;
2222

2323
/**
24-
* Adapter that implements the Servlet 2.3 HttpSessionBindingListener
25-
* interface, wrapping a session destruction callback.
24+
* Adapter that implements the Servlet HttpSessionBindingListener interface,
25+
* wrapping a session destruction callback.
2626
*
2727
* @author Juergen Hoeller
2828
* @since 3.0

spring-web/src/main/java/org/springframework/web/context/request/RequestContextListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
2323
import org.springframework.context.i18n.LocaleContextHolder;
2424

2525
/**
26-
* Servlet 2.4+ listener that exposes the request to the current thread,
26+
* Servlet listener that exposes the request to the current thread,
2727
* through both {@link org.springframework.context.i18n.LocaleContextHolder} and
2828
* {@link RequestContextHolder}. To be registered as listener in {@code web.xml}.
2929
*

spring-web/src/main/java/org/springframework/web/context/support/ServletContextResourcePatternResolver.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -37,8 +37,8 @@
3737
/**
3838
* ServletContext-aware subclass of {@link PathMatchingResourcePatternResolver},
3939
* able to find matching resources below the web application root directory
40-
* via Servlet 2.3's {@code ServletContext.getResourcePaths}.
41-
* Falls back to the superclass' file system checking for other resources.
40+
* via {@link ServletContext#getResourcePaths}. Falls back to the superclass'
41+
* file system checking for other resources.
4242
*
4343
* @author Juergen Hoeller
4444
* @since 1.1.2

spring-web/src/main/java/org/springframework/web/filter/CharacterEncodingFilter.java

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2007 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,15 +23,15 @@
2323
import javax.servlet.http.HttpServletResponse;
2424

2525
/**
26-
* Servlet 2.3/2.4 Filter that allows one to specify a character encoding for
27-
* requests. This is useful because current browsers typically do not set a
28-
* character encoding even if specified in the HTML page or form.
26+
* Servlet Filter that allows one to specify a character encoding for requests.
27+
* This is useful because current browsers typically do not set a character
28+
* encoding even if specified in the HTML page or form.
2929
*
30-
* <p>This filter can either apply its encoding if the request does not
31-
* already specify an encoding, or enforce this filter's encoding in any case
30+
* <p>This filter can either apply its encoding if the request does not already
31+
* specify an encoding, or enforce this filter's encoding in any case
3232
* ("forceEncoding"="true"). In the latter case, the encoding will also be
33-
* applied as default response encoding on Servlet 2.4+ containers (although
34-
* this will usually be overridden by a full content type set in the view).
33+
* applied as default response encoding (although this will usually be overridden
34+
* by a full content type set in the view).
3535
*
3636
* @author Juergen Hoeller
3737
* @since 15.03.2004
@@ -65,9 +65,6 @@ public void setEncoding(String encoding) {
6565
* {@link javax.servlet.http.HttpServletRequest#getCharacterEncoding()}
6666
* returns a non-null value. Switch this to "true" to enforce the specified
6767
* encoding in any case, applying it as default response encoding as well.
68-
* <p>Note that the response encoding will only be set on Servlet 2.4+
69-
* containers, since Servlet 2.3 did not provide a facility for setting
70-
* a default response encoding.
7168
*/
7269
public void setForceEncoding(boolean forceEncoding) {
7370
this.forceEncoding = forceEncoding;

spring-web/src/main/java/org/springframework/web/filter/DelegatingFilterProxy.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,16 +29,16 @@
2929
import org.springframework.web.context.support.WebApplicationContextUtils;
3030

3131
/**
32-
* Proxy for a standard Servlet 2.3 Filter, delegating to a Spring-managed
33-
* bean that implements the Filter interface. Supports a "targetBeanName"
34-
* filter init-param in {@code web.xml}, specifying the name of the
35-
* target bean in the Spring application context.
32+
* Proxy for a standard Servlet Filter, delegating to a Spring-managed bean that
33+
* implements the Filter interface. Supports a "targetBeanName" filter init-param
34+
* in {@code web.xml}, specifying the name of the target bean in the Spring
35+
* application context.
3636
*
3737
* <p>{@code web.xml} will usually contain a {@code DelegatingFilterProxy} definition,
3838
* with the specified {@code filter-name} corresponding to a bean name in
3939
* Spring's root application context. All calls to the filter proxy will then
4040
* be delegated to that bean in the Spring context, which is required to implement
41-
* the standard Servlet 2.3 Filter interface.
41+
* the standard Servlet Filter interface.
4242
*
4343
* <p>This approach is particularly useful for Filter implementation with complex
4444
* setup needs, allowing to apply the full Spring bean definition machinery to
@@ -183,7 +183,7 @@ public String getContextAttribute() {
183183

184184
/**
185185
* Set the name of the target bean in the Spring application context.
186-
* The target bean must implement the standard Servlet 2.3 Filter interface.
186+
* The target bean must implement the standard Servlet Filter interface.
187187
* <p>By default, the {@code filter-name} as specified for the
188188
* DelegatingFilterProxy in {@code web.xml} will be used.
189189
*/

0 commit comments

Comments
 (0)