[jboss-cvs] JBossRemoting/src/tests/org/jboss/test/remoting/performance/spring/rmi ...

Ron Sigal ron_sigal at yahoo.com
Tue Aug 29 00:23:03 EDT 2006


  User: rsigal  
  Date: 06/08/29 00:23:03

  Modified:    src/tests/org/jboss/test/remoting/performance/spring/rmi 
                        SpringRMIPerformanceClient.java
  Log:
  JBREM-592:  Put loading of SpringRMIClientService.xml in a loop to avoid problems when creating multiple callback servers.
  
  Revision  Changes    Path
  1.2       +15 -2     JBossRemoting/src/tests/org/jboss/test/remoting/performance/spring/rmi/SpringRMIPerformanceClient.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: SpringRMIPerformanceClient.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/tests/org/jboss/test/remoting/performance/spring/rmi/SpringRMIPerformanceClient.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- SpringRMIPerformanceClient.java	13 Aug 2006 19:30:05 -0000	1.1
  +++ SpringRMIPerformanceClient.java	29 Aug 2006 04:23:03 -0000	1.2
  @@ -95,7 +95,20 @@
      {
         String springServiceXml = this.getClass().getResource("SpringRMIClientService.xml").getFile();
   
  -      ApplicationContext context = new FileSystemXmlApplicationContext(springServiceXml);
  +      ApplicationContext context = null;
  +      for (int i = 0; i < 10; i++)
  +      {
  +         try
  +         {
  +            context = new FileSystemXmlApplicationContext(springServiceXml);
  +            break;
  +         }
  +         catch (Exception e)
  +         {
  +            Thread.sleep(2000);
  +         }
  +      }
  +      
         SpringRMICallbackServer callbackServer = (SpringRMICallbackServer) context.getBean("springRMICallbackServerService");
         callbackServer.setClientSessionId(clientSessionId);
         callbackServer.setServerDoneLock(serverDoneLock);
  
  
  



More information about the jboss-cvs-commits mailing list