01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.tomcat55;
05:
06: import org.apache.catalina.Container;
07: import org.apache.catalina.Valve;
08: import org.apache.catalina.core.StandardPipeline;
09:
10: import com.tc.tomcat55.session.SessionValve55;
11:
12: public class TerracottaPipeline extends StandardPipeline {
13:
14: private final SessionValve55 tcValve;
15:
16: public TerracottaPipeline(Container container) {
17: super (container);
18: tcValve = new SessionValve55();
19: addValve(tcValve);
20: }
21:
22: public void removeValve(Valve valve) {
23: if (valve == tcValve) {
24: throw new IllegalArgumentException(
25: "Cannot remove the terracotta session valve");
26: }
27: super.removeValve(valve);
28: }
29:
30: }
|