Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To select a back-end implementation, you set the property 'guice.backend.module' in the Roller configuration file the the class name of a Guice module that specifies the Roller interfaces. The RollerFactory will instantiate that Guice module and will use it to create and inject the Roller implementation specified by that module.

*RollerFactory.java
*RollerModule.java.

Changes to the Roller implementation and managers

Roller implementation and all manager implementations use constructor injection. The are all declared as singletons.

*JPARollerImpl.java.
*HibernateRollerImpl.java.

The DatabaseProvider class has been moved into the Core component so that it can be shared by both Weblogger and Planet. It's an abstract class and implementations are expected to provide a constructor that calls it's init method.

*DatabaseProvider.java.

The Roller version of the database provider uses RollerConfig to configure the database.

*RollerDatabaseProvider.

Changes to Roller Planet

...

This is accomplished by a special Planet persistence strategy that uses RollerConfig called HibernateRollerPlanetPersistenceStrategy.java. And we'll need a PlanetModule that specifies that strategy, which we call RollerPlanetModule.java.

*HibernateRollerPlanetPersistenceStrategy.java
*RollerPlanetModule.java

Status

Guice DI is implemented in both Weblogger and Planet and for both the Hibernate and JPA implementations and passing 100% of tests.

...