...
Roller Planet uses the very same setup as Roller Weblogger. As you'd expect there is a PlanetFactory, which uses a PlanetModule to initialize Guice and create injected instances.
- PlanetFactory.java
- PlanetModule.java - JPA version
- PlanetModule.java - Hibernate version
Changes to Weblogger's Planet integration
The PlanetFactory uses the Guice back-end specified in the planet.properties file. In Roller we need a special PlanetModule, with a Planet implementation that can read database parameters from the Roller properties file instead of the Planet one.
...
.
...
This is accomplished by a special Planet persistence strategy that uses RollerConfig and is named HibernateRollerPlanetPersistenceStrategy. And we have a PlanetModule that specifies that strategy, which we call RollerPlanetModule.
...