01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */package org.apache.geronimo.corba.util;
17:
18: import org.apache.commons.logging.Log;
19: import org.apache.commons.logging.LogFactory;
20: import org.omg.CORBA.LocalObject;
21: import org.omg.PortableInterceptor.ORBInitInfo;
22: import org.omg.PortableInterceptor.ORBInitializer;
23:
24: /**
25: * The sole purpose of this initializer is to register a non-singleton ORB
26: * with the class <code>Util</code>.
27: *
28: * @version $Revision: 451417 $ $Date: 2006-09-29 13:13:22 -0700 (Fri, 29 Sep 2006) $
29: * @see Util
30: */
31: public class UtilInitializer extends LocalObject implements
32: ORBInitializer {
33:
34: private final Log log = LogFactory.getLog(UtilInitializer.class);
35:
36: /**
37: * Called during ORB initialization. If it is expected that initial
38: * services registered by an interceptor will be used by other
39: * interceptors, then those initial services shall be registered at
40: * this point via calls to
41: * <code>ORBInitInfo.register_initial_reference</code>.
42: *
43: * @param info provides initialization attributes and operations by
44: * which Interceptors can be registered.
45: */
46: public void pre_init(ORBInitInfo info) {
47: }
48:
49: /**
50: * Called during ORB initialization. If a service must resolve initial
51: * references as part of its initialization, it can assume that all
52: * initial references will be available at this point.
53: * <p/>
54: * Calling the <code>post_init</code> operations is not the final
55: * task of ORB initialization. The final task, following the
56: * <code>post_init</code> calls, is attaching the lists of registered
57: * interceptors to the ORB. Therefore, the ORB does not contain the
58: * interceptors during calls to <code>post_init</code>. If an
59: * ORB-mediated call is made from within <code>post_init</code>, no
60: * request interceptors will be invoked on that call.
61: * Likewise, if an operation is performed which causes an IOR to be
62: * created, no IOR interceptors will be invoked.
63: *
64: * @param info provides initialization attributes and
65: * operations by which Interceptors can be registered.
66: */
67: public void post_init(ORBInitInfo info) {
68: }
69: }
|