users@glassfish.java.net

Re: JMS exception causing resending message :(

From: Felipe Gaścho <fgaucho_at_gmail.com>
Date: Tue, 22 Sep 2009 20:20:56 +0200

and the method that calls the previous one:

@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType",
propertyValue = "javax.jms.Queue") }, mappedName =
JmsConstants.PUJ_REGISTRATION_QUEUE)
public class RegistrationMessageBean implements MessageListener {

        @Override
        public void onMessage(Message registration) {
                try {
                         .........
                        PujUserEntity user = createNewCustomer(registration);
                         .........
                } catch (Throwable ex) {
                        logger.log(...);
                }
        }
}

and the message continue to be redelivered :(

2009/9/22 Felipe Gaścho <fgaucho_at_gmail.com>:
> again I am facing this problem .. and again lost :)
>
> in my method:
>
>        private PujUserEntity createNewCustomer(Message registration) {
>                try {
>                           .....
>                } catch (Exception error) {
>                        logger.log(Level.WARNING, "unable to create user [login= " + login
>                                        + ", email=" + email, error);
>                }
>                return user;
>        }
>
>
> and when the code causes a JPA exception, the message is sent again to
> the Queue...
>
> How do I digest the message in a way it never more is delivered ?
>
> --
> Looking for a client application for this service:
> http://fgaucho.dyndns.org:8080/footprint-service/wadl
>



-- 
Looking for a client application for this service:
http://fgaucho.dyndns.org:8080/footprint-service/wadl