Following the exploration of key server components in this article we will see the component connections to the database and messaging. The two components were designed and implemented separately from the application server, so they are not coupled in any way. To "add" to the server, the server is implemented modules that adapt.
Pool of connections to the database
The pool implemented is very simple. It has a collection of links with an initial size (configurable) and if the client (in this case the application server) need more, make up (also configurable).
Methods startup () and shutdown () handle module lifecycle pool. The first load a configuration file, which we shall see below the data to create the pool and the second kill active connections.
Messaging
The courier service is also simple, yet powerful. It has a pool of threads that process messages asynchronously. Messaging class has a set of MessageHandlers who are responsible for processing messages. When a message arrives, this is passed to all handlers and each is responsible for whether or not process it.
In the next article I will present the server configuration and I'll upload the source code. Until next time!


