Skip to content

Commit

Permalink
Subsume PR 838 and rebase with HEAD of main (#855)
Browse files Browse the repository at this point in the history
* Managed Beans version should be 2.1-SNAPSHOT

Signed-off-by: Kevin Sutter <kwsutter@gmail.com>

Initial draft outline of the core profile specification

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Fix typo in CDI lite reference

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Initial draft outline of the core profile specification (#356)

* Initial draft outline of the core profile specification

Signed-off-by: Scott M Stark <starksm64@gmail.com>

* Fix typo in CDI lite reference

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Prepare next development version (#366)

Signed-off-by: Ivar Grimstad <ivar.grimstad@eclipse-foundation.org>

removal of managed beans spec content and build process

Signed-off-by: Kevin Sutter <kwsutter@gmail.com>

PNG to SVG images format conversion.

Signed-off-by: Dmitri Cherkas <dmitricerkas@yahoo.com>

1) Figure 5 converted from PNG to SVG, 2) margin of 5 mm is added to Figure 4, 3) Elements are aligned.

Signed-off-by: Dmitri Cherkas <dmitricerkas@yahoo.com>

1) Figure 6 converted from PNG to SVG, 2) error corrected in Figure 5.

Signed-off-by: Dmitri Cherkas <dmitricerkas@yahoo.com>

Figure 7 in SVG format.

Signed-off-by: Dmitri Cherkas <dmitricerkas@yahoo.com>

Figure 8 in SVG format.

Signed-off-by: Dmitri Cherkas <dmitricerkas@yahoo.com>

References in the spec from png to svg are updated as requested.

Signed-off-by: Dmitri Cherkas <dmitricerkas@yahoo.com>

JavaEEapplication_schema.svg conversion

Signed-off-by: Dmitri Cherkas <dmitricerkas@yahoo.com>

JavaEEapplication_schema.svg errata corrige and other 3 images converted.

Signed-off-by: Dmitri Cherkas <dmitricerkas@yahoo.com>

JavaEEapplication_schema.svg errata corrige and other 3 images converted.

Signed-off-by: Dmitri Cherkas <dmitricerkas@yahoo.com>

JavaEEapplication-client_schema.svg errata corrige.

Signed-off-by: Dmitri Cherkas <dmitricerkas@yahoo.com>

The next images convertion done.

Signed-off-by: Dmitri Cherkas <dmitricerkas@yahoo.com>

Last images (Platform_Spec-24.svg, Platform_Spec-23.svg, Platform_Spec-21.svg, JavaEEapplication_DTD.svg) converted.

Signed-off-by: Dmitri Cherkas <dmitricerkas@yahoo.com>

1) Errata corrige for images 22, 23, 24; 2) all of the doc references updated to point at the svg files instead of the png files.

Signed-off-by: Dmitri Cherkas <dmitricerkas@yahoo.com>

Begin work on the EE 10.0 specs
Update asciidoc related dependencies, clean up warnings and add coreprofile spec generation
Set version to 10.0

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Remove applet requirements, #298
Change Java SE 8 references to Java SE 11, #331

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Address comments from  @kazumura

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Remove applet requirements, #298, update Java SE #331 (#417)

* Remove applet requirements, #298
Change Java SE 8 references to Java SE 11, #331

Signed-off-by: Scott M Stark <starksm64@gmail.com>

* Address comments from  @kazumura

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Remove the Applet container from the diagram, #298

Signed-off-by: starksm64 <starksm64@gmail.com>

Remove applet container from interoperability diagram

Signed-off-by: starksm64 <starksm64@gmail.com>

Remove the managed bean spec generation that was readded in a PR merge.

Signed-off-by: starksm64 <starksm64@gmail.com>

Fix the out of date img references that had been converted to svg, #435

Signed-off-by: starksm64 <starksm64@gmail.com>

Various errata corriges.

Signed-off-by: Dmitri Cherkas <dmitricerkas@yahoo.com>

