[jboss-cvs] JBossAS SVN: r101114 - in branches/JBPAPP_4_2_0_GA_CP: testsuite/imports/sections and 10 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Feb 18 09:18:50 EST 2010


Author: wolfc
Date: 2010-02-18 09:18:48 -0500 (Thu, 18 Feb 2010)
New Revision: 101114

Added:
   branches/JBPAPP_4_2_0_GA_CP/testsuite/imports/sections/ejb3.xml
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/common/
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/common/EJB3TestCase.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/RunAsManagerBean.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/RunAsPrincipalBean.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/WhoAmI.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/WhoAmIBean.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/unit/
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/unit/RunAsUnitTestCase.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/ejb3/
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/ejb3/jbpapp2473/
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/ejb3/jbpapp2473/roles.properties
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/ejb3/jbpapp2473/users.properties
   branches/JBPAPP_4_2_0_GA_CP/thirdparty/hibernate-commons-annotations/
   branches/JBPAPP_4_2_0_GA_CP/thirdparty/hibernate-commons-annotations/component-info.xml
Removed:
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/RunAsManagerBean.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/RunAsPrincipalBean.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/WhoAmI.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/WhoAmIBean.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/unit/
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/unit/RunAsUnitTestCase.java
Modified:
   branches/JBPAPP_4_2_0_GA_CP/testsuite/imports/test-jars.xml
Log:
JBPAPP-2500: merged JBPAPP-2473 (rev 92506, 92756, 92774)

