summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Mesnier <mesnier_p@ociweb.com>2013-04-10 21:25:16 +0000
committerPhil Mesnier <mesnier_p@ociweb.com>2013-04-10 21:25:16 +0000
commitc4610fb16827cb4395cedfcf9ce57a081dfd71c6 (patch)
tree1b82cb17059d7dd58eba8b7b2e242828b4f29cdc
parent32590e2d6fc26204e2d88e6393095e4097e62fcc (diff)
downloadATCD-c4610fb16827cb4395cedfcf9ce57a081dfd71c6.tar.gz
Wed Apr 10 21:09:01 UTC 2013 Phil Mesnier <mesnier_p@ociweb.com>
-rw-r--r--TAO/ChangeLog207
-rw-r--r--TAO/ChangeLog_Asynch_ImR202
-rw-r--r--TAO/MPC/config/tao_versioning_idl_defaults.mpb1
-rw-r--r--TAO/NEWS6
-rw-r--r--TAO/PROBLEM-REPORT-FORM4
-rw-r--r--TAO/TAO_IDL/be/be_codegen.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_global.cpp40
-rw-r--r--TAO/TAO_IDL/be/be_util.cpp12
-rw-r--r--TAO/TAO_IDL/be_include/be_global.h13
-rw-r--r--TAO/TAO_IDL/util/utl_err.cpp16
-rw-r--r--TAO/VERSION2
-rw-r--r--TAO/bin/tao_other_tests.lst1
-rw-r--r--TAO/docs/Options.html2
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/Locator_Options.cpp28
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/Locator_Repository.cpp68
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/Locator_Repository.h3
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/README10
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp95
-rw-r--r--TAO/orbsvcs/orbsvcs/CosEvent/CEC_EventChannel.h3
-rw-r--r--TAO/orbsvcs/orbsvcs/CosEvent/CEC_TypedEventChannel.h3
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp4
-rw-r--r--TAO/orbsvcs/tests/FT_Naming/FaultTolerant/client.cpp41
-rwxr-xr-xTAO/orbsvcs/tests/FT_Naming/FaultTolerant/run_backup_restart_test.pl3
-rwxr-xr-xTAO/orbsvcs/tests/FT_Naming/FaultTolerant/run_persistence_test.pl12
-rw-r--r--TAO/orbsvcs/tests/FT_Naming/FaultTolerant/server.cpp10
-rwxr-xr-xTAO/orbsvcs/tests/FT_Naming/Replication/run_test.pl18
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/RestartServer/MessengerClient.cpp12
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/RestartServer/RestartServer.mpc2
-rwxr-xr-xTAO/orbsvcs/tests/ImplRepo/RestartServer/run_test.pl11
-rwxr-xr-xTAO/orbsvcs/tests/ImplRepo/run_test.pl301
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/scale_clients/scale_clients.mpc2
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/servers_list/servers_list.mpc2
-rw-r--r--TAO/performance-tests/POA/Object_Creation_And_Registration/registration.cpp3
-rw-r--r--TAO/tao/ImR_Client/ImR_Client.cpp2
-rw-r--r--TAO/tao/PortableServer/Key_Adapters.cpp5
-rw-r--r--TAO/tao/TransportCurrent/IIOP_Current_Impl.cpp3
-rw-r--r--TAO/tao/Version.h4
-rw-r--r--TAO/tests/Bug_4097_Regression/Bug_4097_Regression.cpp161
-rw-r--r--TAO/tests/Dynamic_TP/POA_Loader/Dynamic_TP_POA_Test_Dynamic/client.cpp38
-rw-r--r--TAO/tests/Dynamic_TP/POA_Loader/Dynamic_TP_POA_Test_Static/client.cpp38
-rw-r--r--TAO/tests/File_IO/File_i.cpp5
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/client.cpp3
-rw-r--r--TAO/tests/POA/Default_Servant2/File_i.cpp5
43 files changed, 1189 insertions, 219 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 0698d7a58cb..3c10f5b5edc 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,210 @@
+Thu Apr 4 13:35:46 UTC 2013 Byron Harris <harrisb@ociweb.com>
+
+ * orbsvcs/tests/FT_Naming/FaultTolerant/client.cpp:
+
+ Avoid output containing "EXCEPTION" that triggers
+ test as a failure while allowing for retries in
+ the presence of exceptions due to timing issues.
+
+Wed Apr 3 16:40:46 UTC 2013 Byron Harris <harrisb@ociweb.com>
+
+ * orbsvcs/tests/FT_Naming/FaultTolerant/client.cpp:
+
+ Add additional error checking/output in
+ do_persistence_objectgroup_test() to help diagnose test
+ failure seen on a few platforms.
+
+ * orbsvcs/tests/FT_Naming/FaultTolerant/server.cpp:
+
+ Write a status file to indicate server is running.
+
+ * orbsvcs/tests/FT_Naming/FaultTolerant/run_persistence_test.pl:
+
+ Use server's status file to check that server is running
+ since group member IOR files are written after server's IOR
+ is written.
+
+Sat Mar 30 18:12:28 UTC 2013 Martin Corino <mcorino@remedy.nl>
+
+ * tests/File_IO/File_i.cpp:
+ * tests/POA/Default_Servant2/File_i.cpp:
+ Fixed int-to-pointer cast warnings.
+
+Sat Mar 30 09:39:40 UTC 2013 Martin Corino <mcorino@remedy.nl>
+
+ * orbsvcs/orbsvcs/CosEvent/CEC_EventChannel.h:
+ * orbsvcs/orbsvcs/CosEvent/CEC_TypedEventChannel.h:
+ * orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp:
+ * performance-tests/POA/Object_Creation_And_Registration/registration.cpp:
+ * tao/PortableServer/Key_Adapters.cpp:
+ * tao/TransportCurrent/IIOP_Current_Impl.cpp:
+ * tests/File_IO/File_i.cpp:
+ * tests/NestedUpcall/MT_Client_Test/client.cpp:
+ * tests/POA/Default_Servant2/File_i.cpp:
+ Added MinGW64 compilers support.
+ All kinds of minor updates and corrections to silence
+ warnings and errors relating to either 64bit Windows or
+ the very latest GCC (4.8.0). Mostly precision loss and
+ truncating casts.
+
+Fri Mar 29 13:11:10 UTC 2013 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * MPC/config/tao_versioning_idl_defaults.mpb:
+ Zapped empty line
+
+ * TAO_IDL/be/be_codegen.cpp:
+ * TAO_IDL/be/be_global.cpp:
+ * TAO_IDL/be/be_util.cpp:
+ * TAO_IDL/be_include/be_global.h:
+ Added versioning_include to specify a different versioned
+ header include and resolved some problems when trying to
+ use versioned namespaces also for the application code
+
+Fri Mar 29 12:26:13 UTC 2013 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * TAO_IDL/util/utl_err.cpp:
+ Fixed crash when feeding tao_idl illegal IDL
+
+Thu Mar 28 15:25:46 UTC 2013 Byron Harris <harrisb@ociweb.com>
+
+ * bin/tao_other_tests.lst:
+
+ Added servers_interact_on_startup test but disabled from
+ test statistics for now as it exposes a problem with the
+ ImR currently being addressed.
+
+ * orbsvcs/tests/ImplRepo/servers_interact_on_startup/Test_i.cpp:
+
+ Fixed missing protocol seen on certain compilers.
+
+ * orbsvcs/tests/ImplRepo/servers_interact_on_startup/client.cpp:
+ * orbsvcs/tests/ImplRepo/servers_interact_on_startup/server.cpp:
+
+ Fixed to build with wide characters enabled.
+
+ * orbsvcs/tests/ImplRepo/servers_interact_on_startup/run_test.pl:
+
+ Made server reply delay long enough to reveal problem under Linux.
+
+Wed Mar 27 13:11:36 UTC 2013 Byron Harris <harrisb@ociweb.com>
+
+ * orbsvcs/tests/ImplRepo/servers_interact_on_startup:
+ * orbsvcs/tests/ImplRepo/servers_interact_on_startup/README:
+ * orbsvcs/tests/ImplRepo/servers_interact_on_startup/Test.idl:
+ * orbsvcs/tests/ImplRepo/servers_interact_on_startup/Test_i.h:
+ * orbsvcs/tests/ImplRepo/servers_interact_on_startup/Test_i.cpp:
+ * orbsvcs/tests/ImplRepo/servers_interact_on_startup/client.cpp:
+ * orbsvcs/tests/ImplRepo/servers_interact_on_startup/run_test.pl:
+ * orbsvcs/tests/ImplRepo/servers_interact_on_startup/server.cpp:
+ * orbsvcs/tests/ImplRepo/servers_interact_on_startup/servers_interact_on_startup.mpc:
+
+ Added test for ImR pinging of ill-behaved, interacting servers.
+
+Thu Mar 14 20:21:19 UTC 2013 Byron Harris <harrisb@ociweb.com>
+
+ * orbsvcs/tests/ImplRepo/RestartServer/MessengerClient.cpp:
+ * orbsvcs/tests/ImplRepo/RestartServer/run_test.pl:
+
+ If valgrind is being ran, adjust delay parameters to
+ account for valgrind slowing processes down.
+
+Thu Mar 14 15:54:03 UTC 2013 Kevin Stanley <stanleyk@ociweb.com>
+
+ * orbsvcs/tests/ImplRepo/run_test.pl:
+ * bin/tao_other_tests.lst:
+
+ Added test for backup_restart feature for ImR.
+
+ * orbsvcs/ImplRepo_Service/Locator_Repository.h:
+ * orbsvcs/ImplRepo_Service/Locator_Repository.cpp:
+
+ Added method to support recovering the ior from the combined ior
+ file when restarting the backup.
+
+ * orbsvcs/ImplRepo_Service/README:
+
+ Updated documentation to indicate that backup can now be started
+ without the primary running when a restart is occuring.
+
+ * orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp:
+
+ Implemented feature for restarting backup after a replicated pair
+ has been successfully started in the past.
+
+ * orbsvcs/tests/FT_Naming/FaultTolerant/run_backup_restart_test.pl:
+
+ Added test for restart of FT_Naming_Server backup after the FT
+ pair has successfully started in the past.
+
+ * tao/ImR_Client/ImR_Client.cpp:
+
+ Fixed memory leak. Clean up list_buffer_ array in destructor.
+
+Thu Mar 14 08:39:00 UTC 2013 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * NEWS:
+ Updated for next release
+
+Thu Mar 14 09:04:46 CET 2013 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * TAO version 2.1.8 released.
+
+Mon Mar 11 19:25:19 UTC 2013 Byron Harris <harrisb@ociweb.com>
+
+ * orbsvcs/ImplRepo_Service/Locator_Options.cpp:
+
+ Generate error if more than one persistence mechanism
+ type is specifed. Generate error if --primary or --backup
+ is based and --directory is not.
+
+Mon Mar 11 16:23:46 UTC 2013 Byron Harris <harrisb@ociweb.com>
+
+ * orbsvcs/tests/ImplRepo/RestartServer/RestartServer.mpc:
+ * orbsvcs/tests/ImplRepo/scale_clients/scale_clients.mpc:
+ * orbsvcs/tests/ImplRepo/servers_list/servers_list.mpc:
+
+ For server project add imr_client to base projects
+ to support resolving ImR client code for static builds.
+
+Mon Mar 11 14:51:28 UTC 2013 Byron Harris <harrisb@ociweb.com>
+
+ * orbsvcs/tests/FT_Naming/Replication/run_test.pl:
+
+ Added to wait time for spawn of client as it may
+ take longer than 15 seconds to run on some systems
+ such as a SPARC T1000.
+
+ Removed duplicate function definition causing prototype
+ mismatch warning from perl.
+
+Mon Mar 11 13:33:14 UTC 2013 Kevin Stanley <stanleyk@ociweb.com>
+
+ * orbsvcs/tests/FT_Naming/FaultTolerant/client.cpp:
+
+ Added sleep in test after first failure to allow time for the
+ replication to happen between redundant servers.
+
+Mon Mar 11 13:17:41 UTC 2013 Byron Harris <harrisb@ociweb.com>
+
+ * NEWS:
+ * docs/Options.html:
+ * orbsvcs/tests/ImplRepo/RestartServer/MessengerClient.cpp:
+
+ Added AIX to systems not supporting -ORBForwardOnReplyClosedLimit.
+
+Mon Mar 11 09:42:00 UTC 2013 Simon Massey <simon dot massey at prismtech dot com>
+
+ * tests/Bug_4097_Regression/Bug_4097_Regression.cpp:
+
+ Missing main try/catch coverity fix.
+
+Sun Mar 10 05:19:06 UTC 2013 Phil Mesnier <mesnier_p@ociweb.com>
+
+ * tests/Dynamic_TP/POA_Loader/Dynamic_TP_POA_Test_Dynamic/client.cpp:
+ * tests/Dynamic_TP/POA_Loader/Dynamic_TP_POA_Test_Static/client.cpp:
+
+ Fix wchar compatibility.
+
Sat Mar 9 19:08:55 UTC 2013 Phil Mesnier <mesnier_p@ociweb.com>
* tests/Dynamic_TP/POA_Loader/Dynamic_TP_POA_Test_Dynamic/run_test.pl:
diff --git a/TAO/ChangeLog_Asynch_ImR b/TAO/ChangeLog_Asynch_ImR
index 7f54c39bb62..a27934dc892 100644
--- a/TAO/ChangeLog_Asynch_ImR
+++ b/TAO/ChangeLog_Asynch_ImR
@@ -1,3 +1,205 @@
+Wed Apr 10 21:09:01 UTC 2013 Phil Mesnier <mesnier_p@ociweb.com>
+
+ * ChangeLog:
+
+ * MPC/config/tao_versioning_idl_defaults.mpb:
+
+ * NEWS:
+ * PROBLEM-REPORT-FORM:
+ * TAO_IDL:
+
+ * TAO_IDL/be/be_codegen.cpp:
+ * TAO_IDL/be/be_global.cpp:
+ * TAO_IDL/be/be_util.cpp:
+
+ * TAO_IDL/be_include/be_global.h:
+
+ * TAO_IDL/util/utl_err.cpp:
+
+ * VERSION:
+
+ * bin/tao_other_tests.lst:
+
+ * docs/Options.html:
+
+ * orbsvcs/IFR_Service:
+
+ * orbsvcs/ImplRepo_Service/Locator_Options.cpp:
+ * orbsvcs/ImplRepo_Service/Locator_Repository.h:
+ * orbsvcs/ImplRepo_Service/Locator_Repository.cpp:
+ * orbsvcs/ImplRepo_Service/README:
+ * orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp:
+
+ * orbsvcs/orbsvcs/CosEvent/CEC_EventChannel.h:
+ * orbsvcs/orbsvcs/CosEvent/CEC_TypedEventChannel.h:
+
+ * orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp:
+
+ * orbsvcs/tests/Bug_3673_Regression:
+
+ * orbsvcs/tests/Bug_3673_Regression/Bug_3673_Regression.mpc:
+ * orbsvcs/tests/Bug_3673_Regression/Hello.h:
+ * orbsvcs/tests/Bug_3673_Regression/Hello.cpp:
+ * orbsvcs/tests/Bug_3673_Regression/NamingTask.h:
+ * orbsvcs/tests/Bug_3673_Regression/NamingTask.cpp:
+ * orbsvcs/tests/Bug_3673_Regression/NsShutdown.h:
+ * orbsvcs/tests/Bug_3673_Regression/NsShutdown.cpp:
+ * orbsvcs/tests/Bug_3673_Regression/Test.idl:
+ * orbsvcs/tests/Bug_3673_Regression/client.cpp:
+ * orbsvcs/tests/Bug_3673_Regression/nsmain.cpp:
+ * orbsvcs/tests/Bug_3673_Regression/run_test.pl:
+ * orbsvcs/tests/Bug_3673_Regression/server.cpp:
+
+ * orbsvcs/tests/FT_Naming/FaultTolerant/client.cpp:
+ * orbsvcs/tests/FT_Naming/FaultTolerant/run_backup_restart_test.pl:
+ * orbsvcs/tests/FT_Naming/FaultTolerant/run_persistence_test.pl:
+ * orbsvcs/tests/FT_Naming/FaultTolerant/server.cpp:
+
+ * orbsvcs/tests/FT_Naming/Replication/run_test.pl:
+
+ * orbsvcs/tests/ImplRepo/RestartServer/MessengerClient.cpp:
+ * orbsvcs/tests/ImplRepo/RestartServer/RestartServer.mpc:
+ * orbsvcs/tests/ImplRepo/RestartServer/run_test.pl:
+
+ * orbsvcs/tests/ImplRepo/run_test.pl:
+
+ * orbsvcs/tests/ImplRepo/scale_clients/scale_clients.mpc:
+
+ * orbsvcs/tests/ImplRepo/servers_list/servers_list.mpc:
+
+ * orbsvcs/tests/Notify/Bug_3646a_Regression:
+
+ * orbsvcs/tests/Notify/Bug_3646a_Regression/Bug_3646a_Regression.mpc:
+ * orbsvcs/tests/Notify/Bug_3646a_Regression/Consumer.cpp:
+ * orbsvcs/tests/Notify/Bug_3646a_Regression/run_test.pl:
+
+ * orbsvcs/tests/Notify/Bug_3646b_Regression:
+
+ * orbsvcs/tests/Notify/Bug_3646b_Regression/Bug_3646b_Regression.mpc:
+ * orbsvcs/tests/Notify/Bug_3646b_Regression/DllORB.h:
+ * orbsvcs/tests/Notify/Bug_3646b_Regression/DllORB.cpp:
+ * orbsvcs/tests/Notify/Bug_3646b_Regression/bug3646b_export.h:
+ * orbsvcs/tests/Notify/Bug_3646b_Regression/run_test.pl:
+ * orbsvcs/tests/Notify/Bug_3646b_Regression/server.cpp:
+
+ * orbsvcs/tests/Notify/Bug_3646c_Regression:
+
+ * orbsvcs/tests/Notify/Bug_3646c_Regression/Bug_3646c_Regression.mpc:
+ * orbsvcs/tests/Notify/Bug_3646c_Regression/Consumer.cpp:
+ * orbsvcs/tests/Notify/Bug_3646c_Regression/DllORB.h:
+ * orbsvcs/tests/Notify/Bug_3646c_Regression/DllORB.cpp:
+ * orbsvcs/tests/Notify/Bug_3646c_Regression/bug3646c_export.h:
+ * orbsvcs/tests/Notify/Bug_3646c_Regression/run_test.pl:
+ * orbsvcs/tests/Notify/Bug_3646c_Regression/server.cpp:
+
+ * orbsvcs/tests/Notify/Bug_3646d_Regression:
+
+ * orbsvcs/tests/Notify/Bug_3646d_Regression/Bug_3646d_Regression.mpc:
+ * orbsvcs/tests/Notify/Bug_3646d_Regression/DllORB.h:
+ * orbsvcs/tests/Notify/Bug_3646d_Regression/DllORB.cpp:
+ * orbsvcs/tests/Notify/Bug_3646d_Regression/bug3646d_export.h:
+ * orbsvcs/tests/Notify/Bug_3646d_Regression/run_test.pl:
+ * orbsvcs/tests/Notify/Bug_3646d_Regression/server.cpp:
+
+ * orbsvcs/tests/Notify/Bug_3663_Regression:
+
+ * orbsvcs/tests/Notify/Bug_3663_Regression/Bug_3663_Regression.mpc:
+ * orbsvcs/tests/Notify/Bug_3663_Regression/DllORB.h:
+ * orbsvcs/tests/Notify/Bug_3663_Regression/DllORB.cpp:
+ * orbsvcs/tests/Notify/Bug_3663_Regression/bug3663_export.h:
+ * orbsvcs/tests/Notify/Bug_3663_Regression/run_test.pl:
+ * orbsvcs/tests/Notify/Bug_3663_Regression/server.cpp:
+
+ * orbsvcs/tests/Notify/Bug_3688b_Regression:
+
+ * orbsvcs/tests/Notify/Bug_3688b_Regression/Bug_3688b.mpc:
+ * orbsvcs/tests/Notify/Bug_3688b_Regression/DllORB.h:
+ * orbsvcs/tests/Notify/Bug_3688b_Regression/DllORB.cpp:
+ * orbsvcs/tests/Notify/Bug_3688b_Regression/TestBroadcaster.h:
+ * orbsvcs/tests/Notify/Bug_3688b_Regression/TestBroadcaster.cpp:
+ * orbsvcs/tests/Notify/Bug_3688b_Regression/TestListener.h:
+ * orbsvcs/tests/Notify/Bug_3688b_Regression/TestListener.cpp:
+ * orbsvcs/tests/Notify/Bug_3688b_Regression/bug3688_export.h:
+ * orbsvcs/tests/Notify/Bug_3688b_Regression/run_test.pl:
+ * orbsvcs/tests/Notify/Bug_3688b_Regression/server.cpp:
+
+ * performance-tests/POA/Object_Creation_And_Registration/registration.cpp:
+
+ * tao/ImR_Client/ImR_Client.cpp:
+
+ * tao/PortableServer/Key_Adapters.cpp:
+
+ * tao/TransportCurrent/IIOP_Current_Impl.cpp:
+
+ * tao/Version.h:
+
+ * tests/Bug_3630_Regression:
+
+ * tests/Bug_3630_Regression/Bug_3630_Regression.mpc:
+ * tests/Bug_3630_Regression/TAO Conf File.conf:
+ * tests/Bug_3630_Regression/TAO_Conf_File.conf:
+ * tests/Bug_3630_Regression/run_test.pl:
+ * tests/Bug_3630_Regression/server.cpp:
+
+ * tests/Bug_3647_Regression/Backend_Impl.h:
+ * tests/Bug_3647_Regression/Middle_Impl.h:
+
+ * tests/Bug_3672_Regression:
+
+ * tests/Bug_3672_Regression/Bug_3672_Regression.mpc:
+ * tests/Bug_3672_Regression/ami_test.idl:
+ * tests/Bug_3672_Regression/ami_test_i.h:
+ * tests/Bug_3672_Regression/ami_test_i.cpp:
+ * tests/Bug_3672_Regression/client.cpp:
+ * tests/Bug_3672_Regression/run_test.pl:
+ * tests/Bug_3672_Regression/server.cpp:
+
+ * tests/Bug_3683_Regression:
+
+ * tests/Bug_3683_Regression/Bug_3683_Regression.mpc:
+ * tests/Bug_3683_Regression/Echo.idl:
+ * tests/Bug_3683_Regression/Echo_Client_i.h:
+ * tests/Bug_3683_Regression/Echo_Client_i.cpp:
+ * tests/Bug_3683_Regression/Echo_i.h:
+ * tests/Bug_3683_Regression/Echo_i.cpp:
+ * tests/Bug_3683_Regression/Simple_util.h:
+ * tests/Bug_3683_Regression/Simple_util.cpp:
+ * tests/Bug_3683_Regression/client.cpp:
+ * tests/Bug_3683_Regression/run_test.pl:
+ * tests/Bug_3683_Regression/server.cpp:
+ * tests/Bug_3683_Regression/svc.conf:
+
+ * tests/Bug_3701_Regression:
+
+ * tests/Bug_3701_Regression/Bug_3701_Regression.mpc:
+ * tests/Bug_3701_Regression/client.cpp:
+ * tests/Bug_3701_Regression/run_test.pl:
+
+ * tests/Bug_4097_Regression/Bug_4097_Regression.cpp:
+
+ * tests/Dynamic_TP/POA_Loader/Dynamic_TP_POA_Test_Dynamic/client.cpp:
+
+ * tests/Dynamic_TP/POA_Loader/Dynamic_TP_POA_Test_Static/client.cpp:
+
+ * tests/File_IO/File_i.cpp:
+
+ * tests/NestedUpcall/MT_Client_Test/client.cpp:
+
+ * tests/POA/Default_Servant2/File_i.cpp:
+
+ * tests/RTCORBA/Bug_3643_Regression:
+
+ * tests/RTCORBA/Bug_3643_Regression/Bug_3643_Regression.mpc:
+ * tests/RTCORBA/Bug_3643_Regression/client.cpp:
+ * tests/RTCORBA/Bug_3643_Regression/run_test.pl:
+ * tests/RTCORBA/Bug_3643_Regression/server.cpp:
+ * tests/RTCORBA/Bug_3643_Regression/svc.conf.dynamic:
+ * tests/RTCORBA/Bug_3643_Regression/test.idl:
+ * tests/RTCORBA/Bug_3643_Regression/test_i.h:
+ * tests/RTCORBA/Bug_3643_Regression/test_i.cpp:
+
+ Merge in from trunk.
+
Wed Apr 10 00:58:56 UTC 2013 Phil Mesnier <mesnier_p@ociweb.com>
* orbsvcs/ImplRepo_Service/LiveCheck.h:
diff --git a/TAO/MPC/config/tao_versioning_idl_defaults.mpb b/TAO/MPC/config/tao_versioning_idl_defaults.mpb
index 23bc1208716..d270fd30b2d 100644
--- a/TAO/MPC/config/tao_versioning_idl_defaults.mpb
+++ b/TAO/MPC/config/tao_versioning_idl_defaults.mpb
@@ -8,5 +8,4 @@
project : taoidldefaults {
idlflags += -Wb,versioning_begin=TAO_BEGIN_VERSIONED_NAMESPACE_DECL \
-Wb,versioning_end=TAO_END_VERSIONED_NAMESPACE_DECL
-
}
diff --git a/TAO/NEWS b/TAO/NEWS
index 0542243864b..c76d3d67c8e 100644
--- a/TAO/NEWS
+++ b/TAO/NEWS
@@ -1,5 +1,9 @@
+USER VISIBLE CHANGES BETWEEN TAO-2.1.8 and TAO-2.2.0
+====================================================
+
USER VISIBLE CHANGES BETWEEN TAO-2.1.7 and TAO-2.1.8
====================================================
+
. Fault Tolerant Implementation Repository [#4091] - The Implementation
Repository Locator now supports a dual-redundant fault tolerant
configuration which provides replication and seamless failover between
@@ -51,7 +55,7 @@ USER VISIBLE CHANGES BETWEEN TAO-2.1.7 and TAO-2.1.8
retry in the presence of COMM_FAILURE, TRANSIENT, OBJECT_NOT_EXIST,
and INV_OBJREF exceptions. In addition, retries can occur if it has
been detected that a connection has closed while waiting for a reply
- (currently not available under FreeBSD, OpenVMS, and Solaris). This
+ (currently not available under FreeBSD, OpenVMS, AIX, and Solaris). This
feature can be used to support fault tolerant services (specifically
the Fault Tolerant Naming and Implementation Repository services
described earlier). The invocation retry support allows
diff --git a/TAO/PROBLEM-REPORT-FORM b/TAO/PROBLEM-REPORT-FORM
index e860e8fc45c..467531cb1fe 100644
--- a/TAO/PROBLEM-REPORT-FORM
+++ b/TAO/PROBLEM-REPORT-FORM
@@ -40,8 +40,8 @@
To: tao-bugs@list.isis.vanderbilt.edu
Subject: [area]: [synopsis]
- TAO VERSION: 2.1.7
- ACE VERSION: 6.1.7
+ TAO VERSION: 2.1.8
+ ACE VERSION: 6.1.8
HOST MACHINE and OPERATING SYSTEM:
If on Windows based OS's, which version of WINSOCK do you
diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp
index 09a88c38009..b6c53922f27 100644
--- a/TAO/TAO_IDL/be/be_codegen.cpp
+++ b/TAO/TAO_IDL/be/be_codegen.cpp
@@ -2657,6 +2657,13 @@ TAO_CodeGen::gen_stub_hdr_includes (void)
"tao/Versioned_Namespace.h",
true);
+ if ((be_global->versioning_include () != 0) && (ACE_OS::strlen (be_global->versioning_include ()) > 0))
+ {
+ this->gen_standard_include (this->client_header_,
+ be_global->versioning_include (),
+ true);
+ }
+
// On some platforms, this include isn't needed if certain command
// line options are present. Rather than try to sort that all out,
// and to keep cross-compiling robust, we always generate this
diff --git a/TAO/TAO_IDL/be/be_global.cpp b/TAO/TAO_IDL/be/be_global.cpp
index 2d130d48663..473aae36bc2 100644
--- a/TAO/TAO_IDL/be/be_global.cpp
+++ b/TAO/TAO_IDL/be/be_global.cpp
@@ -62,6 +62,7 @@ BE_GlobalData::BE_GlobalData (void)
core_versioning_end_ ("\nTAO_END_VERSIONED_NAMESPACE_DECL\n"),
versioning_begin_ (),
versioning_end_ (),
+ versioning_include_ (),
client_hdr_ending_ (ACE::strnew ("C.h")),
client_stub_ending_ (ACE::strnew ("C.cpp")),
client_inline_ending_ (ACE::strnew ("C.inl")),
@@ -1110,22 +1111,22 @@ BE_GlobalData::stripped_filename (const char *s)
this->stripped_filename_ = ACE::strnew (s);
}
-void
-BE_GlobalData::versioning_begin (const char * s)
+const char *
+BE_GlobalData::versioning_begin (void) const
{
- this->versioning_begin_ =
- ACE_CString ("\n\n")
- + ACE_CString (s)
- + ACE_CString ("\n\n");
+ return this->versioning_begin_.c_str ();
+}
- this->core_versioning_end_ += this->versioning_begin_;
- // Yes, "begin".
+void
+BE_GlobalData::versioning_include (const char * s)
+{
+ this->versioning_include_ = s;
}
const char *
-BE_GlobalData::versioning_begin (void) const
+BE_GlobalData::versioning_include (void) const
{
- return this->versioning_begin_.c_str ();
+ return this->versioning_include_.c_str ();
}
const char *
@@ -1143,8 +1144,23 @@ BE_GlobalData::versioning_end (const char * s)
+ ACE_CString ("\n\n");
this->core_versioning_begin_ =
- this->versioning_end_ // Yes, "end".
- + this->core_versioning_begin_; // Initialized in constructor.
+ this->versioning_end_ + // Yes, "end".
+ "\nTAO_BEGIN_VERSIONED_NAMESPACE_DECL\n";
+}
+
+void
+BE_GlobalData::versioning_begin (const char * s)
+{
+ this->versioning_begin_ =
+ ACE_CString ("\n\n")
+ + ACE_CString (s)
+ + ACE_CString ("\n\n");
+
+ this->core_versioning_end_ =
+ "\nTAO_END_VERSIONED_NAMESPACE_DECL\n"
+ + this->versioning_begin_; // Yes, "begin".
+
+ // Yes, "begin".
}
const char *
diff --git a/TAO/TAO_IDL/be/be_util.cpp b/TAO/TAO_IDL/be/be_util.cpp
index d55869c785d..b7d808aa071 100644
--- a/TAO/TAO_IDL/be/be_util.cpp
+++ b/TAO/TAO_IDL/be/be_util.cpp
@@ -147,6 +147,7 @@ be_util::prep_be_arg (char *s)
static const char arg_post_include[] = "post_include=";
static const char arg_versioning_begin[] = "versioning_begin=";
static const char arg_versioning_end[] = "versioning_end=";
+ static const char arg_versioning_include[] = "versioning_include=";
static const char obv_opt_accessor[] = "obv_opt_accessor";
static const char ciao_container_type[] = "ciao_container_type=";
static const char include_guard[] = "include_guard=";
@@ -299,6 +300,12 @@ be_util::prep_be_arg (char *s)
arg + sizeof (arg_versioning_end) - 1;
be_global->versioning_end (val);
}
+ else if (ACE_OS::strstr (arg, arg_versioning_include) == arg)
+ {
+ char const * const val =
+ arg + sizeof (arg_versioning_include) - 1;
+ be_global->versioning_include (val);
+ }
else if (ACE_OS::strstr (arg, dds_impl) == arg)
{
char const * const val =
@@ -524,6 +531,11 @@ be_util::usage (void)
ACE_TEXT (" -Wb,versioning_end\t\t\tSet text that closes a ")
ACE_TEXT ("a \"versioned\" namespace\n")
));
+ ACE_DEBUG ((
+ LM_DEBUG,
+ ACE_TEXT (" -Wb,versioning_include\t\t\tSet text that will be used as include for ")
+ ACE_TEXT ("a \"versioned\" namespace\n")
+ ));
#endif /* ACE_HAS_VERSIONED_NAMESPACE || TAO_HAS_VERSIONED_NAMESPACE */
ACE_DEBUG ((
LM_DEBUG,
diff --git a/TAO/TAO_IDL/be_include/be_global.h b/TAO/TAO_IDL/be_include/be_global.h
index 560281e9ab0..919d04a6ffb 100644
--- a/TAO/TAO_IDL/be_include/be_global.h
+++ b/TAO/TAO_IDL/be_include/be_global.h
@@ -417,6 +417,12 @@ public:
/// Get text that opens a "versioned" namespace.
const char * versioning_begin (void) const;
+ /// Set include file for "versioned" namespace.
+ void versioning_include (const char* s);
+
+ /// Get include file for "versioned" namespace.
+ const char * versioning_include (void) const;
+
/// Get text that opens a "versioned" namespace for core TAO/orbsvcs
/// related code.
const char * core_versioning_begin (void) const;
@@ -963,12 +969,15 @@ private:
/// orbsvcs related code.
ACE_CString core_versioning_end_;
- /// Text that opens a "versioned" namepace.
+ /// Text that opens a "versioned" namespace.
ACE_CString versioning_begin_;
- /// Text that closes a "versioned" namepace.
+ /// Text that closes a "versioned" namespace.
ACE_CString versioning_end_;
+ /// Include for versioned namespace include
+ ACE_CString versioning_include_;
+
/// Client's header file name ending. Default is "C.h".
char* client_hdr_ending_;
diff --git a/TAO/TAO_IDL/util/utl_err.cpp b/TAO/TAO_IDL/util/utl_err.cpp
index af17a0c4b3d..477e256faf3 100644
--- a/TAO/TAO_IDL/util/utl_err.cpp
+++ b/TAO/TAO_IDL/util/utl_err.cpp
@@ -935,15 +935,23 @@ void
UTL_Error::inheritance_fwd_error (UTL_ScopedName *n,
AST_Interface *f)
{
- idl_error_header (EIDL_INHERIT_FWD_ERROR,
- f->line (),
- f->file_name ());
+ if (f)
+ {
+ idl_error_header (EIDL_INHERIT_FWD_ERROR,
+ f->line (),
+ f->file_name ());
+ }
+
ACE_ERROR ((LM_ERROR,
"interface "));
n->dump (*ACE_DEFAULT_LOG_STREAM);
ACE_ERROR ((LM_ERROR,
" cannot inherit from forward declared interface "));
- f->local_name ()->dump (*ACE_DEFAULT_LOG_STREAM);
+ if (f)
+ {
+ f->local_name ()->dump (*ACE_DEFAULT_LOG_STREAM);
+ }
+
ACE_ERROR ((LM_ERROR,
"\n"));
idl_global->set_err_count (idl_global->err_count () + 1);
diff --git a/TAO/VERSION b/TAO/VERSION
index 3282654d3d0..187eefd8542 100644
--- a/TAO/VERSION
+++ b/TAO/VERSION
@@ -1,4 +1,4 @@
-This is TAO version 2.1.7, released Thu Dec 27 10:00:49 CET 2012
+This is TAO version 2.1.8, released Thu Mar 14 09:04:46 CET 2013
If you have any problems with or questions about TAO, please send
e-mail to the TAO mailing list (tao-bugs@list.isis.vanderbilt.edu),
diff --git a/TAO/bin/tao_other_tests.lst b/TAO/bin/tao_other_tests.lst
index 4130eb1d009..27c461a294d 100644
--- a/TAO/bin/tao_other_tests.lst
+++ b/TAO/bin/tao_other_tests.lst
@@ -120,6 +120,7 @@ TAO/orbsvcs/tests/ImplRepo/run_test.pl perclient: !MINIMUM !CORBA_E_COMPACT !COR
TAO/orbsvcs/tests/ImplRepo/run_test.pl persistent_ir_hash: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO
TAO/orbsvcs/tests/ImplRepo/run_test.pl persistent_ir_shared: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO !Win32
TAO/orbsvcs/tests/ImplRepo/run_test.pl failover -replica: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO !Win32
+TAO/orbsvcs/tests/ImplRepo/run_test.pl backup_restart -replica: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO !Win32
TAO/orbsvcs/tests/ImplRepo/run_test.pl persistent_ft -replica: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO !Win32
TAO/orbsvcs/tests/ImplRepo/run_test.pl persistent_listingcorrupt -replica: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO !Win32
TAO/orbsvcs/tests/ImplRepo/run_test.pl persistent_activatorcorrupt -replica: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO !Win32
diff --git a/TAO/docs/Options.html b/TAO/docs/Options.html
index 1bd25a2fa66..7d075cabdff 100644
--- a/TAO/docs/Options.html
+++ b/TAO/docs/Options.html
@@ -996,7 +996,7 @@ having them use the same configurator file.
been detected that a connection is closed when reading a server reply
and having the server possibly process the reqest more than once
is acceptable. This option currently does not work under FreeBSD,
- OpenVMS, and Solaris.
+ OpenVMS, AIX, and Solaris.
The number of retries will not exceed <em>limit</em>.
If this option is used then -ORBForwardOnTransientLimit should
also be used to avoid a TRANSIENT exception being thrown.
diff --git a/TAO/orbsvcs/ImplRepo_Service/Locator_Options.cpp b/TAO/orbsvcs/ImplRepo_Service/Locator_Options.cpp
index 794b0240959..1d8881e67c0 100644
--- a/TAO/orbsvcs/ImplRepo_Service/Locator_Options.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/Locator_Options.cpp
@@ -43,6 +43,11 @@ Options::parse_args (int &argc, ACE_TCHAR *argv[])
{
ACE_Arg_Shifter shifter (argc, argv);
+ // Don't let persistence options co-mingle.
+ bool binary_persistence_used = false;
+ bool xml_persistence_used = false;
+ bool directory_persistence_used = false;
+
while (shifter.is_anything_left ())
{
if (ACE_OS::strcasecmp (shifter.get_current (),
@@ -142,6 +147,7 @@ Options::parse_args (int &argc, ACE_TCHAR *argv[])
this->persist_file_name_ = shifter.get_current ();
this->repo_mode_ = REPO_HEAP_FILE;
+ binary_persistence_used = true;
}
else if (ACE_OS::strcasecmp (shifter.get_current (),
ACE_TEXT ("-UnregisterIfAddressReused")) == 0)
@@ -167,6 +173,7 @@ Options::parse_args (int &argc, ACE_TCHAR *argv[])
this->persist_file_name_ = shifter.get_current ();
this->repo_mode_ = REPO_XML_FILE;
+ xml_persistence_used = true;
}
else if (ACE_OS::strcasecmp (shifter.get_current (),
ACE_TEXT ("--primary")) == 0)
@@ -199,6 +206,7 @@ Options::parse_args (int &argc, ACE_TCHAR *argv[])
{
this->persist_file_name_ += '/';
}
+ directory_persistence_used = true;
}
else if (ACE_OS::strcasecmp (shifter.get_current (),
ACE_TEXT ("-e")) == 0)
@@ -244,6 +252,26 @@ Options::parse_args (int &argc, ACE_TCHAR *argv[])
shifter.consume_arg ();
}
+ if ((this->imr_type_ == BACKUP_IMR || this->imr_type_ == PRIMARY_IMR) &&
+ !directory_persistence_used)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "Error: Redundancy is used but the "
+ "--directory option is not passed\n"));
+ this->print_usage ();
+ return -1;
+ }
+
+ if ((binary_persistence_used + directory_persistence_used +
+ xml_persistence_used)
+ > 1)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "Error: Only one persistence option can be used\n"));
+ this->print_usage ();
+ return -1;
+ }
+
return 0;
}
diff --git a/TAO/orbsvcs/ImplRepo_Service/Locator_Repository.cpp b/TAO/orbsvcs/ImplRepo_Service/Locator_Repository.cpp
index fd18d93299d..93c311a3591 100644
--- a/TAO/orbsvcs/ImplRepo_Service/Locator_Repository.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/Locator_Repository.cpp
@@ -67,8 +67,8 @@ Locator_Repository::report_ior (PortableServer::POA_ptr )
IORTable::Table_var ior_table = IORTable::Table::_narrow (obj.in ());
ACE_ASSERT (! CORBA::is_nil (ior_table.in ()));
- ior_table->bind ("ImplRepoService", this->imr_ior_.in());
- ior_table->bind ("ImR", this->imr_ior_.in());
+ ior_table->rebind ("ImplRepoService", this->imr_ior_.in());
+ ior_table->rebind ("ImR", this->imr_ior_.in());
// Set up multicast support (if enabled)
if (this->opts_.multicast ())
@@ -121,6 +121,70 @@ Locator_Repository::report_ior (PortableServer::POA_ptr )
}
int
+Locator_Repository::recover_ior (void)
+{
+ if (this->registered_)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("ERROR: Repository already registered IOR. ")
+ ACE_TEXT ("recover_ior should not be called.\n")), -1);
+ }
+
+ if (this->opts_.debug () > 0)
+ {
+ ACE_DEBUG ((LM_INFO, ACE_TEXT ("recover_ior <%C>\n"),
+ this->opts_.ior_filename ().c_str()));
+ }
+
+ // Load the IOR from the specified file if it is available.
+ const ACE_TString& combined_ior_file = this->opts_.ior_filename ();
+
+ // Check if the file exists. If not, then return 1 indicating
+ // we cannot recover our state.
+ if (ACE_OS::access (combined_ior_file.c_str (), F_OK) != 0)
+ return -1;
+
+ try {
+ ACE_TString combined_ior = "file://" + combined_ior_file;
+
+ CORBA::Object_var combined_obj =
+ this->orb_->string_to_object (combined_ior.c_str());
+
+ if (!CORBA::is_nil (combined_obj.in ()))
+ {
+ // Convert the object back into an IOR string to store in the
+ // imr_ior_ attribute.
+ this->imr_ior_ = this->orb_->object_to_string (combined_obj.in ());
+ }
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Attempting to read combined_ior for ImR_Locator\n");
+ return -1;
+ }
+
+ // Register the ImR for use with INS
+ CORBA::Object_var obj = this->orb_->resolve_initial_references ("IORTable");
+ IORTable::Table_var ior_table = IORTable::Table::_narrow (obj.in ());
+ ACE_ASSERT (! CORBA::is_nil (ior_table.in ()));
+
+ ior_table->bind ("ImplRepoService", this->imr_ior_.in());
+ ior_table->bind ("ImR", this->imr_ior_.in());
+
+ // Set up multicast support (if enabled)
+ if (this->opts_.multicast ())
+ {
+ ACE_Reactor* reactor = this->orb_->orb_core ()->reactor ();
+ if (this->setup_multicast (reactor, this->imr_ior_.in ()) != 0)
+ return -1;
+ }
+
+ registered_ = true;
+
+ return 0;
+}
+
+int
Locator_Repository::setup_multicast (ACE_Reactor* reactor, const char* ior)
{
ACE_ASSERT (reactor != 0);
diff --git a/TAO/orbsvcs/ImplRepo_Service/Locator_Repository.h b/TAO/orbsvcs/ImplRepo_Service/Locator_Repository.h
index d38a66525a5..6ccf4133131 100644
--- a/TAO/orbsvcs/ImplRepo_Service/Locator_Repository.h
+++ b/TAO/orbsvcs/ImplRepo_Service/Locator_Repository.h
@@ -146,6 +146,9 @@ protected:
/// report the ImR Locator's IOR
virtual int report_ior(PortableServer::POA_ptr imr_poa);
+ /// recover the ImR Locator's IOR from the persisted file
+ virtual int recover_ior(void);
+
int setup_multicast (ACE_Reactor* reactor, const char* imr_ior);
void teardown_multicast();
diff --git a/TAO/orbsvcs/ImplRepo_Service/README b/TAO/orbsvcs/ImplRepo_Service/README
index c5465941cc1..20f5a08f359 100644
--- a/TAO/orbsvcs/ImplRepo_Service/README
+++ b/TAO/orbsvcs/ImplRepo_Service/README
@@ -238,9 +238,11 @@ profile to not be available in the ior.
At startup the primary must be started first, then the backup. When
a single ImR_Locator goes down, it can be restarted at anytime
-(using the same ORBEndPoints). If they are both shutdown then Fault Tolerant
-ImplRepo_Service will be down until both the primary and backup are restarted
-in that order.. The previous ior file will only remain valid if the ORBEndPoint
+(using the same ORBEndPoints). If they are both shutdown after a successful
+startup of the redundant pair, then either the primary or backup can be
+restarted first. With only a single server running, there is no fault
+tolerance support, but the original fault tolerant ior which was created
+by the backup with the -o option can still be used as long as the ORBEndPoint
list remains the same for both instances.
As long as both the primary and backup ImR_Locators are not shutdown at the
@@ -276,7 +278,7 @@ same time the Fault Tolerant ImplRepo_Service will always be available.
@subsection activator ImR_Activator
- ImR_Activators, as you might have guessed, do the real work of
+ImR_Activators, as you might have guessed, do the real work of
activating servers or shutting them down and maintaining the information
about servers related to them. Only one instance of an ImR_Activator
can be run on one host. The ImR_Activator is not exposed at all to the
diff --git a/TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp b/TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp
index fb03f8832f5..2b8dbf523f4 100644
--- a/TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp
@@ -614,47 +614,87 @@ Shared_Backing_Store::repo_mode() const
int
Shared_Backing_Store::connect_replicas (Replica_ptr this_replica)
{
- const ACE_TString& replica_ior = replica_ior_filename(true);
+ const ACE_TString& replica_ior_file = replica_ior_filename(true);
if (this->opts_.debug() > 1)
{
ACE_DEBUG((LM_INFO,
- ACE_TEXT("Resolving ImR replica %s\n"), replica_ior.c_str()));
+ ACE_TEXT("Resolving ImR replica %s\n"), replica_ior_file.c_str()));
}
- CORBA::Object_var obj =
- this->orb_->string_to_object (replica_ior.c_str());
+ // Determine if the peer has started previously by checking if the
+ // ior file for the replica is there.
+ int peer_started_previously = 0;
+ if (ACE_OS::access (replica_ior_file.c_str (), F_OK) == 0)
+ {
+ peer_started_previously = 1;
+ }
+ else
+ this->peer_replica_ =
+ ImplementationRepository::UpdatePushNotification::_nil();
- if (!CORBA::is_nil (obj.in ()))
+ if (peer_started_previously)
{
- bool non_exist = true;
- try
- {
- this->peer_replica_ = ImplementationRepository::
- UpdatePushNotification::_narrow (obj.in());
- non_exist = (this->peer_replica_->_non_existent() == 1);
- }
- catch (const CORBA::Exception& )
- {
- // let error be handled below
- }
+ ACE_TString replica_ior = "file://" + replica_ior_file;
+ CORBA::Object_var obj =
+ this->orb_->string_to_object (replica_ior.c_str());
- if (non_exist)
+ if (!CORBA::is_nil (obj.in ()))
{
- this->peer_replica_ =
- ImplementationRepository::UpdatePushNotification::_nil();
+ bool non_exist = true;
+ try
+ {
+ this->peer_replica_ = ImplementationRepository::
+ UpdatePushNotification::_narrow (obj.in());
+ non_exist = (this->peer_replica_->_non_existent() == 1);
+ }
+ catch (const CORBA::Exception& )
+ {
+ // let error be handled below
+ }
+
+ if (non_exist)
+ {
+ this->peer_replica_ =
+ ImplementationRepository::UpdatePushNotification::_nil();
+ }
}
}
+ // Check if a peer IOR is defined
if (CORBA::is_nil (this->peer_replica_.in()))
{
if (this->imr_type_ == Options::BACKUP_IMR)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT("Error: No primary ImR replica is running <%s>\n"),
- replica_ior.c_str()), -1);
+ { // We are a backup IMR Locator
+
+ // If the primary has started at some point in the past, but is
+ // not available right now, then we will assume that we are in
+ // a restart situation where the backup is being started while
+ // the primary is still down. This implies that a successful
+ // start of the replication pair has been made in the past and
+ // we can use the combined ior from the previous run.
+ if (peer_started_previously)
+ {
+ // Verify that we recovered the IOR successfully. If we did not
+ // then fail startup of the backup IMR Locator.
+ if (this->recover_ior () == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT("Error: Unable to retrieve IOR from combined IOR ")
+ ACE_TEXT ("file: %C\n"),
+ replica_ior_file.c_str()),
+ -1);
+ }
+ else
+ { // There has been a startup error. The backup can only be started
+ // after the primary has been successfully started.
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT("Error: Primary has not been started previously.\n ")
+ ACE_TEXT ("file: %C\n"),
+ replica_ior_file.c_str()),
+ -1);
+ }
}
- // no connection currently, just wait for backup
+ // For either primary or backup - no connection currently, just wait for peer to start
return 0;
}
@@ -674,7 +714,7 @@ Shared_Backing_Store::connect_replicas (Replica_ptr this_replica)
{
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT("Error: obj key <%s> is an invalid ImR replica because %s\n"),
- replica_ior.c_str(), ip.reason.in()), -1);
+ replica_ior_file.c_str(), ip.reason.in()), -1);
}
if (opts_.debug() > 9)
@@ -1240,11 +1280,6 @@ Shared_Backing_Store::replica_ior_filename(bool peer_ior_file) const
}
ACE_CString ior =
this->filename_ + IMR_REPLICA[desired_type] + ACE_TEXT(".ior");
- if (peer_ior_file)
- {
- // the peer ior file needs the file prefix
- ior = "file://" + ior;
- }
return ior;
}
diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_EventChannel.h b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_EventChannel.h
index 3154f1c4fde..920841f752c 100644
--- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_EventChannel.h
+++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_EventChannel.h
@@ -32,6 +32,7 @@
#include "orbsvcs/CosEvent/CEC_Defaults.h"
#include "orbsvcs/CosEvent/event_serv_export.h"
#include "ace/Hash_Map_Manager.h"
+#include "ace/Truncate.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -108,7 +109,7 @@ public:
{
public:
u_long operator() (PortableServer::ServantBase* const & ptr) const {
- return reinterpret_cast<u_long> (ptr);
+ return ACE_Utils::truncate_cast<u_long> ((intptr_t)ptr);
}
};
diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_TypedEventChannel.h b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_TypedEventChannel.h
index 5d07ebec18f..3cc21b59de3 100644
--- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_TypedEventChannel.h
+++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_TypedEventChannel.h
@@ -35,6 +35,7 @@
#include "ace/Hash_Map_Manager.h"
#include "ace/Null_Mutex.h"
+#include "ace/Truncate.h"
#include "ace/SString.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -117,7 +118,7 @@ public:
{
public:
u_long operator() (PortableServer::ServantBase* const & ptr) const {
- return reinterpret_cast<u_long> (ptr);
+ return ACE_Utils::truncate_cast<u_long> ((intptr_t)ptr);
}
};
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp
index 9dce3bc79f0..27e04d65611 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp
@@ -160,8 +160,10 @@ TAO_EC_Basic_Factory::destroy_scheduling_strategy (TAO_EC_Scheduling_Strategy* x
TAO_EC_ProxyPushConsumer_Collection*
TAO_EC_Basic_Factory::create_proxy_push_consumer_collection (TAO_EC_Event_Channel_Base *)
{
+#if defined (__SUNPRO_CC)
// This typedef is a workaround for a SunCC 4.2 bug
typedef TAO_ESF_Proxy_List<TAO_EC_ProxyPushConsumer>::Iterator TAO_EC_Consumer_List_Iterator;
+#endif
return new TAO_ESF_Delayed_Changes<TAO_EC_ProxyPushConsumer,
TAO_ESF_Proxy_List<TAO_EC_ProxyPushConsumer>,
TAO_ESF_Proxy_List<TAO_EC_ProxyPushConsumer>::Iterator,
@@ -177,8 +179,10 @@ TAO_EC_Basic_Factory::destroy_proxy_push_consumer_collection (TAO_EC_ProxyPushCo
TAO_EC_ProxyPushSupplier_Collection*
TAO_EC_Basic_Factory::create_proxy_push_supplier_collection (TAO_EC_Event_Channel_Base *)
{
+#if defined (__SUNPRO_CC)
// This typedef is a workaround for a SunCC 4.2 bug
typedef TAO_ESF_Proxy_List<TAO_EC_ProxyPushSupplier>::Iterator TAO_EC_Supplier_List_Iterator;
+#endif
return new TAO_ESF_Delayed_Changes<TAO_EC_ProxyPushSupplier,
TAO_ESF_Proxy_List<TAO_EC_ProxyPushSupplier>,
TAO_ESF_Proxy_List<TAO_EC_ProxyPushSupplier>::Iterator,
diff --git a/TAO/orbsvcs/tests/FT_Naming/FaultTolerant/client.cpp b/TAO/orbsvcs/tests/FT_Naming/FaultTolerant/client.cpp
index 820d6f85c13..e5e0f6f9c29 100644
--- a/TAO/orbsvcs/tests/FT_Naming/FaultTolerant/client.cpp
+++ b/TAO/orbsvcs/tests/FT_Naming/FaultTolerant/client.cpp
@@ -578,7 +578,10 @@ do_failover_name_test (
catch (const CosNaming::NamingContext::NotFound& ex)
{
ex._tao_print_exception (
- ACE_TEXT ("INFO: Unable to resolve object from replica.\n"));
+ ACE_TEXT ("INFO: Unable to resolve object from replica. Sleeping for a second.\n"));
+
+ // Give it a second to be processed
+ ACE_OS::sleep (1);
// Try again...
try {
@@ -659,7 +662,9 @@ do_failover_name_test (
{
ex._tao_print_exception (
ACE_TEXT ("INFO: Unable to resolve wide context object from ")
- ACE_TEXT ("replica.\n"));
+ ACE_TEXT ("replica. Sleeping for a second.\n"));
+
+ ACE_OS::sleep (1);
// Try again to see if it just was a race condition
try {
@@ -1204,7 +1209,9 @@ do_persistence_name_test (
catch (const CosNaming::NamingContext::NotFound& ex)
{
ex._tao_print_exception (
- ACE_TEXT ("ERROR: Unable to resolve object from repository.\n"));
+ ACE_TEXT ("ERROR: Unable to resolve object from repository. Sleeping for a second.\n"));
+
+ ACE_OS::sleep (1);
// Try again...
try {
@@ -1290,7 +1297,9 @@ do_persistence_name_test (
{
ex._tao_print_exception (
ACE_TEXT ("INFO: Unable to resolve wide context object from ")
- ACE_TEXT ("repository.\n"));
+ ACE_TEXT ("repository. Sleeping for a second.\n"));
+
+ ACE_OS::sleep (1);
// Try again to see if it just was a race condition
try {
@@ -1558,6 +1567,15 @@ do_persistence_objectgroup_test (
std::string member_ior;
in >> member_ior;
+ if (!in.good ())
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("ERROR: Unable to read member data ")
+ ACE_TEXT ("from file %C\n"),
+ member_data_file.c_str ()),
+ RC_ERROR);
+ }
+
CORBA::Object_var member =
theOrb->string_to_object(member_ior.c_str ());
PortableGroup::Location location_name (1);
@@ -1594,12 +1612,13 @@ do_persistence_objectgroup_test (
ACE_TEXT ("ERROR: No group names found")));
}
}
- catch (const CORBA::Exception&)
+ catch (const CORBA::Exception& ex)
{
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("ERROR: Unable to remove member for group %C\n"),
basic_group_name),
RC_ERROR);
+ ex._tao_print_exception ("CORBA::Exception caught:");
}
}
@@ -1777,9 +1796,13 @@ do_equivalence_name_test (
try {
CORBA::Object_var obj1_on_replica = root_context_2->resolve (level1);
}
- catch (const CosNaming::NamingContext::NotFound& ex)
+ catch (const CosNaming::NamingContext::NotFound& )
{
- ex._tao_print_exception ("INFO: Unable to resolve object from replica.\n");
+ ACE_DEBUG ((LM_INFO,
+ "INFO: Unable to resolve object from replica. "
+ "Sleeping for a second.\n"));
+
+ ACE_OS::sleep (1);
// Try again...
try {
@@ -1859,7 +1882,9 @@ do_equivalence_name_test (
{
ex._tao_print_exception (
ACE_TEXT ("INFO: Unable to resolve wide context object from ")
- ACE_TEXT ("replica.\n"));
+ ACE_TEXT ("replica. Sleeping for a second.\n"));
+
+ ACE_OS::sleep (1);
// Try again to see if it just was a race condition
try {
diff --git a/TAO/orbsvcs/tests/FT_Naming/FaultTolerant/run_backup_restart_test.pl b/TAO/orbsvcs/tests/FT_Naming/FaultTolerant/run_backup_restart_test.pl
index ece8e711428..70ffe60cc3c 100755
--- a/TAO/orbsvcs/tests/FT_Naming/FaultTolerant/run_backup_restart_test.pl
+++ b/TAO/orbsvcs/tests/FT_Naming/FaultTolerant/run_backup_restart_test.pl
@@ -381,9 +381,10 @@ sub backup_restart_test()
$status = 1;
}
+ print_msg("INFO: killing backup server");
$server_status = $NS2->TerminateWaitKill ($server->ProcessStopWaitInterval());
if ($server_status != 0) {
- print STDERR "ERROR: server 2 returned $server_status\n";
+ print STDERR "ERROR: Backup Naming Server shutdown returned $server_status\n";
$status = 1;
}
diff --git a/TAO/orbsvcs/tests/FT_Naming/FaultTolerant/run_persistence_test.pl b/TAO/orbsvcs/tests/FT_Naming/FaultTolerant/run_persistence_test.pl
index abb657719a0..f69cccd341d 100755
--- a/TAO/orbsvcs/tests/FT_Naming/FaultTolerant/run_persistence_test.pl
+++ b/TAO/orbsvcs/tests/FT_Naming/FaultTolerant/run_persistence_test.pl
@@ -257,8 +257,11 @@ my $group_dir = "GroupService";
my $nm_iorfile = "nm.ior";
my $ns_iorfile = "ns.ior";
my $sv_iorfile = "obj.ior";
+my $sv_statusfile = "server.status";
+
my $ns_ref = "--ns file://$ns_iorfile";
my $sv2_iorfile = $server2->LocalFile ($sv_iorfile);
+my $sv2_statusfile = $server2->LocalFile ($sv_statusfile);
@@ -275,6 +278,7 @@ END
$client->DeleteFile ($stderr_file);
$client->DeleteFile ($client_member_file);
$server2->DeleteFile($sv_iorfile);
+ $server2->DeleteFile($sv_statusfile);
if ( -d $name_dir ) {
print STDERR "INFO: removing <$name_dir>\n";
@@ -364,9 +368,9 @@ sub persistence_test ()
print STDERR "ERROR: server returned $server_status\n";
exit 1;
}
- if ($server2->WaitForFileTimed ($sv_iorfile,
+ if ($server2->WaitForFileTimed ($sv_statusfile,
$server2->ProcessStartWaitInterval()) == -1) {
- print STDERR "ERROR: cannot find file <$sv_iorfile>\n";
+ print STDERR "ERROR: cannot find file <$sv_statusfile>\n";
$SV2->Kill (); $SV2->TimedWait (1);
exit 1;
}
@@ -506,9 +510,9 @@ sub backup_restore_test ()
print STDERR "ERROR: server returned $server_status\n";
exit 1;
}
- if ($server2->WaitForFileTimed ($sv_iorfile,
+ if ($server2->WaitForFileTimed ($sv_statusfile,
$server2->ProcessStartWaitInterval()) == -1) {
- print STDERR "ERROR: cannot find file <$sv_iorfile>\n";
+ print STDERR "ERROR: cannot find file <$sv_statusfile>\n";
$SV2->Kill (); $SV2->TimedWait (1);
exit 1;
}
diff --git a/TAO/orbsvcs/tests/FT_Naming/FaultTolerant/server.cpp b/TAO/orbsvcs/tests/FT_Naming/FaultTolerant/server.cpp
index b107e6464e5..432ccae5558 100644
--- a/TAO/orbsvcs/tests/FT_Naming/FaultTolerant/server.cpp
+++ b/TAO/orbsvcs/tests/FT_Naming/FaultTolerant/server.cpp
@@ -3,6 +3,8 @@
#include "LB_server.h"
#include "Basic.h"
+#include <iostream>
+
int
ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
@@ -109,6 +111,14 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
return 1;
}
+ // Use status file instead of IOR to indicate server is ready
+ // as basic servant operations are done after server's IOR
+ // is written.
+ {
+ std::ofstream out ("server.status");
+ out << "started" << endl;
+ }
+
lb_server.orb ()->run ();
ACE_DEBUG ((LM_DEBUG,
diff --git a/TAO/orbsvcs/tests/FT_Naming/Replication/run_test.pl b/TAO/orbsvcs/tests/FT_Naming/Replication/run_test.pl
index b00a02d342e..c0573a0c4d8 100755
--- a/TAO/orbsvcs/tests/FT_Naming/Replication/run_test.pl
+++ b/TAO/orbsvcs/tests/FT_Naming/Replication/run_test.pl
@@ -61,18 +61,6 @@ my $test_primary_iorfile = $test->LocalFile ($primary_iorfile);
$status = 0;
-sub clean_persistence_dir
-{
- chdir $naming_persistence_dir;
- opendir(THISDIR, ".");
- @allfiles = grep(!/^\.\.?$/, readdir(THISDIR));
- closedir(THISDIR);
- foreach $tmp (@allfiles){
- $test->DeleteFile ($tmp);
- }
- chdir "..";
-}
-
print "INFO: Running the test in ", getcwd(), "\n";
sub clean_persistence_dir($$)
@@ -174,7 +162,11 @@ print STDERR "Starting Client: $prog $args\n";
$CL = $test->CreateProcess ("$prog", "$args");
-$client = $CL->SpawnWaitKill ($test->ProcessStartWaitInterval());
+# Some systems may take a very long time to process 100 objects.
+# For example, on a Solaris/SPARC system it was found that it took
+# 8 seconds to bind 100 objects compared to 0.08 seconds on a
+# Linux/Intel computer. So add to the wait time.
+$client = $CL->SpawnWaitKill ($test->ProcessStartWaitInterval() + 105);
if ($client != 0) {
print STDERR "ERROR: client returned $client\n";
diff --git a/TAO/orbsvcs/tests/ImplRepo/RestartServer/MessengerClient.cpp b/TAO/orbsvcs/tests/ImplRepo/RestartServer/MessengerClient.cpp
index 18692e90149..1c4daf1fc00 100644
--- a/TAO/orbsvcs/tests/ImplRepo/RestartServer/MessengerClient.cpp
+++ b/TAO/orbsvcs/tests/ImplRepo/RestartServer/MessengerClient.cpp
@@ -6,11 +6,12 @@
#include "ace/OS_NS_unistd.h"
const ACE_TCHAR *ior = ACE_TEXT("file://Messenger.ior");
+int seconds_between_requests = 4;
int
parse_args (int argc, ACE_TCHAR *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("k:"));
+ ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("k:d:"));
int c;
while ((c = get_opts ()) != -1)
@@ -20,11 +21,16 @@ parse_args (int argc, ACE_TCHAR *argv[])
ior = get_opts.opt_arg ();
break;
+ case 'd':
+ seconds_between_requests = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
case '?':
default:
ACE_ERROR_RETURN ((LM_ERROR,
"usage: %s "
"-k <ior> "
+ "-d <seconds> (Delay between requests) "
"\n",
argv [0]),
-1);
@@ -38,7 +44,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
// Detection of closed on read currently not working certain platforms.
-#if defined (sun) || defined (__FreeBSD_version)
+#if defined (sun) || defined (AIX) || defined (__FreeBSD_version)
return 2;
#endif
@@ -70,7 +76,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
// Force server to abort to verify it will be brought
// back up when send_message() is called.
messenger->abort(2);
- ACE_OS::sleep(4);
+ ACE_OS::sleep(seconds_between_requests);
ACE_DEBUG ((LM_INFO,
"(%P|%t) - Sending another message after abort of server\n"));
diff --git a/TAO/orbsvcs/tests/ImplRepo/RestartServer/RestartServer.mpc b/TAO/orbsvcs/tests/ImplRepo/RestartServer/RestartServer.mpc
index 61f6b50edbc..71c175c4dd9 100644
--- a/TAO/orbsvcs/tests/ImplRepo/RestartServer/RestartServer.mpc
+++ b/TAO/orbsvcs/tests/ImplRepo/RestartServer/RestartServer.mpc
@@ -7,7 +7,7 @@ project(*idl): taoidldefaults {
custom_only = 1
}
-project(*Server): taoserver, iortable, avoids_minimum_corba, avoids_corba_e_micro, threads {
+project(*Server): portableserver, orbsvcsexe, avoids_minimum_corba, iortable, imr_client, avoids_corba_e_micro, threads {
exename = MessengerServer
after += *idl
Source_Files {
diff --git a/TAO/orbsvcs/tests/ImplRepo/RestartServer/run_test.pl b/TAO/orbsvcs/tests/ImplRepo/RestartServer/run_test.pl
index 8c8d2ae5cdc..9d502a77a40 100755
--- a/TAO/orbsvcs/tests/ImplRepo/RestartServer/run_test.pl
+++ b/TAO/orbsvcs/tests/ImplRepo/RestartServer/run_test.pl
@@ -18,6 +18,14 @@ foreach $i (@ARGV) {
my $extra_timeout = 45;
+my $seconds_between_requests = 4;
+
+# Valgrind may slow down processes enough that an extra delay
+# is needed between client requests.
+if (exists $ENV{'ACE_RUN_VALGRIND_CMD'}) {
+ $seconds_between_requests = 10;
+}
+
my $c1 = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
my $imr = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
my $act = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
@@ -87,7 +95,8 @@ $SI = $si->CreateProcess ($tao_imr, "-ORBInitRef ImplRepoService=file://$si_imri
$C1 = $c1->CreateProcess ("MessengerClient", "-k file://$c1_srviorfile ".
"-ORBForwardOnReplyClosedLimit 20 -ORBForwardDelay 500 ".
- "-ORBSvcConf $c1_conffile -ORBdebuglevel $debug_level");
+ "-ORBSvcConf $c1_conffile -ORBdebuglevel $debug_level ".
+ "-d $seconds_between_requests");
$SDN = $sdn->CreateProcess ("$tao_imr", "-ORBInitRef ImplRepoService=file://$sdn_imriorfile ".
"shutdown MessengerService");
diff --git a/TAO/orbsvcs/tests/ImplRepo/run_test.pl b/TAO/orbsvcs/tests/ImplRepo/run_test.pl
index 27f97aa3749..f57a9056a46 100755
--- a/TAO/orbsvcs/tests/ImplRepo/run_test.pl
+++ b/TAO/orbsvcs/tests/ImplRepo/run_test.pl
@@ -416,6 +416,32 @@ sub shutdown_servers_using_tao_imr
}
###############################################################################
+# Use the TAO IMR through the provided IOR
+
+sub shutdown_servers_using_ior
+{
+ my $provided_ior = shift;
+ my $target = shift;
+
+ for ($index = 0; $index < $num_srvr; ++$index) {
+ print "\n\nshutting down server $index using tao_imr\n";
+ $TI->Arguments ("-ORBInitRef ImplRepoService" .
+ "=file://$provided_ior $refstyle " .
+ "shutdown $a_srv_name[$index]");
+ my $TI_status = $TI->SpawnWaitKill (
+ $target->ProcessStartWaitInterval());
+ if ($TI_status != 0) {
+ print STDERR "ERROR: tao_imr ($index) returned $TI_status\n";
+ kill_act();
+ kill_imr();
+ return 1;
+ }
+ print "\n\nshut down server $index using tao_imr\n";
+ }
+ return 0;
+}
+
+###############################################################################
sub wait_for_imr
{
@@ -2024,6 +2050,8 @@ sub failover_test
$replica_imr->DeleteFile ($replica_imriorfile);
$replica_imr->DeleteFile ($backupiorfile);
+ cleanup_replication ();
+
print "\n\nstarting primary tao_imr_locator\n";
$repo{IMR}->Arguments ("-d $test_debug_level -o $repo{imr_imriorfile} " .
"$repo{imr_endpoint_flag} $imr_refstyle $repo{imr_backing_store_flag} ");
@@ -2086,6 +2114,7 @@ sub failover_test
}
print "started tao_imr_activator\n";
+ print "Adding servers\n";
if (add_servers (\@repo_for_srvr, \@imr_airplaneiorfile) != 0) {
return 1;
}
@@ -2286,6 +2315,271 @@ sub failover_test
}
###############################################################################
+# Start the primary then the backup. Kill both the primary and the backup and
+# restart the backup and verify it works.
+
+sub backup_restart_test
+{
+ if (!$replica) {
+ # The failover test needs the -replica flag
+ return 0;
+ }
+
+ my $status = 0;
+
+ my $imr_port = 10001 + $imr->RandomPort ();
+ my $replica_imr_port = $imr_port + 10;
+
+ my %repo;
+ setup_repo(\%repo, $imr, $IMR, $imriorfile, $act, $ACT, $actiorfile, $ti,
+ $TI, $imr_port, "--primary", $backupiorfile);
+
+ my %backup_repo;
+ setup_repo(\%backup_repo, $replica_imr, $replica_IMR, $imriorfile,
+ $act, $ACT, $actiorfile, $ti, $TI,
+ $replica_imr_port, "--backup", $primaryiorfile);
+
+ my @repo_for_srvr;
+ my @a_srv_imriorfile;
+ my @imr_airplaneiorfile;
+ my @a_srv_airplaneiorfile;
+ for ($index = 0; $index < $num_srvr; ++$index) {
+ if ($index == ($num_srvr - 1)) {
+ push(@repo_for_srvr, \%backup_repo);
+ } else {
+ push(@repo_for_srvr, \%repo);
+ }
+
+ push(@a_srv_imriorfile, $a_srv[$index]->LocalFile ($repo_for_srvr[$index]->{imriorfile}));
+ push(@imr_airplaneiorfile, $repo_for_srvr[$index]->{imr}->LocalFile ($airplaneiorfile[$index]));
+ push(@a_srv_airplaneiorfile, $a_srv[$index]->LocalFile ($airplaneiorfile[$index]));
+ $a_srv[$index]->DeleteFile ($repo_for_srvr[$index]->{imriorfile});
+ $a_srv[$index]->DeleteFile ($airplaneiorfile[$index]);
+ $a_cli[$index]->DeleteFile ($airplaneiorfile[$index]);
+ $repo_for_srvr[$index]->{imr}->DeleteFile ($airplaneiorfile[$index]);
+ }
+ $imr->DeleteFile ($imriorfile);
+ $imr->DeleteFile ($primaryiorfile);
+ $act->DeleteFile ($imriorfile);
+ $ti->DeleteFile ($imriorfile);
+ $act->DeleteFile ($actiorfile);
+ $replica_imr->DeleteFile ($replica_imriorfile);
+ $replica_imr->DeleteFile ($backupiorfile);
+
+ cleanup_replication ();
+
+ print "\n\nstarting primary tao_imr_locator\n";
+ print STDERR "tao_imr_locator -d $test_debug_level -o $repo{imr_imriorfile} $repo{imr_endpoint_flag} $imr_refstyle $repo{imr_backing_store_flag} \n";
+
+ $repo{IMR}->Arguments ("-d $test_debug_level -o $repo{imr_imriorfile} " .
+ "$repo{imr_endpoint_flag} $imr_refstyle $repo{imr_backing_store_flag} ");
+ my $IMR_status = $repo{IMR}->Spawn ();
+ if ($IMR_status != 0) {
+ print STDERR "ERROR: ImR Service returned $IMR_status\n";
+ return 1;
+ }
+
+ if (wait_for_imr(\%backup_repo, "replicaiorfile")) {
+ return 1;
+ }
+
+ print "\n\nstarting backup tao_imr_locator\n";
+ print STDERR "-d $test_debug_level -o $backup_repo{imriorfile} $imr_refstyle $backup_repo{imr_endpoint_flag} $backup_repo{imr_backing_store_flag}\n";
+
+ $backup_repo{IMR}->Arguments ("-d $test_debug_level -o " .
+ "$backup_repo{imriorfile} $imr_refstyle " .
+ "$backup_repo{imr_endpoint_flag} " .
+ "$backup_repo{imr_backing_store_flag}");
+ my $replica_IMR_status = $backup_repo{IMR}->Spawn ();
+ if ($replica_IMR_status != 0) {
+ print STDERR "ERROR: ImR Service replica returned $replica_IMR_status\n";
+ return 1;
+ }
+ if (wait_for_imr(\%repo, "replicaiorfile")) {
+ return 1;
+ }
+ print "started backup tao_imr_locator\n";
+
+ if (wait_for_imr(\%repo)) {
+ return 1;
+ }
+ print "started primary tao_imr_locator\n";
+
+ for ($index = 0; $index < $num_srvr; ++$index) {
+ if ($a_srv[$index]->PutFile ($repo_for_srvr[$index]->{imriorfile}) == -1) {
+ print STDERR "ERROR: cannot set file <$a_srv_imriorfile[$index]>\n";
+ kill_imr();
+ return 1;
+ }
+ }
+
+ print "\n\nstarting tao_imr_activator\n";
+ $repo{ACT}->Arguments ("-d $test_debug_level -o $repo{act_actiorfile} " .
+ "-ORBInitRef ImplRepoService=file://$repo{act_imriorfile} $refstyle " .
+ $repo{act_explicit_flag});
+ my $ACT_status = $repo{ACT}->Spawn ();
+ if ($ACT_status != 0) {
+ print STDERR "ERROR: ImR Activator returned $ACT_status\n";
+ return 1;
+ }
+
+ if ($repo{act}->WaitForFileTimed (
+ $repo{actiorfile},
+ $repo{act}->ProcessStartWaitInterval()) == -1) {
+ print STDERR "ERROR: cannot find file <" .
+ $repo{act_actiorfile} . ">\n";
+ kill_act();
+ kill_imr();
+ return 1;
+ }
+ print "started tao_imr_activator\n";
+
+ print "Adding servers\n";
+ if (add_servers (\@repo_for_srvr, \@imr_airplaneiorfile) != 0) {
+ return 1;
+ }
+
+ if (add_servers_again (\@repo_for_srvr, \@imr_airplaneiorfile) != 0) {
+ return 1;
+ }
+
+ for ($index = 0; $index < $num_srvr; ++$index) {
+ print "\n\nstarting server $index using tao_imr\n";
+ $repo_for_srvr[$index]->{TI}->Arguments ("-ORBInitRef ImplRepoService" .
+ "=file://$repo_for_srvr[$index]->{ti_imriorfile} $refstyle " .
+ "start $a_srv_name[$index]");
+ my $TI_status = $repo_for_srvr[$index]->{TI}->SpawnWaitKill (
+ $repo_for_srvr[$index]->{ti}->ProcessStartWaitInterval());
+ if ($TI_status != 0) {
+ print STDERR "ERROR: tao_imr ($index) returned $TI_status\n";
+ kill_act();
+ kill_imr();
+ return 1;
+ }
+ print "started server $index using tao_imr\n";
+ }
+
+ for ($index = 0; $index < $num_srvr; ++$index) {
+ if ($a_srv[$index]->WaitForFileTimed (
+ $airplaneiorfile[$index],
+ $a_srv[$index]->ProcessStartWaitInterval()) == -1) {
+ print STDERR
+ "ERROR: cannot find file <$a_srv_airplaneiorfile[$index]>\n";
+ kill_then_timed_wait(\@A_SRV, 1);
+ $ACT->Kill (); $ACT->TimedWait (1);
+ $IMR->Kill (); $IMR->TimedWait (1);
+ return 1;
+ }
+ if ($a_srv[$index]->GetFile ($airplaneiorfile[$index]) == -1) {
+ print STDERR
+ "ERROR: cannot retrieve file <$a_srv_airplaneiorfile[$index]>\n";
+ kill_then_timed_wait(\@A_SRV, 1);
+ $ACT->Kill (); $ACT->TimedWait (1);
+ $IMR->Kill (); $IMR->TimedWait (1);
+ return 1;
+ }
+ if ($a_cli[$index]->PutFile ($airplaneiorfile[$index]) == -1) {
+ print STDERR "ERROR: cannot set file <$a_cli_airplaneiorfile[$index]>\n";
+ kill_then_timed_wait(\@A_SRV, 1);
+ $ACT->Kill (); $ACT->TimedWait (1);
+ $IMR->Kill (); $IMR->TimedWait (1);
+ return 1;
+ }
+ }
+
+ if (start_clients() != 0) {
+ return 1;
+ }
+
+ if (stop_clients() != 0) {
+ return 1;
+ }
+
+ if (shutdown_servers_using_ior($imriorfile, $ti) != 0) {
+ return 1;
+ }
+
+ if (start_clients() != 0) {
+ return 1;
+ }
+
+ if (stop_clients() != 0) {
+ return 1;
+ }
+
+ print "\n\nkilling the primary tao_imr_locator\n";
+ $IMR->Kill(); $IMR->TimedWait();
+ print "killed the primary tao_imr_locator\n";
+
+
+ # Kill the backup and then restart it
+ print "\n\nkilling the backup tao_imr_locator\n";
+ $replica_IMR->Kill(); $replica_IMR->TimedWait();
+ print "killed the backup tao_imr_locator\n";
+
+ print "\n\nstarting backup tao_imr_locator\n";
+ print "tao_imr_locator -d $test_debug_level -o " .
+ "$backup_repo{imriorfile} $imr_refstyle " .
+ "$backup_repo{imr_endpoint_flag} " .
+ "$backup_repo{imr_backing_store_flag} \n";
+ $backup_repo{IMR}->Arguments ("-d $test_debug_level -o " .
+ "$backup_repo{imriorfile} $imr_refstyle " .
+ "$backup_repo{imr_endpoint_flag} " .
+ "$backup_repo{imr_backing_store_flag}");
+ $replica_IMR_status = $backup_repo{IMR}->Spawn ();
+ if ($replica_IMR_status != 0) {
+ print STDERR "ERROR: ImR Service replica returned $replica_IMR_status\n";
+ return 1;
+ }
+ if (wait_for_imr(\%repo, "replicaiorfile")) {
+ return 1;
+ }
+ print "started backup tao_imr_locator again\n";
+
+ # Wait for the backup to restart.
+ sleep (10);
+
+ if (start_clients() != 0) {
+ return 1;
+ }
+
+ if (stop_clients() != 0) {
+ return 1;
+ }
+
+ print STDERR "Shuting down servers after backup restarted\n";
+ if (shutdown_servers_using_ior($imriorfile, $ti) != 0) {
+ return 1;
+ }
+
+ print "\n\nkilling the backup tao_imr_locator\n";
+ $replica_IMR->Kill(); $replica_IMR->TimedWait();
+ print "killed the backup tao_imr_locator\n";
+
+ # kill the activator
+ $ACT->Kill(); $ACT->TimedWait();
+
+ cleanup_replication ();
+
+ # clean up IOR files
+ for ($index = 0; $index < $num_srvr; ++$index) {
+ $a_srv[$index]->DeleteFile ($repo_for_srvr[$index]->{imriorfile});
+ $a_srv[$index]->DeleteFile ($airplaneiorfile[$index]);
+ $a_cli[$index]->DeleteFile ($airplaneiorfile[$index]);
+ $repo_for_srvr[$index]->{imr}->DeleteFile ($airplaneiorfile[$index]);
+ }
+ $imr->DeleteFile ($imriorfile);
+ $imr->DeleteFile ($primaryiorfile);
+ $act->DeleteFile ($imriorfile);
+ $ti->DeleteFile ($imriorfile);
+ $act->DeleteFile ($actiorfile);
+ $replica_imr->DeleteFile ($replica_imriorfile);
+ $replica_imr->DeleteFile ($backupiorfile);
+
+ return $status;
+}
+
+###############################################################################
sub persistent_ft_test
{
@@ -2860,7 +3154,9 @@ my $test_num = 0;
my @tests = ("airplane", "airplane_ir", "nestea", "nestea_ir",
"both_ir", "persistent_ir", "persistent_ir_hash",
- "persistent_ir_shared", "persistent_ft", "failover");
+ "persistent_ir_shared", "persistent_ft", "failover",
+ "backup_restart");
+
my @nt_tests = ("nt_service_ir", "persistent_ir_registry");
my $i;
@@ -2949,6 +3245,9 @@ for ($i = 0; $i <= $#ARGV; $i++) {
elsif ($ARGV[$i] eq "failover") {
$ret = failover_test ();
}
+ elsif ($ARGV[$i] eq "backup_restart") {
+ $ret = backup_restart_test ();
+ }
elsif ($ARGV[$i] eq "perclient") {
$ret = perclient();
}
diff --git a/TAO/orbsvcs/tests/ImplRepo/scale_clients/scale_clients.mpc b/TAO/orbsvcs/tests/ImplRepo/scale_clients/scale_clients.mpc
index 39eff2fa489..e8275b43b9a 100644
--- a/TAO/orbsvcs/tests/ImplRepo/scale_clients/scale_clients.mpc
+++ b/TAO/orbsvcs/tests/ImplRepo/scale_clients/scale_clients.mpc
@@ -8,7 +8,7 @@ project(*idl): taoidldefaults {
custom_only = 1
}
-project(*server): taoserver, iortable, avoids_minimum_corba, avoids_corba_e_micro {
+project(*server): portableserver, orbsvcsexe, avoids_minimum_corba, iortable, imr_client, avoids_corba_e_micro {
after += *idl
exename = server
IDL_Files {
diff --git a/TAO/orbsvcs/tests/ImplRepo/servers_list/servers_list.mpc b/TAO/orbsvcs/tests/ImplRepo/servers_list/servers_list.mpc
index eddb8a3e628..5ac2135b6b5 100644
--- a/TAO/orbsvcs/tests/ImplRepo/servers_list/servers_list.mpc
+++ b/TAO/orbsvcs/tests/ImplRepo/servers_list/servers_list.mpc
@@ -8,7 +8,7 @@ project(*idl): taoidldefaults {
custom_only = 1
}
-project(*server): taoserver, iortable, avoids_minimum_corba, avoids_corba_e_micro, threads {
+project(*server): portableserver, orbsvcsexe, avoids_minimum_corba, iortable, imr_client, avoids_corba_e_micro, threads {
after += *idl
exename = server
IDL_Files {
diff --git a/TAO/performance-tests/POA/Object_Creation_And_Registration/registration.cpp b/TAO/performance-tests/POA/Object_Creation_And_Registration/registration.cpp
index 3e769711f33..eb4703c1899 100644
--- a/TAO/performance-tests/POA/Object_Creation_And_Registration/registration.cpp
+++ b/TAO/performance-tests/POA/Object_Creation_And_Registration/registration.cpp
@@ -20,6 +20,7 @@
#include "tao/ORB_Core.h"
#include "ace/Profile_Timer.h"
#include "ace/Get_Opt.h"
+#include "ace/Truncate.h"
//
// The following macros help take a very precise look into the
@@ -172,7 +173,7 @@ reverse_map_effectiveness (test_i *servants)
// Calculate the effectiveness of the hash.
for (i = 0; i < iterations; i++)
{
- u_long hash_index = u_long (&servants[i]) % active_object_map_size;
+ u_long hash_index = ACE_Utils::truncate_cast<u_long> ((intptr_t)&servants[i]) % active_object_map_size;
hash_counter[hash_index]++;
}
diff --git a/TAO/tao/ImR_Client/ImR_Client.cpp b/TAO/tao/ImR_Client/ImR_Client.cpp
index fffcfef6398..66c83596235 100644
--- a/TAO/tao/ImR_Client/ImR_Client.cpp
+++ b/TAO/tao/ImR_Client/ImR_Client.cpp
@@ -91,6 +91,8 @@ namespace
{
}
+ ~ImRifyProfiles () { delete [] list_buffer_; }
+
CORBA::Object_ptr combined_ior ()
{
const CORBA::ULong pcount = base_profiles_.profile_count ();
diff --git a/TAO/tao/PortableServer/Key_Adapters.cpp b/TAO/tao/PortableServer/Key_Adapters.cpp
index 4d59ff4b642..c8c9d520c30 100644
--- a/TAO/tao/PortableServer/Key_Adapters.cpp
+++ b/TAO/tao/PortableServer/Key_Adapters.cpp
@@ -17,13 +17,14 @@ TAO_Incremental_Key_Generator::TAO_Incremental_Key_Generator (void)
int
TAO_Incremental_Key_Generator::operator() (PortableServer::ObjectId &id)
{
+ const size_t cntr_size = sizeof this->counter_;
// Resize to accommodate the counter.
- id.length (sizeof this->counter_);
+ id.length (cntr_size);
// Add new key data.
ACE_OS::memcpy (id.get_buffer (),
&++this->counter_,
- sizeof this->counter_);
+ cntr_size);
// Success.
return 0;
diff --git a/TAO/tao/TransportCurrent/IIOP_Current_Impl.cpp b/TAO/tao/TransportCurrent/IIOP_Current_Impl.cpp
index e9cd92fc9d0..2d7a1ff7861 100644
--- a/TAO/tao/TransportCurrent/IIOP_Current_Impl.cpp
+++ b/TAO/tao/TransportCurrent/IIOP_Current_Impl.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/INET_Addr.h"
+#include "ace/Truncate.h"
#include "tao/IIOP_Connection_Handler.h"
#include "tao/IIOP_Transport.h"
#include "tao/Transport_Selection_Guard.h"
@@ -70,7 +71,7 @@ namespace TAO
#if defined (TAO_HAS_IIOP) && (TAO_HAS_IIOP != 0)
// Need to use cast to pacify windows compilers complaining
// about the implicit HANDLE -> CORBA::Long conversion.
- return (CORBA::Long) this->handler ()->get_handle ();
+ return ACE_Utils::truncate_cast<CORBA::Long> ((intptr_t)this->handler ()->get_handle ());
#else
throw ::CORBA::NO_IMPLEMENT ();
#endif
diff --git a/TAO/tao/Version.h b/TAO/tao/Version.h
index 6a59c5fd4fb..1c6d9cff1fc 100644
--- a/TAO/tao/Version.h
+++ b/TAO/tao/Version.h
@@ -5,5 +5,5 @@
#define TAO_MAJOR_VERSION 2
#define TAO_MINOR_VERSION 1
-#define TAO_BETA_VERSION 7
-#define TAO_VERSION "2.1.7"
+#define TAO_BETA_VERSION 8
+#define TAO_VERSION "2.1.8"
diff --git a/TAO/tests/Bug_4097_Regression/Bug_4097_Regression.cpp b/TAO/tests/Bug_4097_Regression/Bug_4097_Regression.cpp
index 7adeee035ea..81440cf3aea 100644
--- a/TAO/tests/Bug_4097_Regression/Bug_4097_Regression.cpp
+++ b/TAO/tests/Bug_4097_Regression/Bug_4097_Regression.cpp
@@ -54,89 +54,102 @@ int
ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
ACE_DEBUG ((LM_DEBUG, "Starting\n"));
- CORBA::ORB_var orb (CORBA::ORB_init (argc, argv));
-
- CORBA::Object_var obj (orb->resolve_initial_references ("CodecFactory"));
- IOP::CodecFactory_var codecFactory (IOP::CodecFactory::_narrow (obj.in ()));
-
- IOP::Encoding cdr_encoding;
- cdr_encoding.format = IOP::ENCODING_CDR_ENCAPS;
- cdr_encoding.major_version = 1;
- cdr_encoding.minor_version = 2;
- IOP::Codec_var codec (codecFactory->create_codec (cdr_encoding));
-
- // Test starts here with first case
-
- ACE_DEBUG ((LM_DEBUG, "Creating union using default descriminant of mlu_char type\n"));
- MultiLabelUnion mlu;
- mlu.mlu_char ('x');
- CORBA::Any any;
- any <<= mlu;
- bool error = checkResult (any, mlu);
-
- ACE_DEBUG ((LM_DEBUG, "Encode->Decode any with union using default descriminant of mlu_char type\n"));
- CORBA::OctetSeq_var messageInCDR (codec->encode (any));
- ACE_DEBUG ((LM_DEBUG, ". Size of encoding is %d\n", messageInCDR->length ()));
- CORBA::Any_var decoded = codec->decode (messageInCDR);
- if (!decoded.ptr ())
+ try
{
- ACE_DEBUG ((LM_DEBUG, "No decoding\n"));
- error = true;
- }
- else if (checkResult (decoded.in (), mlu))
- {
- error = true;
- }
+ CORBA::ORB_var orb (CORBA::ORB_init (argc, argv));
+
+ CORBA::Object_var obj (orb->resolve_initial_references ("CodecFactory"));
+ IOP::CodecFactory_var codecFactory (IOP::CodecFactory::_narrow (obj.in ()));
+
+ IOP::Encoding cdr_encoding;
+ cdr_encoding.format = IOP::ENCODING_CDR_ENCAPS;
+ cdr_encoding.major_version = 1;
+ cdr_encoding.minor_version = 2;
+ IOP::Codec_var codec (codecFactory->create_codec (cdr_encoding));
+
+ // Test starts here with first case
+
+ ACE_DEBUG ((LM_DEBUG, "Creating union using default descriminant of mlu_char type\n"));
+ MultiLabelUnion mlu;
+ mlu.mlu_char ('x');
+ CORBA::Any any;
+ any <<= mlu;
+ bool error = checkResult (any, mlu);
+
+ ACE_DEBUG ((LM_DEBUG, "Encode->Decode any with union using default descriminant of mlu_char type\n"));
+ CORBA::OctetSeq_var messageInCDR (codec->encode (any));
+ ACE_DEBUG ((LM_DEBUG, ". Size of encoding is %d\n", messageInCDR->length ()));
+ CORBA::Any_var decoded = codec->decode (messageInCDR);
+ if (!decoded.ptr ())
+ {
+ ACE_DEBUG ((LM_DEBUG, "No decoding\n"));
+ error = true;
+ }
+ else if (checkResult (decoded.in (), mlu))
+ {
+ error = true;
+ }
- ACE_DEBUG ((LM_DEBUG, "Creating union using case 0\n"));
- mlu.mlu_char ('y');
- mlu._d (static_cast<CORBA::Long> (0)); // Note first case label for type.
- any <<= mlu;
- if (checkResult (any, mlu))
- {
- error = true;
- }
+ ACE_DEBUG ((LM_DEBUG, "Creating union using case 0\n"));
+ mlu.mlu_char ('y');
+ mlu._d (static_cast<CORBA::Long> (0)); // Note first case label for type.
+ any <<= mlu;
+ if (checkResult (any, mlu))
+ {
+ error = true;
+ }
- ACE_DEBUG ((LM_DEBUG, "Encode->Decode any with union using case 0\n"));
- messageInCDR = codec->encode (any);
- ACE_DEBUG ((LM_DEBUG, ". Size of encoding is %d\n", messageInCDR->length ()));
- decoded = codec->decode (messageInCDR);
- if (!decoded.ptr ())
- {
- ACE_DEBUG ((LM_DEBUG, "No decoding\n"));
- error = true;
- }
- else if (checkResult (decoded.in (), mlu))
- {
- error = true;
- }
+ ACE_DEBUG ((LM_DEBUG, "Encode->Decode any with union using case 0\n"));
+ messageInCDR = codec->encode (any);
+ ACE_DEBUG ((LM_DEBUG, ". Size of encoding is %d\n", messageInCDR->length ()));
+ decoded = codec->decode (messageInCDR);
+ if (!decoded.ptr ())
+ {
+ ACE_DEBUG ((LM_DEBUG, "No decoding\n"));
+ error = true;
+ }
+ else if (checkResult (decoded.in (), mlu))
+ {
+ error = true;
+ }
- ACE_DEBUG ((LM_DEBUG, "Creating union using case 1\n"));
- mlu.mlu_char ('z');
- mlu._d (static_cast<CORBA::Long> (1)); // Note second case label for same type as before
- any <<= mlu;
- if (checkResult (any, mlu))
- {
- error = true;
- }
+ ACE_DEBUG ((LM_DEBUG, "Creating union using case 1\n"));
+ mlu.mlu_char ('z');
+ mlu._d (static_cast<CORBA::Long> (1)); // Note second case label for same type as before
+ any <<= mlu;
+ if (checkResult (any, mlu))
+ {
+ error = true;
+ }
- ACE_DEBUG ((LM_DEBUG, "Encode->Decode any with union using case 1\n"));
- messageInCDR = codec->encode (any);
- ACE_DEBUG ((LM_DEBUG, ". Size of encoding is %d\n", messageInCDR->length ()));
- decoded = codec->decode (messageInCDR);
- if (!decoded.ptr ())
- {
- ACE_DEBUG ((LM_DEBUG, "No decoding\n"));
- error = true;
+ ACE_DEBUG ((LM_DEBUG, "Encode->Decode any with union using case 1\n"));
+ messageInCDR = codec->encode (any);
+ ACE_DEBUG ((LM_DEBUG, ". Size of encoding is %d\n", messageInCDR->length ()));
+ decoded = codec->decode (messageInCDR);
+ if (!decoded.ptr ())
+ {
+ ACE_DEBUG ((LM_DEBUG, "No decoding\n"));
+ error = true;
+ }
+ else if (checkResult (decoded.in (), mlu))
+ {
+ error = true;
+ }
+
+ if (error)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Test FAILED.\n"));
+ return 1;
+ }
}
- else if (checkResult (decoded.in (), mlu))
+ catch (const CORBA::Exception &ex)
{
- error = true;
+ ex._tao_print_exception ("Test FAILED due to Exception:");
+ return 1;
}
-
- if (error)
+ catch (...)
{
- ACE_DEBUG ((LM_DEBUG, "Test FAILED.\n"));
+ ACE_DEBUG ((LM_DEBUG, "Test FAILED (UNKNOWN exception).\n"));
return 1;
}
diff --git a/TAO/tests/Dynamic_TP/POA_Loader/Dynamic_TP_POA_Test_Dynamic/client.cpp b/TAO/tests/Dynamic_TP/POA_Loader/Dynamic_TP_POA_Test_Dynamic/client.cpp
index 1baf4140a3a..bb2cc17034f 100644
--- a/TAO/tests/Dynamic_TP/POA_Loader/Dynamic_TP_POA_Test_Dynamic/client.cpp
+++ b/TAO/tests/Dynamic_TP/POA_Loader/Dynamic_TP_POA_Test_Dynamic/client.cpp
@@ -11,7 +11,7 @@ int client_num = 1;
int report_exception = 1;
bool is_shutdown = false;
int num_threads = 1;
-const ACE_TCHAR *test = "";
+const ACE_TCHAR *test = ACE_TEXT("");
int goal = 0;
int
@@ -47,13 +47,13 @@ parse_args (int argc, ACE_TCHAR *argv[])
case '?':
default:
ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "[-c <client #>] "
- "[-e (show exception) <0|1>] "
- "[-k <ior>] "
- "[-s (shutdown)] "
- "[-t <test> <goal>] "
- "\n",
+ ACE_TEXT("usage: %C ")
+ ACE_TEXT("[-c <client #>] ")
+ ACE_TEXT("[-e (show exception) <0|1>] ")
+ ACE_TEXT("[-k <ior>] ")
+ ACE_TEXT("[-s (shutdownE)] ")
+ ACE_TEXT("[-t <test> <goal>] ")
+ ACE_TEXT("\n"),
argv [0]),
-1);
}
@@ -97,11 +97,11 @@ int ClientTask::svc (void)
try
{
ACE_DEBUG((LM_DEBUG,
- "Client %d calling server\n",
+ ACE_TEXT("Client %d calling server\n"),
ndx));
CORBA::String_var the_string = target_->get_string (ndx);
ACE_DEBUG((LM_DEBUG,
- "Client %d received return text of: [%C %d].\n",
+ ACE_TEXT("Client %d received return text of: [%s %d].\n"),
ndx, the_string.in(), ndx));
{
ACE_GUARD_RETURN (ACE_Mutex, mon, this->lock_, -1);
@@ -111,7 +111,7 @@ int ClientTask::svc (void)
catch (const CORBA::NO_IMPLEMENT& )
{
ACE_DEBUG ((LM_DEBUG,
- "Client %d caught full queue exception.\n",
+ ACE_TEXT("Client %d caught full queue exception.\n"),
ndx));
{
ACE_GUARD_RETURN (ACE_Mutex, mon, this->lock_, -1);
@@ -121,14 +121,14 @@ int ClientTask::svc (void)
catch (const CORBA::TRANSIENT& )
{
ACE_DEBUG ((LM_DEBUG,
- "Client %d caught transent, retrying.\n",
+ ACE_TEXT("Client %d caught transent, retrying.\n"),
ndx));
continue;
}
catch (const CORBA::Exception& ex)
{
ACE_DEBUG ((LM_DEBUG,
- "Client %d caught other exception. %s\n",
+ ACE_TEXT("Client %d caught other exception. %s\n"),
ndx, ex._name()));
{
@@ -175,7 +175,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if (hello->_non_existent())
{
ACE_ERROR_RETURN ((LM_ERROR,
- "Client: non_existent returns true\n"),
+ ACE_TEXT("Client: non_existent returns true\n")),
-1);
}
else
@@ -184,7 +184,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
catch (CORBA::TRANSIENT &)
{
ACE_DEBUG ((LM_DEBUG,
- "Client: got a transient exception with %d tries remaining\n",
+ ACE_TEXT("Client: got a transient exception with %d tries remaining\n"),
i-1));
}
}
@@ -200,18 +200,18 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
ct.activate (THR_NEW_LWP | THR_JOINABLE, num_threads);
ct.wait ();
ACE_DEBUG ((LM_DEBUG,
- "Client: replies = %d, NO_IMPL = %d, other ex = %d\n",
+ ACE_TEXT("Client: replies = %d, NO_IMPL = %d, other ex = %d\n"),
ct.replies_, ct.nis_, ct.exs_));
if (ct.exs_ > 0)
{
ACE_DEBUG ((LM_DEBUG,
- "Client: ERROR: unexpected exception caught.\n"));
+ ACE_TEXT("Client: ERROR: unexpected exception caught.\n")));
result = -1;
}
else if (ACE_OS::strcasecmp (test, ACE_TEXT ("max_queue")) == 0)
{
ACE_DEBUG ((LM_DEBUG,
- "Client: max_queue test, got %d overages, expected %d\n",
+ ACE_TEXT("Client: max_queue test, got %d overages, expected %d\n"),
ct.nis_, goal));
if (ct.nis_ != goal)
{
@@ -224,7 +224,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
catch (const CORBA::Exception& ex)
{
if (report_exception)
- ex._tao_print_exception ("Exception caught:");
+ ex._tao_print_exception (ACE_TEXT("Exception caught:"));
return -1;
}
diff --git a/TAO/tests/Dynamic_TP/POA_Loader/Dynamic_TP_POA_Test_Static/client.cpp b/TAO/tests/Dynamic_TP/POA_Loader/Dynamic_TP_POA_Test_Static/client.cpp
index 1baf4140a3a..bb2cc17034f 100644
--- a/TAO/tests/Dynamic_TP/POA_Loader/Dynamic_TP_POA_Test_Static/client.cpp
+++ b/TAO/tests/Dynamic_TP/POA_Loader/Dynamic_TP_POA_Test_Static/client.cpp
@@ -11,7 +11,7 @@ int client_num = 1;
int report_exception = 1;
bool is_shutdown = false;
int num_threads = 1;
-const ACE_TCHAR *test = "";
+const ACE_TCHAR *test = ACE_TEXT("");
int goal = 0;
int
@@ -47,13 +47,13 @@ parse_args (int argc, ACE_TCHAR *argv[])
case '?':
default:
ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "[-c <client #>] "
- "[-e (show exception) <0|1>] "
- "[-k <ior>] "
- "[-s (shutdown)] "
- "[-t <test> <goal>] "
- "\n",
+ ACE_TEXT("usage: %C ")
+ ACE_TEXT("[-c <client #>] ")
+ ACE_TEXT("[-e (show exception) <0|1>] ")
+ ACE_TEXT("[-k <ior>] ")
+ ACE_TEXT("[-s (shutdownE)] ")
+ ACE_TEXT("[-t <test> <goal>] ")
+ ACE_TEXT("\n"),
argv [0]),
-1);
}
@@ -97,11 +97,11 @@ int ClientTask::svc (void)
try
{
ACE_DEBUG((LM_DEBUG,
- "Client %d calling server\n",
+ ACE_TEXT("Client %d calling server\n"),
ndx));
CORBA::String_var the_string = target_->get_string (ndx);
ACE_DEBUG((LM_DEBUG,
- "Client %d received return text of: [%C %d].\n",
+ ACE_TEXT("Client %d received return text of: [%s %d].\n"),
ndx, the_string.in(), ndx));
{
ACE_GUARD_RETURN (ACE_Mutex, mon, this->lock_, -1);
@@ -111,7 +111,7 @@ int ClientTask::svc (void)
catch (const CORBA::NO_IMPLEMENT& )
{
ACE_DEBUG ((LM_DEBUG,
- "Client %d caught full queue exception.\n",
+ ACE_TEXT("Client %d caught full queue exception.\n"),
ndx));
{
ACE_GUARD_RETURN (ACE_Mutex, mon, this->lock_, -1);
@@ -121,14 +121,14 @@ int ClientTask::svc (void)
catch (const CORBA::TRANSIENT& )
{
ACE_DEBUG ((LM_DEBUG,
- "Client %d caught transent, retrying.\n",
+ ACE_TEXT("Client %d caught transent, retrying.\n"),
ndx));
continue;
}
catch (const CORBA::Exception& ex)
{
ACE_DEBUG ((LM_DEBUG,
- "Client %d caught other exception. %s\n",
+ ACE_TEXT("Client %d caught other exception. %s\n"),
ndx, ex._name()));
{
@@ -175,7 +175,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if (hello->_non_existent())
{
ACE_ERROR_RETURN ((LM_ERROR,
- "Client: non_existent returns true\n"),
+ ACE_TEXT("Client: non_existent returns true\n")),
-1);
}
else
@@ -184,7 +184,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
catch (CORBA::TRANSIENT &)
{
ACE_DEBUG ((LM_DEBUG,
- "Client: got a transient exception with %d tries remaining\n",
+ ACE_TEXT("Client: got a transient exception with %d tries remaining\n"),
i-1));
}
}
@@ -200,18 +200,18 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
ct.activate (THR_NEW_LWP | THR_JOINABLE, num_threads);
ct.wait ();
ACE_DEBUG ((LM_DEBUG,
- "Client: replies = %d, NO_IMPL = %d, other ex = %d\n",
+ ACE_TEXT("Client: replies = %d, NO_IMPL = %d, other ex = %d\n"),
ct.replies_, ct.nis_, ct.exs_));
if (ct.exs_ > 0)
{
ACE_DEBUG ((LM_DEBUG,
- "Client: ERROR: unexpected exception caught.\n"));
+ ACE_TEXT("Client: ERROR: unexpected exception caught.\n")));
result = -1;
}
else if (ACE_OS::strcasecmp (test, ACE_TEXT ("max_queue")) == 0)
{
ACE_DEBUG ((LM_DEBUG,
- "Client: max_queue test, got %d overages, expected %d\n",
+ ACE_TEXT("Client: max_queue test, got %d overages, expected %d\n"),
ct.nis_, goal));
if (ct.nis_ != goal)
{
@@ -224,7 +224,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
catch (const CORBA::Exception& ex)
{
if (report_exception)
- ex._tao_print_exception ("Exception caught:");
+ ex._tao_print_exception (ACE_TEXT("Exception caught:"));
return -1;
}
diff --git a/TAO/tests/File_IO/File_i.cpp b/TAO/tests/File_IO/File_i.cpp
index 1776c7394c0..62ee922a07c 100644
--- a/TAO/tests/File_IO/File_i.cpp
+++ b/TAO/tests/File_IO/File_i.cpp
@@ -18,6 +18,7 @@
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_fcntl.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/Truncate.h"
// IDL File::System constructor
FileImpl::System::System (PortableServer::POA_ptr poa)
@@ -58,7 +59,7 @@ FileImpl::System::open (const char *file_name,
// convert ACE_HANDLE to a string
ACE_OS::sprintf (file_descriptor_buffer,
"%ld",
- (long int) file_descriptor);
+ ACE_Utils::truncate_cast<long int> ((intptr_t)file_descriptor));
//Create an objectID from the ACE_HANDLE string
PortableServer::ObjectId_var oid =
@@ -143,7 +144,7 @@ FileImpl::Descriptor::fd (void)
PortableServer::ObjectId_to_string (oid1.in ());
// Get the ACE_HANDLE from the string
- return (ACE_HANDLE) ACE_OS::atol (s.in ());
+ return (ACE_HANDLE)(intptr_t)ACE_OS::atol (s.in ());
}
CORBA::Long
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/client.cpp b/TAO/tests/NestedUpcall/MT_Client_Test/client.cpp
index b1d3f5db780..66a50c4fa4d 100644
--- a/TAO/tests/NestedUpcall/MT_Client_Test/client.cpp
+++ b/TAO/tests/NestedUpcall/MT_Client_Test/client.cpp
@@ -23,6 +23,7 @@
#include "ace/OS_NS_unistd.h"
#include "ace/OS_NS_fcntl.h"
#include "ace/Malloc_Base.h"
+#include "ace/Truncate.h"
MT_Client_Task::MT_Client_Task (int argc, ACE_TCHAR **argv,
int client_number)
@@ -196,7 +197,7 @@ MT_Client::init (int argc, ACE_TCHAR **argv,
try
{
char buf[64];
- ACE_OS::sprintf (buf, "thread_%lx", reinterpret_cast<long> (this));
+ ACE_OS::sprintf (buf, "thread_%lx", ACE_Utils::truncate_cast<long> ((intptr_t)this));
this->orb_var_ =
CORBA::ORB_init (this->argc_,
diff --git a/TAO/tests/POA/Default_Servant2/File_i.cpp b/TAO/tests/POA/Default_Servant2/File_i.cpp
index 8dadb95ddd7..3542cdfc3cf 100644
--- a/TAO/tests/POA/Default_Servant2/File_i.cpp
+++ b/TAO/tests/POA/Default_Servant2/File_i.cpp
@@ -18,6 +18,7 @@
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_fcntl.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/Truncate.h"
#include "tao/PortableServer/PortableServer.h"
// IDL File::System constructor
@@ -60,7 +61,7 @@ FileImpl::System::open (const char *file_name,
// convert ACE_HANDLE to a string
ACE_OS::sprintf (file_descriptor_buffer,
"%ld",
- (long int) file_descriptor);
+ ACE_Utils::truncate_cast<long int> ((intptr_t)file_descriptor));
//Create an objectID from the ACE_HANDLE string
PortableServer::ObjectId_var oid =
@@ -151,7 +152,7 @@ FileImpl::Descriptor::fd (void)
PortableServer::ObjectId_to_string (oid1.in ());
// Get the ACE_HANDLE from the string
- return (ACE_HANDLE) ACE_OS::atol (s.in ());
+ return (ACE_HANDLE)(intptr_t)ACE_OS::atol (s.in ());
}
CORBA::Long