[jboss-cvs] JBossAS SVN: r70149 - 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
Tue Feb 26 22:36:42 EST 2008


Author: ALRubinger
Date: 2008-02-26 22:36:41 -0500 (Tue, 26 Feb 2008)
New Revision: 70149

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/TesterMBean.java
Log:
Cleaned up service tests Tester

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 03:16:19 UTC (rev 70148)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/service/Tester.java	2008-02-27 03:36:41 UTC (rev 70149)
@@ -22,15 +22,15 @@
 package org.jboss.ejb3.test.service;
 
 
+import java.util.ArrayList;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
 import org.jboss.security.SecurityAssociation;
 import org.jboss.security.SimplePrincipal;
 import org.jboss.system.ServiceMBeanSupport;
 
-import javax.naming.InitialContext;
-
-import java.io.File;
-import java.util.ArrayList;
-
 /**
  * Comment
  *
@@ -39,8 +39,8 @@
  */
 public class Tester extends ServiceMBeanSupport implements TesterMBean
 {
-   public static ArrayList creates = new ArrayList();
-   public static ArrayList starts = new ArrayList();
+   public static ArrayList<String> creates = new ArrayList<String>();
+   public static ArrayList<String> starts = new ArrayList<String>();
    
    public void testLocalServiceWithInterfaceAnnotation() throws Exception
    {
@@ -102,7 +102,8 @@
       
       SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
       SecurityAssociation.setCredential("password".toCharArray());
-      final InitialContext ctx = new InitialContext();
+      final Context ctx = new InitialContext();
+      
       ServiceOneLocal test = (ServiceOneLocal) ctx.lookup("ServiceOne/local");
       test.setLocalMethodCalls(0);
 
@@ -117,12 +118,12 @@
                   {
                      try
                      {
-                        ServiceOneLocal test = (ServiceOneLocal) ctx.lookup("ServiceOne/local");
+                        ServiceOneLocal test1 = (ServiceOneLocal) ctx.lookup("ServiceOne/local");
                         for (int j = 0 ; j < count ; j++)
                         {
                            String s = outer + "_" + j;
                            //System.out.println(s);
-                           test.localMethod(s);
+                           test1.localMethod(s);
                         }
                      }
                      catch(Exception e)
@@ -173,14 +174,14 @@
       if (!test.getCalled()) throw new RuntimeException("Called should be true, not " + test.getCalled());
    }
 
-   public ArrayList getCreates()
+   public ArrayList<String> getCreates()
    {
-      return creates;
+      return Tester.creates;
    }
 
-   public ArrayList getStarts()
+   public ArrayList<String> getStarts()
    {
-      return starts;
+      return Tester.starts;
    }
 
 }

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/service/TesterMBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/service/TesterMBean.java	2008-02-27 03:16:19 UTC (rev 70148)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/service/TesterMBean.java	2008-02-27 03:36:41 UTC (rev 70149)
@@ -35,6 +35,6 @@
    void testServiceWithLocalBinding() throws Exception;
    void testDeploymentDescriptorServiceWithLocalBinding() throws Exception;
    void testLocalServiceWithInterfaceAnnotation() throws Exception;
-   ArrayList getCreates();
-   ArrayList getStarts();
+   ArrayList<String> getCreates();
+   ArrayList<String> getStarts();
 }




More information about the jboss-cvs-commits mailing list