[jboss-user] [JBoss Seam] - Re: Can I manually commit a Transaction?

JakeC do-not-reply at jboss.com
Thu Sep 27 15:53:26 EDT 2007


I tried dustismo's code and it worked without having to start another Transactcion. I'd be VERY surprised if committing the Transaction actually closed it.

I haven't tried Christian's code yet because Matt's idea is precisely what I was looking for! I don't have a problem doing manual commits if it is on a Transaction I started, but I really don't like messing with a container's Transaction.

However, even after adding <core:transactionListener/> to my components.xml to get past the "org.jboss.seam.core.transactionListener is not installed" exception, my method still isn't getting called. I'm using the form of raiseTransactionSuccessEvent() that has parameters (a single parameter, in my case), but it isn't being called.


  | 		Events.instance().raiseTransactionSuccessEvent("filesUploaded", uploadedFiles);
  | 

... and in the same file I have ...

@Observer("filesUploaded")
  | 	public void filesUploaded(Map<File,UploadDocument> uploadedFiles) 		{
  | 		log.info("filesUploaded entered");
  | 		...
  | 	}
  | 
... but the log message never prints, and my files don't get moved, although the Document records get into the database without any manual commits.

What am I missing?

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

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



More information about the jboss-user mailing list