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 TxServerClientInterceptorInitializer extends LocalObject implements ORBInitializer 40 { 41 42 static final long serialVersionUID = 6115001236395131840L; 43 44 public TxServerClientInterceptorInitializer() 45 { 46 } 48 49 51 public void pre_init(ORBInitInfo info) 52 { 53 } 55 56 public void post_init(ORBInitInfo info) 57 { 58 try 59 { 60 Encoding encoding = new Encoding (ENCODING_CDR_ENCAPS.value, 62 (byte)1, 63 (byte)0 ); 64 Codec codec = info.codec_factory().create_codec(encoding); 65 66 TxServerClientInterceptor.init(codec); 68 69 TxServerClientInterceptor interceptor = new TxServerClientInterceptor(); 71 info.add_client_request_interceptor(interceptor); 72 } 73 catch (Exception e) 74 { 75 throw new NestedRuntimeException("Unexpected ", e); 76 } 77 } 78 } 79 | Popular Tags |