users@glassfish.java.net

Re: JMS exception causing resending message :(

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

No, because the transaction will fail, and the message will be redelivered. I
didn't realize they are methods of the same bean - make createNewCustomer() a
method on another bean that runs in its own transaction, then transaction will
fail, but onMessage won't.

Another option would be to verify that the customer can be created before doing
em.persist(0 and not fail the transaction in the 1st place.

HTH,
-marina

Felipe Gaścho wrote:
> ??
>
>
> if I just merge the two methods it will solve the problem ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>