Package org.jboss.jms.destination

Examples of org.jboss.jms.destination.JBossDestination


/* 122 */         throw new InvalidDestinationException("Destination " + destination.getName() + " already exists");
/*     */       }
/*     */       catch (NameNotFoundException c)
/*     */       {
/* 129 */         Context c = JNDIUtil.createContext(this.initialContext, parentContext);
/*     */         JBossDestination jbDest;
/*     */         JBossDestination jbDest;
/* 133 */         if (destination.isQueue())
/*     */         {
/* 135 */           jbDest = new JBossQueue(destination.getName());
/*     */         }
/*     */         else
View Full Code Here


/*     */   {
/* 733 */     if (this.trace) log.trace("createConnectionConsumer()");
/*     */
/* 735 */     MethodInvocation mi = (MethodInvocation)invocation;
/*     */
/* 737 */     JBossDestination dest = (JBossDestination)mi.getArguments()[0];
/* 738 */     String subscriptionName = (String)mi.getArguments()[1];
/* 739 */     String messageSelector = (String)mi.getArguments()[2];
/* 740 */     ServerSessionPool sessionPool = (ServerSessionPool)mi.getArguments()[3];
/* 741 */     int maxMessages = ((Integer)mi.getArguments()[4]).intValue();
/*     */
View Full Code Here

/* 149 */     DelegateSupport delegate = consumerDelegate;
/*     */
/* 151 */     SessionState sessionState = (SessionState)getState(invocation);
/*     */
/* 153 */     MethodInvocation mi = (MethodInvocation)invocation;
/* 154 */     JBossDestination dest = (JBossDestination)mi.getArguments()[0];
/* 155 */     String selector = (String)mi.getArguments()[1];
/* 156 */     boolean noLocal = ((Boolean)mi.getArguments()[2]).booleanValue();
/* 157 */     String subscriptionName = (String)mi.getArguments()[3];
/* 158 */     boolean connectionConsumer = ((Boolean)mi.getArguments()[4]).booleanValue();
/*     */
View Full Code Here

/* 202 */     ClientBrowserDelegate browserDelegate = (ClientBrowserDelegate)invocation.invokeNext();
/* 203 */     DelegateSupport delegate = browserDelegate;
/*     */
/* 205 */     SessionState sessionState = (SessionState)getState(invocation);
/*     */
/* 207 */     JBossDestination destination = (JBossDestination)mi.getArguments()[0];
/* 208 */     String selector = (String)mi.getArguments()[1];
/*     */
/* 210 */     BrowserState state = new BrowserState(sessionState, browserDelegate, destination, selector);
/*     */
/* 213 */     delegate.setState(state);
View Full Code Here

/*     */     throws Throwable
/*     */   {
/* 202 */     ConsumerAdvised del = (ConsumerAdvised)invocation.getTargetObject();
/* 203 */     ServerConsumerEndpoint cons = (ServerConsumerEndpoint)del.getEndpoint();
/* 204 */     ServerConnectionEndpoint conn = cons.getSessionEndpoint().getConnectionEndpoint();
/* 205 */     JBossDestination dest = cons.getDestination();
/*     */
/* 207 */     check(dest, CheckType.READ, conn);
/*     */   }
View Full Code Here

/*     */   }
/*     */
/*     */   private void check(Destination dest, CheckType checkType, ServerConnectionEndpoint conn)
/*     */     throws JMSSecurityException
/*     */   {
/* 264 */     JBossDestination jbd = (JBossDestination)dest;
/*     */
/* 266 */     if (jbd.isTemporary())
/*     */     {
/* 268 */       if (this.trace) log.trace("skipping permission check on temporary destination " + dest);
/* 269 */       return;
/*     */     }
/*     */
/* 272 */     if (this.trace) log.trace("checking access permissions to " + dest);
/*     */
/* 274 */     if (checkCached(dest, checkType))
/*     */     {
/* 277 */       return;
/*     */     }
/*     */
/* 280 */     boolean isQueue = jbd.isQueue();
/* 281 */     String name = jbd.getName();
/*     */
/* 283 */     SecurityStore sm = conn.getSecurityManager();
/* 284 */     SecurityMetadata securityMetadata = sm.getSecurityMetadata(isQueue, name);
/*     */
/* 286 */     if (securityMetadata == null)
View Full Code Here

/*     */
/* 386 */       synchronized (this.temporaryDestinations)
/*     */       {
/* 388 */         for (Iterator i = this.temporaryDestinations.iterator(); i.hasNext(); )
/*     */         {
/* 390 */           JBossDestination dest = (JBossDestination)i.next();
/*     */
/* 392 */           if (dest.isQueue())
/*     */           {
/* 396 */             this.postOffice.removeBinding(dest.getName(), this.postOffice.isClustered());
/*     */           }
/*     */           else
/*     */           {
/* 407 */             Collection queues = this.serverPeer.getPostOfficeInstance().getQueuesForCondition(new JMSCondition(false, dest.getName()), true);
/*     */
/* 409 */             if (!queues.isEmpty())
/*     */             {
/* 412 */               throw new IllegalStateException("Cannot delete temporary destination if it has consumer(s)");
/*     */             }
View Full Code Here

/*     */
/* 671 */         return;
/*     */       }
/*     */     }
/*     */
/* 675 */     JBossDestination dest = (JBossDestination)msg.getJMSDestination();
/*     */
/* 681 */     msg.setConnectionID(this.id);
/*     */
/* 689 */     MessageReference ref = msg.createReference();
/*     */
/* 691 */     long schedDeliveryTime = msg.getScheduledDeliveryTime();
/*     */
/* 693 */     if (schedDeliveryTime > 0L)
/*     */     {
/* 695 */       ref.setScheduledDeliveryTime(schedDeliveryTime);
/*     */     }
/*     */
/* 698 */     if (dest.isDirect())
/*     */     {
/* 702 */       Binding binding = this.postOffice.getBindingForQueueName(dest.getName());
/*     */
/* 704 */       if (binding == null)
/*     */       {
/* 706 */         throw new IllegalArgumentException("Cannot find binding for queue " + dest.getName());
/*     */       }
/*     */
/* 709 */       Queue queue = binding.queue;
/*     */
/* 711 */       Delivery del = queue.handle(null, ref, tx);
/*     */
/* 713 */       if (del == null)
/*     */       {
/* 715 */         throw new JMSException("Failed to route " + ref + " to " + dest.getName());
/*     */       }
/*     */     }
/* 718 */     else if (dest.isQueue())
/*     */     {
/* 720 */       if (!this.postOffice.route(ref, new JMSCondition(true, dest.getName()), tx))
/*     */       {
/* 722 */         throw new JMSException("Failed to route " + ref + " to " + dest.getName());
/*     */       }
/*     */     }
/*     */     else
/*     */     {
/* 727 */       this.postOffice.route(ref, new JMSCondition(false, dest.getName()), tx);
/*     */     }
/*     */
/* 730 */     if (trace) log.trace("sent " + msg);
/*     */   }
View Full Code Here

/* 140 */       sess = (JBossSession)this.localConnection.createXASession();
/*     */
/* 142 */       this.localSession = sess.getDelegate();
/*     */     }
/*     */
/* 145 */     JBossDestination dest = new JBossQueue(this.localQueue.getName(), true);
/*     */
/* 147 */     this.producer = this.localSession.createProducerDelegate(dest);
/*     */
/* 154 */     this.consumer = this.sourceSession.createConsumerDelegate(dest, null, false, null, false, false);
/*     */
View Full Code Here

      sess = (JBossSession)localConnection.createXASession();
     
      localSession = (SessionDelegate)sess.getDelegate();
    }
           
    JBossDestination dest = new JBossQueue(localQueue.getName(), true);
       
    producer = localSession.createProducerDelegate(dest);
   
    //We create the consumer with autoFlowControl = false
    //In this mode, the consumer does not handle it's own flow control, but it must be handled
View Full Code Here

TOP

Related Classes of org.jboss.jms.destination.JBossDestination

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.