[jboss-cvs] JBossAS SVN: r91530 - in projects/security/security-jboss-sx/tags: 2.0.3.SP2 and 10 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jul 21 19:53:23 EDT 2009


Author: anil.saldhana at jboss.com
Date: 2009-07-21 19:53:22 -0400 (Tue, 21 Jul 2009)
New Revision: 91530

Added:
   projects/security/security-jboss-sx/tags/2.0.3.SP2/
   projects/security/security-jboss-sx/tags/2.0.3.SP2/acl/pom.xml
   projects/security/security-jboss-sx/tags/2.0.3.SP2/assembly/pom.xml
   projects/security/security-jboss-sx/tags/2.0.3.SP2/identity/pom.xml
   projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-bridge-as4/pom.xml
   projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-client/pom.xml
   projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-mc-int/pom.xml
   projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/pom.xml
   projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/src/main/java/org/jboss/security/ClientLoginModule.java
   projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/src/test/java/org/jboss/test/authentication/jaas/ClientLoginModuleUnitTestCase.java
   projects/security/security-jboss-sx/tags/2.0.3.SP2/parent/pom.xml
   projects/security/security-jboss-sx/tags/2.0.3.SP2/pom.xml
Removed:
   projects/security/security-jboss-sx/tags/2.0.3.SP2/acl/pom.xml
   projects/security/security-jboss-sx/tags/2.0.3.SP2/assembly/pom.xml
   projects/security/security-jboss-sx/tags/2.0.3.SP2/identity/pom.xml
   projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-bridge-as4/pom.xml
   projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-client/pom.xml
   projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-mc-int/pom.xml
   projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/pom.xml
   projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/src/main/java/org/jboss/security/ClientLoginModule.java
   projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/src/test/java/org/jboss/test/authentication/jaas/ClientLoginModuleUnitTestCase.java
   projects/security/security-jboss-sx/tags/2.0.3.SP2/parent/pom.xml
   projects/security/security-jboss-sx/tags/2.0.3.SP2/pom.xml
Log:
[maven-release-plugin]  copy for tag 2.0.3.SP2

Copied: projects/security/security-jboss-sx/tags/2.0.3.SP2 (from rev 91524, projects/security/security-jboss-sx/branches/Branch_2_0)

Deleted: projects/security/security-jboss-sx/tags/2.0.3.SP2/acl/pom.xml
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/acl/pom.xml	2009-07-21 21:59:08 UTC (rev 91524)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/acl/pom.xml	2009-07-21 23:53:22 UTC (rev 91530)
@@ -1,122 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-   <parent>
-      <groupId>org.jboss.security</groupId>
-      <artifactId>jbosssx-parent</artifactId>
-      <version>2.0.3.SP2-SNAPSHOT</version>
-   </parent>
-   <modelVersion>4.0.0</modelVersion>
-   <artifactId>jboss-security-acl-impl</artifactId>
-   <packaging>jar</packaging>
-   <name>JBoss Security ACL Implementation</name>
-   <url>http://labs.jboss.org/portal/jbosssecurity/</url>
-   <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
-   <licenses>
-      <license>
-         <name>lgpl</name>
-         <url>http://repository.jboss.com/licenses/lgpl.txt</url>
-      </license>
-   </licenses>
-   <organization>
-      <name>JBoss Inc.</name>
-      <url>http://www.jboss.org</url>
-   </organization>
-   <profiles>
-    <!--    mvn install -Psecurity-manager    -->
-    <profile>
-      <id>security-manager</id>
-      <activation>
-         <activeByDefault>false</activeByDefault>
-      </activation>
-      <properties>
-         <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
-         <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
-         <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} ${test.env}</surefire.jvm.args>
-      </properties>
-    </profile>
-    <!--     mvn install -Psecurity-manager-debug   -->
-    <!-- Best Practice:    mvn install -Psecurity-manager-debug  2>&1 > logfile2>&1 > logfile -->
-    <profile>
-      <id>security-manager-debug</id>
-      <activation>
-         <activeByDefault>false</activeByDefault>
-      </activation>
-      <properties>
-         <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
-         <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
-         <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} -Djava.security.debug=failure,access ${test.env}</surefire.jvm.args>
-      </properties>
-    </profile>
-   </profiles>
-   <build>
-      <sourceDirectory>src/main/java</sourceDirectory>
-      <outputDirectory>target/classes</outputDirectory>
-      <testSourceDirectory>src/tests/java</testSourceDirectory>
-      <testOutputDirectory>target/test-classes</testOutputDirectory>
-      <finalName>${artifactId}</finalName>
-      <resources>
-         <resource>
-            <directory>${basedir}</directory>
-            <includes>
-               <include>JBossORG-EULA.txt</include>
-            </includes>
-         </resource>
-         <resource>
-            <directory>src/main/resources</directory>
-            <includes>
-               <include>**/*.dtd</include>
-               <include>**/*.xsd</include>
-            </includes>
-         </resource>
-      </resources> 
-      <testResources>
-         <testResource>
-            <directory>src/tests/resources/</directory>
-            <includes>
-               <include>**/*.xml</include>
-            </includes>
-         </testResource>
-      </testResources>
-   </build>
-   <dependencies> 
-      <dependency>
-         <groupId>jboss</groupId>
-         <artifactId>jboss-logging-log4j</artifactId>
-         <scope>runtime</scope>
-      </dependency>
-      <dependency>
-         <groupId>org.hibernate</groupId>
-         <artifactId>hibernate</artifactId>
-         <version>3.2.4.sp1</version>
-         <scope>compile</scope>
-      </dependency>
-      <dependency>
-         <groupId>org.hibernate</groupId>
-         <artifactId>hibernate-annotations</artifactId>
-         <version>3.3.0.ga</version>
-         <scope>compile</scope>
-      </dependency>
-      <dependency>
-         <groupId>org.hibernate</groupId>
-         <artifactId>hibernate-entitymanager</artifactId>
-         <version>3.3.1.ga</version>
-         <scope>compile</scope>
-      </dependency>
-      <dependency>
-         <groupId>hsqldb</groupId>
-         <artifactId>hsqldb</artifactId>
-         <version>1.8.0.2</version>
-         <scope>test</scope>
-      </dependency>
-      <dependency>
-         <groupId>junit</groupId>
-         <artifactId>junit</artifactId>
-         <scope>test</scope>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss.security</groupId>
-         <artifactId>identity-impl</artifactId>
-         <version>${project.version}</version>
-         <scope>compile</scope>
-      </dependency>    
-   </dependencies>
-</project>

Copied: projects/security/security-jboss-sx/tags/2.0.3.SP2/acl/pom.xml (from rev 91526, projects/security/security-jboss-sx/branches/Branch_2_0/acl/pom.xml)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.SP2/acl/pom.xml	                        (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/acl/pom.xml	2009-07-21 23:53:22 UTC (rev 91530)
@@ -0,0 +1,122 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <parent>
+      <groupId>org.jboss.security</groupId>
+      <artifactId>jbosssx-parent</artifactId>
+      <version>2.0.3.SP2</version>
+   </parent>
+   <modelVersion>4.0.0</modelVersion>
+   <artifactId>jboss-security-acl-impl</artifactId>
+   <packaging>jar</packaging>
+   <name>JBoss Security ACL Implementation</name>
+   <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+   <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
+   <licenses>
+      <license>
+         <name>lgpl</name>
+         <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+      </license>
+   </licenses>
+   <organization>
+      <name>JBoss Inc.</name>
+      <url>http://www.jboss.org</url>
+   </organization>
+   <profiles>
+    <!--    mvn install -Psecurity-manager    -->
+    <profile>
+      <id>security-manager</id>
+      <activation>
+         <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+         <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
+         <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
+         <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} ${test.env}</surefire.jvm.args>
+      </properties>
+    </profile>
+    <!--     mvn install -Psecurity-manager-debug   -->
+    <!-- Best Practice:    mvn install -Psecurity-manager-debug  2>&1 > logfile2>&1 > logfile -->
+    <profile>
+      <id>security-manager-debug</id>
+      <activation>
+         <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+         <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
+         <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
+         <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} -Djava.security.debug=failure,access ${test.env}</surefire.jvm.args>
+      </properties>
+    </profile>
+   </profiles>
+   <build>
+      <sourceDirectory>src/main/java</sourceDirectory>
+      <outputDirectory>target/classes</outputDirectory>
+      <testSourceDirectory>src/tests/java</testSourceDirectory>
+      <testOutputDirectory>target/test-classes</testOutputDirectory>
+      <finalName>${artifactId}</finalName>
+      <resources>
+         <resource>
+            <directory>${basedir}</directory>
+            <includes>
+               <include>JBossORG-EULA.txt</include>
+            </includes>
+         </resource>
+         <resource>
+            <directory>src/main/resources</directory>
+            <includes>
+               <include>**/*.dtd</include>
+               <include>**/*.xsd</include>
+            </includes>
+         </resource>
+      </resources> 
+      <testResources>
+         <testResource>
+            <directory>src/tests/resources/</directory>
+            <includes>
+               <include>**/*.xml</include>
+            </includes>
+         </testResource>
+      </testResources>
+   </build>
+   <dependencies> 
+      <dependency>
+         <groupId>jboss</groupId>
+         <artifactId>jboss-logging-log4j</artifactId>
+         <scope>runtime</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.hibernate</groupId>
+         <artifactId>hibernate</artifactId>
+         <version>3.2.4.sp1</version>
+         <scope>compile</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.hibernate</groupId>
+         <artifactId>hibernate-annotations</artifactId>
+         <version>3.3.0.ga</version>
+         <scope>compile</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.hibernate</groupId>
+         <artifactId>hibernate-entitymanager</artifactId>
+         <version>3.3.1.ga</version>
+         <scope>compile</scope>
+      </dependency>
+      <dependency>
+         <groupId>hsqldb</groupId>
+         <artifactId>hsqldb</artifactId>
+         <version>1.8.0.2</version>
+         <scope>test</scope>
+      </dependency>
+      <dependency>
+         <groupId>junit</groupId>
+         <artifactId>junit</artifactId>
+         <scope>test</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss.security</groupId>
+         <artifactId>identity-impl</artifactId>
+         <version>${project.version}</version>
+         <scope>compile</scope>
+      </dependency>    
+   </dependencies>
+</project>

Deleted: projects/security/security-jboss-sx/tags/2.0.3.SP2/assembly/pom.xml
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/assembly/pom.xml	2009-07-21 21:59:08 UTC (rev 91524)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/assembly/pom.xml	2009-07-21 23:53:22 UTC (rev 91530)
@@ -1,62 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <groupId>org.jboss.security</groupId>
-    <artifactId>jbosssx-parent</artifactId>
-    <version>2.0.3.SP2-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.jboss.security</groupId>
-  <artifactId>jbosssx</artifactId>
-  <packaging>pom</packaging>
-  <name>JBoss Security Implementation for the JBAS - Assembly</name>
-  <url>http://labs.jboss.org/portal/jbosssecurity/</url>
-  <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
-  <licenses>
-    <license>
-      <name>lgpl</name>
-      <url>http://repository.jboss.com/licenses/lgpl.txt</url>
-    </license>
-  </licenses>
-  <organization>
-    <name>JBoss Inc.</name>
-    <url>http://www.jboss.org</url>
-  </organization>
-    
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.1</version>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>attached</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <archive>
-            <manifestEntries>
-              <Specification-Title>JBoss Security Implementation for the JBAS</Specification-Title>
-              <Specification-Version>${project.version}</Specification-Version>
-              <Specification-Vendor>Red Hat Middleware LLC</Specification-Vendor>
-              <Implementation-Title>JBoss Security Implementation for the JBAS</Implementation-Title>
-              <Implementation-Version>${project.version}</Implementation-Version>
-              <Implementation-VendorId>org.jboss.security</Implementation-VendorId>
-              <Implementation-Vendor>Red Hat Middleware LLC</Implementation-Vendor>
-              <Implementation-URL>http://labs.jboss.org/portal/jbosssecurity/</Implementation-URL>
-            </manifestEntries>
-          </archive>
-          <descriptors>
-            <descriptor>src/assembly/bin.xml</descriptor>
-            <descriptor>src/assembly/sources.xml</descriptor>
-          </descriptors>
-        </configuration>
-        <inherited>false</inherited>
-      </plugin>
-    </plugins>
-  </build>
-  
-</project>