Added: branches/JBPAPP_4_2_0_GA_CP/testsuite/imports/sections/ejb3.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/imports/sections/ejb3.xml	                        (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/imports/sections/ejb3.xml	2010-02-18 14:18:48 UTC (rev 101114)
@@ -0,0 +1,19 @@
+<project name="tests-ejb3-jars">
+   <target name="jbpapp2473" depends="compile">
+      <mkdir dir="${build.lib}" />
+      
+      <jar destfile="${build.lib}/jbpapp2473.jar">
+         <fileset dir="${build.classes}">
+            <!-- include name="org/jboss/test/ejb3/common/**" / -->
+            <include name="org/jboss/test/ejb3/jbpapp2473/**" />
+         </fileset>
+         <fileset dir="${source.resources}/ejb3/jbpapp2473" includes="**"/>
+      </jar>
+   </target>
+   
+   <target name="_jars-ejb3" depends="
+      jbpapp2473
+      ">
+   </target>
+  
+</project>


Property changes on: branches/JBPAPP_4_2_0_GA_CP/testsuite/imports/sections/ejb3.xml
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/imports/test-jars.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/imports/test-jars.xml	2010-02-18 14:10:57 UTC (rev 101113)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/imports/test-jars.xml	2010-02-18 14:18:48 UTC (rev 101114)
@@ -21,6 +21,7 @@
 	<import file="sections/dbtest.xml"/>
 	<import file="sections/deadlock.xml"/>
 	<import file="sections/deployers.xml"/>
+    <import file="sections/ejb3.xml"/>   
 	<import file="sections/ejbconf.xml"/>
    <import file="sections/ejb.xml"/>   
 	<import file="sections/entity.xml"/>
@@ -96,6 +97,7 @@
       _jars-deadlock,
       _jars-deployers,
       _jars-deployment,
+	  _jars-ejb3,
       _jars-ejbconf,
       _jars-ejbproxy,
       _jars-entity,

Copied: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/common/EJB3TestCase.java (from rev 101108, branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/ejb3/common/EJB3TestCase.java)
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/common/EJB3TestCase.java	                        (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/common/EJB3TestCase.java	2010-02-18 14:18:48 UTC (rev 101114)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ejb3.common;
+
+import javax.jms.QueueConnectionFactory;
+import javax.naming.NamingException;
+
+import org.jboss.test.JBossTestCase;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public abstract class EJB3TestCase extends JBossTestCase
+{
+   protected EJB3TestCase(String name)
+   {
+      super(name);
+   }
+
+   protected QueueConnectionFactory getQueueConnectionFactory() throws Exception
+   {
+      try
+      {
+         return (QueueConnectionFactory) getInitialContext().lookup("ConnectionFactory");
+      }
+      catch (NamingException e)
+      {
+         return (QueueConnectionFactory) getInitialContext().lookup("java:/ConnectionFactory");
+      }
+   }
+
+   protected <T> T lookup(String name, Class<T> expectedType) throws Exception
+   {
+      return expectedType.cast(getInitialContext().lookup(name));
+   }
+   
+   /**
+    * Make sure the deployment is successful.
+    * @throws Exception
+    */
+   public final void testServerFound() throws Exception
+   {
+      // we don't want this done in suite, because then the individual
+      // failure count for this test would go down. (1 failure instead of many)
+      serverFound();
+   }
+}

Copied: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473 (from rev 92506, branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473)

Deleted: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/RunAsManagerBean.java
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/RunAsManagerBean.java	2009-08-18 10:45:11 UTC (rev 92506)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/RunAsManagerBean.java	2010-02-18 14:18:48 UTC (rev 101114)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ejb3.jbpapp2473;
-
-import javax.annotation.security.RunAs;
-import javax.ejb.EJB;
-import javax.ejb.Remote;
-import javax.ejb.Stateless;
-
-import org.jboss.ejb3.annotation.SecurityDomain;
-
-/**
- * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
- at Stateless
- at SecurityDomain(value="other", unauthenticatedPrincipal="nobody")
- at RunAs("manager")
- at Remote(WhoAmI.class)
-public class RunAsManagerBean implements WhoAmI
-{
-   @EJB
-   private WhoAmI whoAmI;
-   
-   public String getCallerPrincipal()
-   {
-      return whoAmI.getCallerPrincipal();
-   }
-
-   public boolean isCallerInRole(String roleName)
-   {
-      return whoAmI.isCallerInRole(roleName);
-   }
-}

Copied: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/RunAsManagerBean.java (from rev 92506, branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/RunAsManagerBean.java)
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/RunAsManagerBean.java	                        (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/RunAsManagerBean.java	2010-02-18 14:18:48 UTC (rev 101114)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ejb3.jbpapp2473;
+
+import org.jboss.annotation.security.SecurityDomain;
+
+import javax.annotation.security.RunAs;
+import javax.ejb.EJB;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at SecurityDomain(value="other", unauthenticatedPrincipal="nobody")
+ at RunAs("manager")
+ at Remote(WhoAmI.class)
+public class RunAsManagerBean implements WhoAmI
+{
+   // all beans in this test implement WhoAmI, so I must specify the correct bean
+   @EJB(beanName="WhoAmIBean")
+   private WhoAmI whoAmI;
+   
+   public String getCallerPrincipal()
+   {
+      return whoAmI.getCallerPrincipal();
+   }
+
+   public boolean isCallerInRole(String roleName)
+   {
+      return whoAmI.isCallerInRole(roleName);
+   }
+}

Deleted: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/RunAsPrincipalBean.java
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/RunAsPrincipalBean.java	2009-08-18 10:45:11 UTC (rev 92506)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/RunAsPrincipalBean.java	2010-02-18 14:18:48 UTC (rev 101114)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ejb3.jbpapp2473;
-
-import javax.annotation.security.RunAs;
-import javax.ejb.EJB;
-import javax.ejb.Remote;
-import javax.ejb.Stateless;
-
-import org.jboss.ejb3.annotation.RunAsPrincipal;
-import org.jboss.ejb3.annotation.SecurityDomain;
-
-/**
- * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
- at Stateless
- at SecurityDomain(value="other", unauthenticatedPrincipal="nobody")
- at RunAs("manager")
- at RunAsPrincipal("jbpapp2473")
- at Remote(WhoAmI.class)
-public class RunAsPrincipalBean implements WhoAmI
-{
-   @EJB
-   private WhoAmI whoAmI;
-   
-   public String getCallerPrincipal()
-   {
-      return whoAmI.getCallerPrincipal();
-   }
-
-   public boolean isCallerInRole(String roleName)
-   {
-      return whoAmI.isCallerInRole(roleName);
-   }
-}

Copied: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/RunAsPrincipalBean.java (from rev 92506, branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/RunAsPrincipalBean.java)
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/RunAsPrincipalBean.java	                        (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/RunAsPrincipalBean.java	2010-02-18 14:18:48 UTC (rev 101114)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ejb3.jbpapp2473;
+
+import org.jboss.annotation.security.RunAsPrincipal;
+import org.jboss.annotation.security.SecurityDomain;
+
+import javax.annotation.security.RunAs;
+import javax.ejb.EJB;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at SecurityDomain(value="other", unauthenticatedPrincipal="nobody")
+ at RunAs("manager")
+ at RunAsPrincipal("jbpapp2473")
+ at Remote(WhoAmI.class)
+public class RunAsPrincipalBean implements WhoAmI
+{
+   // all beans in this test implement WhoAmI, so I must specify the correct bean
+   @EJB(beanName="WhoAmIBean")
+   private WhoAmI whoAmI;
+   
+   public String getCallerPrincipal()
+   {
+      return whoAmI.getCallerPrincipal();
+   }
+
+   public boolean isCallerInRole(String roleName)
+   {
+      return whoAmI.isCallerInRole(roleName);
+   }
+}

Deleted: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/WhoAmI.java
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/WhoAmI.java	2009-08-18 10:45:11 UTC (rev 92506)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/WhoAmI.java	2010-02-18 14:18:48 UTC (rev 101114)
@@ -1,33 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ejb3.jbpapp2473;
-
-/**
- * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public interface WhoAmI
-{
-   String getCallerPrincipal();
-   
-   boolean isCallerInRole(String roleName);
-}

Copied: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/WhoAmI.java (from rev 92506, branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/WhoAmI.java)
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/WhoAmI.java	                        (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/WhoAmI.java	2010-02-18 14:18:48 UTC (rev 101114)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ejb3.jbpapp2473;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public interface WhoAmI
+{
+   String getCallerPrincipal();
+   
+   boolean isCallerInRole(String roleName);
+}

Deleted: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/WhoAmIBean.java
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/WhoAmIBean.java	2009-08-18 10:45:11 UTC (rev 92506)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/WhoAmIBean.java	2010-02-18 14:18:48 UTC (rev 101114)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ejb3.jbpapp2473;
-
-import javax.annotation.Resource;
-import javax.ejb.SessionContext;
-import javax.ejb.Stateless;
-
-import org.jboss.ejb3.annotation.SecurityDomain;
-
-/**
- * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
- at Stateless
- at SecurityDomain(value="other", unauthenticatedPrincipal="nobody")
-public class WhoAmIBean implements WhoAmI
-{
-   @Resource
-   private SessionContext ctx;
-   
-   public String getCallerPrincipal()
-   {
-      return ctx.getCallerPrincipal().getName();
-   }
-   
-   public boolean isCallerInRole(String roleName)
-   {
-      return ctx.isCallerInRole(roleName);
-   }
-}

Copied: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/WhoAmIBean.java (from rev 92506, branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/WhoAmIBean.java)
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/WhoAmIBean.java	                        (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/WhoAmIBean.java	2010-02-18 14:18:48 UTC (rev 101114)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ejb3.jbpapp2473;
+
+import org.jboss.annotation.security.SecurityDomain;
+
+import javax.annotation.Resource;
+import javax.annotation.security.RunAs;
+import javax.ejb.SessionContext;
+import javax.ejb.Stateless;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at SecurityDomain(value="other", unauthenticatedPrincipal="nobody")
+// FIXME: this should not be needed (JBPAPP-1951)
+ at RunAs("broken")
+public class WhoAmIBean implements WhoAmI
+{
+   @Resource
+   private SessionContext ctx;
+   
+   public String getCallerPrincipal()
+   {
+      return ctx.getCallerPrincipal().getName();
+   }
+   
+   public boolean isCallerInRole(String roleName)
+   {
+      return ctx.isCallerInRole(roleName);
+   }
+}

Copied: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/unit (from rev 92506, branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/unit)

Deleted: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/unit/RunAsUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/unit/RunAsUnitTestCase.java	2009-08-18 10:45:11 UTC (rev 92506)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/unit/RunAsUnitTestCase.java	2010-02-18 14:18:48 UTC (rev 101114)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ejb3.jbpapp2473.unit;
-
-import junit.framework.Test;
-
-import org.jboss.test.ejb3.common.EJB3TestCase;
-import org.jboss.test.ejb3.jbpapp2473.WhoAmI;
-
-/**
- * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public class RunAsUnitTestCase extends EJB3TestCase
-{
-   public RunAsUnitTestCase(String name)
-   {
-      super(name);
-   }
-   
-   public void testRole1() throws Exception
-   {
-      WhoAmI bean = lookup("RunAsManagerBean/remote", WhoAmI.class);
-      
-      assertTrue("RunAsManagerBean specifies a RunAs 'manager' role", bean.isCallerInRole("manager"));
-   }
-   
-   public void testRole2() throws Exception
-   {
-      WhoAmI bean = lookup("RunAsPrincipalBean/remote", WhoAmI.class);
-      
-      assertTrue("RunAsPrincipalBean specifies a RunAs 'manager' role", bean.isCallerInRole("manager"));
-   }
-   
-   public void testRunAsManager() throws Exception
-   {
-      WhoAmI bean = lookup("RunAsManagerBean/remote", WhoAmI.class);
-      
-      String caller = bean.getCallerPrincipal();
-      // TODO: note that there is a bug in RunAsIdentity which hard-codes anonymous
-      assertEquals("RunAsManagerBean doesn't override the principal", "anonymous", caller);
-   }
-   
-   public void testRunAsPrincipal() throws Exception
-   {
-      WhoAmI bean = lookup("RunAsPrincipalBean/remote", WhoAmI.class);
-      
-      String caller = bean.getCallerPrincipal();
-      assertEquals("RunAsPrincipalBean overrides the principal", "jbpapp2473", caller);
-   }
-   
-   public static Test suite() throws Exception
-   {
-      return getDeploySetup(RunAsUnitTestCase.class, "jbpapp2473.jar");
-   }
-}

Copied: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/unit/RunAsUnitTestCase.java (from rev 92506, branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/unit/RunAsUnitTestCase.java)
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/unit/RunAsUnitTestCase.java	                        (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/ejb3/jbpapp2473/unit/RunAsUnitTestCase.java	2010-02-18 14:18:48 UTC (rev 101114)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ejb3.jbpapp2473.unit;
+
+import junit.framework.Test;
+
+import org.jboss.test.ejb3.common.EJB3TestCase;
+import org.jboss.test.ejb3.jbpapp2473.WhoAmI;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class RunAsUnitTestCase extends EJB3TestCase
+{
+   public RunAsUnitTestCase(String name)
+   {
+      super(name);
+   }
+   
+   public void testRole1() throws Exception
+   {
+      WhoAmI bean = lookup("RunAsManagerBean/remote", WhoAmI.class);
+      
+      assertTrue("RunAsManagerBean specifies a RunAs 'manager' role", bean.isCallerInRole("manager"));
+   }
+   
+   public void testRole2() throws Exception
+   {
+      WhoAmI bean = lookup("RunAsPrincipalBean/remote", WhoAmI.class);
+      
+      assertTrue("RunAsPrincipalBean specifies a RunAs 'manager' role", bean.isCallerInRole("manager"));
+   }
+   
+   public void testRunAsManager() throws Exception
+   {
+      WhoAmI bean = lookup("RunAsManagerBean/remote", WhoAmI.class);
+      
+      String caller = bean.getCallerPrincipal();
+      // TODO: note that there is a bug in RunAsIdentity which hard-codes anonymous
+      assertEquals("RunAsManagerBean doesn't override the principal", "anonymous", caller);
+   }
+   
+   public void testRunAsPrincipal() throws Exception
+   {
+      WhoAmI bean = lookup("RunAsPrincipalBean/remote", WhoAmI.class);
+      
+      String caller = bean.getCallerPrincipal();
+      assertEquals("RunAsPrincipalBean overrides the principal", "jbpapp2473", caller);
+   }
+   
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(RunAsUnitTestCase.class, "jbpapp2473.jar");
+   }
+}

Added: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/ejb3/jbpapp2473/roles.properties
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/ejb3/jbpapp2473/roles.properties	                        (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/ejb3/jbpapp2473/roles.properties	2010-02-18 14:18:48 UTC (rev 101114)
@@ -0,0 +1 @@
+# nothing

Added: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/ejb3/jbpapp2473/users.properties
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/ejb3/jbpapp2473/users.properties	                        (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/ejb3/jbpapp2473/users.properties	2010-02-18 14:18:48 UTC (rev 101114)
@@ -0,0 +1 @@
+jduke=theduke
\ No newline at end of file

Added: branches/JBPAPP_4_2_0_GA_CP/thirdparty/hibernate-commons-annotations/component-info.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/thirdparty/hibernate-commons-annotations/component-info.xml	                        (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/thirdparty/hibernate-commons-annotations/component-info.xml	2010-02-18 14:18:48 UTC (rev 101114)
@@ -0,0 +1,17 @@
+<project name="hibernate-commons-annotations-component-info">
+   <component id="hibernate-commons-annotations"
+               licenseType="lgpl"
+               version="3.0.0.GA-brew"
+               projectHome="http://annotations.hibernate.org"
+      description="Hibernate Commons Annotations"
+      scm=":ext:cvs.devel.redhat.com:/cvs/dist/hibernate3-annotations"
+      tag="hibernate3-commons-annotations-3_0_0-1jpp_ep1_1_el4">
+      <!-- Built using JDK 5 -->
+      <artifact id="hibernate-commons-annotations.jar"/>
+      <export>
+         <include input="hibernate-commons-annotations.jar"/>         
+      </export>
+      
+   </component>
+
+</project>


Property changes on: branches/JBPAPP_4_2_0_GA_CP/thirdparty/hibernate-commons-annotations/component-info.xml
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native




More information about the jboss-cvs-commits mailing list