Package javax.jms

Examples of javax.jms.Destination


   {
      // read permission required on the destination
     
      MethodInvocation mi = (MethodInvocation)invocation;
     
      Destination dest = (Destination)mi.getArguments()[0];
     
      SessionAdvised del = (SessionAdvised)invocation.getTargetObject();
      ServerSessionEndpoint sess = (ServerSessionEndpoint)del.getEndpoint();
                 
      check(dest, CheckType.READ, sess.getConnectionEndpoint());
View Full Code Here


      // anonymous producer - if destination is not null then write permissions required
     
      MethodInvocation mi = (MethodInvocation)invocation;
     
      Message m = (Message)mi.getArguments()[0];
      Destination dest = m.getJMSDestination();

      SessionAdvised del = (SessionAdvised)invocation.getTargetObject();
      ServerSessionEndpoint se = (ServerSessionEndpoint)del.getEndpoint();
      ServerConnectionEndpoint ce = se.getConnectionEndpoint();
                       
View Full Code Here

         for(Iterator i = destinations.iterator(); i.hasNext(); )
         {
            String name;
            boolean isQueue = true;
            Destination d = (Destination)i.next();
            if (d instanceof Queue)
            {
               name = ((Queue)d).getQueueName();
            }
            else
View Full Code Here

      DelegateSupport delegate = (DelegateSupport)producerDelegate;

      SessionState sessionState = (SessionState)getState(invocation);

      MethodInvocation mi = (MethodInvocation)invocation;
      Destination dest = ((Destination)mi.getArguments()[0]);

      ProducerState producerState = new ProducerState(sessionState, producerDelegate, dest);

      delegate.setState(producerState);
View Full Code Here

     
      Context icSource = sourceAdaptor.getInitialContext();
     
      Context icTarget = targetAdaptor.getInitialContext();
     
      Destination sourceDest = (Destination)icSource.lookup(sourceDestinationLookup);
     
      Destination targetDest = (Destination)icTarget.lookup(targetDestinationLookup);
           
      String sourceCFRef = sourceAdaptor.getFactoryRef();
     
      String targetCFRef = targetAdaptor.getFactoryRef();
     
View Full Code Here

      try
      {
         Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE);
         MessageProducer p = ps.createProducer(topic);
         Destination dest = p.getDestination();
         assertEquals(dest, topic);
      }
      finally
      {
         pconn.close();
View Full Code Here

   {
      log.info("++testTopicSubscriber");

      log.info(">>Lookup Queue");
     
      Destination destination = (Destination) topic[1];

      Connection conn1 = cf.createConnection();
      Connection conn2 = cf.createConnection();

      JBossConnection conn =
View Full Code Here

      public void onMessage(Message m)
      {
         try
         {
            log.trace("Received message");
            Destination queue = m.getJMSReplyTo();
            log.trace("Sending response back to:" + queue);
            Message m2 = sess.createTextMessage("This is the response");
            sender.send(queue, m2);
         }
         catch (JMSException e)
View Full Code Here

    * @param destination - the destination's fully qualified JNDI name
    */
   public Destination lookupDestination(String destination) throws Exception
   {
      InitialContext ic = new InitialContext();
      Destination d = (Destination)ic.lookup(destination);
      ic.close();
      return d;
   }
View Full Code Here

    * JIRA issue: http://jira.jboss.org/jira/browse/JBMESSAGING-371
    */
   public void testMessageListenerTimeout() throws Exception
   {
      ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
      Destination topic = (Destination)ic.lookup("/topic/ATopic");

      Connection conn = cf.createConnection();
      Slot slot = new Slot();

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

TOP

Related Classes of javax.jms.Destination

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.