Dashboard > RIFE > ... > Repository > RIFE applications without any XML
RIFE Log In | Sign Up   View a printable version of the current page.
RIFE applications without any XML


Added by Geert Bevin, last edited by Geert Bevin on Aug 20, 2006
Labels: 
(None)

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.



Are you enjoying Confluence? Please consider purchasing it today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.1a Build:#515 May 19, 2006) - Bug/feature request - Contact Administrators