diff options
author | Chris Cleeland <chris.cleeland@gmail.com> | 1997-09-28 22:09:57 +0000 |
---|---|---|
committer | Chris Cleeland <chris.cleeland@gmail.com> | 1997-09-28 22:09:57 +0000 |
commit | 9b0828ce05aa48c755009485c716e46a4c64a0ee (patch) | |
tree | 6c396a92d3d4c7d1f6eb61c09bee4b705b7348b6 | |
parent | 3256913465f89cd2d1ce2d0bbb500f169ce91af8 (diff) | |
download | ATCD-9b0828ce05aa48c755009485c716e46a4c64a0ee.tar.gz |
Quick commit so that people can synch up. There are probably problems
lurking still that need to be corrected.
-rw-r--r-- | TAO/ChangeLog-98c | 16 | ||||
-rw-r--r-- | TAO/tao/except.cpp | 29 | ||||
-rw-r--r-- | TAO/tao/orbobj.cpp | 13 | ||||
-rw-r--r-- | TAO/tao/singletons.h | 29 | ||||
-rw-r--r-- | TAO/tests/Cubit/TAO/svc.conf | 3 |
5 files changed, 66 insertions, 24 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index 72fd6d4303b..bc0176a93e4 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,3 +1,19 @@ +Sun Sep 28 17:01:27 1997 Chris Cleeland <cleeland@cs.wustl.edu> + + * tests/multiCubit: Added a multi-threaded version of Cubit. + + * tao/orbobj.cpp: At long last, Andy has his wish for not having + to provide a "-ORBhost <me>" argument to a server. It now uses + ACE_OS::hostname() to determine the canonical hostname, and + listens on that address. + + * tao/singletons.h: Changed the ORB Core singleton to be a TSS + singleton; this will eventually be conditionally compiled in + (before release). Also added comments and "safety defines". + + * tao/except.cpp: Changed some usage of fputs() in + print_exception() to use ACE_DEBUG. + Sun Sep 28 03:18:24 1997 Nanbor Wang <nw1@cumbia.cs.wustl.edu> * tests/Cubit/TAO/cubitC.h (Object): Changed references of base diff --git a/TAO/tao/except.cpp b/TAO/tao/except.cpp index dc0351fdf5b..65dd84d514b 100644 --- a/TAO/tao/except.cpp +++ b/TAO/tao/except.cpp @@ -433,7 +433,7 @@ print_exception (const CORBA::Exception *x, { CORBA::String id = x->id (); - ACE_DEBUG ((LM_ERROR, "EXCEPTION, %s\n", info)); + ACE_DEBUG ((LM_ERROR, "(%P|%t) EXCEPTION, %s\n", info)); // XXX get rid of this logic, and rely on some member function // on Exception to say if it's user or system exception. @@ -450,29 +450,16 @@ print_exception (const CORBA::Exception *x, // (yeech) or (preferably) to represent the exception type // directly in the exception value so it can be queried. - ACE_DEBUG ((LM_ERROR, "ACE_OS::system exception, ID '%s'\n", id)); - ACE_DEBUG ((LM_ERROR, "minor code = %#lx, completed = ", x2->minor ())); - - switch (x2->completion ()) - { - case CORBA::COMPLETED_YES: - fputs ("YES", stream); - break; - case CORBA::COMPLETED_NO: - fputs ("NO", stream); - break; - case CORBA::COMPLETED_MAYBE: - fputs ("MAYBE", stream); - break; - default: - fputs ("**garbage**", stream); - break; - } - fputc ('\n', stream); + ACE_DEBUG ((LM_ERROR, "(%P|%t) system exception, ID '%s'\n", id)); + ACE_DEBUG ((LM_ERROR, "(%P|%t) minor code = %#lx, completed = %s", x2->minor (), + (x2->completion () == CORBA::COMPLETED_YES) ? "YES" : + (x2->completion () == CORBA::COMPLETED_NO) ? "NO" : + (x2->completion () == CORBA::COMPLETED_MAYBE) ? "MAYBE" : + "garbage")); } else // XXX we can use the exception's typecode to dump all the data // held within it ... - ACE_DEBUG ((LM_ERROR, "user exception, ID '%s'\n", id)); + ACE_DEBUG ((LM_ERROR, "(%P|%t) user exception, ID '%s'\n", id)); } diff --git a/TAO/tao/orbobj.cpp b/TAO/tao/orbobj.cpp index 4836f160fa6..ef4dd556116 100644 --- a/TAO/tao/orbobj.cpp +++ b/TAO/tao/orbobj.cpp @@ -299,10 +299,21 @@ CORBA::ORB_init (int &argc, #endif /* DEBUG */ ACE_INET_Addr rendezvous; + char hbuf[128]; // create a INET_Addr + if (ACE_OS::strlen (host) == 0) + { + // hostname not provided, so use the default + if (ACE_OS::hostname (hbuf, sizeof(hbuf)-1) == -1) + ACE_DEBUG ((LM_ERROR, "(%P|%t) %p, unable to obtain host name\n")); + + host = &hbuf[0]; + } + + // The conditional catches errors in hbuf if (ACE_OS::strlen (host) > 0) rendezvous.set (port, host); - else + else rendezvous.set (port); // On Win32, we should be collecting information from the Registry diff --git a/TAO/tao/singletons.h b/TAO/tao/singletons.h index a3d69a3fdd0..75c30140b83 100644 --- a/TAO/tao/singletons.h +++ b/TAO/tao/singletons.h @@ -1,3 +1,27 @@ +// This may look like C, but it's really -*- C++ -*- + +// ============================================================================ +// +// = LIBRARY +// TAO +// +// = FILENAME +// singletons.h +// +// = DESCRIPTION +// Type declarations for singletons used in TAO. +// +// = AUTHOR +// Chris Cleeland, WU DOC +// +// = COPYRIGHT +// Copyright 1997 +// +// ============================================================================ + +#if !defined (TAO_SINGLETONS_H) +# define TAO_SINGLETONS_H + typedef ACE_Singleton<TAO_Marshal_Factory, ACE_SYNCH_MUTEX> TAO_MARSHAL_FACTORY; typedef ACE_Singleton<TAO_Marshal_Primitive, ACE_SYNCH_MUTEX> TAO_MARSHAL_PRIMITIVE; typedef ACE_Singleton<TAO_Marshal_Any, ACE_SYNCH_MUTEX> TAO_MARSHAL_ANY; @@ -12,6 +36,9 @@ typedef ACE_Singleton<TAO_Marshal_Array, ACE_SYNCH_MUTEX> TAO_MARSHAL_ARRAY; typedef ACE_Singleton<TAO_Marshal_Alias, ACE_SYNCH_MUTEX> TAO_MARSHAL_ALIAS; typedef ACE_Singleton<TAO_Marshal_Except, ACE_SYNCH_MUTEX> TAO_MARSHAL_EXCEPT; typedef ACE_Singleton<TAO_Marshal_WString, ACE_SYNCH_MUTEX> TAO_MARSHAL_WSTRING; -typedef ACE_Singleton<TAO_ORB_Core, ACE_SYNCH_MUTEX> TAO_ORB_CORE; +// Seems like we should also provide the option for having this be +// just an ACE_Singleton<> +typedef ACE_TSS_Singleton<TAO_ORB_Core, ACE_SYNCH_MUTEX> TAO_ORB_CORE; +#endif /* TAO_SINGLETONS_H */ diff --git a/TAO/tests/Cubit/TAO/svc.conf b/TAO/tests/Cubit/TAO/svc.conf index f59ddd6a087..dca260e8a9d 100644 --- a/TAO/tests/Cubit/TAO/svc.conf +++ b/TAO/tests/Cubit/TAO/svc.conf @@ -36,4 +36,5 @@ # specified the size of the object table # dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory() "" -dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-T -L dynamic -o 128" +dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-R -L dynamic -o 128" + |