users@glassfish.java.net

Re: JMS exception causing resending message :(

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Tue, 22 Sep 2009 11:25:44 -0700

Make that other one RequiresNew transaction type.

Regards,
-marina

Felipe Gaścho wrote:
> 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
>>
>
>
>
>