diff options
author | jxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-05-02 02:23:54 +0000 |
---|---|---|
committer | jxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-05-02 02:23:54 +0000 |
commit | f5daa86618b44ee3b2f225bba1687ddbada160d9 (patch) | |
tree | fe3f776d3818404a003c6a60b7817e222302cb3a /apps | |
parent | 7581128d91408296baff2393a32663b74c21576f (diff) | |
download | ATCD-f5daa86618b44ee3b2f225bba1687ddbada160d9.tar.gz |
Added tracing statements. Debugging fixes.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/JAWS/PROTOTYPE/JAWS/Data_Block.cpp | 6 | ||||
-rw-r--r-- | apps/JAWS/PROTOTYPE/JAWS/Pipeline_Tasks.cpp | 9 | ||||
-rw-r--r-- | apps/JAWS/PROTOTYPE/JAWS/Server.cpp | 15 |
3 files changed, 21 insertions, 9 deletions
diff --git a/apps/JAWS/PROTOTYPE/JAWS/Data_Block.cpp b/apps/JAWS/PROTOTYPE/JAWS/Data_Block.cpp index 4225659b5c0..47c2c7e3316 100644 --- a/apps/JAWS/PROTOTYPE/JAWS/Data_Block.cpp +++ b/apps/JAWS/PROTOTYPE/JAWS/Data_Block.cpp @@ -38,9 +38,3 @@ JAWS_Data_Block::policy (JAWS_Dispatch_Policy *policyp) { this->policy_ = policyp; } - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class JAWS_Pipeline_Abstract_Handler<JAWS_Data_Block>; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate JAWS_Pipeline_Abstract_Handler<JAWS_Data_Block> -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/apps/JAWS/PROTOTYPE/JAWS/Pipeline_Tasks.cpp b/apps/JAWS/PROTOTYPE/JAWS/Pipeline_Tasks.cpp index 4ef4a2e8118..e3d1fc85bfc 100644 --- a/apps/JAWS/PROTOTYPE/JAWS/Pipeline_Tasks.cpp +++ b/apps/JAWS/PROTOTYPE/JAWS/Pipeline_Tasks.cpp @@ -28,17 +28,20 @@ JAWS_Pipeline_Accept_Task::handle_put (JAWS_Data_Block *data, { case JAWS_IO_Handler::ACCEPT_OK: result = 0; + ACE_TRACE ("JAWS_Pipeline_Accept_Task::handle_put ACCEPT_OK"); // At this point need to move to the next task in the pipeline! - // The framework will automatically call the next stage. + // The framework should automatically call the next stage. break; case JAWS_IO_Handler::ACCEPT_ERROR: result = -1; + ACE_TRACE ("JAWS_Pipeline_Accept_Task::handle_put ACCEPT_ERROR"); // Should recycle the thread break; default: result = -1; + ACE_TRACE ("JAWS_Pipeline_Accept_Task::handle_put ACCEPT_IDLE"); // Should mean that the IO is asynchronous, and the word isn't out - // yet + // yet. break; } @@ -52,7 +55,9 @@ JAWS_Pipeline_Accept_Task::handle_put (JAWS_Data_Block *data, } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class JAWS_Pipeline_Abstract_Handler<JAWS_Data_Block>; template class ACE_Singleton<JAWS_Pipeline_Accept_Task, ACE_SYNCH_MUTEX>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate JAWS_Pipeline_Abstract_Handler<JAWS_Data_Block> #pragma instantiate ACE_Singleton<JAWS_Pipeline_Accept_Task, ACE_SYNCH_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/apps/JAWS/PROTOTYPE/JAWS/Server.cpp b/apps/JAWS/PROTOTYPE/JAWS/Server.cpp index eb19f75c607..0ccd7f3a3c2 100644 --- a/apps/JAWS/PROTOTYPE/JAWS/Server.cpp +++ b/apps/JAWS/PROTOTYPE/JAWS/Server.cpp @@ -2,6 +2,10 @@ #include "ace/Get_Opt.h" +#if (ACE_NTRACE != 1) +#include "ace/Trace.h" +#endif /* (ACE_NTRACE != 1) */ + #include "JAWS/Server.h" #include "JAWS/Data_Block.h" #include "JAWS/Concurrency.h" @@ -107,6 +111,7 @@ JAWS_Server::open (JAWS_Pipeline_Handler *protocol, db->io_handler (handler); db->task (JAWS_Pipeline_Accept_Task_Singleton::instance ()); + db->policy (policy); // The message block should contain an INET_Addr, and call the // io->accept (INET_Addr) method! @@ -125,11 +130,15 @@ void JAWS_Server::parse_args (int argc, char *argv[]) { int c; + int t = 1; - ACE_Get_Opt getopt (argc, argv, "p:c:d:n:m:f:"); + ACE_Get_Opt getopt (argc, argv, "t" "p:c:d:n:m:f:"); while ((c = getopt ()) != -1) switch (c) { + case 't': + t = !t; + break; case 'p': this->port_ = ACE_OS::atoi (getopt.optarg); break; @@ -159,6 +168,10 @@ JAWS_Server::parse_args (int argc, char *argv[]) break; } +#if (ACE_NTRACE != 1) + t ? ACE_Trace::start_tracing () : ACE_Trace::stop_tracing (); +#endif /* (ACE_NTRACE != 1) */ + if (this->port_ == 0) this->port_ = 5432; if (this->nthreads_ == 0) this->nthreads_ = 5; if (this->maxthreads_ == 0) this->maxthreads_ = 20; |