所有实体的表都是在部署时自动创建的。但是,当使用 REST API 创建、启动和终止求解器时,尽管成功启动和终止求解,但没有任何内容保存到数据库中。请参阅下面的日志。我正在使用从 jbpm 安装程序 7.0.0.Beta6 安装的 kie-wb 和执行服务器。
我错过了什么吗?
2017-03-14 23:30:06,971 INFO [org.drools.compiler.kie.builder.impl.KieRepositoryImpl] (EJB default - 4) KieModule was added: ZipKieModule[releaseId=org.optaplanner.examples:cloud-balancing:1.0,file=C:\Users\User\.m2\repository\org\optaplanner\examples\cloud-balancing\1.0\cloud-balancing-1.0.jar]
2017-03-14 23:30:07,584 INFO [org.hibernate.jpa.internal.util.LogHelper] (EJB default - 4) HHH000204: Processing PersistenceUnitInfo [
name: org.optaplanner.examples:cloud-balancing:1.0
...]
2017-03-14 23:30:07,601 INFO [org.hibernate.dialect.Dialect] (EJB default - 4) HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
2017-03-14 23:30:07,687 INFO [org.hibernate.tool.hbm2ddl.SchemaUpdate] (EJB default - 4) HHH000228: Running hbm2ddl schema update
2017-03-14 23:30:08,114 INFO [org.kie.server.services.impl.KieServerImpl] (EJB default - 4) Container cloud-balancing_1.0 (for release id org.optaplanner.examples:cloud-balancing:1.0) successfully started
2017-03-14 23:30:23,379 INFO [org.kie.workbench.common.screens.datasource.management.util.ServiceUtil] (DataSourceManagementBootstrapTimer) Getting reference to managed bean: WildflyDataSourceProvider
2017-03-14 23:30:23,433 INFO [org.kie.workbench.common.screens.datasource.management.util.ServiceUtil] (DataSourceManagementBootstrapTimer) Getting reference to managed bean: WildflyDriverProvider
2017-03-14 23:31:26,260 INFO [org.kie.server.services.optaplanner.SolverServiceBase] (default task-55) Solver 'solver1' successfully created in container 'cloud-balancing_1.0'
2017-03-14 23:31:37,659 INFO [org.optaplanner.core.impl.solver.DefaultSolver] (pool-11-thread-1) Solving started: time spent (62), best score (-1init/0hard/0soft), environment mode (REPRODUCIBLE), random (JDK with seed 0).
2017-03-14 23:31:37,699 INFO [org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase] (pool-11-thread-1) Construction Heuristic phase (0) ended: time spent (103), best score (0hard/-1000soft), score calculation speed (76/sec), step total (1).
2017-03-14 23:31:48,198 INFO [org.optaplanner.core.impl.solver.termination.BasicPlumbingTermination] (default task-57) Terminating solver early.
2017-03-14 23:31:48,199 INFO [org.optaplanner.core.impl.localsearch.DefaultLocalSearchPhase] (pool-11-thread-1) Local Search phase (1) ended: time spent (10603), best score (0hard/-1000soft), score calculation speed (66839/sec), step total (1).
2017-03-14 23:31:48,201 INFO [org.optaplanner.core.impl.solver.DefaultSolver] (pool-11-thread-1) Solving ended: time spent (10604), best score (0hard/-1000soft), score calculation speed (66146/sec), phase total (2), environment mode (REPRODUCIBLE).