Skip to content

Commit

Permalink
Remove @ManagedBean annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-krueger committed Feb 9, 2024
1 parent ece5f07 commit 83572fe
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
[[change-log]]
== Change Log

include::_changes-since-3.1-release.adoc[]

include::_changes-since-3.0-release.adoc[]

include::_changes-since-2.1-release.adoc[]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
////
*******************************************************************
* Copyright (c) 2024 Eclipse Foundation
*
* This specification document is made available under the terms
* of the Eclipse Foundation Specification License v1.0, which is
* available at https://www.eclipse.org/legal/efsl.php.
*******************************************************************
////

[[changes-since-3.1-release]]
=== Changes Since 3.1 Release

* <<javaee>>: Removal of `@ManagedBean`
annotation support. Managed bean support is now part of CDI.
42 changes: 2 additions & 40 deletions jaxrs-spec/src/main/asciidoc/chapters/environment/_javaee.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
////
*******************************************************************
* Copyright (c) 2019, 2020 Eclipse Foundation
* Copyright (c) 2019, 2024 Eclipse Foundation
*
* This specification document is made available under the terms
* of the Eclipse Foundation Specification License v1.0, which is
Expand Down Expand Up @@ -37,43 +37,6 @@ Additionally, web application’s `<context-param>` and servlet’s
server-side features or injected into server-side JAX-RS components. See
Javadoc for `Application.getProperties` for more information.

[[managed_beans]]
==== Managed Beans

In a product that supports Managed Beans, implementations MUST support
the use of Managed Beans as root resource classes, providers and
`Application` subclasses.

For example, a bean that uses a managed-bean interceptor can be defined
as a JAX-RS resource as follows:

[source,java]
----
@ManagedBean
@Path("/managedbean")
public class ManagedBeanResource {
public static class MyInterceptor {
@AroundInvoke
public String around(InvocationContext ctx) throws Exception {
System.out.println("around() called");
return (String) ctx.proceed();
}
}
@GET
@Produces("text/plain")
@Interceptors(MyInterceptor.class)
public String getIt() {
return "Hi managedbean!";
}
}
----

The example above uses a managed-bean interceptor to intercept calls to
the resource method `getIt`. See <<additional_reqs>> for
additional requirements on Managed Beans.

[[cdi]]
==== Context and Dependency Injection (CDI)

Expand Down Expand Up @@ -203,8 +166,7 @@ form `application/*+xml`.
[[additional_reqs]]
==== Additional Requirements

The following additional requirements apply when using Managed Beans,
CDI-style Beans or EJBs as resource classes, providers or `Application`
The following additional requirements apply when using CDI-style Beans or EJBs as resource classes, providers or `Application`
subclasses:

* For JAX-RS resources and providers where the JAX-RS implementation
Expand Down

0 comments on commit 83572fe

Please sign in to comment.