Package org.drools.agent

Examples of org.drools.agent.KnowledgeAgent.dispose()


            Thread.sleep(6000);
            kbase = kagent.getKnowledgeBase();
            assertEquals(1, kbase.getKnowledgePackages().iterator().next().getRules().size());

        } finally {
            kagent.dispose();
            ResourceFactory.getResourceChangeNotifierService().stop();
            ResourceFactory.getResourceChangeScannerService().stop();
        }
    }
View Full Code Here


                    }
                }
                String kName = sName + "_kAgent";
                if ( localContext.containsKey( kName ) ) {
                    KnowledgeAgent kAgent = (KnowledgeAgent) localContext.get( kName );
                    kAgent.dispose();
                } else {
//                throw new IllegalStateException( "Expected kAgent in node " + kName );
                }
            }
            localContext.clear();
View Full Code Here

          .getRules().size());
    } finally {
      ResourceFactory.getResourceChangeNotifierService().stop();
      ResourceFactory.getResourceChangeScannerService().stop();
      file.delete();
      kagent.dispose();
    }
  }

    private void writeBinaryFile( File file, byte[] blob1 ) throws FileNotFoundException, IOException {
        file.delete();
View Full Code Here

          .getRules().size());
    } finally {
      ResourceFactory.getResourceChangeNotifierService().stop();
      ResourceFactory.getResourceChangeScannerService().stop();
      file.delete();
      kagent.dispose();
    }
  }
 
  /**
   *
 
View Full Code Here

        // stop scanning service
        ResourceFactory.getResourceChangeNotifierService().stop();
        ResourceFactory.getResourceChangeScannerService().stop();
        // file could remain and we will see, that it has changed, but scanner didn't register that
        //ruleFile.delete();
        kagent.dispose();  
    }
   
  private static void copy(InputStream in, OutputStream out) throws IOException {
        // Transfer bytes from in to out
        byte[] buf = new byte[1024];
View Full Code Here

            Thread.sleep(6000);
            kbase = kagent.getKnowledgeBase();
            assertEquals(1, kbase.getKnowledgePackages().iterator().next().getRules().size());

        } finally {
            kagent.dispose();
            ResourceFactory.getResourceChangeNotifierService().stop();
            ResourceFactory.getResourceChangeScannerService().stop();
        }
    }
View Full Code Here

                    .getRules().size());
        } finally {
            ResourceFactory.getResourceChangeNotifierService().stop();
            ResourceFactory.getResourceChangeScannerService().stop();
            file.delete();
            kagent.dispose();
        }
    }

    private void writeBinaryFile( File file, byte[] blob1 ) throws FileNotFoundException, IOException {
        file.delete();
View Full Code Here

        KnowledgeAgent kagent = KnowledgeAgentFactory
                .newKnowledgeAgent( "MortgageAgent" );
        kagent.applyChangeSet( ResourceFactory
                .newClassPathResource( "changeset.xml" ) );
        KnowledgeBase kbase = kagent.getKnowledgeBase();
        kagent.dispose();
        return kbase;
    }

}
View Full Code Here

          .getRules().size());
    } finally {
      ResourceFactory.getResourceChangeNotifierService().stop();
      ResourceFactory.getResourceChangeScannerService().stop();
      file.delete();
      kagent.dispose();
    }
  }
 
  /**
   *
 
View Full Code Here

        // stop scanning service
        ResourceFactory.getResourceChangeNotifierService().stop();
        ResourceFactory.getResourceChangeScannerService().stop();
        // file could remain and we will see, that it has changed, but scanner didn't register that
        //ruleFile.delete();
        kagent.dispose();  
    }
   
  private static void copy(InputStream in, OutputStream out) throws IOException {
        // Transfer bytes from in to out
        byte[] buf = new byte[1024];
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.