Package org.drools.grid.local

Examples of org.drools.grid.local.LocalConnection


    return true;
  }

  public void afterPropertiesSet() throws Exception {
    if ("local".equals(type)) {
      connection = new LocalConnection();
    }
    else if ("remote".equals(type)) {
      throw new UnsupportedOperationException("not implemented yet");
    }
    else {
View Full Code Here


    return true;
  }

  public void afterPropertiesSet() throws Exception {
    if (node == null) {
      node = new LocalConnection().getExecutionNode();
    }
    KnowledgeBuilder kbuilder = node.get(KnowledgeBuilderFactoryService.class).newKnowledgeBuilder();
    kbase = node.get(KnowledgeBaseFactoryService.class).newKnowledgeBase();

    if (models != null && models.size() > 0) {
View Full Code Here

  protected void initDao() {
    if (kbase == null) {
      throw new IllegalArgumentException("property kbase is mandatory");
    }
    if (node == null) {
      LocalConnection connection = new LocalConnection();
      node = connection.getExecutionNode(null);
    }
    if (environment == null) {
      environment = node.get(KnowledgeBaseFactoryService.class).newEnvironment();
    }
    if (environment.get(EnvironmentName.ENTITY_MANAGER_FACTORY) != null) {
View Full Code Here

        inXml += "    </org.drools.Cheese>";
        inXml += "  </insert>";
        inXml += "  <fire-all-rules />";
        inXml += "</batch-execution>";

        LocalConnection connection = new LocalConnection();
        ExecutionNode node = connection.getExecutionNode(null);

        StatefulKnowledgeSession ksession = getExecutionNodeSessionStateful(node, ResourceFactory.newByteArrayResource( str.getBytes() ) );

        node.get(DirectoryLookupFactoryService.class).register("ksession1", ksession);
View Full Code Here

        return true;
    }

    public void afterPropertiesSet() throws Exception {
        if ( "local".equals( type ) ) {
            connection = new LocalConnection();
        } else if ( "remote".equals( type ) ) {
            throw new UnsupportedOperationException( "not implemented yet" );
        } else {
            throw new IllegalArgumentException( "invalid connection type: local/remote" );
        }
View Full Code Here

        return true;
    }

    public void afterPropertiesSet() throws Exception {
        if ( this.node == null ) {
            this.node = new LocalConnection().getExecutionNode();
        }      
       
        PackageBuilderConfiguration kconf = (PackageBuilderConfigurationKnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
        if (this.accumulateFunctions != null && !this.accumulateFunctions.isEmpty()) {           
            for ( Entry<String, AccumulateFunction> entry : this.accumulateFunctions.entrySet() ) {
View Full Code Here

        dataSource.init();
    }

    @Before
    public void configureNode() {
        connection = new LocalConnection();

        node = connection.getExecutionNode(null);
        node.set(KnowledgeStoreService.class, new KnowledgeStoreServiceImpl());
    }
View Full Code Here

        dataSource.init();
    }

    @Before
    public void configureNode() {
        connection = new LocalConnection();

        node = connection.getExecutionNode(null);
        node.set(JPAKnowledgeFactoryService.class, new JPAKnowledgeProviderLocalClient());
    }
View Full Code Here

TOP

Related Classes of org.drools.grid.local.LocalConnection

Copyright © 2018 www.massapicom. 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.