Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove @ManagedBean annotation #1217

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
////
*******************************************************************
* Copyright (c) 2019 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 All @@ -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