Bug 425 - interceptors only work for first orb.
Summary: interceptors only work for first orb.
Status: RESOLVED
Alias: None
Product: TAO
Classification: Unclassified
Component: Portable Interceptors (show other bugs)
Version: 1.0.9
Hardware: x86 FreeBSD
: P2 normal
Assignee: Nanbor Wang
URL:
Depends on:
Blocks:
 
Reported: 2000-02-08 10:19 CST by Russell L. Carter
Modified: 2001-02-14 02:13 CST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Russell L. Carter 2000-02-08 10:19:25 CST
The following diff is sufficient to break $(ACE_ROOT)/TAO/tests/Interceptors:

--- server.cpp.orig     Tue Feb  8 09:14:24 2000
+++ server.cpp  Tue Feb  8 09:13:04 2000
@@ -40,6 +40,10 @@
 {
   ACE_TRY_NEW_ENV
     {
+      CORBA::ORB_var orb_a =
+        CORBA::ORB_init (argc, argv, "another orb", ACE_TRY_ENV);
+      ACE_TRY_CHECK;
+
       CORBA::ORB_var orb =
         CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV);
       ACE_TRY_CHECK;


Swapping the order of the orb declarations and it works.  Also, this is for
version 1.0.13, but the little html widget only goes up to 1.0.9.  Maybe
you need a -current designator?

Cheers,
Russell
Comment 1 Nanbor Wang 2000-02-08 12:17:59 CST
I'll look into this.
Comment 2 Nanbor Wang 2000-02-14 02:40:59 CST
This is not really a bug in the interceptors.  The problem stems from the
fact that I use _this() to implicitly activate the servant, which uses the
RootPOA in the default ORB to perform the activation.  Creating an unrelated
ORB changed the default ORB in this case.

To solve the problem in your applications, make sure you activate the servant
explicitly using the intended POA.