From 13adc2269d4a0110a0d1145951b9f7ef16eda3d7 Mon Sep 17 00:00:00 2001
From: RanVaknin <50976344+RanVaknin@users.noreply.github.com>
Date: Tue, 2 Sep 2025 14:03:04 -0700
Subject: [PATCH 1/4] Adding thread context package
---
bom/pom.xml | 5 +++
pom.xml | 1 +
thread-context/pom.xml | 33 ++++++++++++++
.../awssdk/threadcontext/ThreadStorage.java | 45 +++++++++++++++++++
4 files changed, 84 insertions(+)
create mode 100644 thread-context/pom.xml
create mode 100644 thread-context/src/main/java/software/amazon/awssdk/threadcontext/ThreadStorage.java
diff --git a/bom/pom.xml b/bom/pom.xml
index ede5b9251007..51494631af0f 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -252,6 +252,11 @@
endpoints-spi
${awsjavasdk.version}
+
+ software.amazon.awssdk
+ thread-context
+ ${awsjavasdk.version}
+
software.amazon.awssdk
diff --git a/pom.xml b/pom.xml
index 42dbdbfc01bb..fd1409a27f37 100644
--- a/pom.xml
+++ b/pom.xml
@@ -95,6 +95,7 @@
test/crt-unavailable-tests
test/architecture-tests
test/s3-tests
+ thread-context
${scm.github.url}
diff --git a/thread-context/pom.xml b/thread-context/pom.xml
new file mode 100644
index 000000000000..e942f7e0a335
--- /dev/null
+++ b/thread-context/pom.xml
@@ -0,0 +1,33 @@
+
+
+
+
+ 4.0.0
+
+ software.amazon.awssdk
+ aws-sdk-java-pom
+ 2.33.2-SNAPSHOT
+
+ thread-context
+ AWS Java SDK :: Thread Context
+
+ Provides thread-local context storage utilities for sharing data across components.
+
+ https://aws.amazon.com/sdkforjava
+
+
\ No newline at end of file
diff --git a/thread-context/src/main/java/software/amazon/awssdk/threadcontext/ThreadStorage.java b/thread-context/src/main/java/software/amazon/awssdk/threadcontext/ThreadStorage.java
new file mode 100644
index 000000000000..f7223a74f70c
--- /dev/null
+++ b/thread-context/src/main/java/software/amazon/awssdk/threadcontext/ThreadStorage.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file 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.
+ */
+
+package software.amazon.awssdk.threadcontext;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public final class ThreadStorage {
+ private static final ThreadLocal
+
+ software.amazon.awssdk
+ thread-context
+ ${awsjavasdk.version}
+
software.amazon.awssdk
textract
diff --git a/pom.xml b/pom.xml
index f5577c128f95..2e942d5f56e0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -659,6 +659,7 @@
protocols
regions
sdk-core
+ thread-context
http-client-spi
apache-client
netty-nio-client
diff --git a/test/architecture-tests/pom.xml b/test/architecture-tests/pom.xml
index 7b255deff4d5..ac97eb8cbc38 100644
--- a/test/architecture-tests/pom.xml
+++ b/test/architecture-tests/pom.xml
@@ -61,6 +61,11 @@
software.amazon.awssdk
${awsjavasdk.version}
+
+ thread-context
+ software.amazon.awssdk
+ ${awsjavasdk.version}
+
s3
software.amazon.awssdk
diff --git a/test/tests-coverage-reporting/pom.xml b/test/tests-coverage-reporting/pom.xml
index 39e84897ced9..d730618895a0 100644
--- a/test/tests-coverage-reporting/pom.xml
+++ b/test/tests-coverage-reporting/pom.xml
@@ -242,6 +242,11 @@
software.amazon.awssdk
${awsjavasdk.version}
+
+ thread-context
+ software.amazon.awssdk
+ ${awsjavasdk.version}
+