[jboss-user] [JBoss Seam] - Re: Conversation and Manual Flush Mode
pete.muir@jboss.org
do-not-reply at jboss.com
Tue Nov 13 06:23:03 EST 2007
"dapeng" wrote : I know the difference bet. tx-commit and persistence context flush.
Good :) - a common mistake!
anonymous wrote : My question is, whether the manual flush is always the best strategy for a conversation, when I don't want to see modified data in the database permaturely, before the conversation is completed.
IMO, yes.
anonymous wrote : in Seam examples and documentation the manual flush is called in the JSF layer. But in my layered application, I would not like to expose the entitymanager to the JSF layer but to keep in the "backend layers" (service + dao).
You can control the flushmode both through annotations/xml and programatically through PersistenceProvider.instance().setManualFlushMode(em); You have to use a Seam Managed Persistence Context though. I would probably make the service layer set the flush mode, but then this is definitely not how I would design an application.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104042#4104042
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104042
More information about the jboss-user
mailing list