1 57 58 package util; 59 60 import org.apache.wsif.util.jms.JMS2HTTPBridge; 61 import org.apache.wsif.util.jms.JMS2HTTPBridgeDestination; 62 63 69 70 class BridgeThread extends Thread { 71 private String name; 72 73 public BridgeThread(String name) { 74 this.name = name; 75 } 76 77 public void run() { 78 try { 79 System.out.println("Starting " + name + " JMS2HTTPBridge"); 80 String pattern = 81 TestUtilities.getWsifProperty( 82 "wsif.jms2httpbridge.jndidestinationnamepattern"); 83 String queue = 84 pattern.substring(0, pattern.indexOf('%')) 85 + name 86 + pattern.substring(pattern.indexOf('%') + 1); 87 88 String url = 89 TestUtilities.getWsifProperty("wsif.jms2httpbridge.httpurl"); 90 if (TestUtilities.getSoapServer().equals("axis")) { 91 if (!url.endsWith("/")) 92 url = url.concat("/"); 93 url = url.concat(name); 94 } 95 96 JMS2HTTPBridge j2h = 97 new JMS2HTTPBridge( 98 TestUtilities.getWsifProperty( 99 "wsif.jms2httpbridge.initialcontextfactory"), 100 TestUtilities.getWsifProperty( 101 "wsif.jms2httpbridge.jndiproviderurl"), 102 TestUtilities.getWsifProperty( 103 "wsif.jms2httpbridge.jndiconnectionfactoryname"), 104 queue, 105 url, 106 JMS2HTTPBridgeDestination.COLDSTART, 107 TestUtilities.isJmsVerbose()); 108 j2h.listen(); 109 } catch (Exception e) { 110 System.out.println("Caught JMS2HTTPBridge exception " + e); 111 } 112 } 113 } 114 115 | Popular Tags |