This content has been marked as final.
Show 2 replies
-
1. Re: out and observer
matthieugd Jan 15, 2009 9:56 AM (in response to matthieugd)The observer is called from a statetful bean from a nested conversation ended :
`@Stateful
@Name("creationMvt")
@Scope(ScopeType.CONVERSATION)
public class CreationMvttBean implements CreationMvt {
public void creerLeMouvement() {
//stuff to update base
events.raiseTransactionSuccessEvent("creationMAJ");
}
}`
in pages.xml :
<page view-id="/creerMount.xhtml">
<description>Création</description>
<navigation from-action="#{creationMouvement.creerLeMouvement}">
<rule if="#{creationMouvement.mouvementValid}">
<end-conversation />
<redirect view-id="/consulterCompte.xhtml"/>
</rule>
</navigation>
</page> -
2. Re: out and observer
matthieugd Jan 15, 2009 1:28 PM (in response to matthieugd)I forget to mention that the nested conversation has a
compte
injected, here is the code :@Stateful @Name("creationMvt") @Scope(ScopeType.CONVERSATION) public class CreationMvttBean implements CreationMvt { @In @Out private Compte compte; @End(root=false) public void creerLeMouvement() { //stuff to update base service.update(compte,blabla) events.raiseTransactionSuccessEvent("creationMAJ"); } }
When I test this in the observer method I got true ?
log.debug("Conversation ID : " Conversation.instance().isNested());