[jboss-user] [JBoss Seam] - Re: #{conversationList} appears to be empty

omilian3 do-not-reply at jboss.com
Wed Oct 3 04:58:22 EDT 2007


I'm having a few difficulties with long running conversations, so I've added the "conversationLogger" event listener above to help debug the problem. However, I'm finding that when my @Begin method is invoked the logConversationBegin() method is not called. 

I've added some extra methods to the logger which observe other events, such as "org.jboss.seam.postCreate.xxx", where xxx is one of my components, e.g. 


  | @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.postCreate.businessProfileQuestionnaireController")	
  | 	public void logPostCreateBegin() {
  | 		Conversation currentConversation = Conversation.instance();
  | 		System.out.println(">>>>>>>>>>>>>>POST CREATE>>>>>>>>>>>>>");
  | 		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());
  | 	}
  | }

I see these events being raised and the conversationLogger is called, so I'm comfortable the logger is working:

18:38:53,421 INFO  [STDOUT] >>>>>>>>>>>>>>POST CREATE>>>>>>>>>>>>>
  | 18:38:53,421 INFO  [ConversationLogger] Beginning conversation: 2, Parent Id: null

It would appear then that the Manager methods which raise the 'org.jboss.seam.beginConversation' event are not being called, yet I can see that I have a long running conversation by the following 3 means:

1 - In my @Begin method I do:

Conversation currentConversation = Conversation.instance();
  | System.out.println("Conversation id " + currentConversation.getId());

This prints "Conversation id 2"

2 - In my pages I've included:

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

This displays "Current converstation is long running true"

3 - I can see the conversation with id 2 listed on the seam debug page

These 3 facts lead me to believe I've got a conversation, yet they don't seem to raise the 'org.jboss.seam.beginConversation' event; what could be going on here? Any ideas?

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

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



More information about the jboss-user mailing list