Examples of JMException


Examples of javax.management.JMException

        public void createNewBinding(String queueName, String binding) throws JMException
        {
            AMQQueue queue = getQueueRegistry().getQueue(new AMQShortString(queueName));
            if (queue == null)
            {
                throw new JMException("Queue \"" + queueName + "\" is not registered with the exchange.");
            }

            try
            {
                queue.bind(DirectExchange.this, new AMQShortString(binding), null);
View Full Code Here

Examples of javax.management.JMException

                                                               durable, false, 0);
                    _exchangeRegistry.registerExchange(exchange);
                }
                else
                {
                    throw new JMException("The exchange \"" + exchangeName + "\" already exists.");
                }
            }
        }
        catch (AMQException ex)
        {
View Full Code Here

Examples of javax.management.JMException

    public void createNewQueue(String queueName, String owner, boolean durable) throws JMException
    {
        AMQQueue queue = _queueRegistry.getQueue(new AMQShortString(queueName));
        if (queue != null)
        {
            throw new JMException("The queue \"" + queueName + "\" already exists.");
        }

        try
        {
            AMQShortString ownerShortString = null;
            if (owner != null)
            {
                ownerShortString = new AMQShortString(owner);
            }

            queue = AMQQueueFactory.createAMQQueueImpl(new AMQShortString(queueName), durable, ownerShortString, false, getVirtualHost(),
                                                       null);
            if (queue.isDurable() && !queue.isAutoDelete())
            {
                _messageStore.createQueue(queue);
            }

            _queueRegistry.registerQueue(queue);
        }
        catch (AMQException ex)
        {
            JMException jme = new JMException(ex.getMessage());
            jme.initCause(ex);
            throw new MBeanException(jme, "Error in creating queue " + queueName);
        }
    }
View Full Code Here

Examples of javax.management.JMException

    public void deleteQueue(String queueName) throws JMException
    {
        AMQQueue queue = _queueRegistry.getQueue(new AMQShortString(queueName));
        if (queue == null)
        {
            throw new JMException("The Queue " + queueName + " is not a registerd queue.");
        }

        try
        {
            queue.delete();
            _messageStore.removeQueue(queue);

        }
        catch (AMQException ex)
        {
            JMException jme = new JMException(ex.getMessage());
            jme.initCause(ex);
            throw new MBeanException(jme, "Error in deleting queue " + queueName);
        }
    }
View Full Code Here

Examples of javax.management.JMException

            return new CompositeDataSupport(_msgContentType, _msgContentAttributes, itemValues);
        }
        catch (AMQException e)
        {
            JMException jme = new JMException("Error creating header attributes list: " + e);
            jme.initCause(e);
            throw jme;
        }
    }
View Full Code Here

Examples of org.jmule.core.JMException

        for (int count = 0; count < browsers.length && browser == null; count++)
           if (Runtime.getRuntime().exec(
                 new String[] {"which", browsers[count]}).waitFor() == 0)
              browser = browsers[count];
        if (browser == null)
           throw new JMException("Could not find web browser");
        else
           Runtime.getRuntime().exec(new String[] {browser, url});
      }
     } catch (Exception e) {
        e.printStackTrace();
View Full Code Here

Examples of org.jmule.core.JMException

    return connection_status;
  }
 
  void send(Packet packet) throws JMException {
    if (connection_status != ConnectionStatus.CONNECTED)
      throw new JMException("Server connection not open to " + remote_inet_socket_address);
    send_queue.add(packet);
    if (sender_thread.isSleeping())
      sender_thread.wakeUp();
  }
View Full Code Here

Examples of org.jmule.core.JMException

    open();
  }
 
  public void sendPacket(UDPPacket packet ) throws JMException {
    if (!isOpen())
      throw new JMException("UDP socket is not open");
    sendQueue.offer(packet);
    if (sender_thread.isSleeping())
      sender_thread.wakeUp();
  }
View Full Code Here

Examples of org.jmule.core.JMException

            if (cause instanceof JMEndOfStreamException)
              notifyDisconnect(); else
            if (cause instanceof AsynchronousCloseException)
              return ;
            else {
              JMException exception = new JMException("Exception in connection " + remote_inet_socket_address+"\n"+Misc.getStackTrace(cause));
              exception.printStackTrace();
            }
          }
        }
      }
    };
View Full Code Here

Examples of org.jmule.core.JMException

    receiver_thread.JMStop();
  }
 
  void send(Packet packet) throws JMException {
    if (connection_status != ConnectionStatus.CONNECTED)
      throw new JMException("Not connected to " + remote_inet_socket_address);
    send_queue.add(packet);
    if (sender_thread.isSleeping()) {
      sender_thread.wakeUp();
    }
  }
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.