Copied: projects/security/security-jboss-sx/tags/2.0.3.SP2/assembly/pom.xml (from rev 91526, projects/security/security-jboss-sx/branches/Branch_2_0/assembly/pom.xml)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.SP2/assembly/pom.xml	                        (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/assembly/pom.xml	2009-07-21 23:53:22 UTC (rev 91530)
@@ -0,0 +1,62 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.jboss.security</groupId>
+    <artifactId>jbosssx-parent</artifactId>
+    <version>2.0.3.SP2</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.jboss.security</groupId>
+  <artifactId>jbosssx</artifactId>
+  <packaging>pom</packaging>
+  <name>JBoss Security Implementation for the JBAS - Assembly</name>
+  <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+  <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
+  <licenses>
+    <license>
+      <name>lgpl</name>
+      <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+    </license>
+  </licenses>
+  <organization>
+    <name>JBoss Inc.</name>
+    <url>http://www.jboss.org</url>
+  </organization>
+    
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <version>2.1</version>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>attached</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Specification-Title>JBoss Security Implementation for the JBAS</Specification-Title>
+              <Specification-Version>${project.version}</Specification-Version>
+              <Specification-Vendor>Red Hat Middleware LLC</Specification-Vendor>
+              <Implementation-Title>JBoss Security Implementation for the JBAS</Implementation-Title>
+              <Implementation-Version>${project.version}</Implementation-Version>
+              <Implementation-VendorId>org.jboss.security</Implementation-VendorId>
+              <Implementation-Vendor>Red Hat Middleware LLC</Implementation-Vendor>
+              <Implementation-URL>http://labs.jboss.org/portal/jbosssecurity/</Implementation-URL>
+            </manifestEntries>
+          </archive>
+          <descriptors>
+            <descriptor>src/assembly/bin.xml</descriptor>
+            <descriptor>src/assembly/sources.xml</descriptor>
+          </descriptors>
+        </configuration>
+        <inherited>false</inherited>
+      </plugin>
+    </plugins>
+  </build>
+  
+</project>

Deleted: projects/security/security-jboss-sx/tags/2.0.3.SP2/identity/pom.xml
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/identity/pom.xml	2009-07-21 21:59:08 UTC (rev 91524)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/identity/pom.xml	2009-07-21 23:53:22 UTC (rev 91530)
@@ -1,86 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-   <parent>
-      <groupId>org.jboss.security</groupId>
-      <artifactId>jbosssx-parent</artifactId>
-      <version>2.0.3.SP2-SNAPSHOT</version>
-   </parent>
-   <modelVersion>4.0.0</modelVersion>
-   <artifactId>identity-impl</artifactId>
-   <packaging>jar</packaging>
-   <name>JBoss Security Identity Implementation</name>
-   <url>http://labs.jboss.org/portal/jbosssecurity/</url>
-   <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
-   <licenses>
-      <license>
-         <name>lgpl</name>
-         <url>http://repository.jboss.com/licenses/lgpl.txt</url>
-      </license>
-   </licenses>
-   <organization>
-      <name>JBoss Inc.</name>
-      <url>http://www.jboss.org</url>
-   </organization>
-   <profiles>
-    <!--    mvn install -Psecurity-manager    -->
-    <profile>
-      <id>security-manager</id>
-      <activation>
-         <activeByDefault>false</activeByDefault>
-      </activation>
-      <properties>
-         <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
-         <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
-         <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} ${test.env}</surefire.jvm.args>
-      </properties>
-    </profile>
-    <!--     mvn install -Psecurity-manager-debug   -->
-    <!-- Best Practice:    mvn install -Psecurity-manager-debug  2>&1 > logfile2>&1 > logfile -->
-    <profile>
-      <id>security-manager-debug</id>
-      <activation>
-         <activeByDefault>false</activeByDefault>
-      </activation>
-      <properties>
-         <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
-         <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
-         <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} -Djava.security.debug=failure,access ${test.env}</surefire.jvm.args>
-      </properties>
-    </profile>
-   </profiles>
-   <build>
-      <finalName>${artifactId}</finalName>
-      <resources>
-         <resource>
-            <directory>src/main</directory>
-            <includes>
-               <include>**/*.xml</include>
-            </includes>
-         </resource>
-         <resource>
-            <directory>${basedir}</directory>
-            <includes>
-               <include>JBossORG-EULA.txt</include>
-            </includes>
-         </resource>
-         <resource>
-            <directory>src/resources</directory>
-            <includes>
-               <include>**/*.dtd</include>
-               <include>**/*.xsd</include>
-            </includes>
-         </resource>
-      </resources> 
-   </build>
-   <dependencies> 
-      <dependency>
-         <groupId>org.jboss.security</groupId>
-         <artifactId>jboss-security-spi</artifactId>
-         <scope>compile</scope>
-      </dependency>
-      <dependency>
-         <groupId>junit</groupId>
-         <artifactId>junit</artifactId>
-         <scope>test</scope>
-      </dependency>
-   </dependencies>
-</project>

Copied: projects/security/security-jboss-sx/tags/2.0.3.SP2/identity/pom.xml (from rev 91526, projects/security/security-jboss-sx/branches/Branch_2_0/identity/pom.xml)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.SP2/identity/pom.xml	                        (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/identity/pom.xml	2009-07-21 23:53:22 UTC (rev 91530)
@@ -0,0 +1,86 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <parent>
+      <groupId>org.jboss.security</groupId>
+      <artifactId>jbosssx-parent</artifactId>
+      <version>2.0.3.SP2</version>
+   </parent>
+   <modelVersion>4.0.0</modelVersion>
+   <artifactId>identity-impl</artifactId>
+   <packaging>jar</packaging>
+   <name>JBoss Security Identity Implementation</name>
+   <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+   <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
+   <licenses>
+      <license>
+         <name>lgpl</name>
+         <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+      </license>
+   </licenses>
+   <organization>
+      <name>JBoss Inc.</name>
+      <url>http://www.jboss.org</url>
+   </organization>
+   <profiles>
+    <!--    mvn install -Psecurity-manager    -->
+    <profile>
+      <id>security-manager</id>
+      <activation>
+         <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+         <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
+         <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
+         <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} ${test.env}</surefire.jvm.args>
+      </properties>
+    </profile>
+    <!--     mvn install -Psecurity-manager-debug   -->
+    <!-- Best Practice:    mvn install -Psecurity-manager-debug  2>&1 > logfile2>&1 > logfile -->
+    <profile>
+      <id>security-manager-debug</id>
+      <activation>
+         <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+         <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
+         <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
+         <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} -Djava.security.debug=failure,access ${test.env}</surefire.jvm.args>
+      </properties>
+    </profile>
+   </profiles>
+   <build>
+      <finalName>${artifactId}</finalName>
+      <resources>
+         <resource>
+            <directory>src/main</directory>
+            <includes>
+               <include>**/*.xml</include>
+            </includes>
+         </resource>
+         <resource>
+            <directory>${basedir}</directory>
+            <includes>
+               <include>JBossORG-EULA.txt</include>
+            </includes>
+         </resource>
+         <resource>
+            <directory>src/resources</directory>
+            <includes>
+               <include>**/*.dtd</include>
+               <include>**/*.xsd</include>
+            </includes>
+         </resource>
+      </resources> 
+   </build>
+   <dependencies> 
+      <dependency>
+         <groupId>org.jboss.security</groupId>
+         <artifactId>jboss-security-spi</artifactId>
+         <scope>compile</scope>
+      </dependency>
+      <dependency>
+         <groupId>junit</groupId>
+         <artifactId>junit</artifactId>
+         <scope>test</scope>
+      </dependency>
+   </dependencies>
+</project>

Deleted: projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/pom.xml
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/pom.xml	2009-07-21 21:59:08 UTC (rev 91524)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/pom.xml	2009-07-21 23:53:22 UTC (rev 91530)
@@ -1,187 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-   <parent>
-      <groupId>org.jboss.security</groupId>
-      <artifactId>jbosssx-parent</artifactId>
-      <version>2.0.3.SP2-SNAPSHOT</version>
-   </parent>
-   <modelVersion>4.0.0</modelVersion>
-   <artifactId>jbosssx-bare</artifactId>
-   <packaging>jar</packaging>
-   <name>JBoss Security Implementation for the JBAS</name>
-   <url>http://labs.jboss.org/portal/jbosssecurity/</url>
-   <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
-   <licenses>
-      <license>
-         <name>lgpl</name>
-         <url>http://repository.jboss.com/licenses/lgpl.txt</url>
-      </license>
-   </licenses>
-   <organization>
-      <name>JBoss Inc.</name>
-      <url>http://www.jboss.org</url>
-   </organization>
-   <profiles>
-    <!--    mvn install -Psecurity-manager    -->
-    <profile>
-      <id>security-manager</id>
-      <activation>
-         <activeByDefault>false</activeByDefault>
-      </activation>
-      <properties>
-         <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
-         <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
-         <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} ${test.env}</surefire.jvm.args>
-      </properties>
-    </profile>
-    <!--     mvn install -Psecurity-manager-debug   -->
-    <!-- Best Practice:    mvn install -Psecurity-manager-debug  2>&1 > logfile2>&1 > logfile -->
-    <profile>
-      <id>security-manager-debug</id>
-      <activation>
-         <activeByDefault>false</activeByDefault>
-      </activation>
-      <properties>
-         <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
-         <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
-         <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} -Djava.security.debug=policy,failure,access ${test.env}</surefire.jvm.args>
-      </properties>
-    </profile>
-    <profile>
-      <id>one-test</id>
-      <activation>
-         <activeByDefault>false</activeByDefault>
-      </activation>
-      <properties>
-         <surefire.jvm.args>-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8686</surefire.jvm.args>
-      </properties>
-    </profile>
-   </profiles>
-
-   <build>
-      <finalName>${artifactId}</finalName>
-      <resources>
-         <resource>
-            <directory>src/main/java</directory>
-            <includes>
-               <include>**/*.xml</include>
-            </includes>
-         </resource>
-         <resource>
-            <directory>${basedir}</directory>
-            <includes>
-               <include>JBossORG-EULA.txt</include>
-            </includes>
-         </resource>
-         <resource>
-            <directory>src/resources</directory>
-            <includes>
-               <include>**/*.dtd</include>
-               <include>**/*.xsd</include>
-            </includes>
-         </resource>
-         <resource>
-            <directory>target/generated-sources/javacc</directory>
-            <includes>
-               <include>**/*.class</include>
-            </includes>
-         </resource> 
-      </resources> 
-      <plugins>
-         <!-- generate java files from grammar -->
-         <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>javacc-maven-plugin</artifactId>
-            <version>2.3-jboss-1</version>
-            <configuration>
-               <packageName>org/jboss/security/auth/login</packageName>
-               <sourceDirectory>src/main/java</sourceDirectory>
-               <isStatic>false</isStatic>
-            </configuration>
-            <executions>
-               <execution>
-                  <goals>
-                     <goal>javacc</goal>
-                  </goals>
-                  <id>javacc</id>
-               </execution>
-            </executions>
-         </plugin> 
-      </plugins>
-   </build>
-   <dependencies> 
-      <dependency>
-         <groupId>org.jboss.javaee</groupId>
-         <artifactId>jboss-jaspi-api</artifactId>
-         <scope>compile</scope>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss</groupId>
-         <artifactId>jbossxb</artifactId>
-         <scope>compile</scope>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss.security</groupId>
-         <artifactId>jboss-security-acl-impl</artifactId>
-         <version>${project.version}</version>
-         <scope>compile</scope>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss.javaee</groupId>
-         <artifactId>jboss-javaee</artifactId>
-         <version>5.0.0.GA</version>
-         <scope>compile</scope>
-         <exclusions>
-           <exclusion>
-             <groupId>sun-jaxb</groupId>
-             <artifactId>jaxb-api</artifactId>
-           </exclusion>
-         </exclusions>
-      </dependency>
-      <dependency>
-         <groupId>jboss</groupId>
-         <artifactId>jboss-jmx</artifactId>
-         <version>4.2.1.GA</version>
-         <scope>compile</scope>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss.security</groupId>
-         <artifactId>jbossxacml</artifactId>
-         <version>2.0.3.CR2</version>
-         <scope>compile</scope>
-      </dependency>
-      <dependency>
-         <groupId>sun-jaxb</groupId>
-         <artifactId>jaxb-impl</artifactId>
-         <version>2.1.9</version>
-         <scope>runtime</scope>
-      </dependency>
-      <dependency>
-         <groupId>stax</groupId>
-         <artifactId>stax-api</artifactId>
-         <version>1.0.1</version>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss</groupId>
-         <artifactId>jnpserver</artifactId>
-         <version>4.2.3.GA</version>
-         <scope>test</scope>
-      </dependency>    
-      <dependency>
-         <groupId>org.jboss</groupId>
-         <artifactId>jboss-test</artifactId>
-         <scope>test</scope>
-      </dependency>    
-      <dependency>
-         <groupId>sun-opends</groupId>
-         <artifactId>OpenDS</artifactId>
-         <version>1.0.0</version>
-         <scope>test</scope>
-      </dependency>
-      <dependency>
-         <groupId>sleepycat</groupId>
-         <artifactId>je</artifactId>
-         <version>3.2.43</version>
-         <scope>test</scope>
-      </dependency>    
-   </dependencies>
-</project>

Copied: projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/pom.xml (from rev 91526, projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/pom.xml)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/pom.xml	                        (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/pom.xml	2009-07-21 23:53:22 UTC (rev 91530)
@@ -0,0 +1,187 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <parent>
+      <groupId>org.jboss.security</groupId>
+      <artifactId>jbosssx-parent</artifactId>
+      <version>2.0.3.SP2</version>
+   </parent>
+   <modelVersion>4.0.0</modelVersion>
+   <artifactId>jbosssx-bare</artifactId>
+   <packaging>jar</packaging>
+   <name>JBoss Security Implementation for the JBAS</name>
+   <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+   <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
+   <licenses>
+      <license>
+         <name>lgpl</name>
+         <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+      </license>
+   </licenses>
+   <organization>
+      <name>JBoss Inc.</name>
+      <url>http://www.jboss.org</url>
+   </organization>
+   <profiles>
+    <!--    mvn install -Psecurity-manager    -->
+    <profile>
+      <id>security-manager</id>
+      <activation>
+         <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+         <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
+         <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
+         <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} ${test.env}</surefire.jvm.args>
+      </properties>
+    </profile>
+    <!--     mvn install -Psecurity-manager-debug   -->
+    <!-- Best Practice:    mvn install -Psecurity-manager-debug  2>&1 > logfile2>&1 > logfile -->
+    <profile>
+      <id>security-manager-debug</id>
+      <activation>
+         <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+         <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
+         <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
+         <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} -Djava.security.debug=policy,failure,access ${test.env}</surefire.jvm.args>
+      </properties>
+    </profile>
+    <profile>
+      <id>one-test</id>
+      <activation>
+         <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+         <surefire.jvm.args>-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8686</surefire.jvm.args>
+      </properties>
+    </profile>
+   </profiles>
+
+   <build>
+      <finalName>${artifactId}</finalName>
+      <resources>
+         <resource>
+            <directory>src/main/java</directory>
+            <includes>
+               <include>**/*.xml</include>
+            </includes>
+         </resource>
+         <resource>
+            <directory>${basedir}</directory>
+            <includes>
+               <include>JBossORG-EULA.txt</include>
+            </includes>
+         </resource>
+         <resource>
+            <directory>src/resources</directory>
+            <includes>
+               <include>**/*.dtd</include>
+               <include>**/*.xsd</include>
+            </includes>
+         </resource>
+         <resource>
+            <directory>target/generated-sources/javacc</directory>
+            <includes>
+               <include>**/*.class</include>
+            </includes>
+         </resource> 
+      </resources> 
+      <plugins>
+         <!-- generate java files from grammar -->
+         <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>javacc-maven-plugin</artifactId>
+            <version>2.3-jboss-1</version>
+            <configuration>
+               <packageName>org/jboss/security/auth/login</packageName>
+               <sourceDirectory>src/main/java</sourceDirectory>
+               <isStatic>false</isStatic>
+            </configuration>
+            <executions>
+               <execution>
+                  <goals>
+                     <goal>javacc</goal>
+                  </goals>
+                  <id>javacc</id>
+               </execution>
+            </executions>
+         </plugin> 
+      </plugins>
+   </build>
+   <dependencies> 
+      <dependency>
+         <groupId>org.jboss.javaee</groupId>
+         <artifactId>jboss-jaspi-api</artifactId>
+         <scope>compile</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss</groupId>
+         <artifactId>jbossxb</artifactId>
+         <scope>compile</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss.security</groupId>
+         <artifactId>jboss-security-acl-impl</artifactId>
+         <version>${project.version}</version>
+         <scope>compile</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss.javaee</groupId>
+         <artifactId>jboss-javaee</artifactId>
+         <version>5.0.0.GA</version>
+         <scope>compile</scope>
+         <exclusions>
+           <exclusion>
+             <groupId>sun-jaxb</groupId>
+             <artifactId>jaxb-api</artifactId>
+           </exclusion>
+         </exclusions>
+      </dependency>
+      <dependency>
+         <groupId>jboss</groupId>
+         <artifactId>jboss-jmx</artifactId>
+         <version>4.2.1.GA</version>
+         <scope>compile</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss.security</groupId>
+         <artifactId>jbossxacml</artifactId>
+         <version>2.0.3.CR2</version>
+         <scope>compile</scope>
+      </dependency>
+      <dependency>
+         <groupId>sun-jaxb</groupId>
+         <artifactId>jaxb-impl</artifactId>
+         <version>2.1.9</version>
+         <scope>runtime</scope>
+      </dependency>
+      <dependency>
+         <groupId>stax</groupId>
+         <artifactId>stax-api</artifactId>
+         <version>1.0.1</version>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss</groupId>
+         <artifactId>jnpserver</artifactId>
+         <version>4.2.3.GA</version>
+         <scope>test</scope>
+      </dependency>    
+      <dependency>
+         <groupId>org.jboss</groupId>
+         <artifactId>jboss-test</artifactId>
+         <scope>test</scope>
+      </dependency>    
+      <dependency>
+         <groupId>sun-opends</groupId>
+         <artifactId>OpenDS</artifactId>
+         <version>1.0.0</version>
+         <scope>test</scope>
+      </dependency>
+      <dependency>
+         <groupId>sleepycat</groupId>
+         <artifactId>je</artifactId>
+         <version>3.2.43</version>
+         <scope>test</scope>
+      </dependency>    
+   </dependencies>
+</project>

