org.kie.internal.runtime.manager

## Interface SessionFactory

-     public interface SessionFactory

  Factory that produces `KieSession` instances.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Closes the factory and releases all resources
    `org.kie.api.runtime.KieSession` | `findKieSessionById(Long sessionId)` Loads `KieSession` form data store (such as db) based on given id.
    `org.kie.api.runtime.KieSession` | `newKieSession()` Produces new instance of `KieSession`

- - ### Method Detail

    - #### newKieSession

          org.kie.api.runtime.KieSession newKieSession()

      Produces new instance of `KieSession`
      Returns:
        new instance of `KieSession`

    - #### findKieSessionById

          org.kie.api.runtime.KieSession findKieSessionById(Long sessionId)

      Loads `KieSession` form data store (such as db) based on given id.
      Parameters:
        `sessionId` - identifier of ksession
      Returns:
        loaded instance of `KieSession`
      Throws:
        `RuntimeException` - in case session cannot be loaded

    - #### close

          void close()

      Closes the factory and releases all resources

Copyright © 2001–2015 JBoss by Red Hat. All rights reserved.