3 #include "ace/svc_export.h"
4 #include "tao/default_resource.h"
5 #include "Alt_Resource_Factory.h"
10 * @class My_Resource_Factory
12 * @brief Illustrates how to select the appropriate @c ACE_Reactor.
14 * If we're running in a single-threaded configuration this will be
15 * the @c ACE_Reactor::instance singleton. Otherwise, it'll be the
16 * ORB's own default @c ACE_Reactor, which is defined by the
17 * @c TAO_Default_Resource_Factory.
19 class Alt_Resource_Factory_Export My_Resource_Factory
20 : public TAO_Default_Resource_Factory
23 /// Return the @c ACE_Reactor that will be utilized by the ORB.
24 virtual ACE_Reactor
*get_reactor ();
27 ACE_FACTORY_DECLARE (Alt_Resource_Factory
, My_Resource_Factory
)
32 * @brief Define a class that dynamically links an ORB into a server
33 * process via the @c ACE_Service_Configurator.
35 class ACE_Svc_Export DLL_ORB
: public ACE_Task_Base
38 /// Initialize the @c TAO_ORB_Manager.
39 virtual int init (int argc
, ACE_TCHAR
*argv
[]);
41 /// Shutdown the @c TAO_ORB_Manager.
48 /// ORB pseudo-reference.
51 /// Reference to the POA.
52 PortableServer::POA_var poa_
;
54 /// Reference to the POA Manager.
55 PortableServer::POAManager_var poa_manager_
;
59 * @class Time_Date_Servant
61 * @brief Define a class that dynamically links the Time_Date service
62 * into a server process via the @c ACE_Service_Configurator.
63 * Note that this assumes the ORB has been linked previously.
65 class ACE_Svc_Export Time_Date_Servant
: public ACE_Service_Object
71 /// Initialize the @c Time_Date servant.
72 virtual int init (int argc
, ACE_TCHAR
*argv
[]);
74 /// Parse the "command-line" arguments.
75 int parse_args (int argc
, ACE_TCHAR
*argv
[]);
78 /// Servant for the @c Time_Date object.
79 Time_Date_i
* servant_
;
81 /// File where the IOR of the server object is stored.
82 const ACE_TCHAR
*ior_output_file_
;
84 /// Name of the ORB we're linking dynamically.
88 // The following Factory is used by the <ACE_Service_Config> and
89 // dll_orb.conf file to dynamically initialize the state of the
91 ACE_SVC_FACTORY_DECLARE (DLL_ORB
)
92 ACE_SVC_FACTORY_DECLARE (Time_Date_Servant
)