01: /**
02: * High Availability Service (HA) for JOnAS
03: *
04: * Copyright (C) 2006 Distributed Systems Lab.
05: * Universidad Politécnica de Madrid (Spain)
06: * Contact: http://lsd.ls.fi.upm.es/lsd
07: *
08: * This library is free software; you can redistribute it and/or
09: * modify it under the terms of the GNU Lesser General Public
10: * License as published by the Free Software Foundation; either
11: * version 2.1 of the License, or any later version.
12: *
13: * This library is distributed in the hope that it will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16: * Lesser General Public License for more details.
17: *
18: * You should have received a copy of the GNU Lesser General Public
19: * License along with this library; if not, write to the Free Software
20: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21: * USA
22: *
23: * --------------------------------------------------------------------------
24: *
25: * --------------------------------------------------------------------------
26: */package org.objectweb.jonas.ha.interceptor;
27:
28: import org.objectweb.carol.rmi.jrmp.interceptor.JInitInfo;
29: import org.objectweb.carol.rmi.jrmp.interceptor.JInitializer;
30:
31: /**
32: * This class initializes the interception mechanism
33: * @author Francisco Perez-Sorrosal (fpsorrosal@no-spam@fi.upm.es)
34: * @author Alberto Paz-Jimenez (apaz@no-spam@fi.upm.es)
35: */
36: public class HAInterceptorInitializer implements JInitializer {
37:
38: /**
39: * Initializes the HA client and server side interceptors
40: */
41: public void pre_init(JInitInfo info) {
42: try {
43: info
44: .add_client_request_interceptor(new HAClientInterceptor());
45: info
46: .add_server_request_interceptor(new HAServerInterceptor());
47: } catch (Exception e) {
48: e.printStackTrace();
49: }
50: }
51:
52: public void post_init(JInitInfo info) {
53: }
54:
55: }
|