tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgallim...@apache.org
Subject tomee git commit: make client security a thread local based object
Date Mon, 10 Oct 2016 21:49:59 GMT
Repository: tomee
Updated Branches:
  refs/heads/tomee-1.7.x ea8347ac0 -> 2998e4adc


make client security a thread local based object


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/2998e4ad
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/2998e4ad
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/2998e4ad

Branch: refs/heads/tomee-1.7.x
Commit: 2998e4adc9bd376a97bd9f7f121d18ba574f462c
Parents: ea8347a
Author: Jonathan S. Fisher <jfisher@tomitribe.com>
Authored: Mon Oct 10 16:27:33 2016 -0500
Committer: Jonathan Gallimore <jon@jrg.me.uk>
Committed: Mon Oct 10 22:49:37 2016 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/openejb/core/ivm/ClientSecurity.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/2998e4ad/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/ClientSecurity.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/ClientSecurity.java
b/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/ClientSecurity.java
index b154856..cbcfe4b 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/ClientSecurity.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/ClientSecurity.java
@@ -22,13 +22,13 @@ package org.apache.openejb.core.ivm;
  */
 public class ClientSecurity {
 
-    private static Object clientIdentity;
+    private static ThreadLocal<Object> clientIdentity = new ThreadLocal<Object>();
 
     public static Object getIdentity() {
-        return clientIdentity;
+        return clientIdentity.get();
     }
 
     public static void setIdentity(final Object clientIdentity) {
-        ClientSecurity.clientIdentity = clientIdentity;
+        ClientSecurity.clientIdentity.set(clientIdentity);
     }
 }


Mime
View raw message