[Ace-users] [tao-users] NotificationService: Single filter with default_admin does not work

Wernke zur Borg wernke.zur.borg at vega.de
Wed Jan 23 04:27:58 CST 2008


Hi all,

The following applies to both ACE+TAO 5.5a_p4 and 5.6.2.

I am currently exploring the secrets of filtering in the notification
service. My experience is that filtering with a single filter using the
default channel admin has no effect, because in the TAO implementation
it is created with the "OR" operator. To be effective, filtering has to
be applied with a newly created channel admin that has the "AND"
operator defined.

Background:

Channel admins are created with a specification of an operator either
"AND" or "OR" that is to be applied when filters are defined on both the
admin itself and on the proxy objects created by the admin. Each of
these two sets are always combined with "OR", but the two results are
then combined with the operator defined at creation time of the admin.

Now when you create a single filter and assign it either to the admin or
to a proxy (it does not matter to which) the filtering does not work
when the admin has been created with the "OR" operator. It does work
when the admin is created with the "AND" operator.

This can be proven with the example under
TAO/orbsvcs/examples/Notify/Filter. Unfortunately the example is defined
such that the consumer stops listening after the expected number of
events has been received, therefore any extra events are not received,
thus hiding the problem. The example needs to be modified such that a
bigger number of events is expected, i.e., set
EVENTS_EXPECTED_TO_RECEIVE to a high value (e.g. 100), then change 

	ifgop_ = CosNotifyChannelAdmin::AND_OP
to
	ifgop_ = CosNotifyChannelAdmin::OR_OP

or use the default_consumer_admin of the event channel, which is
internally created with the "OR" operator. When using "OR", the consumer
receives events that should normally be blocked by the condition
"threshold < 20".

As a remark, the filtering applied to the supplier side has no effect at
all, because two filters are defined on the supplier admin, of which the
second one always yields TRUE. Since these filters are always combined
with "OR", irrespective of the admin operator setting, this filtering
has no effect.

My suspicion is that if only one set of filters is defined, either on
the admin or on the proxy, the other one is assumed to be empty (i.e.
yield TRUE), and therefore all events pass through if the operator is
"OR".

I have been searching the source code but cannot find the location in
the code where this is done, therefore I am also hesitating to raise a
bug report.

I cannot find any statement in the standard that defines the operator
for the default admin. But I believe when you apply a single filter it
should irrespectively be applied.

Thanks for any hints or comments,
Wernke



More information about the Ace-users mailing list