[prev in list] [next in list] [prev in thread] [next in thread]
List: jboss-cvs-commits
Subject: [jboss-cvs] jbosstest/src/main/org/jboss/test/security/test ...
From: Scott Stark <scott.stark () jboss ! com>
Date: 2005-05-31 23:23:30
Message-ID: E1DdG54-0004zo-VE () committer01 ! frg ! pub ! inap ! atl ! jboss ! com
[Download RAW message or body]
User: starksm
Date: 05/05/31 19:23:30
Modified: src/main/org/jboss/test/security/test
EJBSpecUnitTestCase.java
Log:
Extend the run-as interaction tests
Revision Changes Path
1.32 +38 -2 jbosstest/src/main/org/jboss/test/security/test/EJBSpecUnitTestCase.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: EJBSpecUnitTestCase.java
===================================================================
RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/security/test/EJBSpecUnitTestCase.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- EJBSpecUnitTestCase.java 21 Feb 2005 02:15:37 -0000 1.31
+++ EJBSpecUnitTestCase.java 31 May 2005 23:23:30 -0000 1.32
@@ -41,6 +41,8 @@
import org.jboss.test.security.interfaces.StatelessSessionHome;
import org.jboss.test.security.interfaces.SecurityContext;
import org.jboss.test.security.interfaces.SecurityContextHome;
+import org.jboss.test.security.ejb.jbas1852.SessionFacade;
+import org.jboss.test.security.ejb.jbas1852.SessionFacadeHome;
import org.jboss.test.util.AppCallbackHandler;
import org.apache.log4j.Logger;
@@ -53,7 +55,7 @@
deployment unit. These test the basic role based access model.
@author Scott.Stark@jboss.org
- @version $Revision: 1.31 $
+ @version $Revision: 1.32 $
*/
public class EJBSpecUnitTestCase
extends JBossTestCase
@@ -534,6 +536,41 @@
}
}
+ public void testRunAsSFSB() throws Exception
+ {
+ log.info("+++ testRunAsSFSB");
+ login();
+ Object obj = getInitialContext().lookup("spec.CallerFacadeBean-testRunAsSFSB");
+ obj = PortableRemoteObject.narrow(obj, CalledSessionHome.class);
+ CalledSessionHome home = (CalledSessionHome) obj;
+ log.debug("Found CallerFacadeBean-testRunAsSFSB Home");
+ CalledSession bean = home.create();
+ log.debug("Created spec.CallerFacadeBean-testRunAsSFSB");
+ bean.invokeEcho("testRunAsSFSB");
+ log.debug("Bean.invokeEcho() ok");
+ bean.remove();
+ }
+
+ /**
+ * Test the run-as side-effects raised in
+ * http://jira.jboss.com/jira/browse/JBAS-1852
+ *
+ * @throws Exception
+ */
+ public void testJBAS1852() throws Exception
+ {
+ log.info("+++ testJBAS1852");
+ login();
+ Object obj = getInitialContext().lookup("spec.PublicSessionFacade");
+ obj = PortableRemoteObject.narrow(obj, SessionFacadeHome.class);
+ SessionFacadeHome home = (SessionFacadeHome) obj;
+ log.debug("Found PublicSessionFacade home");
+ SessionFacade bean = home.create();
+ log.debug("Created PublicSessionFacade");
+ log.debug("Bean.callEcho('testJBAS1852') -> " + bean.callEcho("testJBAS1852"));
+ bean.remove();
+ }
+
/** Test that an MDB with a run-as identity is able to access secure EJBs
that require the identity.
*/
@@ -897,4 +934,3 @@
}
}
-
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
jboss-cvs-commits mailing list
jboss-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-cvs-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic