Examples of XBDestination


Examples of org.xmlBlaster.jms.XBDestination

         return;
      }
      XBSession session = this.publisher.getJmsSession();
      // XBMessageProducer producer = new XBMessageProducer(session, new XBDestination(topic, null));
     
      XBDestination dest = new XBDestination(this.initialDataTopic, SpecificDefault.toString(slaveSessionNames));
     
      XBMessageProducer producer = new XBMessageProducer(session, dest);
      producer.setPriority(PriorityEnum.HIGH_PRIORITY.getInt());
      producer.setDeliveryMode(DeliveryMode.PERSISTENT);
     
View Full Code Here

Examples of org.xmlBlaster.jms.XBDestination

      try {
         // System.setProperty("java.naming.factory.initial", "org.apache.naming.modules.memory.MemoryURLContextFactory");
         // System.setProperty("java.naming.factory.url.pkgs", "org.apache.naming.modules");
         InitialContext ctx = new InitialContext(this.env);
         ctx.bind(CONNECTION_FACTORY, new XBConnectionFactory(null, this.args, false));           
         ctx.bind(TOPIC, new XBDestination(TOPIC, null, false));
      }
      catch (NamingException ex) {
         ex.printStackTrace();
         assertTrue("exception occured in testJndi", false);
      }
View Full Code Here

Examples of org.xmlBlaster.jms.XBDestination

         // System.setProperty("java.naming.factory.url.pkgs", "org.apache.naming.modules");
         InitialContext ctx = new InitialContext();
         String connQosTxt = null;
         boolean forQueues = false;
         this.factory = new XBConnectionFactory(connQosTxt, this.args, forQueues);
         this.topic = new XBDestination(TOPIC, null, false);
         ctx.bind(CONNECTION_FACTORY, this.factory);           
         ctx.bind(TOPIC, this.topic);
      }
      catch (NamingException ex) {
         ex.printStackTrace();
View Full Code Here

Examples of org.xmlBlaster.jms.XBDestination

        
         Session session = connection.createSession(transacted, Session.CLIENT_ACKNOWLEDGE);
         // String topic = "jms-topic";
         String topic = null;
         String sessionName = "hello/1";
         MessageProducer producer = session.createProducer(new XBDestination(topic, sessionName));
         // producer.setPriority(PriorityEnum.HIGH_PRIORITY.getInt());
         // producer.setDeliveryMode(DeliveryMode.PERSISTENT);
         TextMessage msg = session.createTextMessage();
         msg.setText("Hallo");
         producer.send(msg);
View Full Code Here

Examples of org.xmlBlaster.jms.XBDestination

            for (int i=0; i < 256; i++) {
               content[i] = (byte)i;
            }
           
            msg.writeBytes(content, 0, content.length);
            XBDestination dest = new XBDestination("someTopic", null);
            msg.setJMSDestination(dest);
            msg.reset();
           
            byte[] content2 = new byte[256];
            msg.readBytes(content2);
            for (int i=0; i < content.length; i++)
               assertEquals("byte nr. '" + i + "' is wrong", content[i], content2[i]);
         }
         { // 1. key, content and qos all null in constructor
            byte[] content = null;
            XBBytesMessage msg = new XBBytesMessage(null, content);
           
            content = new byte[256];
            for (int i=0; i < 256; i++) {
               content[i] = (byte)i;
            }
           
            msg.writeBytes(content, 0, content.length);
            XBDestination dest = new XBDestination("someTopic", null);
            msg.setJMSDestination(dest);
            msg.reset();
            MsgUnit msgUnit = MessageHelper.convertToMessageUnit(new Global(), msg);
           
            byte[] content2 = msgUnit.getContent();
View Full Code Here

Examples of org.xmlBlaster.jms.XBDestination

         log.warning("request for sending initial response can not be done since no publisher configured");
   }

   public void sendEndOfTransitionMessage(I_Info info, String initialDataTopic, String[] slaveSessionNames) throws JMSException {
      XBSession session = this.publisher.getJmsSession();
      XBDestination dest = new XBDestination(initialDataTopic, SpecificDefault.toString(slaveSessionNames));
      XBMessageProducer producer = new XBMessageProducer(session, dest);
      producer.setPriority(PriorityEnum.HIGH_PRIORITY.getInt());
      producer.setDeliveryMode(DeliveryMode.PERSISTENT);
      String dumpId = "" + new Timestamp().getTimestamp();
      sendEndOfTransitionMessage(info, session, null, null, dumpId, producer);
View Full Code Here

Examples of org.xmlBlaster.jms.XBDestination

   private void doPublishJMS(byte[] content, int maxChunkSize, boolean doInterrupt, String name) throws JMSException {
      // Global glob = this.global.getClone(null);
      // XBSession session = new XBSession(this.publisherGlobal, XBSession.AUTO_ACKNOWLEDGE, false);
      log.info("Publishing for '" + name + "'");
      XBSession session = new XBSession(this.connGlobal, XBSession.AUTO_ACKNOWLEDGE, false);
      XBMessageProducer producer = new XBMessageProducer(session, new XBDestination(this.oid, null));
      producer.setDeliveryMode(DeliveryMode.PERSISTENT);
      XBStreamingMessage msg = session.createStreamingMessage(null);
      if (doInterrupt)
         msg.setBooleanProperty("interrupted", true);
      msg.setIntProperty(XBConnectionMetaData.JMSX_MAX_CHUNK_SIZE, maxChunkSize);
View Full Code Here

Examples of org.xmlBlaster.jms.XBDestination

   public void prepare() throws JMSException {
      try {
         // create a factory (normally retreived by naming service)
         TopicConnectionFactory factory = new XBConnectionFactory(null, this.cmdLine, false);
         // should be retreived via jndi
         Topic topic = new XBDestination("jms-test", null, false);
     
         TopicConnection connection = factory.createTopicConnection();
         connection.start();
         TopicSession session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
         TopicSubscriber subscriber = session.createSubscriber(topic);
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.