Discussion:
[omniORB] Is it possible to customize request discarding (with omniORB)?
Martin B.
2011-08-05 12:42:18 UTC
Permalink
Hi!

I have a couple of objects in one process and for a certain state I
would like to discard all requests to these objects.

I can easily achieve this through POAManager::discard_requests, but this
has the drawback that the ORB/POA raises TRANSIENT
(TRANSIENT_POANoResource:COMPLETED_NO to be specific) and unfortunately
the clients we have at the moment are programmed to interpret TRANSIENT
as "system not there" and not "object temporarily unreachable". (And I'm
not sure if the minor code sent with TRANSIENT could be somehow used in
the clients to get some more insight.)

Anyways - the best thing would be if I could throw a custom user
exception (or a system exception with a custom minor code) for the
"discarding" state and the obvious place to put this would be the
POA/POAManager for the objects that are affected. But it seems I'm out
of luck here, or is there a way to achieve this?

cheers,
Martin
Johnny Willemsen
2011-08-05 12:55:57 UTC
Permalink
Hi,

Have you checked the server portable interceptors, you could throw an exception there.

Johnny
Hi!
I have a couple of objects in one process and for a certain state I would like to discard all requests to these objects.
I can easily achieve this through POAManager::discard_requests, but this has the drawback that the ORB/POA raises TRANSIENT (TRANSIENT_POANoResource:COMPLETED_NO to be specific) and unfortunately the clients we have at the moment are programmed to interpret TRANSIENT as "system not there" and not "object temporarily unreachable". (And I'm not sure if the minor code sent with TRANSIENT could be somehow used in the clients to get some more insight.)
Anyways - the best thing would be if I could throw a custom user exception (or a system exception with a custom minor code) for the "discarding" state and the obvious place to put this would be the POA/POAManager for the objects that are affected. But it seems I'm out of luck here, or is there a way to achieve this?
cheers,
Martin
_______________________________________________
omniORB-list mailing list
http://www.omniorb-support.com/mailman/listinfo/omniorb-list
Martin B.
2011-08-05 13:20:23 UTC
Permalink
Post by Johnny Willemsen
Hi!
I have a couple of objects in one process and for a certain state I would like to discard all requests to these objects.
I can easily achieve this through POAManager::discard_requests, but this has the drawback that the ORB/POA raises TRANSIENT (TRANSIENT_POANoResource:COMPLETED_NO to be specific) and unfortunately the clients we have at the moment are programmed to interpret TRANSIENT as "system not there" and not "object temporarily unreachable". (And I'm not sure if the minor code sent with TRANSIENT could be somehow used in the clients to get some more insight.)
Anyways - the best thing would be if I could throw a custom user exception (or a system exception with a custom minor code) for the "discarding" state and the obvious place to put this would be the POA/POAManager for the objects that are affected. But it seems I'm out of luck here, or is there a way to achieve this?
Hi,
Have you checked the server portable interceptors, you could throw an exception there.
omniORB doesn't currently support the portable interceptors (but it has
it's own set of interceptors -- that are not fine-grained enough as far
as I can tell: they do not support per-object interception, see:
http://omniorb.sourceforge.net/omni41/omniORB/omniORB010.html ).

From skimming the Portable Interceptors specs (in 2.6 and 3.1) it seems
those would help as those can be set per object - am I right?

cheers,
Martin
Johnny Willemsen
2011-08-05 23:05:24 UTC
Permalink
Hi,
Post by Martin B.
omniORB doesn't currently support the portable interceptors (but it has
it's own set of interceptors -- that are not fine-grained enough as far
http://omniorb.sourceforge.net/omni41/omniORB/omniORB010.html ).
From skimming the Portable Interceptors specs (in 2.6 and 3.1) it seems
those would help as those can be set per object - am I right?
Portable Interceptors are set for a specific ORB, but within the
interception point you can get all the details of the object that is
being invoked.

Johnny

Martin B.
2011-08-05 14:11:37 UTC
Permalink
Post by Martin B.
Hi!
I have a couple of objects in one process and for a certain state I
would like to discard all requests to these objects.
I can easily achieve this through POAManager::discard_requests, but this
has the drawback that the ORB/POA raises TRANSIENT
(TRANSIENT_POANoResource:COMPLETED_NO to be specific) and unfortunately
the clients we have at the moment are programmed to interpret TRANSIENT
as "system not there" and not "object temporarily unreachable". (And I'm
not sure if the minor code sent with TRANSIENT could be somehow used in
the clients to get some more insight.)
Update: Regarding the minor code, it seems that should be a workable
approach:

TRANSIENT_POANoResource from omniORB is reported as 0x 4F4D 0001 wich is
an OMG std minor code (TRANSIENT/1 : Request discarded because of
resource exhaustion in POA, or because POA is in discarding state.) so I
could change my client to check for that code. (Resource exhaustion is
not really something I care about here, so it should be pretty save.)

cheers,
Martin
Loading...