Examples of BlasterConnection


Examples of org.xmlBlaster.j2ee.k2.client.BlasterConnection


         // Publish 5 messages
         // 5 for first sub
         // 1 for second sub
      BlasterConnection conn = null;
      for ( int i = 0; i<5;i++) {
         try {
            conn = factory.getConnection();
            String c = "<content>"+i+"</content>";
            String k = "<key oid='"+i+"' contentMime='text/xml'><TestLocalProtocol-AGENT id='"+i+"' type='generic'/></key>";
            log.info("Key: " +k);
            conn.publish(new MsgUnit(k, c.getBytes(), null));
         } catch(XmlBlasterException e) {
            log.warning("XmlBlasterException: " + e.getMessage());
            assertTrue("publish - XmlBlasterException: " + e.getMessage(), false);
         }finally {
           
            if ( conn != null) {
               conn.close();
            } // end of if ()
           
         } // end of finally
        
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.