User: sparre
Date: 01/06/17 09:47:51
Modified: src/main/org/jboss/test/cts/ejb StatefulSessionBean.java
Log:
Fix for CTS test failure:
Suite: org.jboss.test.cts.test.AllJUnitTests
Test: testProbeBeanContext
Type: failure
Exception: junit.framework.AssertionFailedError
Message: Caught an unknown exception in testProbeBeanContex
isCallerInRole() failed with NPE, due to lack of security setup.
That test was duplicated in the security tests, so all security-
related tests were removed from CTS test.
Also moved the CTS-specific BeanContextInfo to a CTS-specific
package.
Revision Changes Path
1.12 +2 -23
jbosstest/src/main/org/jboss/test/cts/ejb/StatefulSessionBean.java
Index: StatefulSessionBean.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/cts/ejb/StatefulSessionBean.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- StatefulSessionBean.java 2001/02/01 02:23:26 1.11
+++ StatefulSessionBean.java 2001/06/17 16:47:51 1.12
@@ -15,8 +15,8 @@
/**
*
* @see <related>
- * @author $Author: peter $
- * @version $Revision: 1.11 $
+ * @author $Author: sparre $
+ * @version $Revision: 1.12 $
*/
public class StatefulSessionBean
@@ -151,36 +151,15 @@
BeanContextInfo ctx = new BeanContextInfo();
System.out.println("Getting EJBObject..");
-
Class remoteInterface = sessionCtx.getEJBObject().getClass();
-
ctx.remoteInterface = remoteInterface.getName();
System.out.println("Getting EJBHome...");
-
Class homeInterface = sessionCtx.getEJBHome().getClass();
-
ctx.homeInterface = homeInterface.getName();
- System.out.println("Getting CallerPrincipal...");
-
- Principal principal = sessionCtx.getCallerPrincipal();
-
- if (principal == null)
- {
- System.out.println("Went to get 'Principal', principal is null!");
-
- throw new java.rmi.RemoteException(
- "Unable to get Principal, getCallerPrincipal() returned NULL");
- }
-
- ctx.principleName = principal.getName();
- ctx.isCallerInRole =
- new Boolean(sessionCtx.isCallerInRole("bean tester"));
-
System.out.println("calling setRollbackOnly( ) on context");
sessionCtx.setRollbackOnly();
-
ctx.isRollbackOnly = new Boolean(sessionCtx.getRollbackOnly());
return ctx;
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development