public final class Initializer extends LocalObject implements ORBInitializer
{
@Override
public void pre_init(ORBInitInfo info)
{
ORBInitInfoImpl infoImpl = (ORBInitInfoImpl) info;
int slotId = info.allocate_slot_id();
try
{
info.add_client_request_interceptor(new ClientRequestInterceptorImpl(
"ClientRequestInterceptor", infoImpl.getORB(), slotId));
info.add_server_request_interceptor(new ServerRequestInterceptorImpl(
"ServerRequestInterceptor", infoImpl.getORB(), slotId));
}
catch (DuplicateName e)
{
String message = "Unexpected error registering interceptors";
throw new INITIALIZE(message);