1 22 package org.jboss.tm.iiop; 23 24 import org.jboss.util.NestedRuntimeException; 25 import org.omg.CORBA.LocalObject ; 26 import org.omg.IOP.Codec ; 27 import org.omg.IOP.ENCODING_CDR_ENCAPS ; 28 import org.omg.IOP.Encoding ; 29 import org.omg.PortableInterceptor.ORBInitInfo ; 30 import org.omg.PortableInterceptor.ORBInitializer ; 31 32 39 public class TxIORInterceptorInitializer extends LocalObject implements ORBInitializer 40 { 41 42 static final long serialVersionUID = 963051265993070280L; 43 44 public TxIORInterceptorInitializer() 45 { 46 } 48 49 public void pre_init(ORBInitInfo info) 51 { 52 } 54 55 public void post_init(ORBInitInfo info) 56 { 57 try 58 { 59 Encoding encoding = new Encoding (ENCODING_CDR_ENCAPS.value, 61 (byte) 1, 62 (byte) 0 ); 63 Codec codec = info.codec_factory().create_codec(encoding); 64 info.add_ior_interceptor(new TxIORInterceptor(codec)); 65 } 66 catch (Exception e) 67 { 68 throw new NestedRuntimeException("Unexpected", e); 69 } 70 } 71 } | Popular Tags |