[jboss-dev-forums] [Design of JBoss ESB] - Re: How to use FaultTo

jaroslaw.kijanowski do-not-reply at jboss.com
Fri Aug 24 13:03:41 EDT 2007


Ok, I create now an ESB aware message, where I define the FaultTo that way:


  | PortReference pr = new PortReference();
  | pr.setAddress("jms://localhost/queue/quickstart_exceptions_faults_receiver");
  | pr.addExtension("jbossesb:java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
  | pr.addExtension("jbossesb:java.naming.provider.url", "localhost");
  | pr.addExtension("jbossesb:specification-version", "1.1");
  | pr.addExtension("jbossesb:connection-factory", "ConnectionFactory");
  | pr.addExtension("jbossesb:message-selector", "serviceName='ExceptionCaughtServiceReceiver'");
  | EPR epr = new EPR();
  | epr.setAddr(pr);
  | .
  | .
  | .
  | esbMessage.getHeader().getCall().setFaultTo(epr);
  | ListenerUtil.tryToDeliver(esbMessage, category, name);
  | 

Then, while processing the message, I throw an ActionProcessingException/ActionProcessingFaultException but the fault message still doesn't want to go to the quickstart_exceptions_faults_receiver queue:

18:58:55,337 ERROR [ActionProcessingPipeline] Failed to send error to address EPR: PortReference < <wsa:Address jms://localhost/queue/quickstart_exceptions_faults_receiver/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : localhost/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:message-selector : serviceName='ExceptionCaughtServiceReceiver'/> >.
org.jboss.soa.esb.couriers.CourierException: org.jboss.soa.esb.couriers.CourierException: Unknown destination type
        at org.jboss.internal.soa.esb.couriers.JmsCourier.deliver(JmsCourier.java:147)


How should I define the EPR?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077879#4077879

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077879



More information about the jboss-dev-forums mailing list