我有一个方法可以返回特定 DB 的实体管理器。现在,当我第一次使用该方法来获取实体管理器时,一切正常。我可以使用实体管理器将数据保存到任何表 A、B、C 中。现在说我保存在表 B 中时出现异常
现在,当我在收到上述异常后尝试对 DB 执行任何操作时,下次我尝试运行相同的代码时,它在表 A 本身更新时失败。我可以看到以下错误
<openjpa-1.2.2-SNAPSHOT-r422266:778978M-OPENJPA-975 nonfatal user error> org.apache.openjpa.persistence.InvalidStateException: The factory has been closed. The stack trace at which the factory was closed is available if Runtime=TRACE logging is enabled.
at org.apache.openjpa.kernel.AbstractBrokerFactory.assertOpen(AbstractBrokerFactory.java:673)
at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:182)
at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:142)
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:192)
at ..