From 741ced45d6f682828e7b8fd217e6a40233356dac Mon Sep 17 00:00:00 2001 From: Kevin Sutter Date: Tue, 27 Apr 2021 16:52:17 -0500 Subject: [PATCH 1/4] Managed Beans version should be 2.1-SNAPSHOT Signed-off-by: Kevin Sutter Initial draft outline of the core profile specification Signed-off-by: Scott M Stark Fix typo in CDI lite reference Signed-off-by: Scott M Stark Initial draft outline of the core profile specification (#356) * Initial draft outline of the core profile specification Signed-off-by: Scott M Stark * Fix typo in CDI lite reference Signed-off-by: Scott M Stark Prepare next development version (#366) Signed-off-by: Ivar Grimstad removal of managed beans spec content and build process Signed-off-by: Kevin Sutter PNG to SVG images format conversion. Signed-off-by: Dmitri Cherkas 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 1) Figure 6 converted from PNG to SVG, 2) error corrected in Figure 5. Signed-off-by: Dmitri Cherkas Figure 7 in SVG format. Signed-off-by: Dmitri Cherkas Figure 8 in SVG format. Signed-off-by: Dmitri Cherkas References in the spec from png to svg are updated as requested. Signed-off-by: Dmitri Cherkas JavaEEapplication_schema.svg conversion Signed-off-by: Dmitri Cherkas JavaEEapplication_schema.svg errata corrige and other 3 images converted. Signed-off-by: Dmitri Cherkas JavaEEapplication_schema.svg errata corrige and other 3 images converted. Signed-off-by: Dmitri Cherkas JavaEEapplication-client_schema.svg errata corrige. Signed-off-by: Dmitri Cherkas The next images convertion done. Signed-off-by: Dmitri Cherkas Last images (Platform_Spec-24.svg, Platform_Spec-23.svg, Platform_Spec-21.svg, JavaEEapplication_DTD.svg) converted. Signed-off-by: Dmitri Cherkas 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 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 Remove applet requirements, #298 Change Java SE 8 references to Java SE 11, #331 Signed-off-by: Scott M Stark Address comments from @kazumura Signed-off-by: Scott M Stark 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 * Address comments from @kazumura Signed-off-by: Scott M Stark Remove the Applet container from the diagram, #298 Signed-off-by: starksm64 Remove applet container from interoperability diagram Signed-off-by: starksm64 Remove the managed bean spec generation that was readded in a PR merge. Signed-off-by: starksm64 Fix the out of date img references that had been converted to svg, #435 Signed-off-by: starksm64 Various errata corriges. Signed-off-by: Dmitri Cherkas Broken line at the start of 8.3. Class Loading Requirements paragraph. Signed-off-by: Dmitri Cherkas Broken line at the end of 8.3.3. paragraph Signed-off-by: Dmitri Cherkas Two errata corrige: 'Jakarta instead of Jaav' and '_multitier applications_' istead of 'multitier __ applications' Signed-off-by: Dmitri Cherkas Update documentation regarding Java SE base level Start a dependency graph section in the specs Signed-off-by: starksm64 Correct authentication label Signed-off-by: starksm64 Add ejb, jta child dependencies Signed-off-by: starksm64 Label cdi -> {jta, ejb} dependency with javadoc Signed-off-by: starksm64 Update web profile dependencies to latest versions Signed-off-by: Scott M Stark First pass at removing core profile requirements, #413 Signed-off-by: starksm64 Add clarification from ksutter. Signed-off-by: starksm64 Move the JNDI/JTA requirements from Platform profiles section to Web profile Signed-off-by: starksm64 Address comment from Edwin Signed-off-by: Scott M Stark Further simplifications Signed-off-by: Scott M Stark Update specification versions and related documents Signed-off-by: Scott M Stark Add Jakarta Concurrency 3.0 Signed-off-by: Scott M Stark Add Jakarta Concurrency Specification 3.0 to related docs Signed-off-by: Scott M Stark Statement for #460, #406 Signed-off-by: Scott M Stark Make the last paragraph a decision statement Signed-off-by: Scott M Stark Add a future statement regarding JPMS, make clear there are no requirements currently #425 Signed-off-by: Scott M Stark 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 Just talk about the jakarta package name restrictions. Signed-off-by: Scott M Stark Minor updates to core profile Signed-off-by: Scott M Stark Link to working group about page Signed-off-by: Scott M Stark Address some comments about core profile spec doc Signed-off-by: Scott M Stark Fix the CDI spec link as there is no separate CDI Lite spec. Signed-off-by: Scott M Stark Update the component spec versions Signed-off-by: Scott M Stark Breakout the copyright section to a new document, #499 Signed-off-by: Scott M Stark Address review comments Signed-off-by: Scott M Stark Order included specs by name drop the managed bean spec Signed-off-by: Scott M Stark Minor updates to web profile and platform spec Signed-off-by: Scott M Stark 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 Correct sorted ordering of required components Signed-off-by: Scott M Stark Better ordering Signed-off-by: Scott M Stark Address comments from scottmarlow Signed-off-by: Scott M Stark Note managed beans are deprecated for removal, #502 Signed-off-by: Scott M Stark Follow through on removal of entity beans and embeddable EJB container Signed-off-by: Scott M Stark Updated removed list to the EE 10 candidates Signed-off-by: Scott M Stark 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 Address TBDs in platform spec Signed-off-by: Scott M Stark Include the removed tech in the changes Signed-off-by: Scott M Stark Address #567, fix old specification version references. Signed-off-by: Scott M Stark 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 Jakartify (#444) * Jakartify definition Signed-off-by: Ivar Grimstad * Jakartify decorators Signed-off-by: Ivar Grimstad * Jakartify events Signed-off-by: Ivar Grimstad * Jakartify implementation Signed-off-by: Ivar Grimstad * Jakartify inheritance Signed-off-by: Ivar Grimstad * Jakartify inject Signed-off-by: Ivar Grimstad * Jakartify interceptors Signed-off-by: Ivar Grimstad * Jakartify intro Signed-off-by: Ivar Grimstad * Jakartify lifecycle Signed-off-by: Ivar Grimstad * Jakartify packaging Signed-off-by: Ivar Grimstad * Jakartify scopes Signed-off-by: Ivar Grimstad * Jakartify spi Signed-off-by: Ivar Grimstad * Jakartify core packaging Signed-off-by: Ivar Grimstad * Jakartify core spi Signed-off-by: Ivar Grimstad * Jakartify inject Signed-off-by: Ivar Grimstad * Jakartify resolution Signed-off-by: Ivar Grimstad * Fix javax.* references to jakarta.* Signed-off-by: Ivar Grimstad * Fix javax.annotation.ManagedBean reference in javadoc to jakarta.annotation.ManagedBean Signed-off-by: Ivar Grimstad Fix the javax.servlet package usage Signed-off-by: Scott M Stark 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 Move the CDI EE integration spec requirements to a new cdi-ee-spec directory Signed-off-by: Scott M Stark The initial migration of the CDI component specification EE integration requirements, #837 Signed-off-by: Scott M Stark Add an approach to correct the missing cross-references. Signed-off-by: Scott M Stark Add an approach to correct the missing cross-references. Signed-off-by: Scott M Stark --- .../ApplicationProgrammingInterface.adoc | 6 + .../platform/IntegrationRequirements.adoc | 5 + .../src/main/asciidoc/platform/Platform.adoc | 2 + .../asciidoc/platform/RelatedDocuments.adoc | 1 + .../platform/cdi-ee-spec/decorators_ee.adoc | 12 + .../platform/cdi-ee-spec/definition_ee.adoc | 90 +++++ .../asciidoc/platform/cdi-ee-spec/el.adoc | 46 +++ .../platform/cdi-ee-spec/events_ee.adoc | 24 ++ .../cdi-ee-spec/implementation_ee.adoc | 333 ++++++++++++++++++ .../platform/cdi-ee-spec/inheritance_ee.adoc | 23 ++ .../injectionandresolution_ee.adoc | 102 ++++++ .../platform/cdi-ee-spec/interceptors_ee.adoc | 21 ++ .../cdi-ee-spec/javaeeintegration.adoc | 34 ++ .../platform/cdi-ee-spec/lifecycle_ee.adoc | 66 ++++ .../cdi-ee-spec/packagingdeployment_ee.adoc | 58 +++ .../cdi-ee-spec/scopescontext_ee.adoc | 213 +++++++++++ .../asciidoc/platform/cdi-ee-spec/spi_ee.adoc | 119 +++++++ .../asciidoc/platform/cdi-ee-spec/xrefs.adoc | 178 ++++++++++ 18 files changed, 1333 insertions(+) create mode 100644 specification/src/main/asciidoc/platform/IntegrationRequirements.adoc create mode 100644 specification/src/main/asciidoc/platform/cdi-ee-spec/decorators_ee.adoc create mode 100644 specification/src/main/asciidoc/platform/cdi-ee-spec/definition_ee.adoc create mode 100644 specification/src/main/asciidoc/platform/cdi-ee-spec/el.adoc create mode 100644 specification/src/main/asciidoc/platform/cdi-ee-spec/events_ee.adoc create mode 100644 specification/src/main/asciidoc/platform/cdi-ee-spec/implementation_ee.adoc create mode 100644 specification/src/main/asciidoc/platform/cdi-ee-spec/inheritance_ee.adoc create mode 100644 specification/src/main/asciidoc/platform/cdi-ee-spec/injectionandresolution_ee.adoc create mode 100644 specification/src/main/asciidoc/platform/cdi-ee-spec/interceptors_ee.adoc create mode 100644 specification/src/main/asciidoc/platform/cdi-ee-spec/javaeeintegration.adoc create mode 100644 specification/src/main/asciidoc/platform/cdi-ee-spec/lifecycle_ee.adoc create mode 100644 specification/src/main/asciidoc/platform/cdi-ee-spec/packagingdeployment_ee.adoc create mode 100644 specification/src/main/asciidoc/platform/cdi-ee-spec/scopescontext_ee.adoc create mode 100644 specification/src/main/asciidoc/platform/cdi-ee-spec/spi_ee.adoc create mode 100644 specification/src/main/asciidoc/platform/cdi-ee-spec/xrefs.adoc diff --git a/specification/src/main/asciidoc/platform/ApplicationProgrammingInterface.adoc b/specification/src/main/asciidoc/platform/ApplicationProgrammingInterface.adoc index c8bd46b3..81c62469 100644 --- a/specification/src/main/asciidoc/platform/ApplicationProgrammingInterface.adoc +++ b/specification/src/main/asciidoc/platform/ApplicationProgrammingInterface.adoc @@ -226,6 +226,12 @@ language. Jakarta Enterprise Beans 2.x API group.] |Y |REQ +|Managed Beans (Deprecated) +|Y +|Y +|Y +|REQ + |Messaging |Y |Y diff --git a/specification/src/main/asciidoc/platform/IntegrationRequirements.adoc b/specification/src/main/asciidoc/platform/IntegrationRequirements.adoc new file mode 100644 index 00000000..c615c945 --- /dev/null +++ b/specification/src/main/asciidoc/platform/IntegrationRequirements.adoc @@ -0,0 +1,5 @@ +[[component-integration]] +== Component Specification Integration Requirements +This section defines the requirements between component specifications that are included in the Platform. + +include::cdi-ee-spec/javaeeintegration.adoc[leveloffset=+1] \ No newline at end of file diff --git a/specification/src/main/asciidoc/platform/Platform.adoc b/specification/src/main/asciidoc/platform/Platform.adoc index e126bc3e..990a0f7f 100644 --- a/specification/src/main/asciidoc/platform/Platform.adoc +++ b/specification/src/main/asciidoc/platform/Platform.adoc @@ -23,6 +23,8 @@ include::ServiceProviderInterface.adoc[] include::CompatibilityMigration.adoc[] +include::IntegrationRequirements.adoc[] + include::FutureDirections.adoc[] include::PreviousVersionDeploymentDescriptors.adoc[] diff --git a/specification/src/main/asciidoc/platform/RelatedDocuments.adoc b/specification/src/main/asciidoc/platform/RelatedDocuments.adoc index 7827fed5..14c4a49b 100644 --- a/specification/src/main/asciidoc/platform/RelatedDocuments.adoc +++ b/specification/src/main/asciidoc/platform/RelatedDocuments.adoc @@ -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_ diff --git a/specification/src/main/asciidoc/platform/cdi-ee-spec/decorators_ee.adoc b/specification/src/main/asciidoc/platform/cdi-ee-spec/decorators_ee.adoc new file mode 100644 index 00000000..1f5aa097 --- /dev/null +++ b/specification/src/main/asciidoc/platform/cdi-ee-spec/decorators_ee.adoc @@ -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 <> 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. diff --git a/specification/src/main/asciidoc/platform/cdi-ee-spec/definition_ee.adoc b/specification/src/main/asciidoc/platform/cdi-ee-spec/definition_ee.adoc new file mode 100644 index 00000000..688786a6 --- /dev/null +++ b/specification/src/main/asciidoc/platform/cdi-ee-spec/definition_ee.adoc @@ -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 <> 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 <> +* 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 <> - 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 <>, by providing: + +* scoped resolution by bean name when used in a Unified EL expression, as defined by <>. + +[[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 <> and <>. + +[[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 <>. + +[[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 <> 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] +---- + +---- + +[[default_name_ee]] + +==== Default bean names for EJB session beans + +In the circumstances listed in <>, the rule for determining default name for an EJB session bean are defined in <>. + diff --git a/specification/src/main/asciidoc/platform/cdi-ee-spec/el.adoc b/specification/src/main/asciidoc/platform/cdi-ee-spec/el.adoc new file mode 100644 index 00000000..3eef88ae --- /dev/null +++ b/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 <> and resolving ambiguities according to <>. + +* 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 <>. + +[[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 <> and <>, 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 <>. +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 <>. +This `ELResolver` is used to satisfy the rules defined in <>. + +[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 <> are enforced by the container. + +[source, java] +---- +public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory); +---- diff --git a/specification/src/main/asciidoc/platform/cdi-ee-spec/events_ee.adoc b/specification/src/main/asciidoc/platform/cdi-ee-spec/events_ee.adoc new file mode 100644 index 00000000..5e857f66 --- /dev/null +++ b/specification/src/main/asciidoc/platform/cdi-ee-spec/events_ee.adoc @@ -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 <> 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. diff --git a/specification/src/main/asciidoc/platform/cdi-ee-spec/implementation_ee.adoc b/specification/src/main/asciidoc/platform/cdi-ee-spec/implementation_ee.adoc new file mode 100644 index 00000000..7e5d1524 --- /dev/null +++ b/specification/src/main/asciidoc/platform/cdi-ee-spec/implementation_ee.adoc @@ -0,0 +1,333 @@ +[[implementation_ee]] + +== Addition to programming model for Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined in <>, and must also provide built-in support for injection and contextual lifecycle management of the following kinds of bean: + +* Session beans +* Resources (Jakarta EE resources, persistence contexts, persistence units, remote EJBs and web services) + +Jakarta EE and embeddable EJB containers are required by the Jakarta EE and EJB specifications to support EJB session beans and the Jakarta EE component environment. +Other containers are not required to provide support for injection or lifecycle management of session beans or resources. + +[[managed_beans_ee]] + +=== Managed beans in Jakarta EE + +[[what_classes_are_beans_ee]] + +==== Which Java classes are managed beans in Jakarta EE? + +When running in Jakarta EE, a top-level Java class is a managed bean if it meets requirements described in <> or if it is defined to be a managed bean by any other Jakarta EE specification and if + +* It is not annotated with an EJB component-defining annotation or declared as an EJB bean class in `ejb-jar.xml`. + + + +[[session_beans]] + +=== EJB Session beans + +A _session bean_ is a bean that is implemented by a session bean with an EJB 3.x client view that is not annotated with `@Vetoed` or in a package annotated `@Vetoed`. The basic lifecycle and semantics of EJB session beans are defined by the EJB specification. + +A stateless session bean must belong to the `@Dependent` pseudo-scope. A singleton session bean must belong to either the `@ApplicationScoped` scope or to the `@Dependent` pseudo-scope. If a session bean specifies an illegal scope, the container automatically detects the problem and treats it as a definition error. +A stateful session bean may have any scope. + +When a contextual instance of a session bean is obtained via the dependency injection service, the behavior of `SessionContext.getInvokedBusinessInterface()` is specific to the container implementation. +Portable applications should not rely upon the value returned by this method. + +If the bean class of a session bean is annotated `@Interceptor` or `@Decorator`, the container automatically detects the problem and treats it as a definition error. + +If the session bean class is a generic type, it must have scope `@Dependent`. If a session bean with a parameterized bean class declares any scope other than `@Dependent`, the container automatically detects the problem and treats it as a definition error. + +[[session_bean_ejb_remove_method]] + +==== EJB remove methods of session beans + +If a session bean is a stateful session bean: + +* If the scope is `@Dependent`, the application _may_ call any EJB remove method of a contextual instance of the session bean. +* Otherwise, the application _may not_ directly call any EJB remove method of any contextual instance of the session bean. + +The session bean is not required to have an EJB remove method in order for the container to destroy it. + +If the application directly calls an EJB remove method of a contextual instance of a session bean that is a stateful session bean and declares any scope other than `@Dependent`, an `UnsupportedOperationException` is thrown. + +If the application directly calls an EJB remove method of a contextual instance of a session bean that is a stateful session bean and has scope `@Dependent` then no parameters are passed to the method by the container. +Furthermore, the container ignores the instance instead of destroying it when `Contextual.destroy()` is called, as defined in <>. + +[[session_bean_types]] + +==== Bean types of a session bean + +The unrestricted set of bean types for a session bean contains all local interfaces of the bean and their superinterfaces. +If the session bean has a no-interface view, the unrestricted set of bean types contains the bean class and all superclasses. +In addition, `java.lang.Object` is a bean type of every session bean. + +Remote interfaces are not included in the set of bean types. + +The resulting set of bean types for a session bean consists only of <>, all other types are removed from the set of bean types. + +[[declaring_session_bean]] + +==== Declaring a session bean + +A session bean does not require any special annotations apart from the component-defining annotation (or XML declaration) required by the EJB specification. +The following EJBs are beans: + +[source, java] +---- +@Singleton +class Shop { .. } +---- + +[source, java] +---- +@Stateless +class PaymentProcessorImpl implements PaymentProcessor { ... } +---- + +A bean class may also specify a scope, bean name, stereotypes and/or qualifiers: + +[source, java] +---- +@ConversationScoped @Stateful @Default @Model +public class ShoppingCart { ... } +---- + +A session bean class may extend another bean class: + +[source, java] +---- +@Stateless +@Named("loginAction") +public class LoginActionImpl implements LoginAction { ... } +---- + +[source, java] +---- +@Stateless +@Mock +@Named("loginAction") +public class MockLoginActionImpl extends LoginActionImpl { ... } +---- + +[[specialize_session_bean]] + +==== Specializing a session bean + +If a bean class of a session bean X is annotated `@Specializes`, then the bean class of X must directly extend the bean class of another session bean Y. +Then X _directly specializes_ Y, as defined in <>. + +If the bean class of X does not directly extend the bean class of another session bean, the container automatically detects the problem and treats it as a definition error. + +For example, `MockLoginActionBean` directly specializes `LoginActionBean`: + +[source, java] +---- +@Stateless +public class LoginActionBean implements LoginAction { ... } +---- + +[source, java] +---- +@Stateless @Mock @Specializes +public class MockLoginActionBean extends LoginActionBean implements LoginAction { ... } +---- + +[[session_bean_name]] + +==== Default bean name for a session bean + +The default name for a session bean is the unqualified class name of the session bean class, after converting the first character to lower case. + +For example, if the bean class is named `ProductList`, the default bean name is `productList`. + +[[producer_method_ee]] + +=== Producer methods on EJB session bean + +A producer method defined in an EJB session bean follows the rules defined in <> with the following addition: + +* A producer method defined in an EJB session bean must be either a business method exposed by a local business interface of the EJB or a static method of the bean class. + +[[declaring_producer_method_ee]] + +==== Declaring a producer method in an EJB session bean + +A producer method declaration in an EJB session bean follows the rules defined in <> with the following addition: + +* if a non-static method of a session bean class is annotated `@Produces`, and the method is not a business method exposed by a local business interface of the session bean, the container automatically detects the problem and treats it as a definition error. + +[[producer_field_ee]] + +=== Producer field on EJB session bean + +A producer field defined in an EJB session bean follows the rules defined in <> with the following addition: + +* A producer field defined in an EJB session bean must be a static field of the bean class. + +[[declaring_producer_field_ee]] + +==== Declaring a producer field in an EJB session bean + +A producer field declaration in an EJB session bean follows the rules defined in <> with the following addition: + +* If a non-static field of an EJB session bean class is annotated `@Produces`, the container automatically detects the problem and treats it as a definition error. + +[[disposer_method_ee]] + +=== Disposer methods on EJB session bean + +A disposer method defined in an EJB session bean follows the rules defined in <> with the following addition: + +* A disposer method defined in an EJB session bean must be either a business method exposed by a local business interface of the EJB or a static method of the bean class. + +[[declaring_disposer_method_ee]] + +==== Declaring a disposer method on an EJB session bean + +A disposer method declaration in an EJB session bean follows the rules defined in <> with the following addition: + +* If a non-static method of an EJB session bean class has a parameter annotated `@Disposes`, and the method is not a business method exposed by a local business interface of the session bean, the container automatically detects the problem and treats it as a definition error. + +[[javaee_components]] + +=== Jakarta EE components + +Most Jakarta EE components support injection and interception, as defined in the Jakarta EE Platform, Specification, table EE.5-1, but are not considered beans (as defined by this specification). EJBs, as defined in <> are the exception. + +The instance used by the container to service an invocation of a Jakarta EE component will not be the same instance obtained when using `@Inject`, instantiated by the container to invoke a producer method, observer method or disposer method, or instantiated by the container to access the value of a producer field. +It is recommended that Jakarta EE components should not define observer methods, producer methods, producer fields or disposer methods. +It is safe to annotate Jakarta EE components with `@Vetoed` to prevent them being considered beans. + +[[resources]] + +=== Resources + +A _resource_ is a bean that represents a reference to a resource, persistence context, persistence unit, remote EJB or web service in the Jakarta EE component environment. + +By declaring a resource, we enable an object from the Jakarta EE component environment to be injected by specifying only its type and qualifiers at the injection point. +For example, if `@CustomerDatabase` is a qualifier: + +[source, java] +---- +@Inject @CustomerDatabase Datasource customerData; +---- + +[source, java] +---- +@Inject @CustomerDatabase EntityManager customerDatabaseEntityManager; +---- + +[source, java] +---- +@Inject @CustomerDatabase EntityManagerFactory customerDatabaseEntityManagerFactory; +---- + +[source, java] +---- +@Inject PaymentService remotePaymentService; +---- + +The container is not required to support resources with scope other than `@Dependent`. Portable applications should not define resources with any scope other than `@Dependent`. + +A resource may not have a bean name. + +[[declaring_resource]] + +==== Declaring a resource + +A resource may be declared by specifying a Jakarta EE component environment injection annotation as part of a producer field declaration. +The producer field may be static. + +* For a Jakarta EE resource, `@Resource` must be specified. +* For a persistence context, `@PersistenceContext` must be specified. +* For a persistence unit, `@PersistenceUnit` must be specified. +* For a remote EJB, `@EJB` must be specified. +* For a web service, `@WebServiceRef` must be specified. + + +The injection annotation specifies the metadata needed to obtain the resource, entity manager, entity manager factory, remote EJB instance or web service reference from the component environment. + +[source, java] +---- +@Produces @WebServiceRef(lookup="java:app/service/PaymentService") +PaymentService paymentService; +---- + +[source, java] +---- +@Produces @EJB(ejbLink="../their.jar#PaymentService") +PaymentService paymentService; +---- + +[source, java] +---- +@Produces @Resource(lookup="java:global/env/jdbc/CustomerDatasource") +@CustomerDatabase Datasource customerDatabase; +---- + +[source, java] +---- +@Produces @PersistenceContext(unitName="CustomerDatabase") +@CustomerDatabase EntityManager customerDatabasePersistenceContext; +---- + +[source, java] +---- +@Produces @PersistenceUnit(unitName="CustomerDatabase") +@CustomerDatabase EntityManagerFactory customerDatabasePersistenceUnit; +---- + +The bean type and qualifiers of the resource are determined by the producer field declaration. + +If the producer field declaration specifies a bean name, the container automatically detects the problem and treats it as a definition error. + +If the matching object in the Jakarta EE component environment is not of the same type as the producer field declaration, the container automatically detects the problem and treats it as a definition error. + +[[resource_types]] + +==== Bean types of a resource + +The unrestricted set of bean types for a resource is determined by the declared type of the producer field, as specified by <>. + +The resulting set of bean types for a resource consists only of <>, all other types are removed from the set of bean types. + + +[[additional_builtin_beans]] + +=== Additional built-in beans + +A Jakarta EE or embeddable EJB container must provide the following built-in beans, all of which have qualifier `@Default`: + +* a bean with bean type `jakarta.transaction.UserTransaction`, allowing injection of a reference to the JTA `UserTransaction`, and +* a bean with bean type `java.security.Principal`, allowing injection of a `Principal` representing the current caller identity. + + +A servlet container must provide the following built-in beans, all of which have qualifier `@Default`: + +* a bean with bean type `jakarta.servlet.http.HttpServletRequest`, allowing injection of a reference to the `HttpServletRequest` +* a bean with bean type `jakarta.servlet.http.HttpSession`, allowing injection of a reference to the `HttpSession`, +* a bean with bean type `jakarta.servlet.ServletContext`, allowing injection of a reference to the `ServletContext`, + + +These beans are passivation capable dependencies, as defined in <>. + +If a Jakarta EE component class has an injection point of type `UserTransaction` and qualifier `@Default`, and may not validly make use of the JTA `UserTransaction` according to the Jakarta EE platform specification, the container automatically detects the problem and treats it as a definition error. + +[[injected_fields_ee]] + +=== Injected fields in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined for bean classes in <> to Jakarta EE component classes supporting injection. + + +[[initializer_methods_ee]] + +=== Initializer methods in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined for bean classes in <> to Jakarta EE component classes supporting injection. +The container must also ensure that: + +* An initializer method defined in an EJB session bean is _not_ required to be a business method of the session bean. diff --git a/specification/src/main/asciidoc/platform/cdi-ee-spec/inheritance_ee.adoc b/specification/src/main/asciidoc/platform/cdi-ee-spec/inheritance_ee.adoc new file mode 100644 index 00000000..59f7b1e5 --- /dev/null +++ b/specification/src/main/asciidoc/platform/cdi-ee-spec/inheritance_ee.adoc @@ -0,0 +1,23 @@ +[[type_level_inheritance_ee]] + +=== Inheritance of type-level metadata in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined for managed beans in <> to EJB session beans. + + + +[[member_level_inheritance_ee]] + +=== Inheritance of member-level metadata in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined for managed beans in <> to EJB session beans. + +[[specialization_ee]] + +=== Specialization in Jakarta EE + +[[direct_and_indirect_specialization_ee]] + +==== Direct and indirect specialization in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined in <> and is also required to support specialization for EJB session beans as defined in <>. diff --git a/specification/src/main/asciidoc/platform/cdi-ee-spec/injectionandresolution_ee.adoc b/specification/src/main/asciidoc/platform/cdi-ee-spec/injectionandresolution_ee.adoc new file mode 100644 index 00000000..74caf107 --- /dev/null +++ b/specification/src/main/asciidoc/platform/cdi-ee-spec/injectionandresolution_ee.adoc @@ -0,0 +1,102 @@ +[[injection_el_resolution_ee]] + +== Dependency injection, lookup and EL in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined in <> and may also provide references to contextual instances by Unified EL expression evaluation. + +When resolving a name in an EL expression, the container considers the bean name and selected alternatives. + +[[selection_ee]] + +=== Modularity in Jakarta EE + +In the Jakarta EE module architecture, any Jakarta EE module or library is a module. The Jakarta EE module is a bean archive if it contains a `beans.xml` file, as defined in <>. + +When running in Jakarta EE, the container must follow the same accessibility rules for beans and alternatives defined in <> for JSP/JSF pages using EL resolution and make sure that only beans available from injection in the module that defines the JSP/JSF pages are resolved. + +In the Jakarta EE module architecture, a bean class is accessible in a module if and only if it is required to be accessible according to the class loading requirements defined by the Jakarta EE platform specification. + +Note that, in some Jakarta EE implementations, a bean class might be accessible to some other class even when this is not required by the Jakarta EE platform specification. +For the purposes of this specification, a class is not considered accessible to another class unless accessibility is explicitly required by the Jakarta EE platform specification. + +An alternative is not available for injection, lookup or EL resolution to classes or JSP/JSF pages in a module unless the module is a bean archive and the alternative is explicitly _selected_ for the bean archive or the application. + +[[declaring_selected_alternatives_application_ee]] + +==== Declaring selected alternatives for an application in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined for managed beans in <> to EJB session beans. + +[[declaring_selected_alternatives_bean_archive_ee]] + +==== Declaring selected alternatives for a bean archive in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined for managed beans in <> to EJB session beans. + +[[unsatisfied_and_ambig_dependencies_ee]] + +==== Unsatisfied and ambiguous dependencies in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined in <> and must also validate all injection points of all Jakarta EE component classes supporting injection + +[[name_resolution_ee]] + +=== EL name resolution + +When running in Jakarta EE, the container must extend the rules defined in <> and must also support name resolution for name used in Expression Language + +An EL name resolves to a bean if: + +* the name can be resolved to a bean according to rules in <>, and +* the bean is available for injection in the war containing the JSP or JSF page with the EL expression. + +[[ambig_names_ee]] + +==== Ambiguous EL names + +When running in Jakarta EE, the container must extend the rules defined in <> to names used in Expression Language. + +[[injection_ee]] + +=== Dependency injection in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined in <> and is also required to perform dependency injection whenever it creates the following contextual objects: + +* contextual instances of EJB session beans. + +The container is also required to perform dependency injection whenever it instantiates any of the following non-contextual objects: + +* non-contextual instances of EJB session beans (for example, session beans obtained by the application from JNDI or injected using `@EJB`), and +* instances of any other Jakarta EE component class supporting injection. + +A Java EE 5 container is not required to support injection for non-contextual objects. + +[[instantiation_ee]] + +==== Injection using the bean constructor in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined for managed beans in <> to EJB session beans. + +[[fields_initializer_methods_ee]] + +==== Injection of fields and initializer methods in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined for managed beans in <> to EJB session beans and to any other Jakarta EE component class supporting injection. + +The container is also required to ensure that: + +* Initializer methods declared by a class X in the type hierarchy of the bean are called after all Jakarta EE component environment resource dependencies declared by X or by superclasses of X have been injected. +* Any `@PostConstruct` callback declared by a class X in the type hierarchy of the bean is called after all Jakarta EE component environment resource dependencies declared by X or by superclasses of X have been injected. +* Any servlet `init()` method is called after all initializer methods have been called, all injected fields have been initialized and all Jakarta EE component environment resource dependencies have been injected. + +[[dependent_objects_destruction_ee]] + +==== Destruction of dependent objects in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined for managed beans in <> to any other Jakarta EE component class supporting injection and perform destruction after the servlet `destroy()` method is called. + +[[bean_metadata_ee]] + +==== Bean metadata in Jakarta EE + +Interceptor and decorator instances associated with Jakarta EE components that are not considered beans (as defined by this specification) cannot obtain information about the beans they intercept and decorate (as defined in <>) and thus `null` is injected into relevant injection points. diff --git a/specification/src/main/asciidoc/platform/cdi-ee-spec/interceptors_ee.adoc b/specification/src/main/asciidoc/platform/cdi-ee-spec/interceptors_ee.adoc new file mode 100644 index 00000000..ea5a2505 --- /dev/null +++ b/specification/src/main/asciidoc/platform/cdi-ee-spec/interceptors_ee.adoc @@ -0,0 +1,21 @@ +[[interceptors_ee]] + +== Interceptor bindings in Jakarta EE + +EJB session and message-driven beans support interception as defined in <>. + +[[enabled_interceptors_ee]] + +=== Interceptor enablement and ordering in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined in <> and also ensured that: + +* Interceptors declared using interceptor bindings are called after interceptors declared using the `@Interceptor` annotation (or using the corresponding element of a deployment descriptor). +* Interceptors declared using interceptor bindings are called before any around-invoke, around-timeout, or lifecycle event callback methods declared on the target class or any superclass of the target class. + + +[[interceptor_resolution_ee]] + +=== Interceptor resolution in Jakarta EE + +For a custom implementation of the `Interceptor` interface defined in <>, the container also calls `intercepts()` to determine if the interceptor intercepts an EJB timeout method invocation. diff --git a/specification/src/main/asciidoc/platform/cdi-ee-spec/javaeeintegration.adoc b/specification/src/main/asciidoc/platform/cdi-ee-spec/javaeeintegration.adoc new file mode 100644 index 00000000..8ab190a5 --- /dev/null +++ b/specification/src/main/asciidoc/platform/cdi-ee-spec/javaeeintegration.adoc @@ -0,0 +1,34 @@ +:cdi_full: CDI Full +:cdi_lite: CDI Lite +-- +This part of the document specifies additional rules or features when using CDI in a Jakarta EE container. +All content defined in <> applies to this part. + +CDI implementations in Jakarta EE containers are required to support {cdi_full}. +-- + +include::definition_ee.adoc[] + +include::implementation_ee.adoc[] + +include::inheritance_ee.adoc[] + +include::injectionandresolution_ee.adoc[] + +include::scopescontext_ee.adoc[] + +include::lifecycle_ee.adoc[] + +include::decorators_ee.adoc[] + +include::interceptors_ee.adoc[] + +include::events_ee.adoc[] + +include::spi_ee.adoc[] + +include::packagingdeployment_ee.adoc[] + +include::el.adoc[] + +include::xrefs.adoc[] diff --git a/specification/src/main/asciidoc/platform/cdi-ee-spec/lifecycle_ee.adoc b/specification/src/main/asciidoc/platform/cdi-ee-spec/lifecycle_ee.adoc new file mode 100644 index 00000000..72535108 --- /dev/null +++ b/specification/src/main/asciidoc/platform/cdi-ee-spec/lifecycle_ee.adoc @@ -0,0 +1,66 @@ +[[lifecycle_ee]] + +== Lifecycle of contextual instances + +[[biz_method_ee]] + +=== Container invocations and interception in Jakarta EE + +When the application invokes: + +* a business method of a session bean via an EJB remote or local reference, + +the invocation is treated as a _business method invocation_. + +When running in Jakarta EE, the container must extend the rules defined in <>, with: + +* Invocation of EJB timer service timeouts by the container are not business method invocations, but are intercepted by interceptors for EJB timeouts. +* Only an invocation of business method on an EJB session bean is subject to EJB services such as declarative transaction management, concurrency, security and asynchronicity, as defined by the EJB specification. +* Additionally, invocations of message listener methods of message-driven beans during message delivery are passed through method interceptors. + + +[[stateful_lifecycle]] + +==== Lifecycle of EJB stateful session beans + +When the `create()` method of a `Bean` object that represents an EJB stateful session bean that is called, the container creates and returns a container-specific internal local reference to a new EJB session bean instance. The reference must be passivation capable. This reference is not directly exposed to the application. +When the `create()` method of a `Bean` object that represents an EJB stateful session bean that is called, the container creates and returns a container-specific internal local reference to a new EJB session bean instance. The reference must be passivation capable. This reference is not directly exposed to the application. + +Before injecting or returning a contextual instance to the application, the container transforms its internal reference into an object that implements the bean types expected by the application and delegates method invocations to the underlying EJB stateful session bean instance. This object must be passivation capable. + +When the `destroy()` method is called, and if the underlying EJB was not already removed by direct invocation of a remove method by the application, the container removes the EJB stateful session bean. +The `@PreDestroy` callback must be invoked by the container. + +Note that the container performs additional work when the underlying EJB is created and removed, as defined in <> + +[[stateless_lifecycle]] + +==== Lifecycle of EJB stateless and singleton session beans + +When the `create()` method of a `Bean` object that represents an EJB stateless session or singleton session bean is called, the container creates and returns a container-specific internal local reference to the EJB session bean. +This reference is not directly exposed to the application. + +Before injecting or returning a contextual instance to the application, the container transforms its internal reference into an object that implements the bean types expected by the application and delegates method invocations to the underlying EJB session bean. +This object must be passivation capable. + +When the `destroy()` method is called, the container simply discards this internal reference. + +Note that the container performs additional work when the underlying EJB is created and removed, as defined in <> + +[[resource_lifecycle]] + +==== Lifecycle of resources + +When the `create()` method of a `Bean` object that represents a resource is called, the container creates and returns a container-specific internal reference to the Jakarta EE component environment resource, entity manager, entity manager factory, remote EJB instance or web service reference. This reference is not directly exposed to the application. + +Before injecting or returning a contextual instance to the application, the container transforms its internal reference into an object that implements the bean types expected by the application and delegates method invocations to the underlying resource, entity manager, entity manager factory, remote EJB instance or web service reference. This object must be passivation capable. + +The container must perform ordinary Jakarta EE component environment injection upon any non-static field that functions as a resource declaration, as defined by the Jakarta EE platform and Common Annotations for the Java platform specifications. +The container is not required to perform Jakarta EE component environment injection upon a static field. +Portable applications should not rely upon the value of a static field that functions as a resource declaration. + +References to EJBs and web services are always dependent scoped and a new instance must be obtained for every injection performed. + +For an entity manager associated with a resource definition, it must behave as though it were injected directly using `@PersistenceContext`. + +When the `destroy()` method of a bean which represents a remote stateful EJB reference is called, the container will _not_ automatically destroy the EJB reference. The application must explicitly call the method annotated `@Remove`. This behavior differs to that specified in <> for beans which represent a local stateful EJB reference diff --git a/specification/src/main/asciidoc/platform/cdi-ee-spec/packagingdeployment_ee.adoc b/specification/src/main/asciidoc/platform/cdi-ee-spec/packagingdeployment_ee.adoc new file mode 100644 index 00000000..759e31e3 --- /dev/null +++ b/specification/src/main/asciidoc/platform/cdi-ee-spec/packagingdeployment_ee.adoc @@ -0,0 +1,58 @@ +[[packaging_deployment_ee]] + +== Packaging and deployment in Jakarta EE + + +[[bean_archive_ee]] +=== Bean archive with EJB Session Beans + +When running in Jakarta EE, the container must extend the rules defined in <> with: + +* An _implicit bean archive_ may also contain EJB session beans, and +* EJB session bean should be considered as bean class with bean defining annotation when determining if an archive is an _implicit bean archive_. + +When determining which archives are bean archives, the container must also consider: + +* EJB jars or application client jars +* The `WEB-INF/classes` directory of a war + +The container is not required to support application client jar bean archives. + +A Jakarta EE container is required by the Jakarta EE specification to support Jakarta EE modules. + +In a war, the `beans.xml` file must be named: + +* `WEB-INF/beans.xml` or `WEB-INF/classes/META-INF/beans.xml`. + +If a war has a file named `beans.xml` in both the `WEB-INF` directory and in the `WEB-INF/classes/META-INF` directory, then non-portable behavior results. +Portable applications must have a `beans.xml` file in only one of the `WEB-INF` or the `WEB-INF/classes/META-INF` directories. + +The following additional rules apply regarding container search for beans: + +* In an application deployed as an ear, the container searches every bean archive bundled with or referenced by the ear, including bean archives bundled with or referenced by wars, EJB jars and rars contained in the ear. +The bean archives might be library jars, EJB jars or war `WEB-INF/classes` directories. +* In an application deployed as a war, the container searches every bean archive bundled with or referenced by the war. +The bean archives might be library jars or the `WEB-INF/classes` directory. +* In an application deployed as an EJB jar, the container searches the EJB jar, if it is a bean archive, and every bean archive referenced by the EJB jar. +* In an application deployed as a rar, the container searches every bean archive bundled with or referenced by the rar. +* An embeddable EJB container searches each bean archive in the JVM classpath that is listed in the value of the embeddable container initialization property `jakarta.ejb.embeddable.modules`, or every bean archive in the JVM classpath if the property is not specified. +The bean archives might be directories, library jars or EJB jars. + + +[[type_bean_discovery_ee]] + +=== Type and Bean discovery for EJB + +In Jakarta EE, the container automatically discovers EJB session beans and other Jakarta EE component class supporting injection, in bean archives like it does for managed bean as defined in <>. + +[[bean_discovery_steps_ee]] + +==== Bean discovery in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined in <> and must also discover each EJB session bean. + +[[trimmed_bean_archive_ee]] + +==== Trimmed bean archive in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined in <> and must ensure that EJB session beans are not removed from the set of discovered types. diff --git a/specification/src/main/asciidoc/platform/cdi-ee-spec/scopescontext_ee.adoc b/specification/src/main/asciidoc/platform/cdi-ee-spec/scopescontext_ee.adoc new file mode 100644 index 00000000..9b9642ed --- /dev/null +++ b/specification/src/main/asciidoc/platform/cdi-ee-spec/scopescontext_ee.adoc @@ -0,0 +1,213 @@ +[[contexts_ee]] + +== Scopes and contexts in Jakarta EE + +[[dependent_context_ee]] + +=== Dependent pseudo-scope in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined in <> and must also ensure that if a bean is declared to have `@Dependent` scope: + +* When a Unified EL expression in a JSF or JSP page that refers to the bean by its bean name is evaluated, at most one instance of the bean is instantiated. +This instance exists to service just a single evaluation of the EL expression. +It is reused if the bean name appears multiple times in the EL expression, but is never reused when the EL expression is evaluated again, or when another EL expression is evaluated. + +[[dependent_objects_ee]] + +==== Dependent objects in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined for bean in <> to Jakarta EE component class instance. + +[[dependent_destruction_ee]] + +==== Destruction of objects with scope `@Dependent` in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined for bean in <> to Jakarta EE component class instance, and must also ensure that : + +* all `@Dependent` scoped contextual instances created during evaluation of a Unified EL expression in a JSP or JSF page are destroyed when the evaluation completes. + +[[dependent_scope_el]] + +==== Dependent pseudo-scope and Unified EL + +Suppose a Unified EL expression in a JSF or JSP page refers to a bean with scope `@Dependent` by its bean name. Each time the EL expression is evaluated: + +* the bean is instantiated at most once, and +* the resulting instance is reused for every appearance of the bean name, and +* the resulting instance is destroyed when the evaluation completes. + + +Portable extensions that integrate with the container via Unified EL should also ensure that these rules are enforced. + + +[[passivating_scope_ee]] + +=== Passivation and passivating scopes in Jakarta EE + +[[passivation_capable_ee]] + +==== Passivation capable beans in Jakarta EE + +* As defined by the EJB specification, an EJB stateful session beans is passivation capable if: +** interceptors and decorators of the bean are passivation capable, and, +** the EJB stateful session bean does not have the `passivationCapable` flag set to `false`. +* As defined by the EJB specification, an EJB stateless session bean or an EJB singleton session bean is not passivation capable. + +[[passivation_capable_dependency_ee]] + +==== Passivation capable dependencies in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined in <>, and must also guarantee that: + +* all EJB stateless session beans are passivation capable dependencies, +* all EJB singleton session beans are passivation capable dependencies, +* all passivation capable EJB stateful session beans are passivation capable dependencies, and +* all Jakarta EE resources are passivation capable dependencies. + +[[passivation_validation_ee]] + +==== Validation of passivation capable beans and dependencies in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined for managed beans in <> to EJB session beans. + +[[builtin_contexts_ee]] + +=== Context management for built-in scopes in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined in <> and is also required to ensure the following rules for built-in context implementation. + +The built-in request and application context objects are active during servlet, web service and EJB invocations, and the built in session and request context objects are active during servlet and web service invocations. + +[[request_context_ee]] + +==== Request context lifecycle in Jakarta EE + +When running in Jakarta EE the container must extend the rules defined in <> and is also required to implement request context with the following rules. + +The request context is active: + +* during the `service()` method of any servlet in the web application, during the `doFilter()` method of any servlet filter and when the container calls any `ServletRequestListener` or `AsyncListener`, +* during any Jakarta EE web service invocation, +* during any remote method invocation of any EJB, during any asynchronous method invocation of any EJB, during any call to an EJB timeout method and during message delivery to any EJB message-driven bean. + + +The request context is destroyed: + +* at the end of the servlet request, after the `service()` method, all `doFilter()` methods, and all `requestDestroyed()` and `onComplete()` notifications return, +* after the web service invocation completes, +* after the EJB remote method invocation, asynchronous method invocation, timeout or message delivery completes if it did not already exist when the invocation occurred. + +The payload of the event fired when the request context is initialized or destroyed is: + +* the `ServletRequest` if the context is initialized or destroyed due to a servlet request, or +* the `ServletRequest` if the context is initialized or destroyed due to a web service invocation, or +* any `java.lang.Object` for other types of request. + +[[session_context_ee]] + +==== Session context lifecycle in Jakarta EE + +When running in Jakarta EE the container is required to implement session context with the following rules. + +The session scope is active: + +* during the `service()` method of any servlet in the web application, during the `doFilter()` method of any servlet filter and when the container calls any `HttpSessionListener`, `AsyncListener` or `ServletRequestListener`. + +The session context is shared between all servlet requests that occur in the same HTTP session. +The session context is destroyed when the `HTTPSession` times out, after all `HttpSessionListener` s have been called, and at the very end of any request in which `invalidate()` was called, after all filters and `ServletRequestListener` s have been called. + +An event with qualifier `@Initialized(SessionScoped.class)` is synchronously fired when the session context is initialized. +An event with qualifier `@BeforeDestroyed(SessionScoped.class)` is synchronously fired when the session context is about to be destroyed, i.e. before the actual destruction. +An event with qualifier `@Destroyed(SessionScoped.class)` is synchronously fired when the session context is destroyed, i.e. after the actual destruction. +The event payload is `jakarta.servlet.http.HttpSession`. + +[[application_context_ee]] + +==== Application context lifecycle in Jakarta EE + +When running in Jakarta EE the container must extend the rules defined in <> and is also required to implement application context with the following rules. + +The application scope is active: + +* during the `service()` method of any servlet in the web application, during the `doFilter()` method of any servlet filter and when the container calls any `ServletContextListener`, `HttpSessionListener`, `AsyncListener` or `ServletRequestListener`, +* during any Jakarta EE web service invocation, +* during any asynchronous invocation of an event observer, +* during any remote method invocation of any EJB, during any asynchronous method invocation of any EJB, during any call to an EJB timeout method and during message delivery to any EJB message-driven bean, +* when the disposer method or `@PreDestroy` callback of any bean with any normal scope other than `@ApplicationScoped` is called, and +* during `@PostConstruct` callback of any bean. + + +The application context is shared between all servlet requests, web service invocations, asynchronous invocation of an event observer, EJB remote method invocations, EJB asynchronous method invocations, EJB timeouts and message deliveries to message-driven beans that execute within the same application. +The application context is destroyed when the application is shut down. + +The payload of the event fired when the application context is initialized or destroyed is: + +* the `ServletContext` if the application is a web application deployed to a Servlet container, or +* any `java.lang.Object` for other types of application. + + +[[conversation_context_ee]] + +==== Conversation context lifecycle in Jakarta EE + +When running in Jakarta EE the container is required to implement conversation context with the following rules. + +The conversation scope is active during all Servlet requests. + +An event with qualifier `@Initialized(ConversationScoped.class)` is synchronously fired when the conversation context is initialized. +An event with qualifier `@BeforeDestroyed(ConversationScoped.class)` is synchronously fired when the conversation is about to be destroyed, i.e. before the actual destruction. +An event with qualifier `@Destroyed(ConversationScoped.class)` is synchronously fired when the conversation is destroyed, i.e. after the actual destruction. +The event payload is: + +* the conversation id if the conversation context is destroyed and is not associated with a current Servlet request, or +* the `ServletRequest` if the application is a web application deployed to a Servlet container, or +* any `java.lang.Object` for other types of application. + + +The conversation context provides access to state associated with a particular _conversation_. +Every Servlet request has an associated conversation. +This association is managed automatically by the container according to the following rules: + +* Any Servlet request has exactly one associated conversation. +* The container provides a filter with the name "CDI Conversation Filter", which may be mapped in `web.xml`, allowing the user alter when the conversation is associated with the servlet request. +If this filter is not mapped in any `web.xml` in the application, the conversation associated with a Servlet request is determined at the beginning of the request before calling any `service()` method of any servlet in the web application, calling the `doFilter()` method of any servlet filter in the web application and before the container calls any `ServletRequestListener` or `AsyncListener` in the web application. +* The implementation should determine the conversation associated with the Servlet request in a way that does not prevent other filters or servlet from setting the request character encoding or parsing the request body themselves. + +Any conversation is in one of two states: _transient_ or _long-running_. + +* By default, a conversation is transient +* A transient conversation may be marked long-running by calling `Conversation.begin()` +* A long-running conversation may be marked transient by calling `Conversation.end()` + + +All long-running conversations have a string-valued unique identifier, which may be set by the application when the conversation is marked long-running, or generated by the container. + +If the conversation associated with the current Servlet request is in the _transient_ state at the end of a Servlet request, it is destroyed, and the conversation context is also destroyed. + +If the conversation associated with the current Servlet request is in the _long-running_ state at the end of a Servlet request, it is not destroyed. +The long-running conversation associated with a request may be propagated to any Servlet request via use of a request parameter named `cid` containing the unique identifier of the conversation. +In this case, the application must manage this request parameter. + +If the current Servlet request is a JSF request, and the conversation is in _long-running_ state, it is propagated according to the following rules: + +* The long-running conversation context associated with a request that renders a JSF view is automatically propagated to any faces request (JSF form submission) that originates from that rendered page. +* The long-running conversation context associated with a request that results in a JSF redirect (a redirect resulting from a navigation rule or JSF `NavigationHandler`) is automatically propagated to the resulting non-faces request, and to any other subsequent request to the same URL. +This is accomplished via use of a request parameter named `cid` containing the unique identifier of the conversation. + + +When no conversation is propagated to a Servlet request, or if a request parameter named `conversationPropagation` has the value `none` the request is associated with a new transient conversation. + +All long-running conversations are scoped to a particular HTTP servlet session and may not cross session boundaries. + +In the following cases, a propagated long-running conversation cannot be restored and reassociated with the request: + +* When the HTTP servlet session is invalidated, all long-running conversation contexts created during the current session are destroyed, after the servlet `service()` method completes. +* The container is permitted to arbitrarily destroy any long-running conversation that is associated with no current Servlet request, in order to conserve resources. + + +The _conversation timeout_, which may be specified by calling `Conversation.setTimeout()` is a hint to the container that a conversation should not be destroyed if it has been active within the last given interval in milliseconds. + +If the propagated conversation cannot be restored, the container must associate the request with a new transient conversation and throw an exception of type `jakarta.enterprise.context.NonexistentConversationException`. + +The container ensures that a long-running conversation may be associated with at most one request at a time, by blocking or rejecting concurrent requests. +If the container rejects a request, it must associate the request with a new transient conversation and throw an exception of type `jakarta.enterprise.context.BusyConversationException`. diff --git a/specification/src/main/asciidoc/platform/cdi-ee-spec/spi_ee.adoc b/specification/src/main/asciidoc/platform/cdi-ee-spec/spi_ee.adoc new file mode 100644 index 00000000..9ba92f40 --- /dev/null +++ b/specification/src/main/asciidoc/platform/cdi-ee-spec/spi_ee.adoc @@ -0,0 +1,119 @@ +[[spi_ee]] + +== Portable extensions in Jakarta EE + +[[bean_ee]] + +=== The `Bean` interface in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined in <> for managed bean to EJB session bean. + +[[interceptor_ee]] + +==== The `Interceptor` interface in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined in <> and must also ensure that + +`PRE_PASSIVATE`, `POST_ACTIVATE` and `AROUND_TIMEOUT` InterceptorType values are linked to EJB lifecycle callback or timeout method. + + +[[injectiontarget_ee]] + +=== `InjectionTarget` interface in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined for `InjectionTarget` in <> and must also ensure that: + +* when `inject()` is called, the container performs Jakarta EE component environment injection, according to the semantics required by the Jakarta EE platform specification, sets the value of all injected fields, and calls all initializer methods, as defined in <>. +* `@PostConstruct` callback is called according to the semantics required by the Jakarta EE platform specification. +* `@PreDestroy` callback is called according to the semantics required by the Jakarta EE platform specification. + + +[[beanmanager_ee]] + +=== The `BeanManager` object in Jakarta EE + +[[provider_ee]] + +==== Obtaining a reference to the CDI container in Jakarta EE + +A Jakarta EE container is required to provide a CDI provider that will allow access to the current container for any Jakarta EE application or Jakarta EE module which contains enabled beans. + +Jakarta EE Components may obtain an instance of `BeanManager` from JNDI by looking up the name `java:comp/BeanManager`. + +[[alternative_metadata_sources_ee]] + +=== Alternative metadata sources and EJB + +When running in Jakarta EE, the container must extend the rules defined in <> and ensure that: + +* when an `AnnotatedType` represents an EJB session bean class, `Annotated.getTypeClosure()` must returns the EJB session bean types as defined in <>. + +[[init_events_ee]] + +=== Addition to Container lifecycle events in Jakarta EE + +[[process_annotated_type_ee]] + +==== `ProcessAnnotatedType` event in Jakarta EE + +When running in Jakarta EE, the container must extend the rules defined in <> to Jakarta EE component and EJB session bean classes. + +[[process_injection_point_ee]] + +==== `ProcessInjectionPoint` event and EJB + +When running in Jakarta EE, the container must also fire an event for every injection point of every Jakarta EE component class supporting injection that may be instantiated by the container at runtime, including every EJB session or message-driven bean. + +[[process_injection_target_ee]] + +==== `ProcessInjectionTarget` event and EJB + +When running in Jakarta EE, the container must also fire an event for every Jakarta EE component class supporting injection that may be instantiated by the container at runtime, including every EJB session or message-driven bean. + +The container must extend the rules defined in <> for managed bean to EJB session bean and other Jakarta EE component class supporting injection. + +For example, this observer decorates the `InjectionTarget` for all servlets. + +[source, java] +---- + void decorateServlet(@Observes ProcessInjectionTarget pit) { + pit.setInjectionTarget( decorate( pit.getInjectionTarget() ) ); +} +---- + + +[[process_bean_attributes_ee]] + +==== `ProcessBeanAttributes` event and EJB + +When running in Jakarta EE, the container must extend the rules defined in <> to EJB session bean. + + +[[process_bean_ee]] + +==== `ProcessBean` event and EJB + +In addition to definition given in <> the following apply: + +* For a session bean with bean class `X`, the container must raise an event of type `ProcessSessionBean`. + +Resources are considered to be producer fields. + +When running in Jakarta EE, the interface `jakarta.enterprise.inject.spi.ProcessBean` is also a supertype of `jakarta.enterprise.inject.spi.ProcessSessionBean` : + +[source, java] +---- +public interface ProcessSessionBean + extends ProcessManagedBean { + public String getEjbName(); + public SessionBeanType getSessionBeanType(); +} +---- + +* `getEjbName()` returns the EJB name of the session bean. +* `getSessionBeanType()` returns a `jakarta.enterprise.inject.spi.SessionBeanType` representing the kind of session bean. + +[source, java] +---- +public enum SessionBeanType { STATELESS, STATEFUL, SINGLETON } +---- diff --git a/specification/src/main/asciidoc/platform/cdi-ee-spec/xrefs.adoc b/specification/src/main/asciidoc/platform/cdi-ee-spec/xrefs.adoc new file mode 100644 index 00000000..f9e14403 --- /dev/null +++ b/specification/src/main/asciidoc/platform/cdi-ee-spec/xrefs.adoc @@ -0,0 +1,178 @@ +:cdi_spec_url: https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0 + +== CDI Specification References +References from the CDI EE Integration specification to the online CDI core specification are provided in the following sections. + +[[concepts]] +* {cdi_spec_url}#concepts[2.1. Concepts] + +[[capabilities]] +* {cdi_spec_url}#capabilities[2.1.1. Functionality provided by the container to the bean] + +[[legal_bean_types]] +* {cdi_spec_url}#legal_bean_types[2.1.2.1. Legal bean types] + +[[scopes]] +* {cdi_spec_url}#scopes[2.1.4. Scopes] + +[[default_bean_discovery]] +* {cdi_spec_url}#default_bean_discovery[2.1.5. Default bean discovery mode] + +[[default_name]] +* {cdi_spec_url}#default_name[2.1.6.2. Default bean names] + +[[implementation]] +* {cdi_spec_url}#implementation[2.2. Programming model] + +[[what_classes_are_beans]] +* {cdi_spec_url}#what_classes_are_beans[2.2.1.1. Which Java classes are managed beans?] + +[[producer_method]] +* {cdi_spec_url}#producer_method[2.2.2. Producer methods] + +[[declaring_producer_method]] +* {cdi_spec_url}#declaring_producer_method[2.2.2.2. Declaring a producer method] + +[[producer_field]] +* {cdi_spec_url}#producer_field[2.2.3. Producer fields] + +[[producer_field_types]] +* {cdi_spec_url}#producer_field_types[2.2.3.1. Bean types of a producer field] + +[[declaring_producer_field]] +* {cdi_spec_url}#declaring_producer_field[2.2.3.2. Declaring a producer field] + +[[disposer_method]] +* {cdi_spec_url}#disposer_method[2.2.4. Disposer methods] + +[[declaring_disposer_method]] +* {cdi_spec_url}#declaring_disposer_method[2.2.4.2. Declaring a disposer method] + +[[injected_fields]] +* {cdi_spec_url}#injected_fields[2.2.6. Injected fields] + +[[initializer_methods]] +* {cdi_spec_url}#initializer_methods[2.2.7. Initializer methods] + +[[type_level_inheritance]] +* {cdi_spec_url}#type_level_inheritance[2.3.1. Inheritance of type-level metadata] + +[[member_level_inheritance]] +* {cdi_spec_url}#member_level_inheritance[2.3.2. Inheritance of member-level metadata] + +[[injection_and_resolution]] +* {cdi_spec_url}#injection_and_resolution[2.4. Dependency injection and lookup] + +[[selection]] +* {cdi_spec_url}#selection[2.4.1. Modularity] + +[[unsatisfied_and_ambig_dependencies]] +* {cdi_spec_url}#unsatisfied_and_ambig_dependencies[2.4.2.2. Unsatisfied and ambiguous dependencies] + +[[name_resolution]] +* {cdi_spec_url}#name_resolution[2.4.3. Name resolution] + +[[ambig_names]] +* {cdi_spec_url}#ambig_names[2.4.3.1. Ambiguous names] + +[[injection]] +* {cdi_spec_url}#injection[2.4.5. Dependency injection] + +[[instantiation]] +* {cdi_spec_url}#instantiation[2.4.5.1. Injection using the bean constructor] + +[[fields_initializer_methods]] +* {cdi_spec_url}#fields_initializer_methods[2.4.5.2. Injection of fields and initializer methods] + +[[dependent_objects_destruction]] +* {cdi_spec_url}#dependent_objects_destruction[2.4.5.3. Destruction of dependent objects] + +[[bean_metadata]] +* {cdi_spec_url}#bean_metadata[2.4.5.8. Bean metadata] + +[[contexts]] +* {cdi_spec_url}#contexts[2.5. Scopes and contexts] + +[[dependent_context]] +* {cdi_spec_url}#dependent_context[2.5.4. Dependent pseudo-scope] + +[[dependent_objects]] +* {cdi_spec_url}#dependent_objects[2.5.4.1. Dependent objects] + +[[dependent_destruction]] +* {cdi_spec_url}#dependent_destruction[2.5.4.2. Destruction of objects with scope @Dependent] + +[[contextual_instance]] +* {cdi_spec_url}#contextual_instance[2.5.5.3. Contextual instance of a bean] + +[[builtin_contexts]] +* {cdi_spec_url}#builtin_contexts[2.5.6. Context management for built-in scopes] + +[[request_context]] +* {cdi_spec_url}#request_context[2.5.6.1. Request context lifecycle] + +[[application_context]] +* {cdi_spec_url}#application_context[2.5.6.2. Application context lifecycle] + +[[biz_method]] +* {cdi_spec_url}#biz_method[2.6.2. Container invocations and interception] + +[[interceptors]] +* {cdi_spec_url}#interceptors[2.7. Interceptor bindings] + +[[observer_method_invocation_context]] +* {cdi_spec_url}#observer_method_invocation_context[2.8.5.3. Observer method invocation context] + +[[bean_archive_full]] +* {cdi_spec_url}#bean_archive_full[3.10.1. Bean archives in CDI Full] + +[[type_bean_discovery_full]] +* {cdi_spec_url}#type_bean_discovery_full[3.10.4. Type and Bean discovery in CDI Full] + +[[trimmed_bean_archive]] +* {cdi_spec_url}#trimmed_bean_archive[3.10.4.3. Trimmed bean archive] + +[[bean_discovery_steps_full]] +* {cdi_spec_url}#bean_discovery_steps_full[3.10.4.4. Bean discovery in CDI Full] + +[[specialization]] +* {cdi_spec_url}#specialization[3.2.3. Specialization] + +[[passivation_capable_dependency]] +* {cdi_spec_url}#passivation_capable_dependency[3.4.5.3. Passivation capable dependencies] + +[[passivation_validation]] +* {cdi_spec_url}#passivation_validation[3.4.5.5. Validation of passivation capable beans and dependencies] + +[[enabled_interceptors]] +* {cdi_spec_url}#enabled_interceptors[3.6.2. Interceptor enablement and ordering in CDI Full] + +[[decorators]] +* {cdi_spec_url}#decorators[3.7. Decorators] + +[[bean]] +* {cdi_spec_url}#bean[3.9.1. The Bean interface] + +[[interceptor]] +* {cdi_spec_url}#interceptor[3.9.1.2. The Interceptor interface] + +[[injectiontarget]] +* {cdi_spec_url}#injectiontarget[3.9.2. The Producer and InjectionTarget interfaces] + +[[beanmanager]] +* {cdi_spec_url}#beanmanager[3.9.3. The BeanManager object] + +[[alternative_metadata_sources]] +* {cdi_spec_url}#alternative_metadata_sources[3.9.4. Alternative metadata sources] + +[[process_bean]] +* {cdi_spec_url}#process_bean[3.9.5.10. ProcessBean event] + +[[process_annotated_type]] +* {cdi_spec_url}#process_annotated_type[3.9.5.6. ProcessAnnotatedType event] + +[[process_injection_target]] +* {cdi_spec_url}#process_injection_target[3.9.5.8. ProcessInjectionTarget event] + +[[process_bean_attributes]] +* {cdi_spec_url}#process_bean_attributes[3.9.5.9. ProcessBeanAttributes event] From 6e4a0a21926f6cf60ff05e86fc372cbf9e1d3b42 Mon Sep 17 00:00:00 2001 From: Ed Burns Date: Mon, 11 Mar 2024 16:51:09 -0400 Subject: [PATCH 2/4] 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 ..." to unstage) new file: specification/src/main/asciidoc/shared-includes/IntegrationRequirements.adoc Changes not staged for commit: (use "git add/rm ..." to update what will be committed) (use "git restore ..." 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 --- specification/pom.xml | 2 +- specification/src/main/asciidoc/platform/Platform.adoc | 2 +- .../{platform => shared-includes}/IntegrationRequirements.adoc | 2 +- specification/src/main/asciidoc/webprofile/WebProfile.adoc | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) rename specification/src/main/asciidoc/{platform => shared-includes}/IntegrationRequirements.adoc (71%) diff --git a/specification/pom.xml b/specification/pom.xml index 73072ec4..fe9b0543 100644 --- a/specification/pom.xml +++ b/specification/pom.xml @@ -20,7 +20,7 @@ org.eclipse.ee4j project - 1.0.7 + 1.0.9 4.0.0 diff --git a/specification/src/main/asciidoc/platform/Platform.adoc b/specification/src/main/asciidoc/platform/Platform.adoc index 990a0f7f..105349b6 100644 --- a/specification/src/main/asciidoc/platform/Platform.adoc +++ b/specification/src/main/asciidoc/platform/Platform.adoc @@ -23,7 +23,7 @@ include::ServiceProviderInterface.adoc[] include::CompatibilityMigration.adoc[] -include::IntegrationRequirements.adoc[] +include::../shared-includes/IntegrationRequirements.adoc[] include::FutureDirections.adoc[] diff --git a/specification/src/main/asciidoc/platform/IntegrationRequirements.adoc b/specification/src/main/asciidoc/shared-includes/IntegrationRequirements.adoc similarity index 71% rename from specification/src/main/asciidoc/platform/IntegrationRequirements.adoc rename to specification/src/main/asciidoc/shared-includes/IntegrationRequirements.adoc index c615c945..9d2ec5f3 100644 --- a/specification/src/main/asciidoc/platform/IntegrationRequirements.adoc +++ b/specification/src/main/asciidoc/shared-includes/IntegrationRequirements.adoc @@ -2,4 +2,4 @@ == Component Specification Integration Requirements This section defines the requirements between component specifications that are included in the Platform. -include::cdi-ee-spec/javaeeintegration.adoc[leveloffset=+1] \ No newline at end of file +include::../platform/cdi-ee-spec/javaeeintegration.adoc[leveloffset=+1] diff --git a/specification/src/main/asciidoc/webprofile/WebProfile.adoc b/specification/src/main/asciidoc/webprofile/WebProfile.adoc index fe6426f1..8d622c8a 100644 --- a/specification/src/main/asciidoc/webprofile/WebProfile.adoc +++ b/specification/src/main/asciidoc/webprofile/WebProfile.adoc @@ -1,5 +1,7 @@ include::Introduction.adoc[] +include::../shared-includes/IntegrationRequirements.adoc[] + include::WebProfileDefinition.adoc[] include::RevisionHistory.adoc[] From d56d04fc8f91b5695a05afa3bc0803e9fe2d78c8 Mon Sep 17 00:00:00 2001 From: Ed Burns Date: Fri, 29 Mar 2024 16:01:40 -0700 Subject: [PATCH 3/4] On branch edburns-msft-redhat-cdi-integration-838 Addresses https://github.com/jakartaee/platform/pull/855#pullrequestreview-1931388280 from @arjantijms modified: specification/src/main/asciidoc/platform/cdi-ee-spec/implementation_ee.adoc Move this text to https://github.com/jakartaee/security/pull/323 . Signed-off-by: Ed Burns --- .../asciidoc/platform/cdi-ee-spec/implementation_ee.adoc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/specification/src/main/asciidoc/platform/cdi-ee-spec/implementation_ee.adoc b/specification/src/main/asciidoc/platform/cdi-ee-spec/implementation_ee.adoc index 7e5d1524..4ee776eb 100644 --- a/specification/src/main/asciidoc/platform/cdi-ee-spec/implementation_ee.adoc +++ b/specification/src/main/asciidoc/platform/cdi-ee-spec/implementation_ee.adoc @@ -299,12 +299,6 @@ The resulting set of bean types for a resource consists only of < Date: Fri, 29 Mar 2024 16:21:03 -0700 Subject: [PATCH 4/4] 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 --- .../main/asciidoc/platform/cdi-ee-spec/implementation_ee.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specification/src/main/asciidoc/platform/cdi-ee-spec/implementation_ee.adoc b/specification/src/main/asciidoc/platform/cdi-ee-spec/implementation_ee.adoc index 4ee776eb..1ffcfeac 100644 --- a/specification/src/main/asciidoc/platform/cdi-ee-spec/implementation_ee.adoc +++ b/specification/src/main/asciidoc/platform/cdi-ee-spec/implementation_ee.adoc @@ -299,6 +299,10 @@ The resulting set of bean types for a resource consists only of <