Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-231

Solver should be Serializable so it can live in a HTTPSession (and integrate better with CDI)

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Won't Do
    • Icon: Critical Critical
    • Future
    • 6.0.1.Final
    • optaplanner-core
    • None

      In CDI, you can't manage a Solver in a @Produces @SessionScoped method:
      https://github.com/jboss-developer/jboss-brms-quickstarts/blob/6.1.x-develop/business-resource-planner/src/main/java/org/jboss/quickstarts/planner/util/Resources.java

      CDI fails fast if you do that, because Solver is not Serializable.

      Solver and its children (phases, termination, ScoreDirector, ...) should be Serializable.
      Risk: this implies that KieBase is also Serializable. Is it?

            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: