[jboss-cvs] JBossAS SVN: r70197 - projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/service.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Feb 27 18:16:29 EST 2008
Author: ALRubinger
Date: 2008-02-27 18:16:29 -0500 (Wed, 27 Feb 2008)
New Revision: 70197
Modified:
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/service/Tester.java
Log:
Switched SA to SecurityClient, copied into Thread scope as well; for Anil's review
Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/service/Tester.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/service/Tester.java 2008-02-27 22:37:30 UTC (rev 70196)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/service/Tester.java 2008-02-27 23:16:29 UTC (rev 70197)
@@ -29,6 +29,8 @@
import org.jboss.security.SecurityAssociation;
import org.jboss.security.SimplePrincipal;
+import org.jboss.security.client.SecurityClient;
+import org.jboss.security.client.SecurityClientFactory;
import org.jboss.system.ServiceMBeanSupport;
/**
@@ -100,10 +102,12 @@
{
final int count = 15;
- SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
- SecurityAssociation.setCredential("password".toCharArray());
- final Context ctx = new InitialContext();
+ SecurityClient sc= SecurityClientFactory.getSecurityClient();
+ sc.setSimple("somebody", "password");
+ sc.login();
+ Context ctx = new InitialContext();
+
ServiceOneLocal test = (ServiceOneLocal) ctx.lookup("ServiceOne/local");
test.setLocalMethodCalls(0);
@@ -118,7 +122,13 @@
{
try
{
- ServiceOneLocal test1 = (ServiceOneLocal) ctx.lookup("ServiceOne/local");
+
+ SecurityClient sc= SecurityClientFactory.getSecurityClient();
+ sc.setSimple("somebody", "password");
+ sc.login();
+
+ Context ctxThread = new InitialContext();
+ ServiceOneLocal test1 = (ServiceOneLocal) ctxThread.lookup("ServiceOne/local");
for (int j = 0 ; j < count ; j++)
{
String s = outer + "_" + j;
More information about the jboss-cvs-commits
mailing list