Package org.drools

Examples of org.drools.SessionConfiguration


     */
    public static ReteooStatefulSession readSession(MarshallerReaderContext context,
                                                    int id,
                                                    ExecutorService executor) throws IOException,
                                                                             ClassNotFoundException {
        return readSession( context, id, executor, EnvironmentFactory.newEnvironment(), new SessionConfiguration() );
    }
View Full Code Here


                                 context,
                                 workingMemory );
    }

    public StatefulSession newStatefulSession(boolean keepReference) {
        SessionConfiguration config = new SessionConfiguration();
        config.setKeepReference( keepReference );

        return newStatefulSession( config,
                                   EnvironmentFactory.newEnvironment() );
    }
View Full Code Here

   
                // now unmarshall that byte[]
                ByteArrayInputStream bais = new ByteArrayInputStream( rsession.bytes );
                Marshaller marshaller = MarshallerFactory.newMarshaller( new KnowledgeBaseImpl( this ) );
                StatefulKnowledgeSession ksession = marshaller.unmarshall( bais,
                                                                           new SessionConfiguration(),
                                                                           EnvironmentFactory.newEnvironment() );
                session = (StatefulSession) ((StatefulKnowledgeSessionImpl) ksession).session;
   
                if ( keepReference ) {
                    super.addStatefulSession( session );
View Full Code Here

    public ReteooStatelessSession() {
    }

    public ReteooStatelessSession(final InternalRuleBase ruleBase) {
        this.ruleBase = ruleBase;
        this.sessionConf = new SessionConfiguration(); // create one of these and re-use
    }
View Full Code Here

                                            ClassNotFoundException {
        ruleBase = (InternalRuleBase) in.readObject();
        agendaFilter = (AgendaFilter) in.readObject();
        globalResolver = (GlobalResolver) in.readObject();
        globalExporter = (GlobalExporter) in.readObject();
        this.sessionConf = new SessionConfiguration(); // create one of these and re-use
    }
View Full Code Here

                                 final InternalRuleBase ruleBase,
                                 final ExecutorService executorService) {
        this( id,
              ruleBase,
              executorService,
              new SessionConfiguration(),
              EnvironmentFactory.newEnvironment() );
    }
View Full Code Here

    public StatelessKnowledgeSessionImpl(final InternalRuleBase ruleBase,
                                         final KnowledgeAgent kagent,
                                         final KnowledgeSessionConfiguration conf) {
        this.ruleBase = ruleBase;
        this.kagent = kagent;
        this.conf = (conf != null) ? conf : new SessionConfiguration();
        this.environment = EnvironmentFactory.newEnvironment();

        if ( this.ruleBase != null ) {
            // FIXME: this same code exists in ReteooRuleBase#newStatelessSession()
            this.ruleBase.lock();
View Full Code Here

        }
        return list;
    }

    public StatefulKnowledgeSession newStatefulKnowledgeSession() {
      return newStatefulKnowledgeSession(new SessionConfiguration(), EnvironmentFactory.newEnvironment() );
    }
View Full Code Here

    }
   
    public StatefulKnowledgeSession newStatefulKnowledgeSession(KnowledgeSessionConfiguration conf, Environment environment) {
        // NOTE if you update here, you'll also need to update the JPAService
        if ( conf == null ) {
            conf = new SessionConfiguration();
        }
       
        if ( environment == null ) {
            environment = EnvironmentFactory.newEnvironment();
        }
View Full Code Here

    public KnowledgeBaseConfiguration newKnowledgeBaseConfiguration(Properties properties, ClassLoader... classLoaders) {
        return new RuleBaseConfiguration(properties, classLoaders);
    }       
   
    public KnowledgeSessionConfiguration newKnowledgeSessionConfiguration() {
        return new SessionConfiguration();
    }
View Full Code Here

TOP

Related Classes of org.drools.SessionConfiguration

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.