Package net.timewalker.ffmq3

Examples of net.timewalker.ffmq3.FFMQException


     * @see javax.jms.Connection#createSession(boolean, int)
     */
    public final Session createSession(boolean transacted, int acknowledgeMode) throws JMSException
    {
        if (!transacted && acknowledgeMode == Session.SESSION_TRANSACTED)
            throw new FFMQException("Acknowledge mode SESSION_TRANSACTED cannot be used for an non-transacted session","INVALID_ACK_MODE");
       
      synchronized (externalAccessLock)
    {
          checkNotClosed();
          RemoteSession session = new RemoteSession(idProvider.createID(),
View Full Code Here


    public final void transportClosed(boolean linkFailed)
    {
        if (linkFailed)
        {
          close();
          exceptionOccured(new FFMQException("Server connection lost","NETWORK_FAILURE"));
        }
    }
View Full Code Here

        LocalTopic localTopic = (LocalTopic)destination;
          if (localTopic.isTemporary() && !connection.isRegisteredTemporaryTopic(localTopic.getTopicName()))
             throw new IllegalStateException("Temporary topic does not belong to session's connection.");
      }
      else
        throw new FFMQException("Unexpected destination type : "+destination,"INTERNAL_ERROR");
    }
View Full Code Here

    /* (non-Javadoc)
     * @see javax.jms.Session#getMessageListener()
     */
    public final MessageListener getMessageListener() throws JMSException
    {
        throw new FFMQException("Unsupported feature","UNSUPPORTED_FEATURE");
    }
View Full Code Here

    /* (non-Javadoc)
     * @see javax.jms.Session#setMessageListener(javax.jms.MessageListener)
     */
    public final void setMessageListener(MessageListener listener) throws JMSException
    {
        throw new FFMQException("Unsupported feature","UNSUPPORTED_FEATURE");
    }
View Full Code Here

            this.sessionRef = null;
        else
        {
          // Consistency check
          if (sessionRef != null && sessionRef.get() != session)
            throw new FFMQException("Message session already set","CONSISTENCY");
           
            this.sessionRef = new WeakReference(session);
        }
    }
View Full Code Here

     * Get the parent session
     */
    protected final AbstractSession getSession() throws JMSException
    {
        if (sessionRef == null)
            throw new FFMQException("Message has no associated session","CONSISTENCY");
       
        AbstractSession session = (AbstractSession)sessionRef.get();
        if (session == null)
            throw new FFMQException("Message session is no longer valid","CONSISTENCY");
       
        return session;
    }
View Full Code Here

     */
    public final void setJMSDeliveryMode(int deliveryMode) throws JMSException
    {
        if (deliveryMode != DeliveryMode.PERSISTENT &&
            deliveryMode != DeliveryMode.NON_PERSISTENT)
            throw new FFMQException("Invalid delivery mode : "+deliveryMode,"INVALID_DELIVERY_MODE");
           
        assertDeserializationLevel(MessageSerializationLevel.FULL);
        this.deliveryMode = deliveryMode;
    }
View Full Code Here

     * @see javax.jms.Message#setJMSPriority(int)
     */
    public final void setJMSPriority(int priority) throws JMSException
    {
        if (priority < 0 || priority > 9)
            throw new FFMQException("Invalid priority value : "+priority,"INVALID_PRIORITY");
           
        assertDeserializationLevel(MessageSerializationLevel.FULL);
        this.priority = priority;
    }
View Full Code Here

                if (line.length() == 0)
                    continue;
               
                String[] tokens = StringTools.split(line, ':');
                if (tokens.length != 3)
                    throw new FFMQException("Invalid template mapping line : "+line,"INVALID_TEMPLATE_MAPPING");
                boolean isQueueTemplate = tokens[0].equalsIgnoreCase("queue");
                String destinationNamePattern = tokens[1];
                String templateName = tokens[2];
               
                if (isQueueTemplate)
                    addQueueTemplateMapping(new TemplateMapping(destinationNamePattern,templateName));
                else
                    addTopicTemplateMapping(new TemplateMapping(destinationNamePattern,templateName));
            }
           
            input.close();
        }
        catch (IOException e)
        {
            throw new FFMQException("Cannot read templates mapping file","FS_ERROR",e);
        }
    }
View Full Code Here

TOP

Related Classes of net.timewalker.ffmq3.FFMQException

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.