[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Why ServerSessionImpl::doHandleCreateQueue is not callin

clebert.suconic@jboss.com do-not-reply at jboss.com
Fri Nov 14 10:57:13 EST 2008


Ok.. I see on inconsistence then between two different methods for creating Queues. On JMSServerManagerImpl.createQueue and ServerSessionImpl.doHandleCreateQueue.


JMSServerManagerImpl is creating a destination when Queues are created:


   public boolean createQueue(final String queueName, final String jndiBinding) throws Exception
  |    {
  |       JBossQueue jBossQueue = new JBossQueue(queueName);
  |       postOffice.addDestination(jBossQueue.getSimpleAddress(), true);
  |       messagingServer.createQueue(jBossQueue.getAddress(), jBossQueue.getAddress());
  | 

While ServerSessionImpl::doHandleCreateQueue is only creating the binding.


  | 
  |    public void doHandleCreateQueue(final SessionCreateQueueMessage packet)
  |    {
  |       SimpleString address = packet.getAddress();
  | 
  |       SimpleString queueName = packet.getQueueName();
  |       
  |       SimpleString filterString = packet.getFilterString();
  | 
  |       boolean temporary = packet.isTemporary();
  | 
  |       boolean durable = packet.isDurable();
  |       
  |       boolean fanout = packet.isFanout();
  | 
  |       Packet response = null;
  | 
  |       try
  |       {
  |          // make sure the user has privileges to create this queue
  |          if (!postOffice.containsDestination(address))
  |          {
  |             securityStore.check(address, CheckType.CREATE, this);
  |          }
  | 
  |          Binding binding = postOffice.getBinding(queueName);
  | 
  |          if (binding != null)
  |          {
  |             throw new MessagingException(MessagingException.QUEUE_EXISTS);
  |          }
  | 
  |          Filter filter = null;
  | 
  |          if (filterString != null)
  |          {
  |             filter = new FilterImpl(filterString);
  |          }
  | 
  |          binding = postOffice.addBinding(address, queueName, filter, durable, temporary, fanout);
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4189441#4189441

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4189441



More information about the jboss-dev-forums mailing list