CORBA Programming/Server

The server procedure needs to initialize and start the server communication. It also needs to instantiate the meta objects and register them with the name server.

packages are only initialized but are not used otherwise. This would normally trigger a warning, which we switch off here.

pragma Warnings (Off, PolyORB.Setup.Thread_Per_Request_Server);

initialize packages. Forward declarations. You don't normally need them but GNAT is rather strict when full warnings are activated. Set up echo meta class. create the one and only meta echo instance create a servant for the meta echo instance activate the servant. Don't know what to do with the Id. Convert the servant type to the correct return type. The IOR and corbaloc outputs are only for diagnostics. We use a name server to propagate the meta object. Register the meta object with the name server so the client can find the object. Set up root POA Retrieve Root POA. Resolve_Initial_References will automatically create an object if it does not exist already. Activate the root POA. Launch the server