Package org.xmlBlaster.j2ee.k2

Examples of org.xmlBlaster.j2ee.k2.BlasterManagedConnection


   /**
    * we just skip anny pooling and goes directly?
    */
   protected void setUpK2() throws Exception {
      mcf = new BlasterManagedConnectionFactory();
      mcf.setUserName("test");
      mcf.setPassword("test");
      mcf.setClientProtocol("LOCAL");
      mcf.setIorPort(""+serverPort);
      mcf.setPropertyFileName(clientPropertyFileName);
View Full Code Here



         // 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

Related Classes of org.xmlBlaster.j2ee.k2.BlasterManagedConnection

Copyright © 2018 www.massapicom. 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.