[Ace-users] Making the Notification Service Bidir
castro.manuel at gmail.com
Tue Mar 4 09:45:50 CST 2008
TAO VERSION: 1.6
ACE VERSION: 5.6
HOST MACHINE and OPERATING SYSTEM: Windows2003 Server SP2
TARGET MACHINE and OPERATING SYSTEM: WindowsXP Prof.2002 SP2
COMPILER NAME AND VERSION (AND PATCHLEVEL): VC++2005 8.0.50727.762 (SP.
THE $ACE_ROOT/ace/config.h FILE
#define ACE_HAS_VERSIONED_NAMESPACE 0
#define ACE_HAS_STANDARD_CPP_LIBRARY 1
#define ACE_MUST_HELP_DLOPEN_SEARCH_PATH 1
AREA/CLASS/EXAMPLE AFFECTED: Notification Service
DOES THE PROBLEM AFFECT:
OTHER (please specify)?
Making the Notification Service Bidir
We were told that Notification Service doesn't have bidir, so we
should implement it ourselves. We're working on it.
We have external clients behind proxies connecting to our naming
service and notify service.
In fact, we achieved pushing structured events to clients, but it
implies opening a new connection from notification service to the
client, so NAT must be configured at client firewall.
With bidirectional GIOP, connections are supposed to be reused, so no
connections to the client are open.
We modified Notify_Service.cpp in order to create a "childPOA", add a
BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE policy (as shown in tests).
After modifications, everything still works as before (all right so
The issue is, when pushing a structured event, a new connection is
open to the client.
I run the NotifyService in debug mode, debugging each line dozens of
times and I don't manage to understand what is happening.
Before the modification, when the client made
"connect_structured_push_consumer", a new connection was open to the
Now it doesn't happen. But when the first push_structured_event is
done, it's shown:
- Transport_Cache_Manager::find_i, no idle transport is available
so a new connection to peer is open.
Inside Transport_Cache_Manager::find_i(...) , when invoking
retval = this->cache_map_.find (tmp_key,entry);
I always reach this code at ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID,
HASH_KEY, COMPARE_KEYS, ACE_LOCK>::shared_find :
loc = this->hash (ext_id) % this->total_size_;
ACE_Hash_Map_Entry<EXT_ID, INT_ID> *temp = this->table_[loc].next_;
while (temp != &this->table_[loc] && this->equal (temp->ext_id_,
ext_id) == 0)
temp = temp->next_;
if (temp == &this->table_[loc])
errno = ENOENT;
entry = temp;
but i'm not able to go deeper and find out why it's not finding an
existing connection, and I get a "ENOENT".
On the other side, before that invocation, inside
"Transport_Cache_Manager::wait_for_connection", I observe that
if (this->muxed_number_ && this->muxed_number_ == extid.index ())
is always false, even when configuring:
static Resource_Factory "-ORBMuxedConnectionMax 1"
what sets this->muxed_number_ to 1, but extid.index () always returns
By the way, I added "#define ACE_HAS_DUMP 1" to enable dumping, but
at Transport_Cache_Manager::find_i , when doing
but I just get something like this:
total_size_ = 512
cur_size_ = 2
but not the content of the map in order to find out what is held in
the map and what is being searched.
I tried to dump the "map" content, but I wasn't able to achieve it.
As aditional info, the notify service is provided with this:
static Notify_Default_Event_Manager_Objects_Factory "-
AllocateTaskperProxy -DispatchingThreads 1"
(This was set a long time ago, since clients blocked the Notify
I guess I'm digging on the wrong direction or may be I'm missing
something important related to configuration.
Any help will be so much appreciated.
No workaround so far.
More information about the Ace-users