[jboss-user] [JBoss Seam] - Re: destroying the entire conversation stack through annotat

jacob.orshalick do-not-reply at jboss.com
Mon Aug 27 11:53:28 EDT 2007


By the way, I am currently using Seam 2.0.0.BETA1.

I have come up with a potential patch that would allow the existing @End annotation to perform this task:

In org.jboss.seam.annotations.End add the following:


  | boolean endRoot() default false;

and then in the org.jboss.seam.core.ConversationInterceptor.endConversationIfNecessary():

...
  | boolean endRoot = ( isEndAnnotation && method.getAnnotation(End.class).endRoot() );
  | ...
  | private void endConversation(boolean beforeRedirect, boolean endRoot)
  | {
  |     Manager manager = Manager.instance();
  | 
  |     if(endRoot) {
  |         if(manager.isNestedConversation()) {
  |             manager.switchConversation(manager.getRootConversationId());
  |         }
  |     }
  | 
  |     manager.endConversation(beforeRedirect);
  | }
  | ...
and adjust calls to endConversation(boolean beforeRedirect) accordingly.

This would allow you to specify @End(endRoot=true) on a method so the entire conversation stack is destroyed.

Any other thoughts?  Thanks again for any help.

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

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



More information about the jboss-user mailing list