01: /**
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 2007 Bull S.A.S.
04: * Contact: jonas-team@ow2.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or (at your option) any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, write to the Free Software
18: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19: *
20: * --------------------------------------------------------------------------
21: * $Id: CmiConfigurationExtension.java 2163 2007-12-11 18:19:23Z loris $
22: * --------------------------------------------------------------------------
23: */package org.ow2.easybeans.component.cmi;
24:
25: import org.ow2.easybeans.api.EZBContainerConfig;
26: import org.ow2.easybeans.server.EasyBeansConfigurationExtension;
27:
28: /**
29: * Called by Easybeans at runtime to provide a hook for CMI.
30: * @author WEI Zhouyue & ZHU Ning
31: */
32: public class CmiConfigurationExtension implements
33: EasyBeansConfigurationExtension {
34:
35: /**
36: * Adapt the given configuration by adding the callback for CMI.
37: * @param jcc JContainerConfig instance.
38: */
39: public void configure(final EZBContainerConfig jcc) {
40: // create the callback
41: CmiLifeCycleCallback lifeCycleCallback = new CmiLifeCycleCallback();
42:
43: // add the callback in the configuration
44: jcc.addCallback(lifeCycleCallback);
45: }
46:
47: }
|