summaryrefslogtreecommitdiff
path: root/trunk/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/README
blob: 8090bdb87ce66f292d2ca3c4ecf8c9e6ddbddd66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// $Id$
===========================================================================
Directory: $TAO_ROOT/tests/CSD_Strategy_Tests/TP_Test_Static

===========================================================================
This test shows the ThreadPool strategy can automatically apply to the poa
via service configuration file static directive. 

This simple test is a copy of TP_Test_1. The difference is the test 
application does not need to create the TP_Strategy object and apply to the 
poa. A new TP_Strategy object is created during the initialization of the
TP_Strategy_Factory service object and it will be automatically applied to 
a poa. 

The application needs to include the following two files to force the 
TAO_CSD_ORB_Loader and TAO_CSD_TP_Strategy_Factory service objects register
with the service repository before initializing the services specified in
.conf file.

#include "tao/CSD_Framework/CSD_ORB_Loader.h"
#include "tao/CSD_ThreadPool/CSD_TP_Strategy_Factory.h"


The service configuration file specifies the number of threads that
the ThreadPool strategy have and also specify which poa the strategy should 
apply to. We can specify multiple ThreadPool strategies and the poas via -CSDtp 
option.

e.g
static TAO_CSD_TP_Strategy_Factory "-CSDtp RootPOA:2 -CSDtp ChildPoa:3"


To run the test use the run_test.pl script:

$ ./run_test.pl

	the script returns 0 if the test was successful.