I don't see anything in the logs about afterCompletion.  However, I modified my 
EJB to be stateful with conversation scope, and now the database updates seem 
to be working.  Here is the modified code:


  | @Stateful
  | @Scope(ScopeType.CONVERSATION)
  | @Name("accountEditor")
  | public class AccountEditorBean implements AccountEditor {
  | 
  |     @In(required=false)
  |     private AccountManager accountManager;
  |     
  |     @Valid
  |     private Account account;
  |     
  |     @In(create=true)
  |     private Session session;
  |     
  |     @Begin(join=true)
  |     public String select() {
  |             account = 
accountManager.getSelectedAccountSummary().getAccount();
  |             return "editAccount";
  |     }
  |     
  |     @End
  |     @IfInvalid(outcome=Outcome.REDISPLAY, refreshEntities=true)
  |     public String update() {
  |             session.update(account);
  |             return "home";
  |     }
  |     
  |     public Account getAccount() {
  |             return account;
  |     }
  |     
  |     @Remove
  |     @Destroy
  |     public void destroy() {}
  |             
  | }
  | 

I'm still trying to wrap my head around Seam, so I'm not quite sure why this 
bean works, but the other (stateless) bean doesn't.  If you could offer any 
other suggestions or explanations, I would appreciate it.  Otherwise, at least 
I seem to have found a working pattern.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3951496#3951496

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3951496


_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to