AdapterManager am = AdapterManager.getInstance();
//
// NameService
//
Adapter a = new Adapter();
a.setBindName( "NameService" );
a.setRemoteClassName( "gcc.rmi.iiop.server.ServerNamingContext" );
a.setRemoteInterfaceName( "gcc.rmi.iiop.NameServiceOperations" );
a.setShared( true );
a.addId( "IDL:gcc/rmi/iiop/NameService:1.0" );
a.addId( "IDL:omg.org/CosNaming/NamingContext:1.0" );
a.addId( "IDL:omg.org/CosNaming/NamingContextExt:1.0" );
a.addId( "NameService" ); // this gets passed in by the J2SE 1.4 ORB
a.setClassLoader( id.getClass().getClassLoader() );
//a.generateSkels();
//a.compileSkels();
am.registerAdapter( a );
ns.bindAdapter( a );
//
// Component
//
a = new Adapter();
a.setBindName( "mark.comps.Add" );
a.setRemoteClassName( "mark.comps.AddImpl" );
a.setRemoteInterfaceName( "mark.comps.Add" );
a.addId( "RMI:mark.comps.Add:0000000000000000" );
a.setClassLoader( id.getClass().getClassLoader() );
am.registerAdapter( a );
ns.bindAdapter( a );
//
// Component
//
a = new Adapter();
a.setBindName( "mark.comps.Add2" );
a.setRemoteClassName( "mark.comps.Add2Impl" );
a.setRemoteInterfaceName( "mark.comps.Add2" );
a.addId( "RMI:mark.comps.Add2:0000000000000000" );
a.setClassLoader( id.getClass().getClassLoader() );
am.registerAdapter( a );
ns.bindAdapter( a );
}