summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorls1 <ls1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-08-12 17:02:36 +0000
committerls1 <ls1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-08-12 17:02:36 +0000
commitbe0f471bf31364c4e2994427a5e8febbd47345dc (patch)
treeea35911fc620648cea07d4a1bda5a4abdec4d70f
parente3171a364dd491672dba94f187ca3a98c77c6bb3 (diff)
downloadATCD-be0f471bf31364c4e2994427a5e8febbd47345dc.tar.gz
*** empty log message ***
-rw-r--r--TAO/CIAO/tools/XML_Helpers/Cascadable_DocHandler.h5
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp7
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp8
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.cpp7
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Timeout_Generator.cpp27
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Timeout_Generator.h6
6 files changed, 37 insertions, 23 deletions
diff --git a/TAO/CIAO/tools/XML_Helpers/Cascadable_DocHandler.h b/TAO/CIAO/tools/XML_Helpers/Cascadable_DocHandler.h
index 6bb7b0f1428..25dd7736706 100644
--- a/TAO/CIAO/tools/XML_Helpers/Cascadable_DocHandler.h
+++ b/TAO/CIAO/tools/XML_Helpers/Cascadable_DocHandler.h
@@ -15,6 +15,7 @@
#include /**/ "ace/pre.h"
#include "ACEXML/common/DefaultHandler.h"
#include "ACEXML/common/XMLReader.h"
+#include "XML_Helpers_Export.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
#pragma once
@@ -65,7 +66,7 @@ namespace CIAO
* @sa ACEXML_DefaultHandler
* @sa DocHandler_Context
*/
- class Cascadable_DocHandler : public ACEXML_DefaultHandler
+ class CIAO_XML_HELPERS_Export Cascadable_DocHandler : public ACEXML_DefaultHandler
{
public:
/**
@@ -202,7 +203,7 @@ namespace CIAO
*
* @brief This DocHandler ignore and skip over a specific tag.
*/
- class Skip_DocHandler : public Cascadable_DocHandler
+ class CIAO_XML_HELPERS_Export Skip_DocHandler : public Cascadable_DocHandler
{
public:
/// Constructor.
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp
index 6bfc17ea60f..8a3529cdc81 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp
@@ -123,12 +123,7 @@ TAO_EC_Basic_Factory::destroy_proxy_push_consumer (TAO_EC_ProxyPushConsumer *x)
TAO_EC_Timeout_Generator*
TAO_EC_Basic_Factory::create_timeout_generator (TAO_EC_Event_Channel_Base *)
{
- int argc = 0;
- char **argv = 0;
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "");
- ACE_Reactor *reactor = orb->orb_core ()->reactor ();
- return new TAO_EC_Reactive_Timeout_Generator (reactor);
+ return new TAO_EC_Reactive_Timeout_Generator (0);
}
void
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp
index 9d33bbecd68..711329bc9d0 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp
@@ -589,13 +589,7 @@ TAO_EC_Default_Factory::create_timeout_generator (TAO_EC_Event_Channel_Base *)
{
if (this->timeout_ == 0)
{
- int argc = 0;
- char **argv = 0;
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, this->orbid_.c_str ());
-
- ACE_Reactor *reactor = orb->orb_core ()->reactor ();
- return new TAO_EC_Reactive_Timeout_Generator (reactor);
+ return new TAO_EC_Reactive_Timeout_Generator (0);
}
#if 0
else if (this->timeout_ == 1)
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.cpp
index 841bd6656c7..46b5db53840 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.cpp
@@ -120,12 +120,7 @@ TAO_EC_Null_Factory::destroy_proxy_push_consumer (TAO_EC_ProxyPushConsumer *x)
TAO_EC_Timeout_Generator*
TAO_EC_Null_Factory::create_timeout_generator (TAO_EC_Event_Channel_Base *)
{
- int argc = 0;
- char **argv = 0;
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "");
- ACE_Reactor *reactor = orb->orb_core ()->reactor ();
- return new TAO_EC_Reactive_Timeout_Generator (reactor);
+ return new TAO_EC_Reactive_Timeout_Generator (0);
}
void
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Timeout_Generator.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Timeout_Generator.cpp
index 52c7eb79c11..5ded89f208b 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Timeout_Generator.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Timeout_Generator.cpp
@@ -3,6 +3,7 @@
#include "EC_Reactive_Timeout_Generator.h"
#include "ace/Reactor.h"
+#include "ace/Thread_Manager.h"
#if ! defined (__ACE_INLINE__)
#include "EC_Reactive_Timeout_Generator.i"
@@ -14,17 +15,41 @@ ACE_RCSID (Event,
TAO_EC_Reactive_Timeout_Generator::
TAO_EC_Reactive_Timeout_Generator (ACE_Reactor *reactor)
- : reactor_ (reactor)
+ : reactor_ (reactor),
+ reactor_impl_(0)
{
+ if(!reactor_)
+ {
+ reactor_impl_ = new ACE_TP_Reactor();
+ reactor_ = new ACE_Reactor(reactor_impl_);
+ }
}
TAO_EC_Reactive_Timeout_Generator::~TAO_EC_Reactive_Timeout_Generator (void)
{
+ if(reactor_impl_)
+ {
+ reactor_->end_reactor_event_loop();
+
+ delete reactor_;
+ delete reactor_impl_;
+ }
}
void
TAO_EC_Reactive_Timeout_Generator::activate (void)
{
+ ACE_Thread_Manager::instance()->spawn((ACE_THR_FUNC) run_svc, this);
+}
+
+void
+TAO_EC_Reactive_Timeout_Generator::run_svc(void *arg)
+{
+ TAO_EC_Reactive_Timeout_Generator *obj
+ = ACE_static_cast(TAO_EC_Reactive_Timeout_Generator*, arg);
+
+ obj->reactor_->run_reactor_event_loop();
+
}
void
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Timeout_Generator.h b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Timeout_Generator.h
index e75afbcc5fc..b18186cfaeb 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Timeout_Generator.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Timeout_Generator.h
@@ -18,6 +18,7 @@
#include /**/ "ace/pre.h"
#include "EC_Timeout_Generator.h"
+#include "ace/TP_Reactor.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
@@ -37,7 +38,7 @@ class TAO_RTEvent_Export TAO_EC_Reactive_Timeout_Generator
{
public:
/// Constructor.
- /// If <reactor> is 0 then we use the reactor in the ORB singleton.
+ /// If <reactor> is 0 then we create a new reactor.
TAO_EC_Reactive_Timeout_Generator (ACE_Reactor *reactor = 0);
/// destructor
@@ -53,8 +54,11 @@ public:
int id);
private:
+ static void run_svc(void *arg);
+
/// The reactor
ACE_Reactor *reactor_;
+ ACE_TP_Reactor *reactor_impl_;
/// An adapter to receive the timeout events.
TAO_EC_Timeout_Adapter event_handler_;