361362363364365366367368369370371
} try { Thread.sleep( 1000 ); System.out.println( "Halting .." ); session.halt(); } catch ( Exception e ) { fail( e.getMessage() ); } if (t.getError() != null) {
449450451452453454455456457458459
Thread.sleep( 10200 ); executor.shutdownNow(); ksession.halt(); t.join(); if (t.getError() != null) { fail(t.getError().getMessage()); }
26972698269927002701270227032704270527062707
} // let the engine finish its job Thread.sleep(2000); } finally { ksession.halt(); // not to swallow possible exception sessionFuture.get(); } }
28032804280528062807280828092810281128122813
33293330333133323333333433353336333733383339
for ( int j = 0; j < N; j++ ) { ks.getEntryPoint( "x" ).insert( new Integer( j ) ); } Thread.sleep( 1000 ); ks.halt(); assertEquals( N, list.size() ); } @Test
59695970597159725973597459755976597759785979
t1.start(); Thread.currentThread().sleep( 500 ); ep.insert( new Person( "darth" ) ); Thread.currentThread().sleep( 500 ); ksession.halt(); t1.join( 5000 ); boolean alive = t1.isAlive(); if ( alive ) { t1.interrupt(); }
59155916591759185919592059215922592359245925
try { Thread.currentThread().sleep( 1000 ); } catch ( InterruptedException e ) { } boolean aliveT2 = t2.isAlive(); ksession.halt(); try { Thread.currentThread().sleep( 1000 ); } catch ( InterruptedException e ) { } boolean aliveT1 = t1.isAlive();
26212622262326242625262626272628262926302631
for ( int j = 0; j < N; j++ ) { ks.getEntryPoint( "x" ).insert( new Integer( j ) ); } Thread.sleep( 1000 ); ks.halt(); assertEquals( N, list.size() ); }
2526272829303132333435
implements GenericCommand<Void> { public Void execute(Context context) { KieSession ksession = ((KnowledgeCommandContext) context).getKieSession(); ksession.halt(); return null; } public String toString() { return "session.halt();";
implements GenericCommand<Void> { public Void execute(Context context) { StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) context).getStatefulKnowledgesession(); ksession.halt(); return null; } public String toString() { return "session.halt();";