Examples of ResponseTimeoutException


Examples of org.jboss.soa.esb.listeners.message.ResponseTimeoutException

                           * then don't do retries even if there are other EPRs in the list.
                           */
   
                          if (("true".equals(message.getProperties().getProperty(Environment.EXCEPTION_ON_DELIVERY_FAILURE, "false")) || exceptionOnDeliveryFailure)) {
                              if (timeout) {
                                  throw new ResponseTimeoutException("No response received for service [" + service + "], Told not to retry.") ;
                              } else {
                                  throw new MessageDeliverException("Failed to deliver message ["+message.getHeader()+"] to Service [" + service + "].  Told not to retry.");
                              }
                            }
                      }
                  }
                  catch (MalformedEPRException ex// so we can differentiate failure modes, since returning null is limiting
                  {
                    logger.debug("Invalid EPR for service (probably ESB-unaware): ignoring for message: "+message.getHeader());
   
                    serviceClusterInfo.removeDeadEPR(epr);
   
                    /*
                     * DO NOT remove from the registry - it is not dead!!
                     */
                  }
   
                }
            }
        } finally {
            message.getContext().removeContext(SecurityService.CONTEXT);
            message.getContext().removeContext(SecurityService.AUTH_REQUEST);
        }

        // Throw exception if delivery failed...
        if (timeout) {
            throw new ResponseTimeoutException("No response received for service [" + service + "].") ;
        } else {
            throw new MessageDeliverException("Failed to deliver message ["+message.getHeader()+"] to Service [" + service + "].  Check for errors.");
        }
    }
View Full Code Here

Examples of org.jboss.soa.esb.listeners.message.ResponseTimeoutException

                            // do we need to do this for synchronous calls? Vagueries of Couriers?

                            courier.setReplyToEpr(replyToEPR);
                            final Message response = courier.pickup(timeout);
                            if (response == null) {
                                throw new ResponseTimeoutException("No response received within timeout period") ;
                            }
                            return response ;
                        } else {
                            return message;
                        }
                    }
                } catch (FaultMessageException e) {
                    throw e;
                } catch (final CourierServiceBindException e) {
                    // meant to be masked by the SI fail-over

                    if (logger.isDebugEnabled()) {
                        logger.debug("Caught service lookup exception for EPR [" + targetEPR + "] and Service [" + service + "] and Message ["+message.getHeader()+"]. ", e);
                    }

                    // could be stale EPR, so move on to next entry in registry.
                } catch (final CourierMarshalUnmarshalException e) {
                    logger.warn("Courier indicated (un)marshal related error "+e+" during delivery to EPR [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"]. " + e.getMessage());

                    throw new MessageDeliverException("Caught (un)marshal related exception during attempted send/receive.", e);
                } catch (final CourierTransportException e) {
                    // meant to be masked by the SI fail-over

                    if (logger.isDebugEnabled()) {
                        logger.debug("Courier indicated transport related error "+e+" during send/receive with EPR [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"]. ", e);
                    }
                } catch (CourierException e) {
                    // probable config error. Log it and move on to next EPR/service entry.

                    logger.warn("Possible configuration error while using Courier for EPR [" + targetEPR + "] and Service [" + service + "] and Message ["+message.getHeader()+"]. " + e.getMessage());
                } catch (MalformedEPRException e) {
                    // Hmmmm???... Can this really happen?  The Courier has already been created.  Haven't we already validated the EPR during the Courier lookup (above)??
                    logger.error("Unexpected error.  Badly formed EPR [" + targetEPR + "] for Service [" + service + "]. But the EPR has already been validated!!");

                    throw e;
                } catch (final CourierTimeoutException ex) {
                    logger.error("Response timeout using Courier for EPR [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"].");

                    // timeout from synchronous invocation
                   
                    // would like to make this an independent exception (not inherit from MDE). But signatures and applications would break.
                   
                    throw new ResponseTimeoutException("Caught response timeout!", ex);
                } catch (final MessageDeliverException mde) {
                    throw mde ;
                } catch (Throwable t) {
                    logger.error("Unexpected throwable during attempted message delivery using Courier for EPR [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"].", t);
View Full Code Here

Examples of org.jsmpp.extra.ResponseTimeoutException

        try {
            pendingResp.waitDone();
            logger.debug(task.getCommandName() + " response received");
        } catch (ResponseTimeoutException e) {
            pendingResponse.remove(seqNum);
            throw new ResponseTimeoutException("No response after waiting for "
                    + timeout + " millis when executing "
                    + task.getCommandName() + " with sessionId " + sessionId
                    + " and sequenceNumber " + seqNum, e);
        } catch (InvalidResponseException e) {
            pendingResponse.remove(seqNum);
View Full Code Here

Examples of org.jsmpp.extra.ResponseTimeoutException

        try {
            pendingResp.waitDone();
            logger.debug(task.getCommandName() + " response received");
        } catch (ResponseTimeoutException e) {
            pendingResponse.remove(seqNum);
            throw new ResponseTimeoutException("No response after waiting for "
                    + timeout + " millis when executing "
                    + task.getCommandName() + " with sessionId " + sessionId
                    + " and sequenceNumber " + seqNum, e);
        } catch (InvalidResponseException e) {
            pendingResponse.remove(seqNum);
View Full Code Here

Examples of org.mule.api.routing.ResponseTimeoutException

                event.getMuleContext()
                    .fireNotification(
                        new RoutingNotification(event.getMessage(), null,
                            RoutingNotification.ASYNC_REPLY_TIMEOUT));

                throw new ResponseTimeoutException(CoreMessages.responseTimedOutWaitingForId((int) timeout,
                    asyncReplyCorrelationId), event, null);
            }
            else
            {
                return null;
View Full Code Here

Examples of org.mule.api.routing.ResponseTimeoutException

                event.getMuleContext()
                    .fireNotification(
                        new RoutingNotification(event.getMessage(), null,
                            RoutingNotification.ASYNC_REPLY_TIMEOUT));

                throw new ResponseTimeoutException(CoreMessages.responseTimedOutWaitingForId((int) timeout,
                    asyncReplyCorrelationId), event, null);
            }
            else
            {
                return null;
View Full Code Here

Examples of org.mule.api.routing.ResponseTimeoutException

            return this.resultEvent;
        }
        else
        {
            throw new ResponseTimeoutException(
                MessageFactory.createStaticMessage("Processing did not completed in time"), this.event,
                this.messageProcessor);
        }
    }
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.