The KnowledgeAgent no long exists, and was removed. All the spring stuff has to be redone anyway.MarkOn 18 Apr 2013, at 09:04, Charles Moulliard <ch007m@gmail.com> wrote:_______________________________________________Hi,kagent has been commented in drools-spring and cannot be used anymore./** Copyright 2010 JBoss Inc** Licensed under the Apache License, Version 2.0 (the "License");* you may not use this file except in compliance with the License.* You may obtain a copy of the License at*** Unless required by applicable law or agreed to in writing, software* distributed under the License is distributed on an "AS IS" BASIS,* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.* See the License for the specific language governing permissions and* limitations under the License.*/package org.drools.container.spring.beans;import java.util.Collections;import java.util.List;import org.kie.api.KieBase;import org.springframework.beans.factory.FactoryBean;import org.springframework.beans.factory.InitializingBean;public class KnowledgeAgentBeanFactoryimplementsFactoryBean,InitializingBean {private KieBase kbase;
// private KnowledgeAgent kagent;private String id;private String newInstance;private String useKbaseClassloader = "false";private List<DroolsResourceAdapter> resources = Collections.emptyList();public Object getObject() throws Exception {return null; //this.kagent;}public Class getObjectType() {return null; //KnowledgeAgent.class;}public void afterPropertiesSet() throws Exception {// KnowledgeAgentConfiguration kagentConf = KnowledgeAgentFactory.newKnowledgeAgentConfiguration();// if ( kbase == null ) {// throw new RuntimeException( "kagent must reference an existing kbase" );// }//// kagentConf.setProperty( "drools.agent.newInstance",// newInstance );//// kagentConf.setProperty( "drools.agent.useKBaseClassLoaderForCompiling",// useKbaseClassloader );//// this.kagent = KnowledgeAgentFactory.newKnowledgeAgent( this.id,// this.kbase,// kagentConf );//// if ( resources != null && !resources.isEmpty() ) {// Collection<Resource> rs = new ArrayList<Resource>();// for ( DroolsResourceAdapter res : resources ) {// InternalResource resource = (InternalResource) res.getDroolsResource();//// resource.setResourceType( res.getResourceType() );//// if ( res.getResourceConfiguration() != null ) {// resource.setConfiguration( res.getResourceConfiguration() );// }//// rs.add( resource );// }// ChangeSetImpl changeSet = new ChangeSetImpl();// changeSet.setResourcesAdded( rs );//// kagent.applyChangeSet( changeSet );// }}// public KnowledgeBase getKbase() {// return kbase;// }//// public void setKbase(KnowledgeBase kbase) {// this.kbase = kbase;// }//// public KnowledgeAgent getKagent() {// return kagent;// }//// public void setKagent(KnowledgeAgent kagent) {// this.kagent = kagent;// }What is the reason of that decision ? Is there an alternative ?Regards,--Charles MoulliardApache Committer / Sr. Enterprise Architect (RedHat)Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
rules-dev mailing list
rules-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev