From 7fd3bee6ced7de9dc53538c27b5f96d3875863cc Mon Sep 17 00:00:00 2001 From: Ladislav Thon Date: Tue, 30 Jun 2020 17:17:08 +0200 Subject: [PATCH] specify optional integration with MicroProfile Context Propagation Signed-off-by: Ladislav Thon --- .../optional-container-integration.asciidoc | 29 ----------- .../asciidoc/optional-integrations.asciidoc | 48 +++++++++++++++++++ 2 files changed, 48 insertions(+), 29 deletions(-) delete mode 100644 spec/src/main/asciidoc/optional-container-integration.asciidoc create mode 100644 spec/src/main/asciidoc/optional-integrations.asciidoc diff --git a/spec/src/main/asciidoc/optional-container-integration.asciidoc b/spec/src/main/asciidoc/optional-container-integration.asciidoc deleted file mode 100644 index a44196df..00000000 --- a/spec/src/main/asciidoc/optional-container-integration.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -// -// Copyright (c) 2020 Contributors to the Eclipse Foundation -// -// See the NOTICE file(s) distributed with this work for additional -// information regarding copyright ownership. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// Contributors: -// Ladislav Thon - -[[optional-container-integration]] - -== Recommendations for Optional Container Integration - -This section describes the expected behaviors when the implementation runs in a Jakarta EE container. - -=== `@Asynchronous` - -Threads that are servicing `@Asynchronous` invocations should, for the duration of the invocation, have the correct security context and naming context associated. diff --git a/spec/src/main/asciidoc/optional-integrations.asciidoc b/spec/src/main/asciidoc/optional-integrations.asciidoc new file mode 100644 index 00000000..67a48b2a --- /dev/null +++ b/spec/src/main/asciidoc/optional-integrations.asciidoc @@ -0,0 +1,48 @@ +// +// Copyright (c) 2020 Contributors to the Eclipse Foundation +// +// See the NOTICE file(s) distributed with this work for additional +// information regarding copyright ownership. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// Contributors: +// Ladislav Thon + +[[optional-integrations]] + +== Recommendations for Optional Integrations + +=== Jakarta EE + +This section describes the expected behaviors when the implementation runs in a Jakarta EE container. + +==== `@Asynchronous` + +Threads that are servicing `@Asynchronous` invocations should, for the duration of the invocation, have the correct security context and naming context associated. + +=== Context Propagation + +This section describes the expected behaviors when the implementation runs in an environment that provides implementation of MicroProfile Context Propagation. +These behaviors are currently optional because the MicroProfile Context Propagation specification is not part of the MicroProfile Platform. + +==== `@Asynchronous` + +Implementations should use MicroProfile Context Propagation to propagate contexts to threads that are servicing `@Asynchronous` invocations. +The decision which contexts are propagated and which are cleared is left to the MicroProfile Context Propagation implementation. + +[NOTE] +MicroProfile Context Propagation intentionally doesn't define which contexts are propagated and which are cleared by default. +This is left to implementations. +However, there are configuration properties that you can use for this purpose. + +If the environment that provides MicroProfile Context Propagation is itself a Jakarta EE container, the _Jakarta EE_ section above doesn't apply and context propagation is left entirely to MicroProfile Context Propagation.