public PersistCommand(Object sessionInfo, Object jpm, KieSession ksession) { this.sessionInfo = (SessionInfo) sessionInfo; this.persistenceContext = ((PersistenceContextManager) jpm).getApplicationScopedPersistenceContext(); this.ksession = ksession; }
@Override public void destroy() { PersistenceContext persistenceContext = this.jpm.getApplicationScopedPersistenceContext(); boolean transactionOwner = false; try { transactionOwner = txm.begin(); persistenceContext.joinTransaction(); initExistingKnowledgeSession( this.sessionInfo.getId(), this.marshallingHelper.getKbase(), this.marshallingHelper.getConf(), persistenceContext ); persistenceContext.remove(this.sessionInfo); txm.commit( transactionOwner ); } catch ( RuntimeException re ) { rollbackTransaction( re, transactionOwner ); throw re; } catch ( Exception t1 ) { rollbackTransaction(t1, transactionOwner); throw new RuntimeException( "Wrapped exception see cause", t1 ); } }
PersistenceContext persistenceContext = jpm.getApplicationScopedPersistenceContext();
PersistenceContext persistenceContext = jpm.getApplicationScopedPersistenceContext();
PersistenceContext persistenceContext = jpm.getApplicationScopedPersistenceContext(); boolean transactionOwner = false; try {