Deleted: projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/src/main/java/org/jboss/security/ClientLoginModule.java
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/security/ClientLoginModule.java	2009-07-21 21:59:08 UTC (rev 91524)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/src/main/java/org/jboss/security/ClientLoginModule.java	2009-07-21 23:53:22 UTC (rev 91530)
@@ -1,286 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt 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 java.io.IOException;
-import java.security.Principal;
-import java.util.Map;
-import java.util.Set;
-
-import javax.security.auth.Subject;
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.NameCallback;
-import javax.security.auth.callback.PasswordCallback;
-import javax.security.auth.callback.UnsupportedCallbackException;
-import javax.security.auth.login.LoginException;
-import javax.security.auth.spi.LoginModule;
-
-import org.jboss.logging.Logger;
-
-/** A simple implementation of LoginModule for use by JBoss clients for
- the establishment of the caller identity and credentials. This simply sets
- the SecurityAssociation principal to the value of the NameCallback
- filled in by the CallbackHandler, and the SecurityAssociation credential
- to the value of the PasswordCallback filled in by the CallbackHandler.
- 
- It has the following options:
- <ul>
- <li>multi-threaded=[true|false]
- When the multi-threaded option is set to true, the SecurityAssociation.setServer()
- so that each login thread has its own principal and credential storage.
- <li>restore-login-identity=[true|false]
- When restore-login-identity is true, the SecurityAssociation principal
- and credential seen on entry to the login() method are saved and restored
- on either abort or logout. When false (the default), the abort and logout
- simply clears the SecurityAssociation. A restore-login-identity of true is
- needed if one need to change identities and then restore the original
- caller identity.
- <li>password-stacking=tryFirstPass|useFirstPass
- When password-stacking option is set, this module first looks for a shared
- username and password using "javax.security.auth.login.name" and
- "javax.security.auth.login.password" respectively. This allows a module configured
- prior to this one to establish a valid username and password that should be passed
- to JBoss.
- </ul>
- 
- @author <a href="mailto:on at ibis.odessa.ua">Oleg Nitz</a>
- @author Scott.Stark at jboss.org
- @author Anil.Saldhana at redhat.com
- */
-public class ClientLoginModule implements LoginModule
-{
-   private static Logger log = Logger.getLogger(ClientLoginModule.class);
-   private Subject subject;
-   private CallbackHandler callbackHandler;
-   /** The principal set during login() */
-   private Principal loginPrincipal;
-   /** The credential set during login() */
-   private Object loginCredential;
-   /** Shared state between login modules */
-   private Map<String,?> sharedState;
-   /** Flag indicating if the shared password should be used */
-   private boolean useFirstPass;
-   /** Flag indicating if the SecurityAssociation existing at login should
-    be restored on logout.
-    */
-   private boolean restoreLoginIdentity;
-   private boolean trace;
-   
-   /** To restore prelogin identity **/
-   private SecurityContext cachedSecurityContext;
-
-   /** Initialize this LoginModule. This checks for the options:
-    multi-threaded
-    restore-login-identity
-    password-stacking
-    */
-   public void initialize(Subject subject, CallbackHandler callbackHandler,
-                          Map<String,?> sharedState, Map<String,?> options)
-   {
-      this.trace = log.isTraceEnabled();
-      this.subject = subject;
-      this.callbackHandler = callbackHandler;
-      this.sharedState = sharedState;
-
-      //log securityDomain, if set.
-      if(trace)
-	 log.trace("Security domain: " + 
-		   (String)options.get(SecurityConstants.SECURITY_DOMAIN_OPTION));
-
-      // Check for multi-threaded option
-      String flag = (String) options.get("multi-threaded");
-      if (Boolean.valueOf(flag).booleanValue() == true)
-      {
-         /* Turn on the server mode which uses thread local storage for
-            the principal information.
-         */
-         if(trace)
-            log.trace("Enabling multi-threaded mode");
-         SecurityAssociationActions.setServer(); 
-      }
-      else
-      {
-         //Turn on the client side vm wide association
-         SecurityAssociationActions.setClient();
-      }
-
-      flag = (String) options.get("restore-login-identity");
-      restoreLoginIdentity = Boolean.valueOf(flag).booleanValue();
-      if(trace)
-	 log.trace("Enabling restore-login-identity mode");
-
-      /* Check for password sharing options. Any non-null value for
-          password_stacking sets useFirstPass as this module has no way to
-          validate any shared password.
-       */
-      String passwordStacking = (String) options.get("password-stacking");
-      useFirstPass = passwordStacking != null;
-      if(trace && useFirstPass)
-	 log.trace("Enabling useFirstPass mode");
-   }
-
-   /**
-    * Method to authenticate a Subject (phase 1).
-    */
-   public boolean login() throws LoginException
-   {
-      if( trace )
-         log.trace("Begin login");
-      // If useFirstPass is true, look for the shared password
-      if (useFirstPass == true)
-      {
-         try
-         {
-            Object name = sharedState.get("javax.security.auth.login.name");
-            if ((name instanceof Principal) == false)
-            {
-               String username = name != null ? name.toString() : "";
-               loginPrincipal = new SimplePrincipal(username);
-            } else
-            {
-               loginPrincipal = (Principal) name;
-            }
-            loginCredential = sharedState.get("javax.security.auth.login.password");
-            return true;
-         }
-         catch (Exception e)
-         {   // Dump the exception and continue
-            log.debug("Failed to obtain shared state", e);
-         }
-      }
-
-      /* There is no password sharing or we are the first login module. Get
-          the username and password from the callback hander.
-       */
-      if (callbackHandler == null)
-         throw new LoginException("Error: no CallbackHandler available " +
-            "to garner authentication information from the user");
-
-      PasswordCallback pc = new PasswordCallback("Password: ", false);
-      NameCallback nc = new NameCallback("User name: ", "guest");
-      Callback[] callbacks = {nc, pc};
-      try
-      {
-         String username;
-         char[] password = null;
-         char[] tmpPassword;
-
-         callbackHandler.handle(callbacks);
-         username = nc.getName();
-         loginPrincipal = new SimplePrincipal(username);
-         tmpPassword = pc.getPassword();
-         if (tmpPassword != null)
-         {
-            password = new char[tmpPassword.length];
-            System.arraycopy(tmpPassword, 0, password, 0, tmpPassword.length);
-            pc.clearPassword();
-         }
-         loginCredential = password;
-         if( trace )
-         {
-            String credType = "null";
-            if( loginCredential != null )
-               credType = loginCredential.getClass().getName();
-            log.trace("Obtained login: "+loginPrincipal
-               +", credential.class: " + credType);
-         }
-      }
-      catch (IOException ioe)
-      {
-         LoginException ex = new LoginException(ioe.toString());
-         ex.initCause(ioe);
-         throw ex;
-      }
-      catch (UnsupportedCallbackException uce)
-      {
-         LoginException ex = new LoginException("Error: " + uce.getCallback().toString() +
-            ", not able to use this callback for username/password");
-         ex.initCause(uce);
-         throw ex;
-      }
-      if( trace )
-         log.trace("End login");
-      return true;
-   }
-
-   /**
-    * Method to commit the authentication process (phase 2).
-    */
-   public boolean commit() throws LoginException
-   {
-      if( trace )
-         log.trace("commit, subject="+subject);
-      //Cache the existing security context
-      this.cachedSecurityContext = SecurityAssociationActions.getSecurityContext();
-      
-      SecurityAssociationActions.setPrincipalInfo(loginPrincipal, loginCredential, subject);
-
-      // Add the login principal to the subject if is not there
-      Set<Principal> principals = subject.getPrincipals();
-      if (principals.contains(loginPrincipal) == false)
-         principals.add(loginPrincipal);
-      return true;
-   }
-
-   /**
-    * Method to abort the authentication process (phase 2).
-    */
-   public boolean abort() throws LoginException
-   {
-      if( trace )
-         log.trace("abort");
-      if( restoreLoginIdentity == true )
-      {
-         SecurityAssociationActions.popPrincipalInfo();
-         SecurityAssociationActions.setSecurityContext(this.cachedSecurityContext);
-      }
-      else
-      {
-         // Clear the entire security association stack
-         SecurityAssociationActions.clear();  
-         SecurityAssociationActions.setSecurityContext(null);
-      }
-
-      return true;
-   }
-
-   public boolean logout() throws LoginException
-   {
-      if( trace )
-         log.trace("logout");
-      if( restoreLoginIdentity == true )
-      {
-         SecurityAssociationActions.popPrincipalInfo();
-         SecurityAssociationActions.setSecurityContext(this.cachedSecurityContext);
-      }
-      else
-      {
-         // Clear the entire security association stack
-         SecurityAssociationActions.clear();  
-         SecurityAssociationActions.clearSecurityContext(null);         
-      }
-      Set<Principal> principals = subject.getPrincipals();
-      principals.remove(loginPrincipal);
-      return true;
-   }
-}

