public void save() throws POMInitException, PersistenceException{
Transaction tx = null;
try {
//判断上下文是有活动的事务
if (!PersistentObjectManager.getPom().isTransactionActive()) {
tx = new Transaction();
}
if (tx != null) {
tx.start();
}
if (tx != null) {
tx.commit();
}
} finally {
if (tx != null) {
tx.rollback();
}
}
}
Windchill 事务的开启与关闭
最新推荐文章于 2023-03-15 18:46:18 发布