Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Advanced CORBA Programming wit C++ - M. Henning, S. Vinoski.pdf
Скачиваний:
65
Добавлен:
24.05.2014
Размер:
5 Mб
Скачать

IT-SC book: Advanced CORBA® Programming with C++

return 0;

}

10.12 Summary

Implementing a server is not much more difficult than implementing a client. The main differences are that you must know a few simple rules about the implementation of servants, how to raise exceptions, and how to create object references. As for CORBA clients, much of the server-side code is boilerplate that you can write once and then forget about, so most of the effort in writing a server goes toward providing the application semantics rather than worrying about infrastructure concerns.

As with the client side, what may seem complex to you now soon becomes second nature. The small amount of complexity that is added to your code by using an ORB is amply repaid by the advantages we mention in Section 8.8.

Although this version of the CCS server is simple and lacks a number of features, it is easy to write a server that is more sophisticated without unduly complicating the source code. How to achieve this is the topic of the next two chapters, which provide detailed discussion of the POA and object life cycle, respectively.

378