@@ -2274,7 +2274,7 @@ the __scope__ of the objects created from a particular bean definition. This app
22742274powerful and flexible in that you can __choose__ the scope of the objects you create
22752275through configuration instead of having to bake in the scope of an object at the Java
22762276class level. Beans can be defined to be deployed in one of a number of scopes: out of
2277- the box, the Spring Framework supports five scopes, three of which are available only if
2277+ the box, the Spring Framework supports seven scopes, five of which are available only if
22782278you use a web-aware `ApplicationContext`.
22792279
22802280The following scopes are supported out of the box. You can also create
@@ -2301,14 +2301,18 @@ The following scopes are supported out of the box. You can also create
23012301| Scopes a single bean definition to the lifecycle of an HTTP `Session`. Only valid in
23022302 the context of a web-aware Spring `ApplicationContext`.
23032303
2304- | <<beans-factory-scopes-global-session,global session >>
2304+ | <<beans-factory-scopes-global-session,globalSession >>
23052305| Scopes a single bean definition to the lifecycle of a global HTTP `Session`. Typically
2306- only valid when used in a portlet context. Only valid in the context of a web-aware
2306+ only valid when used in a Portlet context. Only valid in the context of a web-aware
23072307 Spring `ApplicationContext`.
23082308
23092309| <<beans-factory-scopes-application,application>>
23102310| Scopes a single bean definition to the lifecycle of a `ServletContext`. Only valid in
23112311 the context of a web-aware Spring `ApplicationContext`.
2312+
2313+ | <<websocket-stomp-websocket-scope,websocket>>
2314+ | Scopes a single bean definition to the lifecycle of a `WebSocket`. Only valid in
2315+ the context of a web-aware Spring `ApplicationContext`.
23122316|===
23132317
23142318[NOTE]
@@ -2418,22 +2422,22 @@ runtime more than once, see <<beans-factory-method-injection>>
24182422
24192423
24202424[[beans-factory-scopes-other]]
2421- === Request , session, and global session scopes
2425+ === request , session, globalSession, application, and websocket scopes
24222426
2423- The `request`, `session`, and `global session` scopes are __only__ available if you use
2424- a web-aware Spring `ApplicationContext` implementation (such as
2425- `XmlWebApplicationContext`). If you use these scopes with regular Spring IoC containers
2426- such as the `ClassPathXmlApplicationContext`, you get an `IllegalStateException`
2427- complaining about an unknown bean scope.
2427+ The `request`, `session`, `globalSession`, `application`, and `websocket` scopes are
2428+ __only__ available if you use a web-aware Spring `ApplicationContext` implementation
2429+ (such as `XmlWebApplicationContext`). If you use these scopes with regular Spring IoC
2430+ containers such as the `ClassPathXmlApplicationContext`, an `IllegalStateException` will
2431+ be thrown complaining about an unknown bean scope.
24282432
24292433
24302434[[beans-factory-scopes-other-web-configuration]]
24312435==== Initial web configuration
24322436
2433- To support the scoping of beans at the `request`, `session`, and `global session` levels
2434- (web-scoped beans), some minor initial configuration is required before you define your
2435- beans. (This initial setup is __not__ required for the standard scopes, `singleton` and
2436- `prototype`.)
2437+ To support the scoping of beans at the `request`, `session`, `globalSession`,
2438+ `application`, and `websocket` levels (web-scoped beans), some minor initial
2439+ configuration is required before you define your beans. (This initial setup is __not__
2440+ required for the standard scopes, `singleton` and `prototype`.)
24372441
24382442How you accomplish this initial setup depends on your particular Servlet environment.
24392443
@@ -2543,15 +2547,15 @@ Consider the following bean definition:
25432547 <bean id="userPreferences" class="com.foo.UserPreferences" scope="globalSession"/>
25442548----
25452549
2546- The `global session ` scope is similar to the standard HTTP `Session` scope
2550+ The `globalSession ` scope is similar to the standard HTTP `Session` scope
25472551(<<beans-factory-scopes-session,described above>>), and applies only in the context of
25482552portlet-based web applications. The portlet specification defines the notion of a global
25492553`Session` that is shared among all portlets that make up a single portlet web
2550- application. Beans defined at the `global session ` scope are scoped (or bound) to the
2554+ application. Beans defined at the `globalSession ` scope are scoped (or bound) to the
25512555lifetime of the global portlet `Session`.
25522556
25532557If you write a standard Servlet-based web application and you define one or more beans
2554- as having `global session ` scope, the standard HTTP `Session` scope is used, and no
2558+ as having `globalSession ` scope, the standard HTTP `Session` scope is used, and no
25552559error is raised.
25562560
25572561
0 commit comments