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

Updates for deprecation of the Managed Beans specification, #679 #709

Merged
merged 2 commits into from
Nov 30, 2023
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
16 changes: 1 addition & 15 deletions spec/src/main/asciidoc/architecture.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This specification defines a powerful set of complementary services that help to


The services defined by this specification allow objects to be bound to lifecycle contexts, to be injected, to be associated with interceptors and decorators, and to interact in a loosely coupled fashion by firing and observing events.
Various kinds of objects are injectable, including Jakarta Enterprise Bean 3 session beans, managed beans and Jakarta EE resources.
Various kinds of objects are injectable, including Jakarta Enterprise Bean 3 session beans, and Jakarta EE resources.
We refer to these objects in general terms as _beans_ and to instances of beans that belong to contexts as _contextual instances_.
Contextual instances may be injected into other objects by the dependency injection service.

Expand Down Expand Up @@ -84,20 +84,6 @@ Message-driven and entity beans are by nature non-contextual objects and may not

The container performs dependency injection on all session and message-driven bean instances, even those which are not contextual instances.

==== Relationship to managed beans

The Managed Beans specification defines the basic programming model for application components managed by the Jakarta EE container.

As defined by this specification, most Java classes, including all Jakarta Enterprise Beans, are managed beans.

This specification defines contextual lifecycle management and dependency injection as generic services applicable to all managed beans.

Any managed bean instance obtained via the dependency injection service is a contextual instance. It is bound to a lifecycle context and is available to other objects that execute in that context.
The container automatically creates the instance when it is needed by a client.
When the context ends, the container automatically destroys the instance.

The container performs dependency injection on all managed bean instances, even those which are not contextual instances.

==== Relationship to Jakarta Dependency Injection

The Jakarta Dependency Injection specification defines a set of annotations for the declaring injected fields, methods and constructors of a bean.
Expand Down
1 change: 0 additions & 1 deletion spec/src/main/asciidoc/core/implementation.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Portable extensions and build compatible extensions may provide other kinds of b

A _managed bean_ is a bean that is implemented by a Java class.
This class is called the _bean class_ of the managed bean.
The basic lifecycle and semantics of managed beans are defined by the Managed Beans specification.

If a managed bean has a non-static public field, its scope must be a <<normal_scope,pseudo-scope>> (for example, `@Dependent` or `@Singleton`).
If a managed bean with a non-static public field declares a normal scope, the container automatically detects the problem and treats it as a definition error.
Expand Down
4 changes: 2 additions & 2 deletions spec/src/main/asciidoc/core/lifecycle.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ The actual mechanics of bean creation and destruction varies according to what k

==== Lifecycle of managed beans

When the `create()` method of the `Bean` object that represents a managed bean is called, the container obtains an instance of the bean, as defined by the Managed Beans specification, calling the bean constructor as defined by <<instantiation>>, and performing dependency injection as defined in <<fields_initializer_methods>>.
When the `create()` method of the `Bean` object that represents a managed bean is called, the container obtains an instance of the bean, calling the bean constructor as defined by <<instantiation>>, and performing dependency injection as defined in <<fields_initializer_methods>>.

When the `destroy()` method is called, the container destroys the instance, as defined by the Managed Beans specification, and any dependent objects, as defined in <<dependent_objects_destruction>>.
When the `destroy()` method is called, the container destroys the instance, and any dependent objects, as defined in <<dependent_objects_destruction>>.



Expand Down