[jboss-cvs] JBossAS SVN: r98903 - in projects/security/security-jboss-sx/trunk/jbosssx/src/main/java/org/jboss/security: auth/spi and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Dec 23 07:03:24 EST 2009


Author: anil.saldhana at jboss.com
Date: 2009-12-23 07:03:24 -0500 (Wed, 23 Dec 2009)
New Revision: 98903

Added:
   projects/security/security-jboss-sx/trunk/jbosssx/src/main/java/org/jboss/security/plugins/HostThreadLocal.java
Removed:
   projects/security/security-jboss-sx/trunk/jbosssx/src/main/java/org/jboss/security/HostThreadLocal.java
Modified:
   projects/security/security-jboss-sx/trunk/jbosssx/src/main/java/org/jboss/security/auth/spi/RemoteHostTrustLoginModule.java
Log:
JBAS-7542: move HostThreadLocal to plugins

Deleted: projects/security/security-jboss-sx/trunk/jbosssx/src/main/java/org/jboss/security/HostThreadLocal.java
===================================================================
--- projects/security/security-jboss-sx/trunk/jbosssx/src/main/java/org/jboss/security/HostThreadLocal.java	2009-12-23 11:53:57 UTC (rev 98902)
+++ projects/security/security-jboss-sx/trunk/jbosssx/src/main/java/org/jboss/security/HostThreadLocal.java	2009-12-23 12:03:24 UTC (rev 98903)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.security;
-
-import org.jboss.logging.Logger;
-
-/**
- * Supports the RemoteHostTrustLoginModule and RemoteHostValve, holds the remote host in a thread local.
- * @author Andrew C. Oliver
- * @version $Revision: 0 $
- */
-public class HostThreadLocal {
-   private static Logger log = Logger.getLogger(HostThreadLocal.class);
-   private static ThreadLocal host = new ThreadLocal();
-
-   public static String get() {
-      if (log.isTraceEnabled()) {
-          log.trace("returning "+host.get()+" for tid "+Thread.currentThread().getId());
-      }
-      return (String)host.get();
-   }
-
-   public static void set(String hostVal) {
-      if (log.isTraceEnabled()) {
-          log.trace("setting "+hostVal+" for tid "+Thread.currentThread().getId());
-      }
-      host.set(hostVal);
-   }
-
-}

Modified: projects/security/security-jboss-sx/trunk/jbosssx/src/main/java/org/jboss/security/auth/spi/RemoteHostTrustLoginModule.java
===================================================================
--- projects/security/security-jboss-sx/trunk/jbosssx/src/main/java/org/jboss/security/auth/spi/RemoteHostTrustLoginModule.java	2009-12-23 11:53:57 UTC (rev 98902)
+++ projects/security/security-jboss-sx/trunk/jbosssx/src/main/java/org/jboss/security/auth/spi/RemoteHostTrustLoginModule.java	2009-12-23 12:03:24 UTC (rev 98903)
@@ -32,7 +32,7 @@
 import javax.security.auth.login.FailedLoginException;
 import javax.transaction.Transaction;
 
-import org.jboss.security.HostThreadLocal;
+import org.jboss.security.plugins.HostThreadLocal;
 import org.jboss.security.SimpleGroup;
 import org.jboss.security.SimplePrincipal;
 

Copied: projects/security/security-jboss-sx/trunk/jbosssx/src/main/java/org/jboss/security/plugins/HostThreadLocal.java (from rev 98897, projects/security/security-jboss-sx/trunk/jbosssx/src/main/java/org/jboss/security/HostThreadLocal.java)
===================================================================
--- projects/security/security-jboss-sx/trunk/jbosssx/src/main/java/org/jboss/security/plugins/HostThreadLocal.java	                        (rev 0)
+++ projects/security/security-jboss-sx/trunk/jbosssx/src/main/java/org/jboss/security/plugins/HostThreadLocal.java	2009-12-23 12:03:24 UTC (rev 98903)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.security.plugins;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Supports the RemoteHostTrustLoginModule and RemoteHostValve, holds the remote host in a thread local.
+ * @author Andrew C. Oliver
+ * @version $Revision: 0 $
+ */
+public class HostThreadLocal 
+{
+   private static Logger log = Logger.getLogger(HostThreadLocal.class);
+   private static ThreadLocal<String> host = new ThreadLocal<String>();
+
+   public static String get() 
+   {
+      if (log.isTraceEnabled()) 
+      {
+          log.trace("returning "+host.get()+" for tid "+Thread.currentThread().getId());
+      }
+      return (String)host.get();
+   }
+
+   public static void set(String hostVal) 
+   {
+      if (log.isTraceEnabled()) 
+      {
+          log.trace("setting "+hostVal+" for tid "+Thread.currentThread().getId());
+      }
+      host.set(hostVal);
+   }
+
+}
\ No newline at end of file




More information about the jboss-cvs-commits mailing list