如何在工作线程中使用JPA?
我正在使用 WebLogic 10.3.5.0 和 JPA 2.0,并有以下场景:
- 用户需要启动一个任务需要一些时间才能完成;
- 该任务需要对DB进行读写;
一种解决方案是编写一个工作程序并使用 WorkManager 功能从会话 EJB 启动它。
我应该如何使用该工作人员的 JPA 以事务方式访问数据库?
I'm using WebLogic 10.3.5.0 with JPA 2.0 and have the following scenario:
- user needs to start a task takes some time to complete;
- this task needs to read and write to DB;
One solution would be to write a worker and use the WorkManager feature to start this from an session EJB.
How should I use JPA from this worker to access the DB in a transactional manner?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论