Examples of Topic


Examples of javax.jms.Topic

   //See JMS 1.1. spec sec 6.11
   public void testUnsubscribeWithActiveConsumer() throws Exception
   {
      ConnectionFactory cf = (ConnectionFactory)ic.lookup("ConnectionFactory");
      Topic topic = (Topic)ic.lookup("/topic/Topic");

      Connection conn = cf.createConnection();
      conn.setClientID("zeke");

      Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
View Full Code Here

Examples of javax.jms.Topic

      Connection c =  cf.createConnection();
      c.setClientID("something");
      try
      {
         Session s = c.createSession(false, Session.AUTO_ACKNOWLEDGE);
         Topic topic = (Topic)ic.lookup("/topic/Topic");

         try
         {
            s.createDurableSubscriber(topic, "somename", "=TEST 'test'", false);
            fail("this should fail");
View Full Code Here

Examples of javax.jms.Topic

      TopicConnection c =  cf.createTopicConnection();
      c.setClientID("something");
      try
      {
         TopicSession s = c.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
         Topic topic = (Topic)ic.lookup("/topic/Topic");

         try
         {
            s.createSubscriber(topic, "=TEST 'test'", false);
            fail("this should fail");
View Full Code Here

Examples of javax.jms.Topic

   public void testCreateTopic() throws Exception
   {
      Connection conn = cf.createConnection();     
      Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
     
      Topic topic = sess.createTopic("TestTopic");
     
      MessageProducer producer = sess.createProducer(topic);
      producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
     
      MessageConsumer consumer = sess.createConsumer(topic);
View Full Code Here

Examples of javax.jms.Topic

         // connecting to the first node

         ic = new InitialContext();

         ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
         Topic distributedTopic = (Topic)ic.lookup(destinationName);
         log("Distributed topic " + destinationName + " exists");


         // When connecting to a messaging cluster, the ConnectionFactory has the capability of
         // transparently creating physical connections to different cluster nodes, in a round
View Full Code Here

Examples of javax.jms.Topic

      try
      {        
         ic = new InitialContext();
        
         ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
         Topic topic = (Topic)ic.lookup(destinationName);
         log("Topic " + destinationName + " exists");
        
         connection = cf.createConnection();
         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         MessageProducer publisher = session.createProducer(topic);
View Full Code Here

Examples of javax.jms.Topic

   {
      String name = "testQueue";

      ServerManagement.deployTopic(name, null);

      Topic t = (Topic)initialContext.lookup(ServerManagement.DEFAULT_TOPIC_CONTEXT + "/" + name);

      assertEquals(name, t.getTopicName());
   }
View Full Code Here

Examples of javax.jms.Topic

      String name = "testTopic";
      String jndiName = "/a/b/c/testTopic2";

      ServerManagement.deployTopic(name, jndiName);

      Topic t = (Topic)initialContext.lookup(jndiName);
      assertEquals(name, t.getTopicName());
   }
View Full Code Here

Examples of net.bpiwowar.mg4j.extensions.query.Topic

    model.init(collection, index);
    int totalRetrieved = 0;
    for (String topicId : topicIds) {
      logger.info(String.format("Answering topic %s", topicId));

      Topic topic = topics.get(topicId);
      ObjectArrayList<DocumentScoreInfo<Reference2ObjectMap<Index, SelectedInterval[]>>> results = new ObjectArrayList<>();

      Set<String> discardedDocuments = null;
      if (discarded != null) {
        Map<String, Integer> map = discarded.get(topicId);
View Full Code Here

Examples of net.easymodo.asagi.model.Topic

                    oldTopic.lock.readLock().lock();
                    int oldTopicNum = oldTopic.getNum();
                    long oldTopicLastMod = oldTopic.getLastModTimestamp();
                    oldTopic.lock.readLock().unlock();

                    Topic newTopic = threadMap.remove(oldTopicNum);
                    if(newTopic != null) {
                        if(oldTopicLastMod < newTopic.getLastModTimestamp()) {
                            debug(TALK, "modified: " + oldTopicNum);
                            if(!newTopics.contains(newTopic.getNum()))
                                newTopics.add(newTopic.getNum());
                        }

                        oldTopic.lock.writeLock().lock();
                        oldTopic.setLastModTimestamp(newTopic.getLastModTimestamp());
                        oldTopic.setLastPage(newTopic.getLastPage());
                        oldTopic.lock.writeLock().unlock();
                    } else {
                        // baleeted topic
                        if(!newTopics.contains(oldTopicNum))
                            newTopics.add(oldTopicNum);
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.