package x; import org.omg.CORBA.Any; import com.sun.corba.se.impl.orb.ORBImpl; import com.sun.corba.se.pept.transport.TransportManager; import com.sun.corba.se.spi.ior.ObjectKeyFactory; import com.sun.corba.se.spi.orb.ORBData; import com.sun.corba.se.spi.orb.ORBVersion; import com.sun.corba.se.spi.protocol.PIHandler; import com.sun.corba.se.spi.protocol.RequestDispatcherRegistry; public class MyORB extends ORBImpl { ORBData orbData; public MyORB() { // Just created this because its needed in the constructor // of SocketOrChannelConnectionImpl. In addition we have to // create this in this constructor, because else it is called // during the call of the super constructor. Constructor escaping // at its best... orbData = new MyORBData(); } @Override public ORBData getORBData() { return orbData; } @Override public TransportManager getTransportManager() { return new MyTransportManager(); } @Override public ObjectKeyFactory getObjectKeyFactory() { return new MyObjectKeyFactory(); } @Override public RequestDispatcherRegistry getRequestDispatcherRegistry() { return new MyRequestDispatcherRegistry(); } @Override public PIHandler getPIHandler() { return new MyPIHandler(); } @Override public ORBVersion getORBVersion() { return new MyORBVersion(); } @Override public synchronized Any create_any() { return new MyAny(this); } } .