001    /**
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     *
009     *     http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    package org.apache.geronimo.corba.util;
018    
019    import org.apache.commons.logging.Log;
020    import org.apache.commons.logging.LogFactory;
021    import org.omg.CORBA.LocalObject;
022    import org.omg.PortableInterceptor.ORBInitInfo;
023    import org.omg.PortableInterceptor.ORBInitializer;
024    
025    
026    /**
027     * The sole purpose of this initializer is to register a non-singleton ORB
028     * with the class <code>Util</code>.
029     *
030     * @version $Revision: 451417 $ $Date: 2006-09-29 13:13:22 -0700 (Fri, 29 Sep 2006) $
031     * @see Util
032     */
033    public class UtilInitializer extends LocalObject implements ORBInitializer {
034    
035        private final Log log = LogFactory.getLog(UtilInitializer.class);
036    
037        /**
038         * Called during ORB initialization.  If it is expected that initial
039         * services registered by an interceptor will be used by other
040         * interceptors, then those initial services shall be registered at
041         * this point via calls to
042         * <code>ORBInitInfo.register_initial_reference</code>.
043         *
044         * @param info provides initialization attributes and operations by
045         *             which Interceptors can be registered.
046         */
047        public void pre_init(ORBInitInfo info) {
048        }
049    
050        /**
051         * Called during ORB initialization. If a service must resolve initial
052         * references as part of its initialization, it can assume that all
053         * initial references will be available at this point.
054         * <p/>
055         * Calling the <code>post_init</code> operations is not the final
056         * task of ORB initialization. The final task, following the
057         * <code>post_init</code> calls, is attaching the lists of registered
058         * interceptors to the ORB. Therefore, the ORB does not contain the
059         * interceptors during calls to <code>post_init</code>. If an
060         * ORB-mediated call is made from within <code>post_init</code>, no
061         * request interceptors will be invoked on that call.
062         * Likewise, if an operation is performed which causes an IOR to be
063         * created, no IOR interceptors will be invoked.
064         *
065         * @param info provides initialization attributes and
066         *             operations by which Interceptors can be registered.
067         */
068        public void post_init(ORBInitInfo info) {
069        }
070    }