1 21 package org.jacorb.orb.standardInterceptors; 22 23 import org.apache.avalon.framework.logger.*; 24 25 import org.omg.PortableInterceptor.*; 26 27 import org.jacorb.orb.*; 28 import org.jacorb.config.Configuration; 29 30 37 38 public class IORInterceptorInitializer 39 extends org.omg.CORBA.LocalObject 40 implements ORBInitializer 41 { 42 43 public IORInterceptorInitializer() 44 { 45 } 46 47 49 55 public void post_init(ORBInitInfo info) 56 { 57 Configuration config = null; 58 try 59 { 60 ORB orb = ((org.jacorb.orb.portableInterceptor.ORBInitInfoImpl) info).getORB(); 61 config = orb.getConfiguration(); 62 63 68 76 int giop_minor = 77 config.getAttributeAsInteger("jacorb.giop_minor_version",2); 78 79 if( giop_minor > 0 ) 80 { 81 info.add_ior_interceptor(new CodeSetInfoInterceptor(orb)); 82 } 83 } 84 catch (Exception e) 85 { 86 if (config!= null) 87 { 88 Logger logger = 89 config.getNamedLogger("org.jacorb.interceptors.ior_init"); 90 if (logger.isErrorEnabled()) 91 logger.error("During IORInterceptor.post_init(): " + e.getMessage()); 92 } 93 else 94 e.printStackTrace(); } 96 } 97 98 102 103 public void pre_init(ORBInitInfo info) 104 { 105 } 107 108 } | Popular Tags |