KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > demo > continuations > LifeCycle


1 package demo.continuations;
2
3 import com.uwyn.rife.engine.Site;
4 import com.uwyn.rife.rep.BlockingRepository;
5 import com.uwyn.rife.rep.Rep;
6 import com.uwyn.rife.resources.ResourceFinderClasspath;
7 import com.uwyn.rife.servlet.RifeLifecycle;
8
9 /**
10  * This is a custom implementation of the entire lifecycle of your RIFE
11  * application. RIFE's standard web.xml file has been modified and instead of
12  * having a rep.path init-param, it uses a lifecycle.classname init-param
13  * that provides the classname of the custom lifecycle implementation.
14  *
15  *@author Terracotta, Inc.
16  */

17 public class LifeCycle extends RifeLifecycle {
18    public LifeCycle() {
19       BlockingRepository rep = new BlockingRepository();
20       rep.addParticipant(ParticipantSite.class, Site.DEFAULT_PARTICIPANT_NAME, false, null);
21       rep.runParticipants();
22       // don't forget to set the default repository
23
Rep.setDefaultRepository(rep);
24    }
25 }
Popular Tags