Please report new issues athttps://github.com/DOCGroup
Trying to configure server to use the "Multiple threads, single ORB, thread-pool model" using TAO_Internal::default_svc_conf_entries() The following code static string taoResourceFacArgs = "static Resource_Factory \"-ORBReactorType tp\""; static string taoSrvStrategyFac = "static Server_Strategy_Factory \"-ORBConcurrency reactive\""; TAO_Internal::default_svc_conf_entries(taoResourceFacArgs, taoSrvStrategyFac, 0); TAO_Internal::open_services(argc, argv, 1); // ORB initialization orb = CORBA::ORB_init(argc, argv,"xxx"); will always give me a select reactor (which is the default) instead of a tp reactor.
This appears to be working for me. (I am of course using the latest version.) Can you provide a small example showing the problem?
I am having the same problem, debugging I see that TAO_Default_Resource_Factory::init (int argc, char **argv) is never called, so where else should the arguments be read out. I have the current version of the repository (date 30. June).
Again. A small example that shows the problem would be very helpful. It appears to work for me and TAO_Default_Resource_Factory::init did get invoked in my test.
Reassigned to tao-support
Accepted by TAO support. Small example, please?
The problem was a combination of calling TAO_Internal::open_services(...) and passing command line arguments (containing the letter 'n') to my executable. Calling TAO_Internal::open_services(...) will call ACE_Service_Config::parse_args(...) which will parse the command line arguments, find an 'n' in there and will do this "ACE_Service_Config::no_static_svcs_ = 1;" This means there will be no Resource_Factory loaded, so "Resource_Factory -ORBReactorType tp" will be ignored, and TAO will default to a select reactor. Solution: Don't call TAO_Internal::open_services(argc, argv, 1); Why was I calling it in the first place??
Michael, I'm not sure how that relates to your problem?
Created attachment 46 [details] shows problem when run like this "test -n"
In my use case I load the ORB dynamically (see time-date example) and supply the arguments in the svc.conf file. Here things get complicated because of the service configurator, which should not be reentered. Shall look into the details ASAP.
The test case is the $TAO_ROOT/examples/Simple/time-date example. Use the following line in the svc.conf: dynamic ORB Service_Object * ./Time_Date:_make_DLL_ORB() "dummy -ORBSkipServiceConfigOpen -ORBSvcConfDirective "static Resource_Factory '-ORBReactor TP'"" to select the TP reactor instead of the default select reactor. With or without the "ORBSkipServiceConfigOpen" the select reactor will still be chosen. You can test for this be setting a break-point in default_resource.cpp "TAO_Default_Resource_Factory::allocate_reactor_impl (void)" and see what kind of reactor is instantiated.
This seems to be working fine for me. Michael, if you still have problem getting your app to work, can you please create a new bug and send us a sample program that demonstrates your problem so we can help? Thanks.
Correct, this is not a bug. I was able to fix my problem by using a second directive in the svc.conf file. Thanks to Bruce McIntosh who pointed out the following: >We use the following in our configuration file with our dynamic ORB.... > >dynamic Resource_Factory Service_Object * >TAOd:_make_TAO_Default_Resource_Factory() "-ORBReactor TP" >dynamic Server_Strategy_Factory Service_Object * >TAOd:_make_TAO_Default_Server_Strategy_Factory() >"-ORBAllowReactivationOfSystemids 0" >dynamic ORB Service_Object * safsvcsd:_make_ORB() "-ORBDebug -ORBDebugLevel >99 -ORBCollocationStrategy direct -ORBSkipServiceConfigOpen " > >I have not had any success getting the "static" directives to work (as yet! >)