[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Issue with persistence | No inserts/updates statements getti
agup10
do-not-reply at jboss.com
Wed Jun 4 06:46:29 EDT 2008
Context
I have a session scoped seam component from where I am invoking a method persistUserFund() in domain layer.
Seam version: 2.0.1.GA
Problem Statement
The method persistUserFund() does not fire an inserts/updates/deletes and the data is not peristed into theoracle database
Problem Explanation
The method in domain layer has the following code block. I am using session.flush to flush the session so that the inserts/updates/deletes could get fired.
persistUserFund() {
Session session = getSession();
Block block = userfund.removeBlock();
session.flush();
userfund.setMainBlock(block);
session.flush();
}
I tried executing the above method using TestNG and the method executes successfully generating inserts/updates statements.
However, from the session scoped seam component, no inserts/updates/deletes are generated.
I have tried using Conversation.changeFlushMode(FlushModeType.MANUAL); at the start of the method in seam component and Conversation.changeFlushMode(FlushModeType.AUTO); at the end of the seam component. But even this did not help.
Could someone provide any insights to help me solve this problem?
Thanks in Advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4155625#4155625
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4155625
More information about the jboss-user
mailing list