whitlock    2002/11/25 06:49:25

  Modified:    java/test wsif.test.properties
               java/test/util TestUtilities.java
  Log:
  Make some JMS hard-coded strings into properties
  
  Revision  Changes    Path
  1.9       +12 -1     xml-axis-wsif/java/test/wsif.test.properties
  
  Index: wsif.test.properties
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/test/wsif.test.properties,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- wsif.test.properties      11 Nov 2002 15:36:04 -0000      1.8
  +++ wsif.test.properties      25 Nov 2002 14:49:25 -0000      1.9
  @@ -26,4 +26,15 @@
   #
   # wsif.displaytime is number of milliseconds that images are displayed for.
   # The default is 2000ms.
  -wsif.displaytime=2000
  \ No newline at end of file
  +wsif.displaytime=2000
  +#
  +# The wsif.jms2httpbridge properties are used to start the JMS2HTTPBridge 
  +# when it is started automatically by the testcases. The
  +# jndidestinationnamepattern is used to construct the jndiDestinationName
  +# by replacing the % with Stockquote or AddressBook, etc.
  +# The httpurl is the URL that the bridge will route requests on to.
  +wsif.jms2httpbridge.initialcontextfactory=com.sun.jndi.fscontext.RefFSContextFactory
  +wsif.jms2httpbridge.jndidestinationnamepattern=SoapJms%Queue
  +wsif.jms2httpbridge.jndiproviderurl=file:///JNDI-Directory
  +wsif.jms2httpbridge.jndiconnectionfactoryname=WSIFSampleQCF
  +wsif.jms2httpbridge.httpurl=http://localhost:8080/soap/servlet/rpcrouter
  
  
  
  1.14      +35 -19    xml-axis-wsif/java/test/util/TestUtilities.java
  
  Index: TestUtilities.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/test/util/TestUtilities.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- TestUtilities.java        18 Nov 2002 15:58:53 -0000      1.13
  +++ TestUtilities.java        25 Nov 2002 14:49:25 -0000      1.14
  @@ -317,24 +317,40 @@
   }
   
   class BridgeThread extends Thread {
  -   private String name;
  -   public BridgeThread(String name) { this.name=name; }
  -   public void run() { 
  -      try {
  -        System.out.println("Starting " + name + " JMS2HTTPBridge");
  -        JMS2HTTPBridge j2h =
  -            new JMS2HTTPBridge(
  -                "com.sun.jndi.fscontext.RefFSContextFactory",
  -                "file:///JNDI-Directory",
  -                "WSIFSampleQCF",
  -                "SoapJms" + name + "Queue",
  -                "http://localhost:8080/soap/servlet/rpcrouter";,
  -                JMS2HTTPBridgeDestination.COLDSTART,
  -                TestUtilities.isJmsVerbose());
  -         j2h.listen();
  -      } catch (Exception e) { 
  -         System.out.println("Caught JMS2HTTPBridge exception " + e); 
  -      }
  -   }
  +    private String name;
  +
  +    public BridgeThread(String name) {
  +        this.name = name;
  +    }
  +
  +    public void run() {
  +        try {
  +            System.out.println("Starting " + name + " JMS2HTTPBridge");
  +            String pattern =
  +                TestUtilities.getWsifProperty(
  +                    "wsif.jms2httpbridge.jndidestinationnamepattern");
  +            String queue =
  +                pattern.substring(0, pattern.indexOf('%'))
  +                    + name
  +                    + pattern.substring(pattern.indexOf('%') + 1);
  +
  +            JMS2HTTPBridge j2h =
  +                new JMS2HTTPBridge(
  +                    TestUtilities.getWsifProperty(
  +                        "wsif.jms2httpbridge.initialcontextfactory"),
  +                    TestUtilities.getWsifProperty(
  +                        "wsif.jms2httpbridge.jndiproviderurl"),
  +                    TestUtilities.getWsifProperty(
  +                        "wsif.jms2httpbridge.jndiconnectionfactoryname"),
  +                    queue,
  +                    TestUtilities.getWsifProperty(
  +                        "wsif.jms2httpbridge.httpurl"),
  +                    JMS2HTTPBridgeDestination.COLDSTART,
  +                    TestUtilities.isJmsVerbose());
  +            j2h.listen();
  +        } catch (Exception e) {
  +            System.out.println("Caught JMS2HTTPBridge exception " + e);
  +        }
  +    }
   }
   
  
  
  


Reply via email to