Why do we have to manually flush() the EntityManager in a extended PersistenceContext?

后端 未结 3 1114
广开言路
广开言路 2021-02-01 10:27

In our J2EE application, we use a EJB-3 stateful bean to allow the front code to create, modify and save persistent entities (managed through JPA-2).

It looks something

3条回答
  •  花落未央
    2021-02-01 10:56

    Because there is no way to know "when" the client is done with the session (extended scope).

提交回复
热议问题