TransactionTemplate txTemplate = new TransactionTemplate( txManager );
final StatefulKnowledgeSession ksession = (StatefulKnowledgeSession) txTemplate.execute( new TransactionCallback() {
public Object doInTransaction(TransactionStatus status) {
StatefulKnowledgeSession kNewSession = kstore.newStatefulKnowledgeSession( kbRollback,
null,
env );
kNewSession.setGlobal( "list",
list );
kNewSession.insert( 1 );