Examples of CourierTransportException


Examples of org.jboss.soa.esb.couriers.CourierTransportException

                                return true;
                        }
                        catch (final CourierException e)
                        {
                            throw new CourierTransportException(e);
                        }
                        catch (final IOException e)
                        {
                                throw new CourierMarshalUnmarshalException(e);
                        }
View Full Code Here

Examples of org.jboss.soa.esb.couriers.CourierTransportException

                        {
                                return CourierUtil.messageFromLocalFile(work);
                        }
                        catch (final FileNotFoundException ex)
                        {
                            throw new CourierTransportException(ex);
                        }
                        catch (final IOException ex)
                        {
                            throw new CourierMarshalUnmarshalException(ex);
                        }
                        catch (final CourierException ex)
                        {
                            throw ex;
                        }
                        catch (final Exception ex)
                        {
                                throw new CourierException(ex);
                        }
                }

                File tmpFile = null;
                try
                {
                        Method download = handler.getClass().getMethod("downloadFile",
                                        new Class[]
                                        { File.class });
                        tmpFile = (File) download.invoke(handler, new Object[]
                        { work });
                        return CourierUtil.messageFromLocalFile(tmpFile);
                }
                catch (FileNotFoundException ex)
                {
                    throw new CourierTransportException(ex);
                }
                catch (IOException ex)
                {
                    throw new CourierTransportException(ex);
                }
                catch (final CourierException ex)
                {
                    throw ex;
                }
                catch (Exception e)
                {
                        throw new CourierTransportException(e);
                }
                finally
                {
                        if ((null != tmpFile) && !tmpFile.delete() && _logger.isDebugEnabled())
                        {
View Full Code Here

Examples of org.jboss.soa.esb.couriers.CourierTransportException

        cleanup() ;
       
        try {
            return internalDeliver(message) ;
        } catch (final JmsConnectionFailureException jcfe) {
            throw new CourierTransportException("Caught exception during delivery and could not reconnect! ", jcfe);
        } catch (final IllegalStateException ise) {
            throw new CourierTransportException("Caught exception during delivery and could not reconnect! ", ise);
        }
    }
View Full Code Here

Examples of org.jboss.soa.esb.couriers.CourierTransportException

        cleanup() ;
       
        try {
            return internalDeliver(message) ;
        } catch (final JmsConnectionFailureException jcfe) {
            throw new CourierTransportException("Caught exception during delivery and could not reconnect! ", jcfe);
        } catch (final IllegalStateException ise) {
            throw new CourierTransportException("Caught exception during delivery and could not reconnect! ", ise);
        }
    }
View Full Code Here

Examples of org.jboss.soa.esb.couriers.CourierTransportException

                        if(message.getStringProperty(key) == null) {
                            message.setStringProperty(key, kvp.getValue());
                        }
                    }
                } catch (final JMSException e) {
                    throw new CourierTransportException("Caught exception initialising properties! ",e);
                }
                   
                try {
                    _messageProducer.send(message);
                   
                    return true;
                }
                catch (final JmsConnectionFailureException jcfe) {
                    throw jcfe ;
                }
                catch (final IllegalStateException ise) {
                    throw ise ;
                }
                catch (JMSException e) {
                    if (!jmsConnectRetry(e))
                        throw new CourierTransportException("Caught exception during delivery and could not reconnect! ",e);
                    try {
                        _messageProducer.send(message);
                       
                        return true;
                    } catch (final JMSException e2) {
                        throw new CourierTransportException("Caught exception during delivery having successfully recovered! ",e2);
                    } catch (Exception e2) {
                        throw new CourierException(e2);
                    }
                }
                catch (Exception e) {
View Full Code Here

Examples of org.jboss.soa.esb.couriers.CourierTransportException

        cleanup() ;
       
        try {
            return internalPickupPayload(millis) ;
        } catch (final JmsConnectionFailureException jcfe) {
            throw new CourierTransportException("Caught exception during receive and could not reconnect! ", jcfe);
        } catch (final IllegalStateException ise) {
            throw new CourierTransportException("Caught exception during receive and could not reconnect! ", ise);
        }
    }
View Full Code Here

Examples of org.jboss.soa.esb.couriers.CourierTransportException

                catch (final IllegalStateException ise) {
                    throw ise ;
                }
                catch (JMSException e) {
                    if (!jmsConnectRetry(e))
                        throw new CourierTransportException("Caught exception during receive and could not reconnect! ",e);
                    try {
                        jmsMessage = _messageConsumer.receive(millis);
                    } catch (JMSException e2) {
                        throw new CourierTransportException("Caught exception during delivery having successfully recovered! ",e2);
                    } catch (Exception e2) {
                        throw new CourierTransportException(e2);
                    }
                }
                catch (Exception e) {
                    throw new CourierTransportException(e);
                }
            }
        }
        return jmsMessage;
    } // ________________________________
View Full Code Here

Examples of org.jboss.soa.esb.couriers.CourierTransportException

                connection = dataSource.getConnection();
            } else {
                    connection = DriverManager.getConnection(epr.getURL(), epr.getUserName(), epr.getPassword());
            }
        } catch (SQLException e) {
            throw new CourierTransportException("Failed to connect to DataSource.", e);
        }

        if (!transactional) {
            try {
                connection.setAutoCommit(false);
            } catch (SQLException e) {
                try {
                    connection.close();
                } catch (SQLException e1) {
                    logger.error("Failed to close connection.", e1);
                }
                throw new CourierTransportException("Failed to turn off autoCommit on connection..", e);
            }
        }

        return connection;
    }
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.