Hot reload for SAP Commerce (Hybris)
An SAP Commerce restart takes minutes, and then you log in again and click back to the page you were testing. Reclazz puts your change into the server that is already running. Change the code, build, refresh the page.
What reaches the running server
- Java classes: method bodies, new methods, services, facades, populators and controllers.
- items.xml and beans.xml: Reclazz runs code generation and reloads the model and DTO classes. A new database column still needs Update Running System.
- Spring XML: bean definitions and references to classes you just added. You can also change a bean's class=, point an alias at another bean, edit a FactoryBean, change primary or lazy-init, or delete a bean nothing uses.
- @Value fields and setters pick up a changed property right away.
- Properties, log levels, localization and Backoffice labels.
- ImpEx: imported when you save the file, if you turn on autoImpex.
- Interceptors, OCC field sets and mappings, and *-backoffice-config.xml.
Each item has conditions. The SAP Commerce guide lists them.
What still needs a restart
Changing a class's superclass, configuration that is only read at startup, and anything Reclazz cannot apply safely. In those cases Reclazz tells you which file needs the restart, instead of leaving old code running.
Set up in a few clicks
- Install the Reclazz plugin in IntelliJ IDEA and open your SAP Commerce project.
- The setup window adds two lines to your SAP Commerce properties (local.properties, or 95-local.properties when you use an optional config directory) and runs ant server for you.
- Restart the server once. From then on, a build is enough.
Reclazz needs Java 17 or newer, so it works with SAP Commerce versions that run on Java 17 or newer.
Questions
Is it free?
Yes. The agent, the plugin and every reload feature are free and open source under Apache 2.0.
Does it change my project?
It adds two lines to your SAP Commerce properties (local.properties, or 95-local.properties in an optional config directory). The plugin shows them first and removes them with one click.
Does it work without IntelliJ?
Yes, attach the agent yourself. The SAP Commerce guide shows how.