In this blog post, we shall examine the notable differences between OptaPlanner 8 and OptaPlanner 9. Subsequently, you will learn how to migrate from OptaPlanner 8 to OptaPlanner 9 with minimal complexities.
Also, Read Upgrading Your OptaPlanner Project: A Step-by-Step Guide
It has been several weeks since the latest edition of OptaPlanner ver. 9.37.0 was rolled out. Although the core functionality remains the same, OptaPlanner brings a couple of exceptions and enhancements, making it different from the previous versions. Those who wish to migrate from ver. 8 to 9 may use an automated script that is available on the OptaPlanner website. However, OptaPlanner 8 will remain functional for the time being and users may continue using it as well.
Both OptaPlanner 8 and 9 have many similarities and the same number of features. Besides, both editions are fully compatible with their respective APIs. There are, however, a couple of notable differences between the two, thanks to the package-level changes brought in by Jakarta EE 10 that impact the whole Java ecosystem.
Below is a tabular representation that summarizes the framework compatibility of OptaPlanner 8 vs OptaPlanner 9:
When used together with Quarkus, the ninth edition of OptaPlanner does not support DRL score calculation as it has been deprecated. It is, therefore, essential to migrate to the constraint streams API if you want to use DRL score calculation. At the same time, the latest edition (ver. 9.37.0) discontinues its support for the AbstractScoreHibernateType and its subtypes.
Also, Read The Top Industrial Use Cases of OptaPlanner
The process of migrating to OptaPlanner 9 will be fairly simple and straightforward for users who do not use Quarkus or Spring Boot. These users only need to change a version of the optaplanner-bom simply using the following command to change dependencies.
<dependency>
<groupId>org.optaplanner</groupId>
<artifactId>optaplanner-bom</artifactId>
<version>9.37.0.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
However, the process is a bit more complex for Quarkus or Spring Boot users. These users need to follow the steps mentioned below:
For faster response, you may run the following commands in your project's root directory.
mvn clean org.openrewrite.maven:rewrite-maven-plugin:4.43.0:run
-Drewrite.recipeArtifactCoordinates=org.optaplanner:optaplanner-migration:9.37.0.Final
-Drewrite.activeRecipes=org.optaplanner.migration.ToLatest9
Also, Read OptaPlanner Development Services For Improved Employee Roster Management
Now that we have discussed the changes and enhancements coming to OptaPlanner 9, you must be wondering what are the key driving factors as well. The main reason for introducing OptaPlanner 9 was the migration from Java EE APIs to Jakarta EE for projects like Quarkus and Spring Boot. That said, OptaPlanner 9 was designed to provide an effective way to seamlessly integrate these changes without impacting its users' experience.
We, at Oodles, provide end-to-end enterprise solutions to steer clear of your routine operational challenges. Our seasoned developers specialize in using OptaPlanner to develop custom and feature-rich planning solutions for varying business needs. Our OptaPlanner development services are conducive to streamlining complex business processes and building resilience. Contact us at [email protected] for more details.
Rahul Sharma | February 28, 2025
Rahul Sharma | February 27, 2025
Rahul Sharma | February 26, 2025
Thank you for contacting us.
Sit tight! One of our technology experts will get in touch with you within next 24 hours.
Catch up with all the latest tech buzz
Please remove URL from text
Comment is required
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.