Why do I need to use flush() when using SMPC ?
Before I had this
| @Stateful
| @Scope(ScopeType.APPLICATION)
| @Name("questionTypeManager")
| public class QuestionTypeManagerBean implements QuestionTypeManager {
|
| @Logger
| Log log;
|
| @PersistenceContext
| EntityManager entityManager;
|
| public void addQuestionType(String questionType) {
| entityManager.persist(new QuestionType(questionType));
| log.info("Successfuly persisted question type");
| }
|
| @Remove @Destroy
| public void destroy() {}
|
| }
|
But when I`ve switched to SMPC I had to add entityManager.flush() couse
entityManager didn`t persist QuestionType to the database. It didn`t show any
errors either.
Why is that ?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111168#4111168
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111168
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user