Examples of SessionConfiguration


Examples of com.google.code.rees.scope.session.SessionConfiguration

  SessionConfigurationProvider builder;
 
  @Test
  @SuppressWarnings("rawtypes")
  public void testGetSessionFieldConfig() {
    SessionConfiguration config = builder.getSessionConfiguration(MockPojoController.class);
    assertNotNull(config);
    for (Class clazz : TestConstants.SESSION_FIELD_ACTION_CLASSES) {
      String failMessage = "SessionConfigurationProvider failed to provide config for class:  " + clazz.getName();
      assertNotNull(failMessage, config.getFields(clazz));
    }
    for (Class clazz : TestConstants.NO_SESSION_FIELD_ACTION_CLASSES) {
      String failMessage = "SessionConfigurationProvider erroneously provided config for class:  " + clazz.getName();
      assertNull(failMessage, config.getFields(clazz));
    }
   
  }
View Full Code Here

Examples of com.liferay.util.dao.hibernate.SessionConfiguration

      Logger.error(HibernateException.class,he.getMessage(),he);
    }
  }

  public static Dialect getDialect(String className) {
    SessionConfiguration config =
      _getSessionConfigurationInstance(className);

    return config.getDialect();
  }
View Full Code Here

Examples of org.drools.SessionConfiguration

        RuleBase ruleBase = createKnowledgeBase();
        // create a new session
        Properties properties = new Properties();
    properties.put("drools.processInstanceManagerFactory", "org.jbpm.process.instance.impl.DefaultProcessInstanceManagerFactory");
    properties.put("drools.processSignalManagerFactory", "org.jbpm.process.instance.event.DefaultSignalManagerFactory");
    SessionConfiguration config = new SessionConfiguration(properties);
        StatefulSession session = ruleBase.newStatefulSession(config, EnvironmentFactory.newEnvironment());
        new WorkingMemoryDbLogger(session);
        session.getWorkItemManager().registerWorkItemHandler("Human Task", new SystemOutWorkItemHandler());

        // start process instance
View Full Code Here

Examples of org.drools.SessionConfiguration

        RuleBase ruleBase = createKnowledgeBase();
        // create a new session
        Properties properties = new Properties();
    properties.put("drools.processInstanceManagerFactory", "org.jbpm.process.instance.impl.DefaultProcessInstanceManagerFactory");
    properties.put("drools.processSignalManagerFactory", "org.jbpm.process.instance.event.DefaultSignalManagerFactory");
    SessionConfiguration config = new SessionConfiguration(properties);
        StatefulSession session = ruleBase.newStatefulSession(config, EnvironmentFactory.newEnvironment());
        new WorkingMemoryDbLogger(session);
        session.getWorkItemManager().registerWorkItemHandler("Human Task", new SystemOutWorkItemHandler());

        // start process instance
View Full Code Here

Examples of org.drools.SessionConfiguration

        RuleBase ruleBase = createKnowledgeBase();
        // create a new session
        Properties properties = new Properties();
    properties.put("drools.processInstanceManagerFactory", "org.jbpm.process.instance.impl.DefaultProcessInstanceManagerFactory");
    properties.put("drools.processSignalManagerFactory", "org.jbpm.process.instance.event.DefaultSignalManagerFactory");
    SessionConfiguration config = new SessionConfiguration(properties);
        StatefulSession session = ruleBase.newStatefulSession(config, EnvironmentFactory.newEnvironment());
        new WorkingMemoryDbLogger(session);
        session.getWorkItemManager().registerWorkItemHandler("Human Task", new SystemOutWorkItemHandler());

        // start process instance
View Full Code Here

Examples of org.drools.SessionConfiguration

        final byte[] b1 = bos.toByteArray();
        bos.close();

        ByteArrayInputStream bais = new ByteArrayInputStream( b1 );
        StatefulKnowledgeSession ksession2 = marshaller.unmarshall( bais,
                                                                    new SessionConfiguration(),
                                                                    EnvironmentFactory.newEnvironment() );
        bais.close();

        bos = new ByteArrayOutputStream();
        marshaller.marshall( bos,
View Full Code Here

Examples of org.drools.SessionConfiguration

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

Examples of org.drools.SessionConfiguration

    public KnowledgeSessionConfiguration newKnowledgeSessionConfiguration() {
        return new SessionConfiguration();
    }
       
    public KnowledgeSessionConfiguration newKnowledgeSessionConfiguration(Properties properties) {
        return new SessionConfiguration(properties);
    }       
View Full Code Here

Examples of org.drools.SessionConfiguration

    public Collection<KnowledgePackage> getKnowledgePackages() {
        return packages.values();
    }

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

Examples of org.drools.SessionConfiguration

                                JPAWorkItemManagerFactory.class.getName() );
        properties.setProperty( "drools.processSignalManagerFactory",
                                JPASignalManagerFactory.class.getName() );
        properties.setProperty( "drools.timerService",
                                JpaJDKTimerService.class.getName() );
        SessionConfiguration config = new SessionConfiguration( properties );

        SingleSessionCommandService service = new SingleSessionCommandService( kbase,
                                                                               config,
                                                                               env );
        int sessionId = service.getSessionId();
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.