Broken line at the start of 8.3. Class Loading Requirements paragraph.

Signed-off-by: Dmitri Cherkas <dmitricerkas@yahoo.com>

Broken line at the end of 8.3.3. paragraph

Signed-off-by: Dmitri Cherkas <dmitricerkas@yahoo.com>

Two errata corrige: 'Jakarta instead of Jaav' and '_multitier applications_' istead of 'multitier __ applications'

Signed-off-by: Dmitri Cherkas <dmitricerkas@yahoo.com>

Update documentation regarding Java SE base level

Start a dependency graph section in the specs

Signed-off-by: starksm64 <starksm64@gmail.com>

Correct authentication label

Signed-off-by: starksm64 <starksm64@gmail.com>

Add ejb, jta child dependencies

Signed-off-by: starksm64 <starksm64@gmail.com>

Label cdi -> {jta, ejb} dependency with javadoc

Signed-off-by: starksm64 <starksm64@gmail.com>

Update web profile dependencies to latest versions

Signed-off-by: Scott M Stark <starksm64@gmail.com>

First pass at removing core profile requirements, #413

Signed-off-by: starksm64 <starksm64@gmail.com>

Add clarification from ksutter.

Signed-off-by: starksm64 <starksm64@gmail.com>

Move the JNDI/JTA requirements from Platform profiles section to Web profile

Signed-off-by: starksm64 <starksm64@gmail.com>

Address comment from Edwin

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Further simplifications

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Update specification versions and related documents

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Add Jakarta Concurrency 3.0

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Add Jakarta Concurrency Specification 3.0 to related docs

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Statement for #460, #406

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Make the last paragraph a decision statement

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Add a future statement regarding JPMS, make clear there are no requirements currently #425

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Refine module-info.class description to clarify they are not standard

Clarify vendor module-info.class contents can be different and may conflict with those in the spec project API jars.

Add a statement about restrictions of using the jakarta package namespace, #457

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Just talk about the jakarta package name restrictions.

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Minor updates to core profile

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Link to working group about page

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Address some comments about core profile spec doc

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Fix the CDI spec link as there is no separate CDI Lite spec.

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Update the component spec versions

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Breakout the copyright section to a new document, #499

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Address review comments

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Order included specs by name
drop the managed bean spec

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Minor updates to web profile and platform spec

Signed-off-by: Scott M Stark <starksm64@gmail.com>

The requirements were really optional behaviors from other specs, so reorg those and add that CDI Java SE is not a requirement.

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Correct sorted ordering of required components

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Better ordering

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Address comments from scottmarlow

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Note managed beans are deprecated for removal, #502

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Follow through on removal of entity beans and embeddable EJB container

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Updated removed list to the EE 10 candidates

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Add Connectors 2.1 to to the list

