[jboss-user] [JBoss Seam] - Identifying long running conversations

omilian3 do-not-reply at jboss.com
Thu Oct 4 04:42:03 EDT 2007


I'm having a few difficulties understanding the observed behaviour of my conversations.

I have an application which starts 2 conversations one after the other. Both conversations are defined on stateful EJBs with methods annotated with @Begin. Both of these 'begin' methods are called, so at this point I expect I'll have a long running conversation, but I don't see the 'clr' in the URL that I would expect (having set conversation-is-long-running-parameter="clr" in components.xml). I do see the conversation in the debug.seam page, but I can't tell from this listing if the conversation is long running or not (can I?).

To get a bit more info I did the following 2 things:

1- I've added a "conversationLogger" event listener as follows. 

  | @Name("conversationLogger")
  | public class ConversationLogger implements Serializable {
  | 
  | 	private Log log = Logging.getLog(ConversationLogger.class);
  | 
  | 	@Observer("org.jboss.seam.beginConversation")	
  | 	public void logConversationBegin() {
  | 		Conversation currentConversation = Conversation.instance();
  | 		log.info("Beginning conversation: #0, Parent Id: #1", currentConversation.getId(), currentConversation
  | 				.getParentId());
  | 	}	
  | 
  | 	@Observer("org.jboss.seam.endConversation")
  | 	public void logConversationEnd() {
  | 		Conversation currentConversation = Conversation.instance();
  | 		log.info("Ending conversation: #0, Parent Id: #1", currentConversation.getId(), currentConversation
  | 				.getParentId());
  | 	}
  | }	

2 - In my pages I've included the following line in my facelets:

Current converstation is long running #{org.jboss.seam.core.conversation.longRunning}	

Curiously, I don't see any event being raised by the 'conversationLogger', nor do I see the 'clr' in the URL, however my pages do display "Current conversation is long running true". Do I have a long running conversation or not? Why might the methods marked with @Begin not raise the 'org.jboss.seam.beginConversation' event?

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

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



More information about the jboss-user mailing list