The last part of the architecture of a RIFE web application that still required XML, was the repository setup. You needed to provide a participants.xml file to declare all the participants in the repository. This can now be removed by creating your own LifeCycle implementation. To use this you have to modify RIFE's standard web.xml file and use a lifecycle.classname init-param instead of the rep.path init-param.
For example:
<web-app>
<filter>
<filter-name>RIFE</filter-name>
<filter-class>com.uwyn.rife.servlet.RifeFilter</filter-class>
<init-param>
<param-name>lifecycle.classname</param-name>
<param-value>LifeCycle</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>RIFE</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
Then you can create your own LifeCycle class like this:
public class LifeCycle extends RifeLifecycle {
public LifeCycle() {
BlockingRepository rep = new BlockingRepository();
rep.addParticipant(ParticipantSite.class);
rep.runParticipants();
Rep.setDefaultRepository(rep);
}
}
Don't forget to set the default repository in your custom lifecycle, since much of RIFE relies on the presence of that.