Update platform-spec.adoc (#506)

We added this commemoration for Jakarta EE 9. I guess it is appropriate to take it out from Jakarta EE 10

Update ApplicationProgrammingInterface.adoc

Remove version numbers, provide reference to Application Programming Interface chapter for specific versions. Fixed Security Spec. name. Noted Web Services Metadata is moved to XML Web Services.

Remove SOAP with Attachments version from table
Order specifications alphabetically to match Profiles ordering
Rename Server Pages Debugging to Debugging Support for Other Languages

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Address TBDs in platform spec

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Include the removed tech in the changes

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Address #567, fix old specification version references.

Signed-off-by: Scott M Stark <starksm64@gmail.com>

update profile names in CCR request template (#649)

Add a tck challenge template

Simplifying spec generation
switch to Asciidcotor pdf generation (remove docbook).
Twick licence blocks to have a nice pdf version

CDI-538 Section 3.8 on CDI 1.2 spec javax.security.Principal (now in 17.8)

CDI-416 Typo on @PersistencContext

Fix minor grammar mistakes

Introduce new ref in EE for TCK

Fix interceptors_ee.asciidoc file name.

Cleaning source asciidoc files to have one sentence per line

Migrating to Asciidoctor 1.5+ notation

CDI-553 move notion of "security context" to EE part.

CDI-545 observers can be only local bussines method.

CDI-569 Add @ObservesAsync where the spec mention @observes

Correct sources to match one sentence per line

CDI-571 producer and disposer methods can be only local bussines method of EJB. (#284)

Correcting typos on Asciidoctor links

CDI-555 remove the outdated wording linked to previous Java SE boot api

CDI-500 Clarify @Intercepted bean metadata injection for EE components (#318)
additional fix - missing chapter id. (#325)

CDI-625 Make it clear when exactly are context init/destroy events fired (#303)

- add @BeforeDestroyed

Few language updates (#329)

Nice to see text reviewer ;). Thx @tremes.

CDI-667 introduce new chapter for trimmed bean archive in Java EE. (#368)

Cleaning Javadoc and typos
remove unused import
minor syntax update to java 8

CDI-495 What happens if an illegal bean type is found in the set of bean types (#363)

CDI-689 Typo or unclear message in 24.1.2 (#382)

CDI-690 Request Context Clarification (#385)

Clarify in core when request context is active, and change verbiage a bit to align to common term of context.

change from javax.* to jakarta.* (#414)

Signed-off-by: Scott Marlow <smarlow@redhat.com>

Jakartify (#444)

* Jakartify definition

Signed-off-by: Ivar Grimstad <ivar.grimstad@eclipse-foundation.org>

* Jakartify decorators

Signed-off-by: Ivar Grimstad <ivar.grimstad@eclipse-foundation.org>

* Jakartify events

Signed-off-by: Ivar Grimstad <ivar.grimstad@eclipse-foundation.org>

* Jakartify implementation

Signed-off-by: Ivar Grimstad <ivar.grimstad@eclipse-foundation.org>

* Jakartify inheritance

Signed-off-by: Ivar Grimstad <ivar.grimstad@eclipse-foundation.org>

* Jakartify inject

Signed-off-by: Ivar Grimstad <ivar.grimstad@eclipse-foundation.org>

* Jakartify interceptors

Signed-off-by: Ivar Grimstad <ivar.grimstad@eclipse-foundation.org>

* Jakartify intro

Signed-off-by: Ivar Grimstad <ivar.grimstad@eclipse-foundation.org>

* Jakartify lifecycle

Signed-off-by: Ivar Grimstad <ivar.grimstad@eclipse-foundation.org>

* Jakartify packaging

Signed-off-by: Ivar Grimstad <ivar.grimstad@eclipse-foundation.org>

* Jakartify scopes

Signed-off-by: Ivar Grimstad <ivar.grimstad@eclipse-foundation.org>

* Jakartify spi

Signed-off-by: Ivar Grimstad <ivar.grimstad@eclipse-foundation.org>

* Jakartify core packaging

Signed-off-by: Ivar Grimstad <ivar.grimstad@eclipse-foundation.org>

* Jakartify core spi

Signed-off-by: Ivar Grimstad <ivar.grimstad@eclipse-foundation.org>

* Jakartify inject

Signed-off-by: Ivar Grimstad <ivar.grimstad@eclipse-foundation.org>

* Jakartify resolution

Signed-off-by: Ivar Grimstad <ivar.grimstad@eclipse-foundation.org>

* Fix javax.* references to jakarta.*

Signed-off-by: Ivar Grimstad <ivar.grimstad@eclipse-foundation.org>

* Fix javax.annotation.ManagedBean reference in javadoc to jakarta.annotation.ManagedBean

Signed-off-by: Ivar Grimstad <ivar.grimstad@eclipse-foundation.org>

Fix the javax.servlet package usage

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Removal of deprecated APIs: BeanManager.fireEvent()

Removal of deprecated APIs: @New

comprehensive review and various Lite/Full split changes

Rename files and chapter refereces to align with rest of the specification

Bump CDI version to 4.1 and place EL integration API in a new supplemental artifact (#644)

* Fix remnants of BeanManager.fireEvent() removal

* Centralize common Maven properties in the parent POM

* Fix EL import version in bundle metadata

* Bump CDI version to 4.1

* Place the EL integration API to ELAwareBeanManager in a new supplemental API artifact

The existing EL integration API in `BeanManager` is deprecated for removal.

Remove references to the removed jakarta.annotation.ManagedBean #750

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Move the CDI EE integration spec requirements to a new cdi-ee-spec directory

Signed-off-by: Scott M Stark <starksm64@gmail.com>

The initial migration of the CDI component specification EE integration requirements, #837

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Add an approach to correct the missing cross-references.

Signed-off-by: Scott M Stark <starksm64@gmail.com>

Add an approach to correct the missing cross-references.

Signed-off-by: Scott M Stark <starksm64@gmail.com>

* On branch edburns-msft-redhat-cdi-integration-838 WIP
Your branch is up to date with 'origin/edburns-msft-redhat-cdi-integration-838'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	new file:   specification/src/main/asciidoc/shared-includes/IntegrationRequirements.adoc

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   specification/pom.xml
	deleted:    specification/src/main/asciidoc/platform/IntegrationRequirements.adoc
	modified:   specification/src/main/asciidoc/platform/Platform.adoc
	modified:   specification/src/main/asciidoc/webprofile/WebProfile.adoc

Signed-off-by: Ed Burns <Edward.Burns@microsoft.com>

* On branch edburns-msft-redhat-cdi-integration-838 Addresses #855 (review) from @arjantijms
modified:   specification/src/main/asciidoc/platform/cdi-ee-spec/implementation_ee.adoc

Move this text to jakartaee/security#323 .

Signed-off-by: Ed Burns <Edward.Burns@microsoft.com>

* On branch edburns-msft-redhat-cdi-integration-838 Put back the JTA related buitlt-in bean.
modified:   specification/src/main/asciidoc/platform/cdi-ee-spec/implementation_ee.adoc

Signed-off-by: Ed Burns <Edward.Burns@microsoft.com>

---------

Signed-off-by: Scott M Stark <starksm64@gmail.com>
Signed-off-by: Ed Burns <Edward.Burns@microsoft.com>
Co-authored-by: Kevin Sutter <kwsutter@gmail.com>
Co-authored-by: Ed Burns <Edward.Burns@microsoft.com>
  • Loading branch information
3 people committed Mar 29, 2024
1 parent a5ac47b commit 15a0c18
Show file tree
Hide file tree
Showing 20 changed files with 1,334 additions and 1 deletion.
2 changes: 1 addition & 1 deletion specification/pom.xml
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.eclipse.ee4j</groupId>
<artifactId>project</artifactId>
<version>1.0.7</version>
<version>1.0.9</version>
<relativePath/>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Expand Up @@ -226,6 +226,12 @@ language. Jakarta Enterprise Beans 2.x API group.]
|Y
|REQ

|Managed Beans (Deprecated)
|Y
|Y
|Y
|REQ

|Messaging
|Y
|Y
Expand Down
2 changes: 2 additions & 0 deletions specification/src/main/asciidoc/platform/Platform.adoc
Expand Up @@ -23,6 +23,8 @@ include::ServiceProviderInterface.adoc[]

include::CompatibilityMigration.adoc[]

include::../shared-includes/IntegrationRequirements.adoc[]

include::FutureDirections.adoc[]

include::PreviousVersionDeploymentDescriptors.adoc[]
Expand Down
Expand Up @@ -68,6 +68,7 @@ _Jakarta™ Managed Beans Specification, Version 2.0_. Available at: _https://ja

_Jakarta™ Interceptors Specification, Version 2.1_. Available at: _https://jakarta.ee/specifications/interceptors/2.1_

[[cdi-spec]]
_Jakarta™ Contexts and Dependency Injection Specification, Version 4.0_. Available at: _https://jakarta.ee/specifications/cdi/4.0_

_Jakarta™ Dependency Injection Specification, Version 2.0_. Available at: _https://jakarta.ee/specifications/dependency-injection/2.0_
Expand Down
@@ -0,0 +1,12 @@
[[decorators_ee]]

== Decorators in Jakarta EE

When running in Jakarta EE, the container must extend the rules defined for managed beans in <<decorators>> to EJB session beans.

[[decorator_bean_ee]]

=== Decorator beans in Jakarta EE

Decorators of an EJB session bean must comply with the bean provider programming restrictions defined by the EJB specification.
Decorators of an EJB stateful session bean must comply with the rules for instance passivation and conversational state defined by the EJB specification.
@@ -0,0 +1,90 @@
[[concepts_ee]]

== CDI Extended Concepts for Jakarta EE

When running in Jakarta EE, the container must extend the concepts defined in <<concepts>> with:

* A Jakarta EE component is a _bean_ if the lifecycle of its instances may be managed by the container according to the lifecycle context model defined in <<contexts>>
* Contextual instances of a bean may be used in EL expressions that are evaluated in the same context
* For some Jakarta EE components - like environment resources, defined in <<resources>> - the developer provides only the annotations and the bean implementation is provided by the container.

[[capabilities_ee]]

=== Functionality provided by the container to the bean in Jakarta EE

When running in Jakarta EE, the container must extend the capabilities defined in <<capabilities>>, by providing:

* scoped resolution by bean name when used in a Unified EL expression, as defined by <<name_resolution>>.

[[bean_types_ee]]

=== Bean types for Jakarta EE component

As managed beans, EJB session beans may have multiple bean types depending on their client-visible types.
For instance, this session bean has only the local interfaces `BookShop` and `Auditable`, along with `Object`, as bean types, since the bean class is not a client-visible type.

[source, java]
----
@Stateful
public class BookShopBean
extends Business
implements BookShop, Auditable {
...
}
----

The rules for determining the (unrestricted) set of bean types for Jakarta EE components are defined in <<session_bean_types>> and <<resource_types>>.

[[scopes_ee]]

=== Scopes

Jakarta EE components such as servlets, EJBs and JavaBeans do not have a well-defined _scope_.
These components are either:

* _singletons_, such as EJB singleton session beans, whose state is shared between all clients,
* _stateless objects_, such as servlets and stateless session beans, which do not contain client-visible state, or
* objects that must be explicitly created and destroyed by their client, such as JavaBeans and stateful session beans, whose state is shared by explicit reference passing between clients.

CDI scopes add to Jakarta EE these missing well-defined lifecycle context as defined in <<scopes>>.

[[builtin_scopes_ee]]

==== Built-in scope types in Jakarta EE

When running in Jakarta EE, the implementations of the `@RequestScoped`, `@ApplicationScoped` and `@SessionScoped` annotations provided by the container, represent the standard scopes defined by the Java Servlets specification.


[[default_bean_discovery_ee]]
=== Default bean discovery mode for Jakarta EE

When running in Jakarta EE, If the _bean discovery mode_ is `annotated`, the container must extend the rules defined in <<default_bean_discovery>> with:

* bean classes of EJB sessions beans, are discovered, and
* producer methods that are on an EJB session bean are discovered, and
* producer fields that are on an EJB session bean are discovered, and
* disposer methods that are on an EJB session bean are discovered, and
* observer methods that are on an EJB session bean are discovered.


[[names_ee]]
=== Bean names in Jakarta EE

A bean with a name may be referred to by its name in Unified EL expressions.

There is no relationship between the bean name of an EJB session bean and the EJB name of the bean.

Bean names allow the direct use of beans in JSP or JSF pages.
For example, a bean with the name `products` could be used like this:

[source, xml]
----
<h:outputText value="#{products.total}"/>
----

[[default_name_ee]]

==== Default bean names for EJB session beans

In the circumstances listed in <<default_name>>, the rule for determining default name for an EJB session bean are defined in <<session_bean_name>>.

46 changes: 46 additions & 0 deletions specification/src/main/asciidoc/platform/cdi-ee-spec/el.adoc
@@ -0,0 +1,46 @@
[[el]]
== Integration with Unified EL

[[el_resolution]]
=== Bean name resolution in EL expressions

The container must provide a Unified EL `ELResolver` to the servlet engine and JSF implementation that resolves bean names using the rules of name resolution defined in <<name_resolution>> and resolving ambiguities according to <<ambig_names>>.

* If a name used in an EL expression does not resolve to any bean, the `ELResolver` must return a null value.
* Otherwise, if a name used in an EL expression resolves to exactly one bean, the `ELResolver` must return a contextual instance of the bean, as defined in <<contextual_instance>>.

[[el_support]]
=== Unified EL integration API

Since CDI version 4.1, the Unified EL integration API, which is part of the `BeanManager` API, is deprecated.
The relevant methods are placed in a new interface `jakarta.enterprise.inject.spi.el.ELAwareBeanManager`, which is present in a new supplemental CDI API artifact: `jakarta.enterprise:jakarta.enterprise.cdi-el-api`.

==== Obtaining `ELAwareBeanManager`

The `BeanManager` implementation in Jakarta EE must also implement `ELAwareBeanManager`.
All rules that apply to the `BeanManager`, as specified in <<beanmanager>> and <<beanmanager_ee>>, also apply to `ELAwareBeanManager`.

It follows that the container provides a built-in bean with bean type `ELAwareBeanManager`, scope `@Dependent` and qualifier `@Default`, which is a passivation capable dependency as defined in <<passivation_capable_dependency>>.
It also follows that an `ELAwareBeanManager` may be obtained by using `CDI.current().getBeanManager()` and casting.

The EL-related methods of `ELAwareBeanManager` may be called at any time during the execution of the application.

==== Obtaining the `ELResolver`

The method `ELAwareBeanManager.getELResolver()` returns the `jakarta.el.ELResolver` specified in <<el_resolution>>.
This `ELResolver` is used to satisfy the rules defined in <<names_ee>>.

[source, java]
----
public ELResolver getELResolver();
----

==== Wrapping a Unified EL `ExpressionFactory`

The method `ELAwareBeanManager.wrapExpressionFactory()` returns a wrapper `jakarta.el.ExpressionFactory` that delegates `MethodExpression` and `ValueExpression` creation to the given `ExpressionFactory`.
When a Unified EL expression is evaluated using a `MethodExpression` or `ValueExpression` returned by the wrapper `ExpressionFactory`, the rules defined in <<dependent_scope_el>> are enforced by the container.

[source, java]
----
public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory);
----
@@ -0,0 +1,24 @@
[[events_ee]]

== Events in Jakarta EE

[[observer_methods_ee]]

=== Observer methods in EJB session beans

An observer method may also be a non-abstract method of an EJB session bean class.
It must be either a business method exposed by a local business interface of the EJB or a static method of the bean class.

[[observes_ee]]

==== Declaring an observer method in an EJB

If a non-static method of a session bean class has a parameter annotated `@Observes` or `@ObservesAsync`, and the method is not a business method exposed by a local business interface of the EJB, the container automatically detects the problem and treats it as a definition error.

[[observer_method_invocation_context_ee]]

==== Observer method invocation context in Jakarta EE

When running in Jakarta EE, the container must extend the rules defined in <<observer_method_invocation_context>> and must also ensure that all kinds of observers are called in the same client security context as the invocation of `Event.fire()` or `Event.fireAsync()`.

The transaction and security contexts for a business method exposed by a local business interface of an EJB session bean also depend upon the transaction attribute and `@RunAs` descriptor, if any.

0 comments on commit 15a0c18

Please sign in to comment.