Copied: projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/src/main/java/org/jboss/security/ClientLoginModule.java (from rev 91525, projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/security/ClientLoginModule.java)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/src/main/java/org/jboss/security/ClientLoginModule.java	                        (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/src/main/java/org/jboss/security/ClientLoginModule.java	2009-07-21 23:53:22 UTC (rev 91530)
@@ -0,0 +1,290 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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 java.io.IOException;
+import java.security.Principal;
+import java.util.Map;
+import java.util.Set;
+
+import javax.security.auth.Subject;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.NameCallback;
+import javax.security.auth.callback.PasswordCallback;
+import javax.security.auth.callback.UnsupportedCallbackException;
+import javax.security.auth.login.LoginException;
+import javax.security.auth.spi.LoginModule;
+
+import org.jboss.logging.Logger;
+
+/** A simple implementation of LoginModule for use by JBoss clients for
+ the establishment of the caller identity and credentials. This simply sets
+ the SecurityAssociation principal to the value of the NameCallback
+ filled in by the CallbackHandler, and the SecurityAssociation credential
+ to the value of the PasswordCallback filled in by the CallbackHandler.
+ 
+ It has the following options:
+ <ul>
+ <li>multi-threaded=[true|false]
+ When the multi-threaded option is set to true, the SecurityAssociation.setServer()
+ so that each login thread has its own principal and credential storage.
+ <li>restore-login-identity=[true|false]
+ When restore-login-identity is true, the SecurityAssociation principal
+ and credential seen on entry to the login() method are saved and restored
+ on either abort or logout. When false (the default), the abort and logout
+ simply clears the SecurityAssociation. A restore-login-identity of true is
+ needed if one need to change identities and then restore the original
+ caller identity.
+ <li>password-stacking=tryFirstPass|useFirstPass
+ When password-stacking option is set, this module first looks for a shared
+ username and password using "javax.security.auth.login.name" and
+ "javax.security.auth.login.password" respectively. This allows a module configured
+ prior to this one to establish a valid username and password that should be passed
+ to JBoss.
+ </ul>
+ 
+ @author <a href="mailto:on at ibis.odessa.ua">Oleg Nitz</a>
+ @author Scott.Stark at jboss.org
+ @author Anil.Saldhana at redhat.com
+ */
+public class ClientLoginModule implements LoginModule
+{
+   private static Logger log = Logger.getLogger(ClientLoginModule.class);
+   private Subject subject;
+   private CallbackHandler callbackHandler;
+   /** The principal set during login() */
+   private Principal loginPrincipal;
+   /** The credential set during login() */
+   private Object loginCredential;
+   /** Shared state between login modules */
+   private Map<String,?> sharedState;
+   /** Flag indicating if the shared password should be used */
+   private boolean useFirstPass;
+   /** Flag indicating if the SecurityAssociation existing at login should
+    be restored on logout.
+    */
+   private boolean restoreLoginIdentity;
+   private boolean trace;
+   
+   /** To restore prelogin identity **/
+   private SecurityContext cachedSecurityContext;
+
+   /** Initialize this LoginModule. This checks for the options:
+    multi-threaded
+    restore-login-identity
+    password-stacking
+    */
+   public void initialize(Subject subject, CallbackHandler callbackHandler,
+                          Map<String,?> sharedState, Map<String,?> options)
+   {
+      this.trace = log.isTraceEnabled();
+      this.subject = subject;
+      this.callbackHandler = callbackHandler;
+      this.sharedState = sharedState;
+
+      //log securityDomain, if set.
+      if(trace)
+	 log.trace("Security domain: " + 
+		   (String)options.get(SecurityConstants.SECURITY_DOMAIN_OPTION));
+
+      // Check for multi-threaded option
+      String flag = (String) options.get("multi-threaded");
+      if (Boolean.valueOf(flag).booleanValue() == true)
+      {
+         /* Turn on the server mode which uses thread local storage for
+            the principal information.
+         */
+         if(trace)
+            log.trace("Enabling multi-threaded mode");
+         SecurityAssociationActions.setServer(); 
+      }
+      
+      /**
+       * SECURITY-415: when the multi-threaded value is explictly set
+       * at false, then get into the client mode.
+       */
+      if(flag != null && flag.length() > 0 && "false".equalsIgnoreCase(flag))
+      {
+         SecurityAssociationActions.setClient();
+      }
+
+      flag = (String) options.get("restore-login-identity");
+      restoreLoginIdentity = Boolean.valueOf(flag).booleanValue();
+      if(trace)
+	 log.trace("Enabling restore-login-identity mode");
+
+      /* Check for password sharing options. Any non-null value for
+          password_stacking sets useFirstPass as this module has no way to
+          validate any shared password.
+       */
+      String passwordStacking = (String) options.get("password-stacking");
+      useFirstPass = passwordStacking != null;
+      if(trace && useFirstPass)
+	 log.trace("Enabling useFirstPass mode");
+   }
+
+   /**
+    * Method to authenticate a Subject (phase 1).
+    */
+   public boolean login() throws LoginException
+   {
+      if( trace )
+         log.trace("Begin login");
+      // If useFirstPass is true, look for the shared password
+      if (useFirstPass == true)
+      {
+         try
+         {
+            Object name = sharedState.get("javax.security.auth.login.name");
+            if ((name instanceof Principal) == false)
+            {
+               String username = name != null ? name.toString() : "";
+               loginPrincipal = new SimplePrincipal(username);
+            } else
+            {
+               loginPrincipal = (Principal) name;
+            }
+            loginCredential = sharedState.get("javax.security.auth.login.password");
+            return true;
+         }
+         catch (Exception e)
+         {   // Dump the exception and continue
+            log.debug("Failed to obtain shared state", e);
+         }
+      }
+
+      /* There is no password sharing or we are the first login module. Get
+          the username and password from the callback hander.
+       */
+      if (callbackHandler == null)
+         throw new LoginException("Error: no CallbackHandler available " +
+            "to garner authentication information from the user");
+
+      PasswordCallback pc = new PasswordCallback("Password: ", false);
+      NameCallback nc = new NameCallback("User name: ", "guest");
+      Callback[] callbacks = {nc, pc};
+      try
+      {
+         String username;
+         char[] password = null;
+         char[] tmpPassword;
+
+         callbackHandler.handle(callbacks);
+         username = nc.getName();
+         loginPrincipal = new SimplePrincipal(username);
+         tmpPassword = pc.getPassword();
+         if (tmpPassword != null)
+         {
+            password = new char[tmpPassword.length];
+            System.arraycopy(tmpPassword, 0, password, 0, tmpPassword.length);
+            pc.clearPassword();
+         }
+         loginCredential = password;
+         if( trace )
+         {
+            String credType = "null";
+            if( loginCredential != null )
+               credType = loginCredential.getClass().getName();
+            log.trace("Obtained login: "+loginPrincipal
+               +", credential.class: " + credType);
+         }
+      }
+      catch (IOException ioe)
+      {
+         LoginException ex = new LoginException(ioe.toString());
+         ex.initCause(ioe);
+         throw ex;
+      }
+      catch (UnsupportedCallbackException uce)
+      {
+         LoginException ex = new LoginException("Error: " + uce.getCallback().toString() +
+            ", not able to use this callback for username/password");
+         ex.initCause(uce);
+         throw ex;
+      }
+      if( trace )
+         log.trace("End login");
+      return true;
+   }
+
+   /**
+    * Method to commit the authentication process (phase 2).
+    */
+   public boolean commit() throws LoginException
+   {
+      if( trace )
+         log.trace("commit, subject="+subject);
+      //Cache the existing security context
+      this.cachedSecurityContext = SecurityAssociationActions.getSecurityContext();
+      
+      SecurityAssociationActions.setPrincipalInfo(loginPrincipal, loginCredential, subject);
+
+      // Add the login principal to the subject if is not there
+      Set<Principal> principals = subject.getPrincipals();
+      if (principals.contains(loginPrincipal) == false)
+         principals.add(loginPrincipal);
+      return true;
+   }
+
+   /**
+    * Method to abort the authentication process (phase 2).
+    */
+   public boolean abort() throws LoginException
+   {
+      if( trace )
+         log.trace("abort");
+      if( restoreLoginIdentity == true )
+      {
+         SecurityAssociationActions.popPrincipalInfo();
+         SecurityAssociationActions.setSecurityContext(this.cachedSecurityContext);
+      }
+      else
+      {
+         // Clear the entire security association stack
+         SecurityAssociationActions.clear();  
+         SecurityAssociationActions.setSecurityContext(null);
+      }
+
+      return true;
+   }
+
+   public boolean logout() throws LoginException
+   {
+      if( trace )
+         log.trace("logout");
+      if( restoreLoginIdentity == true )
+      {
+         SecurityAssociationActions.popPrincipalInfo();
+         SecurityAssociationActions.setSecurityContext(this.cachedSecurityContext);
+      }
+      else
+      {
+         // Clear the entire security association stack
+         SecurityAssociationActions.clear();  
+         SecurityAssociationActions.clearSecurityContext(null);         
+      }
+      Set<Principal> principals = subject.getPrincipals();
+      principals.remove(loginPrincipal);
+      return true;
+   }
+}

Deleted: projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/src/test/java/org/jboss/test/authentication/jaas/ClientLoginModuleUnitTestCase.java
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/test/java/org/jboss/test/authentication/jaas/ClientLoginModuleUnitTestCase.java	2009-07-21 21:59:08 UTC (rev 91524)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/src/test/java/org/jboss/test/authentication/jaas/ClientLoginModuleUnitTestCase.java	2009-07-21 23:53:22 UTC (rev 91530)
@@ -1,448 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt 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.test.authentication.jaas;
-
-import java.lang.reflect.Method;
-import java.security.Principal;
-import java.util.Arrays;
-import java.util.HashMap;
-
-import javax.security.auth.Subject;
-import javax.security.auth.login.AppConfigurationEntry;
-import javax.security.auth.login.Configuration;
-import javax.security.auth.login.LoginContext;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.jboss.security.SecurityAssociation;
-import org.jboss.security.SecurityContextAssociation;
-import org.jboss.security.SimplePrincipal;
-import org.jboss.security.auth.callback.UsernamePasswordHandler;
-
-/**
- ClientLoginModuleUnitTestCase/SecurityAssociation interaction tests
- 
- @author Scott.Stark at jboss.org
- @version $Revision: 68075 $
-*/
-public class ClientLoginModuleUnitTestCase
-   extends TestCase
-{
-   static TestConfig jaasConfig = new TestConfig();
-
-   static class TestConfig extends Configuration
-   {
-      public void refresh()
-      {
-      }
-
-      public AppConfigurationEntry[] getAppConfigurationEntry(String name)
-      {
-         AppConfigurationEntry[] entry = null;
-         try
-         {
-            Class<?>[] parameterTypes = {};
-            Method m = getClass().getDeclaredMethod(name, parameterTypes);
-            Object[] args = {};
-            entry = (AppConfigurationEntry[]) m.invoke(this, args);
-         }
-         catch(Exception e)
-         {
-         }
-         return entry;
-      }
-      AppConfigurationEntry[] testSingleThreaded()
-      {
-         String name = "org.jboss.security.ClientLoginModule";
-         HashMap<String,String> options = new HashMap<String,String>();
-         options.put("multi-threaded", "false");
-         AppConfigurationEntry ace = new AppConfigurationEntry(name,
-         AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options);
-         AppConfigurationEntry[] entry = {ace};
-         return entry;
-      }
-      AppConfigurationEntry[] testSingleThreadedRestoreIdentity()
-      {
-         String name = "org.jboss.security.ClientLoginModule";
-         HashMap<String,String> options = new HashMap<String,String>();
-         options.put("multi-threaded", "false");
-         options.put("restore-login-identity", "true");
-         AppConfigurationEntry ace = new AppConfigurationEntry(name,
-         AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options);
-         AppConfigurationEntry[] entry = {ace};
-         return entry;
-      }
-      AppConfigurationEntry[] testSingleThreadedRestoreStack()
-      {
-         String name = "org.jboss.security.ClientLoginModule";
-         HashMap<String,String> options = new HashMap<String,String>();
-         options.put("multi-threaded", "false");
-         options.put("restore-login-identity", "true");
-         AppConfigurationEntry ace = new AppConfigurationEntry(name,
-         AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options);
-         AppConfigurationEntry[] entry = {ace};
-         return entry;
-      }
-      AppConfigurationEntry[] testMultiThreaded()
-      {
-         String name = "org.jboss.security.ClientLoginModule";
-         HashMap<String,String> options = new HashMap<String,String>();
-         options.put("multi-threaded", "true");
-         AppConfigurationEntry ace = new AppConfigurationEntry(name,
-         AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options);
-         AppConfigurationEntry[] entry = {ace};
-         return entry;
-      }
-      AppConfigurationEntry[] testMultiThreadedRestoreIdentity()
-      {
-         String name = "org.jboss.security.ClientLoginModule";
-         HashMap<String,String> options = new HashMap<String,String>();
-         options.put("multi-threaded", "true");
-         options.put("restore-login-identity", "true");
-         AppConfigurationEntry ace = new AppConfigurationEntry(name,
-         AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options);
-         AppConfigurationEntry[] entry = {ace};
-         return entry;
-      }
-      AppConfigurationEntry[] testMultiThreadedRestoreStack()
-      {
-         String name = "org.jboss.security.ClientLoginModule";
-         HashMap<String,String> options = new HashMap<String,String>();
-         options.put("multi-threaded", "true");
-         options.put("restore-login-identity", "true");
-         AppConfigurationEntry ace = new AppConfigurationEntry(name,
-         AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options);
-         AppConfigurationEntry[] entry = {ace};
-         return entry;
-      }
-      
-   }
-
-   public static Test suite() throws Exception
-   {
-      TestSuite suite = new TestSuite();
-      suite.addTest(new ClientLoginModuleUnitTestCase("testSingleThreaded"));
-      suite.addTest(new ClientLoginModuleUnitTestCase("testSingleThreadedRestoreIdentity"));
-      suite.addTest(new ClientLoginModuleUnitTestCase("testSingleThreadedRestoreStack"));
-      suite.addTest(new ClientLoginModuleUnitTestCase("testMultiThreaded"));
-      suite.addTest(new ClientLoginModuleUnitTestCase("testMultiThreadedRestoreIdentity"));
-      suite.addTest(new ClientLoginModuleUnitTestCase("testMultiThreadedRestoreStack"));
-      return suite;
-   }
-
-   public ClientLoginModuleUnitTestCase(String name)
-   {
-      super(name);
-   }
-
-   protected void setUp() throws Exception
-   {
-      Configuration.setConfiguration(jaasConfig);
-      //Clear SecurityAssociation
-      SecurityAssociation.clear();
-   }
-   protected void tearDown()
-   {
-   }
-
-   public void testSingleThreaded() throws Exception
-   {
-      System.out.println("+++ testSingleThreaded");
-      UsernamePasswordHandler handler = new UsernamePasswordHandler("jduke",
-         "theduke");
-      LoginContext lc = new LoginContext("testSingleThreaded", handler);
-      lc.login();
-      Subject subject = lc.getSubject();
-      System.out.println("LC.Subject: "+subject);
-      Principal theduke = new SimplePrincipal("jduke");
-      assertTrue("Principals contains theduke", subject.getPrincipals().contains(theduke));
-      Principal saPrincipal = SecurityAssociation.getPrincipal();
-      assertTrue("SecurityAssociation.getPrincipal == theduke", saPrincipal.equals(theduke));
-      char[] password = (char[]) SecurityAssociation.getCredential();
-      assertTrue("password == theduke",
-         Arrays.equals(password, "theduke".toCharArray()));
-      
-      assertTrue("Client side association?", SecurityContextAssociation.isClient());
-   }
-
-   public void testSingleThreadedRestoreIdentity() throws Exception
-   {
-      System.out.println("+++ testSingleThreadedRestoreIdentity");
-      
-      Principal jduke1 = new SimplePrincipal("jduke1");
-      SecurityAssociation.setPrincipal(jduke1);
-      SecurityAssociation.setCredential("theduke1");
-
-      UsernamePasswordHandler handler = new UsernamePasswordHandler("jduke2",
-         "theduke2");
-      LoginContext lc = new LoginContext("testSingleThreadedRestoreIdentity", handler);
-      lc.login();
-      Subject subject = lc.getSubject();
-      System.out.println("LC.Subject: "+subject);
-      
-      Principal jduke2 = new SimplePrincipal("jduke2");
-      assertTrue("Principals contains jduke2", subject.getPrincipals().contains(jduke2));
-      Principal saPrincipal = SecurityAssociation.getPrincipal();
-      assertTrue("SecurityAssociation.getPrincipal == jduke2", saPrincipal.equals(jduke2));
-      char[] password = (char[]) SecurityAssociation.getCredential();
-      assertTrue("password == theduke2",
-         Arrays.equals(password, "theduke2".toCharArray()));
-
-      lc.logout();
-      // Validate restored state
-      saPrincipal = SecurityAssociation.getPrincipal();
-      assertTrue("SecurityAssociation.getPrincipal == jduke1", saPrincipal.equals(jduke1));
-      String theduke1 = (String) SecurityAssociation.getCredential();
-      assertTrue("password == theduke1", theduke1.equals("theduke1"));
-      
-   }
-
-   @SuppressWarnings("deprecation")
-   public void testSingleThreadedRestoreStack() throws Exception
-   {
-      System.out.println("+++ testSingleThreadedRestoreStack");
- 
-      Principal jduke1 = new SimplePrincipal("jduke1");
-      Subject subject1 = new Subject();
-      SecurityAssociation.pushSubjectContext(subject1, jduke1, "theduke1");
-
-      Principal jduke2 = new SimplePrincipal("jduke2");
-      Subject subject2 = new Subject();
-      SecurityAssociation.pushSubjectContext(subject2, jduke2, "theduke2");
-
-      UsernamePasswordHandler handler = new UsernamePasswordHandler("jduke3",
-         "theduke3");
-      LoginContext lc = new LoginContext("testSingleThreadedRestoreIdentity", handler);
-      lc.login();
-      Subject subject = lc.getSubject();
-      System.out.println("LC.Subject: "+subject);
-      
-      Principal jduke3 = new SimplePrincipal("jduke3");
-      assertTrue("Principals contains jduke3", subject.getPrincipals().contains(jduke3));
-      Principal saPrincipal = SecurityAssociation.getPrincipal();
-      assertTrue("SecurityAssociation.getPrincipal == jduke3", saPrincipal.equals(jduke3));
-      char[] password = (char[]) SecurityAssociation.getCredential();
-      assertTrue("password == theduke3",
-         Arrays.equals(password, "theduke3".toCharArray()));
-      SecurityAssociation.SubjectContext sc3 = SecurityAssociation.peekSubjectContext();
-      System.out.println(sc3);
-      assertTrue("SecurityAssociation.peekSubjectContext == jduke3", sc3.getPrincipal().equals(jduke3));
-      char[] theduke3 = (char[]) sc3.getCredential();
-      assertTrue("password == theduke3",
-         Arrays.equals(theduke3, "theduke3".toCharArray()));
-
-      lc.logout();
-
-      // Validate restored state
-      SecurityAssociation.SubjectContext sc2 = SecurityAssociation.peekSubjectContext();
-      System.out.println(sc2);
-      assertTrue("SecurityAssociation.peekSubjectContext == jduke2", sc2.getPrincipal().equals(jduke2));
-      String theduke2 = (String) sc2.getCredential();
-      assertTrue("password == theduke2", theduke2.equals("theduke2"));
-
-      SecurityAssociation.popSubjectContext();
-      SecurityAssociation.SubjectContext sc1 = SecurityAssociation.peekSubjectContext();
-      System.out.println(sc1);
-      assertTrue("SecurityAssociation.peekSubjectContext == jduke1", sc1.getPrincipal().equals(jduke1));
-      String theduke1 = (String) sc1.getCredential();
-      assertTrue("password == theduke1", theduke1.equals("theduke1"));
-   }
-
-   public void testMultiThreaded() throws Exception
-   {
-      TestMultiThreaded r0 = new TestMultiThreaded();
-      Thread t0 = new Thread(r0, "testMultiThreaded#0");
-      t0.start();
-      TestMultiThreaded r1 = new TestMultiThreaded();
-      Thread t1 = new Thread(r1, "testMultiThreaded#1");
-      t1.start();
-
-      t0.join();
-      assertTrue(r0.failure == null);
-      t1.join();
-      assertTrue(r1.failure == null);
-   }
-   static class TestMultiThreaded implements Runnable
-   {
-      Exception failure;
-      public void run()
-      {
-         try
-         {
-            System.out.println("+++ testMultiThreadedRunnable");
-            UsernamePasswordHandler handler = new UsernamePasswordHandler("jduke",
-               "theduke");
-            LoginContext lc = new LoginContext("testSingleThreaded", handler);
-            lc.login();
-            Subject subject = lc.getSubject();
-            System.out.println("LC.Subject: "+subject);
-            Principal theduke = new SimplePrincipal("jduke");
-            assertTrue("Principals contains theduke", subject.getPrincipals().contains(theduke));
-            Principal saPrincipal = SecurityAssociation.getPrincipal();
-            assertTrue("SecurityAssociation.getPrincipal == theduke", saPrincipal.equals(theduke));
-            char[] password = (char[]) SecurityAssociation.getCredential();
-            assertTrue("password == theduke",
-               Arrays.equals(password, "theduke".toCharArray()));
-         }
-         catch(Exception e)
-         {
-            failure = e;
-         }
-      }
-   }
-
-   public void testMultiThreadedRestoreIdentity() throws Exception
-   {
-      TestMultiThreadedRestoreIdentity r0 = new TestMultiThreadedRestoreIdentity();
-      Thread t0 = new Thread(r0, "testMultiThreadedRestoreIdentity#0");
-      t0.start();
-      TestMultiThreadedRestoreIdentity r1 = new TestMultiThreadedRestoreIdentity();
-      Thread t1 = new Thread(r1, "testMultiThreadedRestoreIdentity#1");
-      t1.start();
-
-      t0.join();
-      assertTrue(r0.failure == null);
-      t1.join();
-      assertTrue(r1.failure == null);
-   }
-   static class TestMultiThreadedRestoreIdentity implements Runnable
-   {
-      Exception failure;
-      public void run()
-      {
-         try
-         {
-            System.out.println("+++ testMultiThreadedRestoreIdentity");
-      
-            Principal jduke1 = new SimplePrincipal("jduke1");
-            SecurityAssociation.setPrincipal(jduke1);
-            SecurityAssociation.setCredential("theduke1");
-      
-            UsernamePasswordHandler handler = new UsernamePasswordHandler("jduke2",
-               "theduke2");
-            LoginContext lc = new LoginContext("testSingleThreadedRestoreIdentity", handler);
-            lc.login();
-            Subject subject = lc.getSubject();
-            System.out.println("LC.Subject: "+subject);
-            
-            Principal jduke2 = new SimplePrincipal("jduke2");
-            assertTrue("Principals contains jduke2", subject.getPrincipals().contains(jduke2));
-            Principal saPrincipal = SecurityAssociation.getPrincipal();
-            assertTrue("SecurityAssociation.getPrincipal == jduke2", saPrincipal.equals(jduke2));
-            char[] password = (char[]) SecurityAssociation.getCredential();
-            assertTrue("password == theduke2",
-               Arrays.equals(password, "theduke2".toCharArray()));
-      
-            lc.logout();
-            // Validate restored state
-            saPrincipal = SecurityAssociation.getPrincipal();
-            assertTrue("SecurityAssociation.getPrincipal == jduke1", saPrincipal.equals(jduke1));
-            String theduke1 = (String) SecurityAssociation.getCredential();
-            assertTrue("password == theduke1", theduke1.equals("theduke1"));
-      
-         }
-         catch(Exception e)
-         {
-            failure = e;
-         }
-      }
-   }
-
-   public void testMultiThreadedRestoreStack() throws Exception
-   {
-      TestMultiThreadedRestoreStack r0 = new TestMultiThreadedRestoreStack();
-      Thread t0 = new Thread(r0, "testMultiThreadedRestoreIdentity#0");
-      t0.start();
-      TestMultiThreadedRestoreStack r1 = new TestMultiThreadedRestoreStack();
-      Thread t1 = new Thread(r1, "testMultiThreadedRestoreIdentity#1");
-      t1.start();
-
-      t0.join();
-      assertTrue(r0.failure == null);
-      t1.join();
-      assertTrue(r1.failure == null);
-   }
-   static class TestMultiThreadedRestoreStack implements Runnable
-   {
-      Exception failure;
-      @SuppressWarnings("deprecation")
-      public void run()
-      {
-         try
-         {
-            System.out.println("+++ testMultThreadedRestoreStack");
-
-            Principal jduke1 = new SimplePrincipal("jduke1");
-            Subject subject1 = new Subject();
-            SecurityAssociation.pushSubjectContext(subject1, jduke1, "theduke1");
-
-            Principal jduke2 = new SimplePrincipal("jduke2");
-            Subject subject2 = new Subject();
-            SecurityAssociation.pushSubjectContext(subject2, jduke2, "theduke2");
-
-            UsernamePasswordHandler handler = new UsernamePasswordHandler("jduke3",
-               "theduke3");
-            LoginContext lc = new LoginContext("testSingleThreadedRestoreIdentity", handler);
-            lc.login();
-            Subject subject = lc.getSubject();
-            System.out.println("LC.Subject: "+subject);
-      
-            Principal jduke3 = new SimplePrincipal("jduke3");
-            assertTrue("Principals contains jduke3", subject.getPrincipals().contains(jduke3));
-            Principal saPrincipal = SecurityAssociation.getPrincipal();
-            assertTrue("SecurityAssociation.getPrincipal == jduke3", saPrincipal.equals(jduke3));
-            char[] password = (char[]) SecurityAssociation.getCredential();
-            assertTrue("password == theduke3",
-               Arrays.equals(password, "theduke3".toCharArray()));
-            SecurityAssociation.SubjectContext sc3 = SecurityAssociation.peekSubjectContext();
-            System.out.println(sc3);
-            assertTrue("SecurityAssociation.peekSubjectContext == jduke3", sc3.getPrincipal().equals(jduke3));
-            char[] theduke3 = (char[]) sc3.getCredential();
-            assertTrue("password == theduke3",
-               Arrays.equals(theduke3, "theduke3".toCharArray()));
-
-            lc.logout();
-
-            // Validate restored state
-            SecurityAssociation.SubjectContext sc2 = SecurityAssociation.peekSubjectContext();
-            System.out.println(sc2);
-            assertTrue("SecurityAssociation.peekSubjectContext == jduke2", sc2.getPrincipal().equals(jduke2));
-            String theduke2 = (String) sc2.getCredential();
-            assertTrue("password == theduke2", theduke2.equals("theduke2"));
-
-            SecurityAssociation.popSubjectContext();
-            SecurityAssociation.SubjectContext sc1 = SecurityAssociation.peekSubjectContext();
-            System.out.println(sc1);
-            assertTrue("SecurityAssociation.peekSubjectContext == jduke1", sc1.getPrincipal().equals(jduke1));
-            String theduke1 = (String) sc1.getCredential();
-            assertTrue("password == theduke1", theduke1.equals("theduke1"));
-         }
-         catch(Exception e)
-         {
-            failure = e;
-         }
-      }
-   }
-
-}

Copied: projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/src/test/java/org/jboss/test/authentication/jaas/ClientLoginModuleUnitTestCase.java (from rev 91525, projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/test/java/org/jboss/test/authentication/jaas/ClientLoginModuleUnitTestCase.java)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/src/test/java/org/jboss/test/authentication/jaas/ClientLoginModuleUnitTestCase.java	                        (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx/src/test/java/org/jboss/test/authentication/jaas/ClientLoginModuleUnitTestCase.java	2009-07-21 23:53:22 UTC (rev 91530)
@@ -0,0 +1,453 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt 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.test.authentication.jaas;
+
+import java.lang.reflect.Method;
+import java.security.Principal;
+import java.util.Arrays;
+import java.util.HashMap;
+
+import javax.security.auth.Subject;
+import javax.security.auth.login.AppConfigurationEntry;
+import javax.security.auth.login.Configuration;
+import javax.security.auth.login.LoginContext;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.jboss.security.SecurityAssociation;
+import org.jboss.security.SecurityContext;
+import org.jboss.security.SecurityContextAssociation;
+import org.jboss.security.SimplePrincipal;
+import org.jboss.security.auth.callback.UsernamePasswordHandler;
+
+/**
+ ClientLoginModuleUnitTestCase/SecurityAssociation interaction tests
+ 
+ @author Scott.Stark at jboss.org
+ @version $Revision: 68075 $
+*/
+public class ClientLoginModuleUnitTestCase
+   extends TestCase
+{
+   static TestConfig jaasConfig = new TestConfig();
+
+   static class TestConfig extends Configuration
+   {
+      public void refresh()
+      {
+      }
+
+      public AppConfigurationEntry[] getAppConfigurationEntry(String name)
+      {
+         AppConfigurationEntry[] entry = null;
+         try
+         {
+            Class<?>[] parameterTypes = {};
+            Method m = getClass().getDeclaredMethod(name, parameterTypes);
+            Object[] args = {};
+            entry = (AppConfigurationEntry[]) m.invoke(this, args);
+         }
+         catch(Exception e)
+         {
+         }
+         return entry;
+      }
+      AppConfigurationEntry[] testSingleThreaded()
+      {
+         String name = "org.jboss.security.ClientLoginModule";
+         HashMap<String,String> options = new HashMap<String,String>();
+         options.put("multi-threaded", "false");
+         AppConfigurationEntry ace = new AppConfigurationEntry(name,
+         AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options);
+         AppConfigurationEntry[] entry = {ace};
+         return entry;
+      }
+      AppConfigurationEntry[] testSingleThreadedRestoreIdentity()
+      {
+         String name = "org.jboss.security.ClientLoginModule";
+         HashMap<String,String> options = new HashMap<String,String>();
+         options.put("multi-threaded", "false");
+         options.put("restore-login-identity", "true");
+         AppConfigurationEntry ace = new AppConfigurationEntry(name,
+         AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options);
+         AppConfigurationEntry[] entry = {ace};
+         return entry;
+      }
+      AppConfigurationEntry[] testSingleThreadedRestoreStack()
+      {
+         String name = "org.jboss.security.ClientLoginModule";
+         HashMap<String,String> options = new HashMap<String,String>();
+         options.put("multi-threaded", "false");
+         options.put("restore-login-identity", "true");
+         AppConfigurationEntry ace = new AppConfigurationEntry(name,
+         AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options);
+         AppConfigurationEntry[] entry = {ace};
+         return entry;
+      }
+      AppConfigurationEntry[] testMultiThreaded()
+      {
+         String name = "org.jboss.security.ClientLoginModule";
+         HashMap<String,String> options = new HashMap<String,String>();
+         options.put("multi-threaded", "true");
+         AppConfigurationEntry ace = new AppConfigurationEntry(name,
+         AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options);
+         AppConfigurationEntry[] entry = {ace};
+         return entry;
+      }
+      AppConfigurationEntry[] testMultiThreadedRestoreIdentity()
+      {
+         String name = "org.jboss.security.ClientLoginModule";
+         HashMap<String,String> options = new HashMap<String,String>();
+         options.put("multi-threaded", "true");
+         options.put("restore-login-identity", "true");
+         AppConfigurationEntry ace = new AppConfigurationEntry(name,
+         AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options);
+         AppConfigurationEntry[] entry = {ace};
+         return entry;
+      }
+      AppConfigurationEntry[] testMultiThreadedRestoreStack()
+      {
+         String name = "org.jboss.security.ClientLoginModule";
+         HashMap<String,String> options = new HashMap<String,String>();
+         options.put("multi-threaded", "true");
+         options.put("restore-login-identity", "true");
+         AppConfigurationEntry ace = new AppConfigurationEntry(name,
+         AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options);
+         AppConfigurationEntry[] entry = {ace};
+         return entry;
+      }
+      
+   }
+
+   public static Test suite() throws Exception
+   {
+      TestSuite suite = new TestSuite();
+      suite.addTest(new ClientLoginModuleUnitTestCase("testSingleThreaded"));
+      suite.addTest(new ClientLoginModuleUnitTestCase("testSingleThreadedRestoreIdentity"));
+      suite.addTest(new ClientLoginModuleUnitTestCase("testSingleThreadedRestoreStack"));
+      suite.addTest(new ClientLoginModuleUnitTestCase("testMultiThreaded"));
+      suite.addTest(new ClientLoginModuleUnitTestCase("testMultiThreadedRestoreIdentity"));
+      suite.addTest(new ClientLoginModuleUnitTestCase("testMultiThreadedRestoreStack"));
+      return suite;
+   }
+
+   public ClientLoginModuleUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   protected void setUp() throws Exception
+   {
+      Configuration.setConfiguration(jaasConfig);
+      //Clear SecurityAssociation
+      SecurityAssociation.clear();
+   }
+   protected void tearDown()
+   {
+   }
+
+   public void testSingleThreaded() throws Exception
+   {
+      System.out.println("+++ testSingleThreaded");
+      UsernamePasswordHandler handler = new UsernamePasswordHandler("jduke",
+         "theduke");
+      LoginContext lc = new LoginContext("testSingleThreaded", handler);
+      lc.login();
+      Subject subject = lc.getSubject();
+      System.out.println("LC.Subject: "+subject);
+      Principal theduke = new SimplePrincipal("jduke");
+      assertTrue("Principals contains theduke", subject.getPrincipals().contains(theduke));
+      Principal saPrincipal = SecurityAssociation.getPrincipal();
+      assertTrue("SecurityAssociation.getPrincipal == theduke", saPrincipal.equals(theduke));
+      char[] password = (char[]) SecurityAssociation.getCredential();
+      assertTrue("password == theduke",
+         Arrays.equals(password, "theduke".toCharArray()));
+      
+      assertTrue("Client side association?", SecurityContextAssociation.isClient());
+      
+      SecurityContext sc = SecurityContextAssociation.getSecurityContext();
+      assertNotNull("SecurityContext not null", sc);
+      assertEquals("jduke", sc.getUtil().getUserPrincipal().getName()); 
+   }
+
+   public void testSingleThreadedRestoreIdentity() throws Exception
+   {
+      System.out.println("+++ testSingleThreadedRestoreIdentity");
+      
+      Principal jduke1 = new SimplePrincipal("jduke1");
+      SecurityAssociation.setPrincipal(jduke1);
+      SecurityAssociation.setCredential("theduke1");
+
+      UsernamePasswordHandler handler = new UsernamePasswordHandler("jduke2",
+         "theduke2");
+      LoginContext lc = new LoginContext("testSingleThreadedRestoreIdentity", handler);
+      lc.login();
+      Subject subject = lc.getSubject();
+      System.out.println("LC.Subject: "+subject);
+      
+      Principal jduke2 = new SimplePrincipal("jduke2");
+      assertTrue("Principals contains jduke2", subject.getPrincipals().contains(jduke2));
+      Principal saPrincipal = SecurityAssociation.getPrincipal();
+      assertTrue("SecurityAssociation.getPrincipal == jduke2", saPrincipal.equals(jduke2));
+      char[] password = (char[]) SecurityAssociation.getCredential();
+      assertTrue("password == theduke2",
+         Arrays.equals(password, "theduke2".toCharArray()));
+
+      lc.logout();
+      // Validate restored state
+      saPrincipal = SecurityAssociation.getPrincipal();
+      assertTrue("SecurityAssociation.getPrincipal == jduke1", saPrincipal.equals(jduke1));
+      String theduke1 = (String) SecurityAssociation.getCredential();
+      assertTrue("password == theduke1", theduke1.equals("theduke1"));
+      
+   }
+
+   @SuppressWarnings("deprecation")
+   public void testSingleThreadedRestoreStack() throws Exception
+   {
+      System.out.println("+++ testSingleThreadedRestoreStack");
+ 
+      Principal jduke1 = new SimplePrincipal("jduke1");
+      Subject subject1 = new Subject();
+      SecurityAssociation.pushSubjectContext(subject1, jduke1, "theduke1");
+
+      Principal jduke2 = new SimplePrincipal("jduke2");
+      Subject subject2 = new Subject();
+      SecurityAssociation.pushSubjectContext(subject2, jduke2, "theduke2");
+
+      UsernamePasswordHandler handler = new UsernamePasswordHandler("jduke3",
+         "theduke3");
+      LoginContext lc = new LoginContext("testSingleThreadedRestoreIdentity", handler);
+      lc.login();
+      Subject subject = lc.getSubject();
+      System.out.println("LC.Subject: "+subject);
+      
+      Principal jduke3 = new SimplePrincipal("jduke3");
+      assertTrue("Principals contains jduke3", subject.getPrincipals().contains(jduke3));
+      Principal saPrincipal = SecurityAssociation.getPrincipal();
+      assertTrue("SecurityAssociation.getPrincipal == jduke3", saPrincipal.equals(jduke3));
+      char[] password = (char[]) SecurityAssociation.getCredential();
+      assertTrue("password == theduke3",
+         Arrays.equals(password, "theduke3".toCharArray()));
+      SecurityAssociation.SubjectContext sc3 = SecurityAssociation.peekSubjectContext();
+      System.out.println(sc3);
+      assertTrue("SecurityAssociation.peekSubjectContext == jduke3", sc3.getPrincipal().equals(jduke3));
+      char[] theduke3 = (char[]) sc3.getCredential();
+      assertTrue("password == theduke3",
+         Arrays.equals(theduke3, "theduke3".toCharArray()));
+
+      lc.logout();
+
+      // Validate restored state
+      SecurityAssociation.SubjectContext sc2 = SecurityAssociation.peekSubjectContext();
+      System.out.println(sc2);
+      assertTrue("SecurityAssociation.peekSubjectContext == jduke2", sc2.getPrincipal().equals(jduke2));
+      String theduke2 = (String) sc2.getCredential();
+      assertTrue("password == theduke2", theduke2.equals("theduke2"));
+
+      SecurityAssociation.popSubjectContext();
+      SecurityAssociation.SubjectContext sc1 = SecurityAssociation.peekSubjectContext();
+      System.out.println(sc1);
+      assertTrue("SecurityAssociation.peekSubjectContext == jduke1", sc1.getPrincipal().equals(jduke1));
+      String theduke1 = (String) sc1.getCredential();
+      assertTrue("password == theduke1", theduke1.equals("theduke1"));
+   }
+
+   public void testMultiThreaded() throws Exception
+   {
+      TestMultiThreaded r0 = new TestMultiThreaded();
+      Thread t0 = new Thread(r0, "testMultiThreaded#0");
+      t0.start();
+      TestMultiThreaded r1 = new TestMultiThreaded();
+      Thread t1 = new Thread(r1, "testMultiThreaded#1");
+      t1.start();
+
+      t0.join();
+      assertTrue(r0.failure == null);
+      t1.join();
+      assertTrue(r1.failure == null);
+   }
+   static class TestMultiThreaded implements Runnable
+   {
+      Exception failure;
+      public void run()
+      {
+         try
+         {
+            System.out.println("+++ testMultiThreadedRunnable");
+            UsernamePasswordHandler handler = new UsernamePasswordHandler("jduke",
+               "theduke");
+            LoginContext lc = new LoginContext("testSingleThreaded", handler);
+            lc.login();
+            Subject subject = lc.getSubject();
+            System.out.println("LC.Subject: "+subject);
+            Principal theduke = new SimplePrincipal("jduke");
+            assertTrue("Principals contains theduke", subject.getPrincipals().contains(theduke));
+            Principal saPrincipal = SecurityAssociation.getPrincipal();
+            assertTrue("SecurityAssociation.getPrincipal == theduke", saPrincipal.equals(theduke));
+            char[] password = (char[]) SecurityAssociation.getCredential();
+            assertTrue("password == theduke",
+               Arrays.equals(password, "theduke".toCharArray()));
+         }
+         catch(Exception e)
+         {
+            failure = e;
+         }
+      }
+   }
+
+   public void testMultiThreadedRestoreIdentity() throws Exception
+   {
+      TestMultiThreadedRestoreIdentity r0 = new TestMultiThreadedRestoreIdentity();
+      Thread t0 = new Thread(r0, "testMultiThreadedRestoreIdentity#0");
+      t0.start();
+      TestMultiThreadedRestoreIdentity r1 = new TestMultiThreadedRestoreIdentity();
+      Thread t1 = new Thread(r1, "testMultiThreadedRestoreIdentity#1");
+      t1.start();
+
+      t0.join();
+      assertTrue(r0.failure == null);
+      t1.join();
+      assertTrue(r1.failure == null);
+   }
+   static class TestMultiThreadedRestoreIdentity implements Runnable
+   {
+      Exception failure;
+      public void run()
+      {
+         try
+         {
+            System.out.println("+++ testMultiThreadedRestoreIdentity");
+      
+            Principal jduke1 = new SimplePrincipal("jduke1");
+            SecurityAssociation.setPrincipal(jduke1);
+            SecurityAssociation.setCredential("theduke1");
+      
+            UsernamePasswordHandler handler = new UsernamePasswordHandler("jduke2",
+               "theduke2");
+            LoginContext lc = new LoginContext("testSingleThreadedRestoreIdentity", handler);
+            lc.login();
+            Subject subject = lc.getSubject();
+            System.out.println("LC.Subject: "+subject);
+            
+            Principal jduke2 = new SimplePrincipal("jduke2");
+            assertTrue("Principals contains jduke2", subject.getPrincipals().contains(jduke2));
+            Principal saPrincipal = SecurityAssociation.getPrincipal();
+            assertTrue("SecurityAssociation.getPrincipal == jduke2", saPrincipal.equals(jduke2));
+            char[] password = (char[]) SecurityAssociation.getCredential();
+            assertTrue("password == theduke2",
+               Arrays.equals(password, "theduke2".toCharArray()));
+      
+            lc.logout();
+            // Validate restored state
+            saPrincipal = SecurityAssociation.getPrincipal();
+            assertTrue("SecurityAssociation.getPrincipal == jduke1", saPrincipal.equals(jduke1));
+            String theduke1 = (String) SecurityAssociation.getCredential();
+            assertTrue("password == theduke1", theduke1.equals("theduke1"));
+      
+         }
+         catch(Exception e)
+         {
+            failure = e;
+         }
+      }
+   }
+
+   public void testMultiThreadedRestoreStack() throws Exception
+   {
+      TestMultiThreadedRestoreStack r0 = new TestMultiThreadedRestoreStack();
+      Thread t0 = new Thread(r0, "testMultiThreadedRestoreIdentity#0");
+      t0.start();
+      TestMultiThreadedRestoreStack r1 = new TestMultiThreadedRestoreStack();
+      Thread t1 = new Thread(r1, "testMultiThreadedRestoreIdentity#1");
+      t1.start();
+
+      t0.join();
+      assertTrue(r0.failure == null);
+      t1.join();
+      assertTrue(r1.failure == null);
+   }
+   static class TestMultiThreadedRestoreStack implements Runnable
+   {
+      Exception failure;
+      @SuppressWarnings("deprecation")
+      public void run()
+      {
+         try
+         {
+            System.out.println("+++ testMultThreadedRestoreStack");
+
+            Principal jduke1 = new SimplePrincipal("jduke1");
+            Subject subject1 = new Subject();
+            SecurityAssociation.pushSubjectContext(subject1, jduke1, "theduke1");
+
+            Principal jduke2 = new SimplePrincipal("jduke2");
+            Subject subject2 = new Subject();
+            SecurityAssociation.pushSubjectContext(subject2, jduke2, "theduke2");
+
+            UsernamePasswordHandler handler = new UsernamePasswordHandler("jduke3",
+               "theduke3");
+            LoginContext lc = new LoginContext("testSingleThreadedRestoreIdentity", handler);
+            lc.login();
+            Subject subject = lc.getSubject();
+            System.out.println("LC.Subject: "+subject);
+      
+            Principal jduke3 = new SimplePrincipal("jduke3");
+            assertTrue("Principals contains jduke3", subject.getPrincipals().contains(jduke3));
+            Principal saPrincipal = SecurityAssociation.getPrincipal();
+            assertTrue("SecurityAssociation.getPrincipal == jduke3", saPrincipal.equals(jduke3));
+            char[] password = (char[]) SecurityAssociation.getCredential();
+            assertTrue("password == theduke3",
+               Arrays.equals(password, "theduke3".toCharArray()));
+            SecurityAssociation.SubjectContext sc3 = SecurityAssociation.peekSubjectContext();
+            System.out.println(sc3);
+            assertTrue("SecurityAssociation.peekSubjectContext == jduke3", sc3.getPrincipal().equals(jduke3));
+            char[] theduke3 = (char[]) sc3.getCredential();
+            assertTrue("password == theduke3",
+               Arrays.equals(theduke3, "theduke3".toCharArray()));
+
+            lc.logout();
+
+            // Validate restored state
+            SecurityAssociation.SubjectContext sc2 = SecurityAssociation.peekSubjectContext();
+            System.out.println(sc2);
+            assertTrue("SecurityAssociation.peekSubjectContext == jduke2", sc2.getPrincipal().equals(jduke2));
+            String theduke2 = (String) sc2.getCredential();
+            assertTrue("password == theduke2", theduke2.equals("theduke2"));
+
+            SecurityAssociation.popSubjectContext();
+            SecurityAssociation.SubjectContext sc1 = SecurityAssociation.peekSubjectContext();
+            System.out.println(sc1);
+            assertTrue("SecurityAssociation.peekSubjectContext == jduke1", sc1.getPrincipal().equals(jduke1));
+            String theduke1 = (String) sc1.getCredential();
+            assertTrue("password == theduke1", theduke1.equals("theduke1"));
+         }
+         catch(Exception e)
+         {
+            failure = e;
+         }
+      }
+   }
+
+}

Deleted: projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-bridge-as4/pom.xml
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-bridge-as4/pom.xml	2009-07-21 21:59:08 UTC (rev 91524)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-bridge-as4/pom.xml	2009-07-21 23:53:22 UTC (rev 91530)
@@ -1,62 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <groupId>org.jboss.security</groupId>
-    <artifactId>jbosssx-parent</artifactId>
-    <version>2.0.3.SP2-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.jboss.security</groupId>
-  <artifactId>jbosssx-bridge-as4</artifactId>
-  <packaging>pom</packaging>
-  <name>JBoss Security Implementation for the JBAS - Assembly build for AS 4.2.x</name>
-  <url>http://labs.jboss.org/portal/jbosssecurity/</url>
-  <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
-  <licenses>
-    <license>
-      <name>lgpl</name>
-      <url>http://repository.jboss.com/licenses/lgpl.txt</url>
-    </license>
-  </licenses>
-  <organization>
-    <name>JBoss Inc.</name>
-    <url>http://www.jboss.org</url>
-  </organization>
-    
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.1</version>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>attached</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <archive>
-            <manifestEntries>
-              <Specification-Title>JBoss Security Implementation for the JBAS</Specification-Title>
-              <Specification-Version>${project.version}</Specification-Version>
-              <Specification-Vendor>Red Hat Middleware LLC</Specification-Vendor>
-              <Implementation-Title>JBoss Security Implementation for the JBAS</Implementation-Title>
-              <Implementation-Version>${project.version}</Implementation-Version>
-              <Implementation-VendorId>org.jboss.security</Implementation-VendorId>
-              <Implementation-Vendor>Red Hat Middleware LLC</Implementation-Vendor>
-              <Implementation-URL>http://labs.jboss.org/portal/jbosssecurity/</Implementation-URL>
-            </manifestEntries>
-          </archive>
-          <descriptors>
-            <descriptor>bin.xml</descriptor>
-            <descriptor>sources.xml</descriptor>
-          </descriptors>
-        </configuration>
-        <inherited>false</inherited>
-      </plugin>
-    </plugins>
-  </build>
-  
-</project>

Copied: projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-bridge-as4/pom.xml (from rev 91526, projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-bridge-as4/pom.xml)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-bridge-as4/pom.xml	                        (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-bridge-as4/pom.xml	2009-07-21 23:53:22 UTC (rev 91530)
@@ -0,0 +1,62 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.jboss.security</groupId>
+    <artifactId>jbosssx-parent</artifactId>
+    <version>2.0.3.SP2</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.jboss.security</groupId>
+  <artifactId>jbosssx-bridge-as4</artifactId>
+  <packaging>pom</packaging>
+  <name>JBoss Security Implementation for the JBAS - Assembly build for AS 4.2.x</name>
+  <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+  <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
+  <licenses>
+    <license>
+      <name>lgpl</name>
+      <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+    </license>
+  </licenses>
+  <organization>
+    <name>JBoss Inc.</name>
+    <url>http://www.jboss.org</url>
+  </organization>
+    
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <version>2.1</version>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>attached</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Specification-Title>JBoss Security Implementation for the JBAS</Specification-Title>
+              <Specification-Version>${project.version}</Specification-Version>
+              <Specification-Vendor>Red Hat Middleware LLC</Specification-Vendor>
+              <Implementation-Title>JBoss Security Implementation for the JBAS</Implementation-Title>
+              <Implementation-Version>${project.version}</Implementation-Version>
+              <Implementation-VendorId>org.jboss.security</Implementation-VendorId>
+              <Implementation-Vendor>Red Hat Middleware LLC</Implementation-Vendor>
+              <Implementation-URL>http://labs.jboss.org/portal/jbosssecurity/</Implementation-URL>
+            </manifestEntries>
+          </archive>
+          <descriptors>
+            <descriptor>bin.xml</descriptor>
+            <descriptor>sources.xml</descriptor>
+          </descriptors>
+        </configuration>
+        <inherited>false</inherited>
+      </plugin>
+    </plugins>
+  </build>
+  
+</project>

Deleted: projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-client/pom.xml
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-client/pom.xml	2009-07-21 21:59:08 UTC (rev 91524)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-client/pom.xml	2009-07-21 23:53:22 UTC (rev 91530)
@@ -1,75 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-   <parent>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-parent</artifactId>
-      <version>3</version>
-   </parent>
-   <modelVersion>4.0.0</modelVersion>
-   <groupId>org.jboss.security</groupId>
-   <artifactId>jbosssx-client</artifactId>
-   <version>2.0.3.SP2-SNAPSHOT</version>
-   <packaging>jar</packaging>
-   <name>JBoss Security Client</name>
-   <url>http://www.jboss.org</url>
-   <description>JBoss Security Client Library</description>
-   <build>
-   <plugins>
-      <plugin>
-         <groupId>org.apache.maven.plugins</groupId>
-         <artifactId>maven-jar-plugin</artifactId>
-         <executions>
-            <execution>
-               <goals>
-                 <goal>jar</goal>
-               </goals>
-            </execution>
-         </executions>
-         <configuration>
-          <archive>
-             <manifest>
-               <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
-               <addDefaultSpecificationEntries />
-             </manifest>
-          </archive>
-          <classesDirectory>../jbosssx/target/classes</classesDirectory>
-          <includes>
-             <include>JBossORG-EULA.txt</include>
-             <include>org/jboss/crypto/JBossSXProvider.class</include>
-             <include>org/jboss/crypto/CryptoUtil.class</include>
-             <include>org/jboss/crypto/digest/*</include>
-             <include>org/jboss/security/*</include>
-             <include>org/jboss/security/auth/callback/*</include>
-             <include>org/jboss/security/auth/login/*</include>
-             <include>org/jboss/security/client/*</include>
-             <include>org/jboss/security/auth/login/XMLLoginConfig.class</include>
-             <include>org/jboss/security/auth/login/XMLLoginConfigMBean.class</include>
-             <include>org/jboss/security/plugins/PBEUtils.class</include>
-             <include>org/jboss/security/ssl/ClientSocketFactory.class</include>
-             <include>org/jboss/security/ssl/RMISSLClientSocketFactory.class</include>
-             <include>org/jboss/security/plugins/*SecurityContext*.class</include>                              
-             <include>org/jboss/security/plugins/DefaultSecurityManagement.class</include>                              
-             <include>org/jboss/resource/security/*.class</include>                        </includes>
-         </configuration>
-     </plugin>
-     <plugin>
-       <groupId>org.jboss.maven.plugins</groupId>
-       <artifactId>maven-jboss-deploy-plugin</artifactId>
-       <version>1.4</version>
-       <executions>
-         <execution>
-           <id>jboss-deploy</id>
-           <goals>
-             <goal>jboss-deploy</goal>
-           </goals>
-           <phase>deploy</phase>
-         </execution>
-       </executions>
-       <configuration>
-         <groupId>jboss</groupId>
-         <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
-         <removeArtifactVersion>true</removeArtifactVersion>
-       </configuration>
-     </plugin>
-    </plugins>
- </build>
-</project>

Copied: projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-client/pom.xml (from rev 91526, projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-client/pom.xml)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-client/pom.xml	                        (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-client/pom.xml	2009-07-21 23:53:22 UTC (rev 91530)
@@ -0,0 +1,75 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <parent>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-parent</artifactId>
+      <version>3</version>
+   </parent>
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>org.jboss.security</groupId>
+   <artifactId>jbosssx-client</artifactId>
+   <version>2.0.3.SP2</version>
+   <packaging>jar</packaging>
+   <name>JBoss Security Client</name>
+   <url>http://www.jboss.org</url>
+   <description>JBoss Security Client Library</description>
+   <build>
+   <plugins>
+      <plugin>
+         <groupId>org.apache.maven.plugins</groupId>
+         <artifactId>maven-jar-plugin</artifactId>
+         <executions>
+            <execution>
+               <goals>
+                 <goal>jar</goal>
+               </goals>
+            </execution>
+         </executions>
+         <configuration>
+          <archive>
+             <manifest>
+               <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+               <addDefaultSpecificationEntries />
+             </manifest>
+          </archive>
+          <classesDirectory>../jbosssx/target/classes</classesDirectory>
+          <includes>
+             <include>JBossORG-EULA.txt</include>
+             <include>org/jboss/crypto/JBossSXProvider.class</include>
+             <include>org/jboss/crypto/CryptoUtil.class</include>
+             <include>org/jboss/crypto/digest/*</include>
+             <include>org/jboss/security/*</include>
+             <include>org/jboss/security/auth/callback/*</include>
+             <include>org/jboss/security/auth/login/*</include>
+             <include>org/jboss/security/client/*</include>
+             <include>org/jboss/security/auth/login/XMLLoginConfig.class</include>
+             <include>org/jboss/security/auth/login/XMLLoginConfigMBean.class</include>
+             <include>org/jboss/security/plugins/PBEUtils.class</include>
+             <include>org/jboss/security/ssl/ClientSocketFactory.class</include>
+             <include>org/jboss/security/ssl/RMISSLClientSocketFactory.class</include>
+             <include>org/jboss/security/plugins/*SecurityContext*.class</include>                              
+             <include>org/jboss/security/plugins/DefaultSecurityManagement.class</include>                              
+             <include>org/jboss/resource/security/*.class</include>                        </includes>
+         </configuration>
+     </plugin>
+     <plugin>
+       <groupId>org.jboss.maven.plugins</groupId>
+       <artifactId>maven-jboss-deploy-plugin</artifactId>
+       <version>1.4</version>
+       <executions>
+         <execution>
+           <id>jboss-deploy</id>
+           <goals>
+             <goal>jboss-deploy</goal>
+           </goals>
+           <phase>deploy</phase>
+         </execution>
+       </executions>
+       <configuration>
+         <groupId>jboss</groupId>
+         <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
+         <removeArtifactVersion>true</removeArtifactVersion>
+       </configuration>
+     </plugin>
+    </plugins>
+ </build>
+</project>

Deleted: projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-mc-int/pom.xml
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/pom.xml	2009-07-21 21:59:08 UTC (rev 91524)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-mc-int/pom.xml	2009-07-21 23:53:22 UTC (rev 91530)
@@ -1,125 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  
-  <parent>
-    <groupId>org.jboss.security</groupId>
-    <artifactId>jbosssx-parent</artifactId>
-    <version>2.0.3.SP2-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>jbosssx-mc-int</artifactId>
-  <packaging>jar</packaging>
-  <name>JBoss Microcontainer Security Integration</name>
-  <url>http://labs.jboss.org/portal/jbosssecurity/</url>
-  <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
-
-  <build>
-    <finalName>${artifactId}</finalName>
-  </build>
-
-  <dependencies>
-    <!-- Global dependencies -->
-    <dependency>
-      <groupId>org.jboss.security</groupId>
-      <artifactId>jbosssx-bare</artifactId>
-      <version>${project.version}</version>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.security</groupId>
-      <artifactId>jboss-security-spi</artifactId>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.microcontainer</groupId>
-      <artifactId>jboss-kernel</artifactId>
-      <version>2.0.6.GA</version>
-      <scope>compile</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>org.jboss</groupId>
-          <artifactId>jbossxb</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.microcontainer</groupId>
-      <artifactId>jboss-dependency</artifactId>
-      <version>2.0.6.GA</version>
-      <scope>runtime</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>org.jboss</groupId>
-          <artifactId>jbossxb</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-reflect</artifactId>
-      <version>2.0.2.GA</version>
-      <scope>runtime</scope>
-    </dependency>
-
-    <!-- Test dependencies -->
-    <dependency>
-      <groupId>jboss</groupId>
-      <artifactId>jboss-common-logging-log4j</artifactId>
-      <version>2.0.4.GA</version>
-      <scope>test</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>jboss</groupId>
-          <artifactId>jboss-common-core</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>jboss</groupId>
-          <artifactId>jboss-common-logging-spi</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-test</artifactId>
-      <scope>test</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>org.jboss</groupId>
-          <artifactId>jboss-common-core</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>jboss</groupId>
-          <artifactId>jboss-common-logging-spi</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>jboss</groupId>
-          <artifactId>jboss-common-logging-log4j</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>jboss.profiler.jvmti</groupId>
-          <artifactId>jboss-profiler-jvmti</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>log4j</groupId>
-          <artifactId>log4j</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>junit</groupId>
-          <artifactId>junit</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.ant</groupId>
-          <artifactId>ant</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.ant</groupId>
-          <artifactId>ant-junit</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-  </dependencies>
-</project>

Copied: projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-mc-int/pom.xml (from rev 91526, projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/pom.xml)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-mc-int/pom.xml	                        (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/jbosssx-mc-int/pom.xml	2009-07-21 23:53:22 UTC (rev 91530)
@@ -0,0 +1,125 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  
+  <parent>
+    <groupId>org.jboss.security</groupId>
+    <artifactId>jbosssx-parent</artifactId>
+    <version>2.0.3.SP2</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>jbosssx-mc-int</artifactId>
+  <packaging>jar</packaging>
+  <name>JBoss Microcontainer Security Integration</name>
+  <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+  <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
+
+  <build>
+    <finalName>${artifactId}</finalName>
+  </build>
+
+  <dependencies>
+    <!-- Global dependencies -->
+    <dependency>
+      <groupId>org.jboss.security</groupId>
+      <artifactId>jbosssx-bare</artifactId>
+      <version>${project.version}</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.security</groupId>
+      <artifactId>jboss-security-spi</artifactId>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-kernel</artifactId>
+      <version>2.0.6.GA</version>
+      <scope>compile</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>org.jboss</groupId>
+          <artifactId>jbossxb</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-dependency</artifactId>
+      <version>2.0.6.GA</version>
+      <scope>runtime</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>org.jboss</groupId>
+          <artifactId>jbossxb</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-reflect</artifactId>
+      <version>2.0.2.GA</version>
+      <scope>runtime</scope>
+    </dependency>
+
+    <!-- Test dependencies -->
+    <dependency>
+      <groupId>jboss</groupId>
+      <artifactId>jboss-common-logging-log4j</artifactId>
+      <version>2.0.4.GA</version>
+      <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>jboss</groupId>
+          <artifactId>jboss-common-core</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>jboss</groupId>
+          <artifactId>jboss-common-logging-spi</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-test</artifactId>
+      <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>org.jboss</groupId>
+          <artifactId>jboss-common-core</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>jboss</groupId>
+          <artifactId>jboss-common-logging-spi</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>jboss</groupId>
+          <artifactId>jboss-common-logging-log4j</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>jboss.profiler.jvmti</groupId>
+          <artifactId>jboss-profiler-jvmti</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>log4j</groupId>
+          <artifactId>log4j</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>junit</groupId>
+          <artifactId>junit</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.ant</groupId>
+          <artifactId>ant</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.ant</groupId>
+          <artifactId>ant-junit</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+  </dependencies>
+</project>

Deleted: projects/security/security-jboss-sx/tags/2.0.3.SP2/parent/pom.xml
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/parent/pom.xml	2009-07-21 21:59:08 UTC (rev 91524)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/parent/pom.xml	2009-07-21 23:53:22 UTC (rev 91530)
@@ -1,155 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-   <parent>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-parent</artifactId>
-      <version>4</version>
-   </parent>
-   <modelVersion>4.0.0</modelVersion>
-   <groupId>org.jboss.security</groupId>
-   <artifactId>jbosssx-parent</artifactId>
-   <packaging>pom</packaging>
-   <version>2.0.3.SP2-SNAPSHOT</version>
-   <name>JBossSX - Parent</name>
-   <url>http://labs.jboss.org/portal/jbosssecurity/</url>
-   <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
-   <licenses>
-      <license>
-         <name>lgpl</name>
-         <url>http://repository.jboss.com/licenses/lgpl.txt</url>
-      </license>
-   </licenses>
-   <organization>
-      <name>JBoss Inc.</name>
-      <url>http://www.jboss.org</url>
-   </organization>
-   <scm>
-      <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/branches/Branch_2_0</connection>
-      <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/branches/Branch_2_0</developerConnection>
-   </scm>
-  
-   <build>
-     <plugins>
-        <plugin>
-          <artifactId>maven-release-plugin</artifactId>
-          <version>2.0-beta-6</version>
-          <configuration>
-            <tagBase>https://svn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/tags</tagBase>
-          </configuration>
-        </plugin>
-     </plugins>
-     <pluginManagement>
-       <plugins>
-          <plugin>
-             <artifactId>maven-surefire-plugin</artifactId>
-             <version>2.4.3</version>
-             <configuration>
-               <printSummary>true</printSummary>
-               <disableXmlReport>false</disableXmlReport>
-               <testFailureIgnore>false</testFailureIgnore>
-               <includes>
-                 <include>**/**TestCase.java</include>
-               </includes>
-               <forkMode>pertest</forkMode>
-               <argLine>${surefire.jvm.args}</argLine>
-               <useFile>false</useFile>
-               <trimStackTrace>false</trimStackTrace>
-             </configuration>
-          </plugin>
-       </plugins>
-     </pluginManagement>
-   </build>
-  
-   <repositories>
-    <repository>
-      <id>repository.jboss.org</id>
-      <name>JBoss Repository</name>
-      <layout>default</layout>
-      <url>http://repository.jboss.org/maven2/</url>
-      <snapshots>
-        <enabled>false</enabled>
-      </snapshots>
-    </repository>
-
-    <repository>
-      <id>snapshots.jboss.org</id>
-      <name>JBoss Snapshots Repository</name>
-      <layout>default</layout>
-      <url>http://snapshots.jboss.org/maven2/</url>
-      <snapshots>
-         <enabled>true</enabled>
-      </snapshots>
-      <releases>
-         <enabled>false</enabled>
-      </releases>
-    </repository>
-  </repositories>
-  
-  <dependencyManagement>
-    <dependencies>
-      <dependency>
-        <groupId>jboss</groupId>
-        <artifactId>jboss-logging-log4j</artifactId>
-        <version>2.0.2.GA</version>
-        <scope>runtime</scope>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss</groupId>
-         <artifactId>jbossxb</artifactId>
-         <version>2.0.1.GA</version>
-         <scope>compile</scope>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss.javaee</groupId>
-         <artifactId>jboss-jacc-api</artifactId>
-         <version>1.1.0.${org.jboss.javaee.version}</version>
-         <scope>compile</scope>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss.javaee</groupId>
-         <artifactId>jboss-jaspi-api</artifactId>
-         <version>1.0.0.${org.jboss.javaee.version}</version>
-         <scope>compile</scope>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss.security</groupId>
-         <artifactId>jboss-security-spi</artifactId>
-         <version>${org.jboss.security.spi.version}</version>
-         <scope>compile</scope>
-      </dependency>
-      <dependency>
-         <groupId>stax</groupId>
-         <artifactId>stax-api</artifactId>
-         <version>1.0.1</version>
-      </dependency>
-      <dependency>
-         <groupId>sun-jaxb</groupId>
-         <artifactId>jaxb-api</artifactId>
-         <version>2.1.9</version>
-         <scope>compile</scope>
-      </dependency>
-      <dependency>
-         <groupId>sun-jaxb</groupId>
-         <artifactId>jaxb-impl</artifactId>
-         <version>2.1.9</version>
-         <scope>runtime</scope>
-      </dependency>
-      <dependency>
-         <groupId>junit</groupId>
-         <artifactId>junit</artifactId>
-         <version>3.8.1</version>
-         <scope>test</scope>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss</groupId>
-         <artifactId>jboss-test</artifactId>
-         <version>1.0.4.GA</version>
-         <scope>test</scope>
-      </dependency>
-   </dependencies>
-  </dependencyManagement>
-
-  <properties>
-    <org.jboss.javaee.version>GA</org.jboss.javaee.version>
-    <org.jboss.security.spi.version>2.0.3.SP2</org.jboss.security.spi.version>
-  </properties>
-</project>

Copied: projects/security/security-jboss-sx/tags/2.0.3.SP2/parent/pom.xml (from rev 91526, projects/security/security-jboss-sx/branches/Branch_2_0/parent/pom.xml)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.SP2/parent/pom.xml	                        (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/parent/pom.xml	2009-07-21 23:53:22 UTC (rev 91530)
@@ -0,0 +1,155 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <parent>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-parent</artifactId>
+      <version>4</version>
+   </parent>
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>org.jboss.security</groupId>
+   <artifactId>jbosssx-parent</artifactId>
+   <packaging>pom</packaging>
+   <version>2.0.3.SP2</version>
+   <name>JBossSX - Parent</name>
+   <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+   <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
+   <licenses>
+      <license>
+         <name>lgpl</name>
+         <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+      </license>
+   </licenses>
+   <organization>
+      <name>JBoss Inc.</name>
+      <url>http://www.jboss.org</url>
+   </organization>
+   <scm>
+      <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/tags/2.0.3.SP2</connection>
+      <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/tags/2.0.3.SP2</developerConnection>
+   </scm>
+  
+   <build>
+     <plugins>
+        <plugin>
+          <artifactId>maven-release-plugin</artifactId>
+          <version>2.0-beta-6</version>
+          <configuration>
+            <tagBase>https://svn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/tags</tagBase>
+          </configuration>
+        </plugin>
+     </plugins>
+     <pluginManagement>
+       <plugins>
+          <plugin>
+             <artifactId>maven-surefire-plugin</artifactId>
+             <version>2.4.3</version>
+             <configuration>
+               <printSummary>true</printSummary>
+               <disableXmlReport>false</disableXmlReport>
+               <testFailureIgnore>false</testFailureIgnore>
+               <includes>
+                 <include>**/**TestCase.java</include>
+               </includes>
+               <forkMode>pertest</forkMode>
+               <argLine>${surefire.jvm.args}</argLine>
+               <useFile>false</useFile>
+               <trimStackTrace>false</trimStackTrace>
+             </configuration>
+          </plugin>
+       </plugins>
+     </pluginManagement>
+   </build>
+  
+   <repositories>
+    <repository>
+      <id>repository.jboss.org</id>
+      <name>JBoss Repository</name>
+      <layout>default</layout>
+      <url>http://repository.jboss.org/maven2/</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </repository>
+
+    <repository>
+      <id>snapshots.jboss.org</id>
+      <name>JBoss Snapshots Repository</name>
+      <layout>default</layout>
+      <url>http://snapshots.jboss.org/maven2/</url>
+      <snapshots>
+         <enabled>true</enabled>
+      </snapshots>
+      <releases>
+         <enabled>false</enabled>
+      </releases>
+    </repository>
+  </repositories>
+  
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>jboss</groupId>
+        <artifactId>jboss-logging-log4j</artifactId>
+        <version>2.0.2.GA</version>
+        <scope>runtime</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss</groupId>
+         <artifactId>jbossxb</artifactId>
+         <version>2.0.1.GA</version>
+         <scope>compile</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss.javaee</groupId>
+         <artifactId>jboss-jacc-api</artifactId>
+         <version>1.1.0.${org.jboss.javaee.version}</version>
+         <scope>compile</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss.javaee</groupId>
+         <artifactId>jboss-jaspi-api</artifactId>
+         <version>1.0.0.${org.jboss.javaee.version}</version>
+         <scope>compile</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss.security</groupId>
+         <artifactId>jboss-security-spi</artifactId>
+         <version>${org.jboss.security.spi.version}</version>
+         <scope>compile</scope>
+      </dependency>
+      <dependency>
+         <groupId>stax</groupId>
+         <artifactId>stax-api</artifactId>
+         <version>1.0.1</version>
+      </dependency>
+      <dependency>
+         <groupId>sun-jaxb</groupId>
+         <artifactId>jaxb-api</artifactId>
+         <version>2.1.9</version>
+         <scope>compile</scope>
+      </dependency>
+      <dependency>
+         <groupId>sun-jaxb</groupId>
+         <artifactId>jaxb-impl</artifactId>
+         <version>2.1.9</version>
+         <scope>runtime</scope>
+      </dependency>
+      <dependency>
+         <groupId>junit</groupId>
+         <artifactId>junit</artifactId>
+         <version>3.8.1</version>
+         <scope>test</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss</groupId>
+         <artifactId>jboss-test</artifactId>
+         <version>1.0.4.GA</version>
+         <scope>test</scope>
+      </dependency>
+   </dependencies>
+  </dependencyManagement>
+
+  <properties>
+    <org.jboss.javaee.version>GA</org.jboss.javaee.version>
+    <org.jboss.security.spi.version>2.0.3.SP2</org.jboss.security.spi.version>
+  </properties>
+</project>

Deleted: projects/security/security-jboss-sx/tags/2.0.3.SP2/pom.xml
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/pom.xml	2009-07-21 21:59:08 UTC (rev 91524)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/pom.xml	2009-07-21 23:53:22 UTC (rev 91530)
@@ -1,95 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-   <parent>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-parent</artifactId>
-      <version>3</version>
-   </parent>
-   <modelVersion>4.0.0</modelVersion>
-   <groupId>org.jboss.security</groupId>
-   <artifactId>jbosssx-pom</artifactId>
-   <version>2.0.3.SP2-SNAPSHOT</version>
-   <packaging>pom</packaging>
-   <name>JBoss Security Implementation for the JBAS - Parent</name>
-   <url>http://labs.jboss.org/portal/jbosssecurity/</url>
-   <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
-   <licenses>
-      <license>
-         <name>lgpl</name>
-         <url>http://repository.jboss.com/licenses/lgpl.txt</url>
-      </license>
-   </licenses>
-   <organization>
-      <name>JBoss Inc.</name>
-      <url>http://www.jboss.org</url>
-   </organization>
-   <scm>
-      <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/branches/Branch_2_0</connection>
-      <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/branches/Branch_2_0</developerConnection>
-   </scm>
-   <repositories>
-    <repository>
-      <id>repository.jboss.org</id>
-      <name>JBoss Repository</name>
-      <layout>default</layout>
-      <url>http://repository.jboss.org/maven2/</url>
-      <snapshots>
-        <enabled>false</enabled>
-      </snapshots>
-    </repository>
-
-    <repository>
-      <id>snapshots.jboss.org</id>
-      <name>JBoss Snapshots Repository</name>
-      <layout>default</layout>
-      <url>http://snapshots.jboss.org/maven2/</url>
-      <snapshots>
-         <enabled>true</enabled>
-      </snapshots>
-      <releases>
-         <enabled>false</enabled>
-      </releases>
-    </repository>
-  </repositories>
-  
-   <modules>
-     <module>parent</module>
-     <module>identity</module>
-     <module>acl</module>
-     <module>jbosssx</module>
-     <module>jbosssx-client</module>
-     <module>jbosssx-mc-int</module>
-     <module>jbosssx-bridge-as4</module>
-     <module>assembly</module>
-   </modules>
-  
-   <profiles>
-    <!-- Specify heap size for ACL tests -->
-    <profile>
-      <id>acl-heap-profile</id>
-      <activation>
-         <activeByDefault>true</activeByDefault>
-      </activation>
-      <properties>
-         <surefire.jvm.args>-Xms512m -Xmx1024m</surefire.jvm.args>
-      </properties>
-      <modules>
-        <module>acl</module>
-      </modules>
-    </profile>
-   </profiles>
-  
-   <distributionManagement>
-    <repository>
-      <!-- Copy the distribution jar file to a local checkout of the maven repositry
-        -  This variable can be set in $MAVEN_HOME/conf/settings.xml -->
-      <id>repository.jboss.org</id>
-      <url>file://${maven.repository.root}</url>
-    </repository>
-    <snapshotRepository>
-      <id>snapshots.jboss.org</id>
-      <name>JBoss Inc. Repository</name>
-      <layout>default</layout>
-      <url>dav:https://snapshots.jboss.org/maven2/</url>
-    </snapshotRepository>
-   </distributionManagement>
-</project>

Copied: projects/security/security-jboss-sx/tags/2.0.3.SP2/pom.xml (from rev 91526, projects/security/security-jboss-sx/branches/Branch_2_0/pom.xml)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.SP2/pom.xml	                        (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.SP2/pom.xml	2009-07-21 23:53:22 UTC (rev 91530)
@@ -0,0 +1,95 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <parent>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-parent</artifactId>
+      <version>3</version>
+   </parent>
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>org.jboss.security</groupId>
+   <artifactId>jbosssx-pom</artifactId>
+   <version>2.0.3.SP2</version>
+   <packaging>pom</packaging>
+   <name>JBoss Security Implementation for the JBAS - Parent</name>
+   <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+   <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
+   <licenses>
+      <license>
+         <name>lgpl</name>
+         <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+      </license>
+   </licenses>
+   <organization>
+      <name>JBoss Inc.</name>
+      <url>http://www.jboss.org</url>
+   </organization>
+   <scm>
+      <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/tags/2.0.3.SP2</connection>
+      <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/tags/2.0.3.SP2</developerConnection>
+   </scm>
+   <repositories>
+    <repository>
+      <id>repository.jboss.org</id>
+      <name>JBoss Repository</name>
+      <layout>default</layout>
+      <url>http://repository.jboss.org/maven2/</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </repository>
+
+    <repository>
+      <id>snapshots.jboss.org</id>
+      <name>JBoss Snapshots Repository</name>
+      <layout>default</layout>
+      <url>http://snapshots.jboss.org/maven2/</url>
+      <snapshots>
+         <enabled>true</enabled>
+      </snapshots>
+      <releases>
+         <enabled>false</enabled>
+      </releases>
+    </repository>
+  </repositories>
+  
+   <modules>
+     <module>parent</module>
+     <module>identity</module>
+     <module>acl</module>
+     <module>jbosssx</module>
+     <module>jbosssx-client</module>
+     <module>jbosssx-mc-int</module>
+     <module>jbosssx-bridge-as4</module>
+     <module>assembly</module>
+   </modules>
+  
+   <profiles>
+    <!-- Specify heap size for ACL tests -->
+    <profile>
+      <id>acl-heap-profile</id>
+      <activation>
+         <activeByDefault>true</activeByDefault>
+      </activation>
+      <properties>
+         <surefire.jvm.args>-Xms512m -Xmx1024m</surefire.jvm.args>
+      </properties>
+      <modules>
+        <module>acl</module>
+      </modules>
+    </profile>
+   </profiles>
+  
+   <distributionManagement>
+    <repository>
+      <!-- Copy the distribution jar file to a local checkout of the maven repositry
+        -  This variable can be set in $MAVEN_HOME/conf/settings.xml -->
+      <id>repository.jboss.org</id>
+      <url>file://${maven.repository.root}</url>
+    </repository>
+    <snapshotRepository>
+      <id>snapshots.jboss.org</id>
+      <name>JBoss Inc. Repository</name>
+      <layout>default</layout>
+      <url>dav:https://snapshots.jboss.org/maven2/</url>
+    </snapshotRepository>
+   </distributionManagement>
+</project>




More information about the jboss-cvs-commits mailing list