/**
* High Availability Service (HA) for JOnAS
*
* Copyright (C) 2006 Distributed Systems Lab.
* Universidad Politécnica de Madrid (Spain)
* Contact: http://lsd.ls.fi.upm.es/lsd
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* --------------------------------------------------------------------------
*
* --------------------------------------------------------------------------
*/

package org.objectweb.jonas.ha.interceptor;

import org.objectweb.carol.rmi.jrmp.interceptor.JInitInfo;
import org.objectweb.carol.rmi.jrmp.interceptor.JInitializer;

/**
 * This class initializes the interception mechanism
 * @author Francisco Perez-Sorrosal (fpsorrosal@no-spam@fi.upm.es)
 * @author Alberto Paz-Jimenez (apaz@no-spam@fi.upm.es) 
 */
public class HAInterceptorInitializer implements JInitializer {

	/**
	 * Initializes the HA client and server side interceptors
	 */
    public void pre_init(JInitInfo info) {
        try {
            info.add_client_request_interceptor(new HAClientInterceptor());
            info.add_server_request_interceptor(new HAServerInterceptor());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void post_init(JInitInfo info) {
    }

}
