Package javax.jms

Examples of javax.jms.Topic


     
      TopicConnection conn = null;
           
      try
      {
         Topic topic = (Topic)ic.lookup("/topic/TopicSubscriptionsCount");
  
         conn = cf.createTopicConnection();
  
         conn.setClientID("Client1");
  
View Full Code Here


   {
      InitialContext ic = new InitialContext(ServerManagement.getJNDIEnvironment());
      TopicConnectionFactory cf = (JBossConnectionFactory)ic.lookup("/ConnectionFactory");
      ServerManagement.deployTopic("TopicSubscriptionList");
      Topic topic = (Topic)ic.lookup("/topic/TopicSubscriptionList");

      TopicConnection conn = null;
     
      try
      {
View Full Code Here

   {
      InitialContext ic = new InitialContext(ServerManagement.getJNDIEnvironment());
      TopicConnectionFactory cf = (JBossConnectionFactory)ic.lookup("/ConnectionFactory");
      ServerManagement.deployTopic("TopicSubscriptionList");
      Topic topic = (Topic)ic.lookup("/topic/TopicSubscriptionList");

      TopicConnection conn = null;
     
      try
      {
View Full Code Here

     
      TopicConnection conn = null;
     
      try
      {
         Topic topic = (Topic)ic.lookup("/topic/TopicMessageList");
  
         conn = cf.createTopicConnection();
  
         conn.setClientID("Client1");
  
View Full Code Here

         ServerManagement.deployQueue("SomeQueue");
         ServerManagement.deployTopic("SomeTopic");


         Queue q = (Queue)initialContext.lookup("/here-go-queues/SomeQueue");
         Topic t = (Topic)initialContext.lookup("/and-here-topics/etc/etc/SomeTopic");

         assertEquals("SomeQueue", q.getQueueName());
         assertEquals("SomeTopic", t.getTopicName());

      }
      finally
      {
         ServerManagement.undeployQueue("SomeQueue");
View Full Code Here

     
      Queue queue2 = (Queue)initialContext.lookup("/queue/Queue2");
     
      Queue queue3 = (Queue)initialContext.lookup("/queue/Queue3");
     
      Topic topic1 = (Topic)initialContext.lookup("/topic/Topic1");
     
      Topic topic2 = (Topic)initialContext.lookup("/topic/Topic2");
     
      Connection conn = null;
     
      try
      {
View Full Code Here

  
   public void testTopicConnectionConsumerWrongTemporaryDestination() throws Exception
   {
      InitialContext ctx = getInitialContext();
      TopicConnectionFactory factory = (TopicConnectionFactory) ctx.lookup("ConnectionFactory");
      Topic topic = null;
      TopicConnection connection = factory.createTopicConnection();
      try
      {
         TopicSession s = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
         topic = s.createTemporaryTopic();
View Full Code Here

      ManagedComponent topic = managementView.getComponent("testCreateTopic", type);
      assertNotNull(topic);

      // Subscribe to a topic and validate the subscription shows up in the list op
      InitialContext ctx = super.getInitialContext();
      Topic topicDest = (Topic) ctx.lookup("testCreateTopic");
      TopicConnectionFactory tcf = (TopicConnectionFactory) ctx.lookup("ConnectionFactory");
      TopicConnection tc = tcf.createTopicConnection();
      tc.start();
      TopicSession ts = tc.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
      MessageConsumer mc = ts.createConsumer(topicDest);
View Full Code Here

   {
      ManagementView mgtView = getManagementView();
      ManagedComponent component = mgtView.getComponent("testCreateTopic", TopicType);
      assertNotNull(component);
     
      Topic topic = (Topic) getInitialContext().lookup("testCreateTopic");
      TopicConnectionFactory cf = (TopicConnectionFactory) getInitialContext().lookup("ConnectionFactory");
     
      TopicConnection connection = cf.createTopicConnection();
      TopicSession session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
      session.createSubscriber(topic);
View Full Code Here

      connect();

      try
      {
         TopicSession session = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
         Topic topic = (Topic) context.lookup(TEST_TOPIC);
         TemporaryTopic temp = session.createTemporaryTopic();

         boolean caught = false;
         try
         {
View Full Code Here

TOP

Related Classes of javax.jms.Topic

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.