package org.jboss.tm.iiop;
import org.jboss.util.NestedRuntimeException;
import org.omg.CORBA.LocalObject;
import org.omg.IOP.Codec;
import org.omg.IOP.ENCODING_CDR_ENCAPS;
import org.omg.IOP.Encoding;
import org.omg.PortableInterceptor.ORBInitInfo;
import org.omg.PortableInterceptor.ORBInitializer;
public class TxServerClientInterceptorInitializer extends LocalObject implements ORBInitializer
{
static final long serialVersionUID = 6115001236395131840L;
public TxServerClientInterceptorInitializer()
{
}
public void pre_init(ORBInitInfo info)
{
}
public void post_init(ORBInitInfo info)
{
try
{
Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
(byte)1,
(byte)0 );
Codec codec = info.codec_factory().create_codec(encoding);
TxServerClientInterceptor.init(codec);
TxServerClientInterceptor interceptor = new TxServerClientInterceptor();
info.add_client_request_interceptor(interceptor);
}
catch (Exception e)
{
throw new NestedRuntimeException("Unexpected ", e);
}
}
}