Package org.milyn.routing

Examples of org.milyn.routing.SmooksRoutingException


        }
  }

    private void assertTargetDirectoryOK(File destinationDirectory) throws SmooksRoutingException {
        if(destinationDirectory.exists() && !destinationDirectory.isDirectory()) {
            throw new SmooksRoutingException("The file routing target directory '" + destinationDirectory.getAbsolutePath() + "' exist but is not a directory. destinationDirectoryPattern: '" + destinationDirectoryPattern + "'");
        }
        if(!destinationDirectory.exists()) {
            if(!destinationDirectory.mkdirs()) {
                throw new SmooksRoutingException("Failed to create file routing target directory '" + destinationDirectory.getAbsolutePath() + "'. destinationDirectoryPattern: '" + destinationDirectoryPattern + "'");
            }
        }
    }
View Full Code Here


                if(currentList.length < highWaterMark) {
                    return;
                }
            }

            throw new SmooksRoutingException("Failed to route message to Filesystem destination '" + destinationDirectory.getAbsolutePath() + "'. Timed out (" + highWaterMarkTimeout + " ms) waiting for the number of '" + listFileNamePattern + "' files to drop below High Water Mark (" + highWaterMark + ").  Consider increasing 'highWaterMark' and/or 'highWaterMarkTimeout' param values.");
        }
    }
View Full Code Here

    protected void sendMessage( final Message message ) throws SmooksRoutingException
  {
        try {
            waitWhileAboveHighWaterMark();
        } catch (JMSException e) {
            throw new SmooksRoutingException("Exception while attempting to check JMS Queue High Water Mark.", e );
        }

        try
    {
            msgProducer.send( message );
    }
    catch (JMSException e)
    {
      final String errorMsg = "JMSException while sending Message.";
      throw new SmooksRoutingException( errorMsg, e );
    }
  }
View Full Code Here

                    length = getQueueLength(queueBrowser);
                }

                // Check did the queue length drop below the HWM...
                if(length >= highWaterMark) {
                    throw new SmooksRoutingException("Failed to route JMS message to Queue destination '" + ((Queue) destination).getQueueName() + "'. Timed out (" + highWaterMarkTimeout + " ms) waiting for queue length to drop below High Water Mark (" + highWaterMark + ").  Consider increasing 'highWaterMark' and/or 'highWaterMarkTimeout' param values.");
                }
            } finally {
                queueBrowser.close();
            }
        }
View Full Code Here

TOP

Related Classes of org.milyn.routing.SmooksRoutingException

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.