<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2314.1000" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=Verdana size=2>Hello Duncan,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana size=2>Thanks for the reply. </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana size=2>In the "serverReceiveRequest" Interceptor, I need
to do the following.</FONT></DIV>
<DIV> </DIV>
<DIV><EM><FONT face=Verdana size=2>a) Get the target Corba::Object [
Corba::Object *obj ] (Obtained from Corba::Request::target())</FONT></EM></DIV>
<DIV><EM><FONT face=Verdana size=2>b) Get the file descriptor associated with
the Corba::Request (In Orbix, each request has a file descriptor associated with
it. How to get it in omniORB?)</FONT></EM></DIV>
<DIV><EM><FONT face=Verdana size=2>c) Transaction_var txn;</FONT></EM></DIV>
<DIV><EM><FONT face=Verdana size=2> txn =
Transaction::_narrow(obj);</FONT></EM></DIV>
<DIV><EM><FONT face=Verdana size=2> if
(CORBA::is_nil(txn))</FONT></EM></DIV>
<DIV><EM><FONT face=Verdana size=2> {</FONT></EM></DIV>
<DIV><EM><FONT face=Verdana size=2>
evict();// evict() is described below</FONT></EM></DIV>
<DIV><EM><FONT face=Verdana size=2> }</FONT></EM></DIV>
<DIV><EM><FONT face=Verdana size=2> else</FONT></EM></DIV>
<DIV><EM><FONT face=Verdana size=2> {</FONT></EM></DIV>
<DIV><EM><FONT face=Verdana size=2> if
(!strcmp(info.giop_s.operation_name(), "startTransaction"))</FONT></EM></DIV>
<DIV><EM><FONT face=Verdana size=2>
registerObject(obj);</FONT></EM></DIV>
<DIV><EM><FONT face=Verdana size=2>
else</FONT></EM></DIV>
<DIV><EM><FONT face=Verdana size=2>
unRegisterObject(obj);</FONT></EM></DIV>
<DIV> </DIV>
<DIV><EM><FONT face=Verdana size=2>
touch(txn, fd); // described below</FONT></EM></DIV>
<DIV><EM><FONT face=Verdana size=2>
evict();</FONT></EM></DIV>
<DIV><FONT face=Verdana size=2><EM> }</EM></FONT></DIV>
<DIV><FONT face=Verdana size=2><EM>d) evict() </EM></FONT></DIV>
<DIV><EM><FONT face=Verdana size=2> //
std::vector<ObjectDescription*> mTxnTbl;</FONT></EM></DIV>
<DIV><EM><FONT face=Verdana size=2> if ((currentTime -
mTxnTbl.front()->lastAccess) > MaxTimeDuration) </FONT></EM></DIV>
<DIV><FONT face=Verdana size=2><EM>
TerminateProcess( GetCurrentProcess(), -1 );</EM></FONT><FONT face=Verdana
size=2></FONT></DIV>
<DIV><FONT face=Verdana size=2>
<DIV><EM><FONT face=Verdana size=2>e) touch(CORBA::Object_ptr p, int
o)<BR> for (int j = 0; j<mTxnTbl.size();
j++)<BR> if( mTxnTbl[j]->
reference -> _is_equivalent( p )
)<BR>
{<BR>
mTxnTbl[j]->lastAccess
= currentTime;<BR>
mTxnTbl[j]->_owner =
o; <BR> }<BR>f)
registerObject(obj) </FONT></EM></DIV><EM>
<DIV> Creates a ObjectDescription ptr from obj and is pushed
into mTxnTbl vector</FONT></EM></DIV></DIV>
<DIV><FONT face=Verdana size=2><EM>g) unRegisterObject(obj);</EM>
<DIV><EM> Popped from mTxnTbl vector</EM></DIV></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana size=2>Therefore as you can see, I need to know the
target Object (Corba::Object *obj) and file descriptor (int fd) associated with
a request. I am unable to get these using omniORB. Please advice on this
matter.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana size=2>I am using omniORB4 on WinNT4 and am using
VC++6</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana size=2>Regards,</FONT></DIV>
<DIV><FONT face=Verdana size=2>Ameya.</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana size=2>----- Original Message ----- </FONT>
<DIV><FONT face=Verdana size=2>From: Duncan Grisby <<A
href="mailto:duncan@grisby.org">duncan@grisby.org</A>></FONT></DIV>
<DIV><FONT face=Verdana size=2>To: Ameya Virkar <<A
href="mailto:virkar@stee.com.sg">virkar@stee.com.sg</A>></FONT></DIV>
<DIV><FONT face=Verdana size=2>Cc: <<A
href="mailto:omniorb-list@omniorb-support.com">omniorb-list@omniorb-support.com</A>></FONT></DIV>
<DIV><FONT face=Verdana size=2>Sent: Monday, August 18, 2003 6:11
PM</FONT></DIV>
<DIV><FONT face=Verdana size=2>Subject: Re: [omniORB] Interceptor/CORBA::Request
</FONT></DIV></DIV>
<DIV><BR></DIV><FONT face=Verdana size=2>> On Monday 18 August, "Ameya
Virkar" wrote:<BR>> <BR>> > Sorry for re-posting this question. But I
urgently need to know how to<BR>> > map "info_T" object to a
CORBA::Request object.<BR>> > <BR>> > As mentioned in the earlier
posting, I need to use the "Corba::Request"<BR>> > object in the
"serverReceiveRequest" Interceptor as follows.<BR>> <BR>> It can't be
done, since the serverReceiveRequest interceptor is run<BR>> before the
operation arguments are unmarshalled. The only information<BR>> available
when the interceptor runs is that contained in the info<BR>> structure. Note
that omniORB doesn't use Request objects internally at<BR>> all, so there is
no possibility of getting one later in the call<BR>> chain, either.<BR>>
<BR>> What are you actually trying to achieve?<BR>> <BR>>
Cheers,<BR>> <BR>> Duncan.<BR>> <BR>> -- <BR>> -- Duncan
Grisby --<BR>> -- <A
href="mailto:duncan@grisby.org">duncan@grisby.org</A>
--<BR>> -- <A
href="http://www.grisby.org">http://www.grisby.org</A> --<BR>> <BR>>
_______________________________________________<BR>> omniORB-list mailing
list<BR>> <A
href="mailto:omniORB-list@omniorb-support.com">omniORB-list@omniorb-support.com</A><BR>>
<A
href="http://www.omniorb-support.com/mailman/listinfo/omniorb-list">http://www.omniorb-support.com/mailman/listinfo/omniorb-list</A><BR>>
<BR>> </FONT></BODY></HTML>