Skip to content

Commit

Permalink
Check Tx with @observes.
Browse files Browse the repository at this point in the history
  • Loading branch information
alesj committed Sep 12, 2011
1 parent f517702 commit 4a7595e
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -24,6 +24,7 @@

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.event.Observes;
import javax.enterprise.event.TransactionPhase;

/**
* @author <a href="mailto:ales.justin@jboss.org">Ales Justin</a>
Expand All @@ -42,7 +43,7 @@ public void consumeNumber(@Observes Msg<Number> msg) {
System.out.println("number msg = " + msg);
}

public void consumeSecure(@Observes @Secure Msg<String> msg) {
public void consumeSecure(@Observes(during = TransactionPhase.AFTER_SUCCESS) @Secure Msg<String> msg) {
System.out.println("secure msg = " + msg);
}
}

0 comments on commit 4a7595e

Please sign in to comment.