How to retrieve the results of a request in "inReplyPreMarshal" or "inReplyPostMarshal"?

How to retrieve the results of a request in "inReplyPreMarshal" or "inReplyPostMarshal"?

Post by Preside Integrator Suppor » Sat, 03 Mar 2001 04:33:33



Hi All,

I would like to print out the result, arguments and octet of the query
request in "inReplyPreMarshal" and "inReplyPostMarshal".

I have something like:

unsigned char MyFilter::inReplyPreMarshal(CORBA::Request& r,
CORBA::Environment& t)
{
   CORBA::NVList_ptr myList;
   // CORBA::NVList_ptr myList = CORBA::NVList::IT_create();  /* I tried
this too */
   myList = r.arguments();
   cout << "myList has " << myList->count() << endl;
   CORBA::release (myList);

    return 1;

Quote:}

But the myList is always returning 0.

Regards,
Joanne

 
 
 

How to retrieve the results of a request in "inReplyPreMarshal" or "inReplyPostMarshal"?

Post by Brian Kell » Sat, 03 Mar 2001 04:51:11


Hi Joanne,

Quote:> I would like to print out the result, arguments and octet of the query
> request in "inReplyPreMarshal" and "inReplyPostMarshal".

> I have something like:

> unsigned char MyFilter::inReplyPreMarshal(CORBA::Request& r,
> CORBA::Environment& t)
> {
>    CORBA::NVList_ptr myList;
>    // CORBA::NVList_ptr myList = CORBA::NVList::IT_create();  /* I tried
> this too */
>    myList = r.arguments();
>    cout << "myList has " << myList->count() << endl;
>    CORBA::release (myList);

>     return 1;
> }

> But the myList is always returning 0.

While arguments() is available on the Request object, it
cannot be used to examine the request arguments. The reason
for this is explained here:

http://www.iona.com/support/kb/Orbix_C++/articles/1256.74.html

This feature is supported within OrbixWeb. You can also accomplish
the same thing in Orbix 2000 (C++/Java) using Portable Interceptors.

If you just want to do parameter logging, you have other alternatives
like using Smart Proxies or per-object filters to do effectively the
same thing, but be warned that all types of Orbix Filters and Smart
Proxies are not CORBA compliant.

Cheers,

Brian
IONA Technologies

 
 
 

How to retrieve the results of a request in "inReplyPreMarshal" or "inReplyPostMarshal"?

Post by Preside Integrator Suppor » Sat, 03 Mar 2001 08:42:07


Thanks Brian for your clarification.

The reason I am trying to get info out of "query" is the following:
This goes back to an earlier posting (2/9/01) regarding query returning an
old IOR after, I kill the server and server is back up with a new IOR.
We print out the offer right after query returns, and it shows the old IOR.
I know that we are contacting the TDR for sure, because if I suspend the TDR
process(kill -24 pid), query will get stuck, then I resume the TDR process
(kill -26 pid),  query returns.

Now I just want to see what's been returned in "inReplyPreMarshal" and
"inReplyPostMarshal".

Can this be accomplished?
If so, where can I find more information on how to implement this?

Regards,
Joanne


Quote:> Hi Joanne,

> While arguments() is available on the Request object, it
> cannot be used to examine the request arguments. The reason
> for this is explained here:

> http://www.iona.com/support/kb/Orbix_C++/articles/1256.74.html

> This feature is supported within OrbixWeb. You can also accomplish
> the same thing in Orbix 2000 (C++/Java) using Portable Interceptors.

> If you just want to do parameter logging, you have other alternatives
> like using Smart Proxies or per-object filters to do effectively the
> same thing, but be warned that all types of Orbix Filters and Smart
> Proxies are not CORBA compliant.

> Cheers,

> Brian
> IONA Technologies

 
 
 

How to retrieve the results of a request in "inReplyPreMarshal" or "inReplyPostMarshal"?

Post by Brian Kell » Sun, 04 Mar 2001 06:39:20


Hi Joanne,

Quote:> The reason I am trying to get info out of "query" is the following:
> This goes back to an earlier posting (2/9/01) regarding query returning an
> old IOR after, I kill the server and server is back up with a new IOR.
> We print out the offer right after query returns, and it shows the old
IOR.
> I know that we are contacting the TDR for sure, because if I suspend the
TDR
> process(kill -24 pid), query will get stuck, then I resume the TDR process
> (kill -26 pid),  query returns.

> Now I just want to see what's been returned in "inReplyPreMarshal" and
> "inReplyPostMarshal".

I presume you want to do this so that you can examine the returned
values that your client receives without changing your client code, right?
Well then, I believe your only option is to use Smart Proxies. Don't
worry, they don't require changes to the application code - you can just
link the compiled Smart Proxy code into your application and run it (they
are a self-registering mechanism).

Check the Orbix demos directories, the IONA Knowledge Base and the
documentation for everything you will ever need to know about them.

Hope this helps,

Brian
IONA Technologies