[omniORB] Interceptor/CORBA::Request

Ameya Virkar virkar at stee.com.sg
Tue Aug 19 10:32:17 BST 2003


Hello Duncan,

Thanks for the reply. 

In the "serverReceiveRequest" Interceptor, I need to do the following.

a) Get the target Corba::Object [ Corba::Object *obj ] (Obtained from Corba::Request::target())
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?)
c) Transaction_var txn;
    txn = Transaction::_narrow(obj);
    if (CORBA::is_nil(txn))
    {
        evict();// evict() is described below
    }
    else
    {
        if (!strcmp(info.giop_s.operation_name(), "startTransaction"))
            registerObject(obj);
        else
            unRegisterObject(obj);

        touch(txn, fd); // described below
        evict();
    }
d) evict()  
   // std::vector<ObjectDescription*> mTxnTbl;
    if ((currentTime - mTxnTbl.front()->lastAccess) > MaxTimeDuration) 
        TerminateProcess( GetCurrentProcess(), -1 );
e) touch(CORBA::Object_ptr p, int o)
      for (int j = 0; j<mTxnTbl.size(); j++)
         if( mTxnTbl[j]-> reference -> _is_equivalent( p ) )
         {
            mTxnTbl[j]->lastAccess = currentTime;
            mTxnTbl[j]->_owner = o; 
         }
f) registerObject(obj) 
    Creates a ObjectDescription ptr from obj and is pushed into mTxnTbl vector
g) unRegisterObject(obj);
    Popped from mTxnTbl vector

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.

I am using omniORB4 on WinNT4 and am using VC++6

Regards,
Ameya.


----- Original Message ----- 
From: Duncan Grisby <duncan at grisby.org>
To: Ameya Virkar <virkar at stee.com.sg>
Cc: <omniorb-list at omniorb-support.com>
Sent: Monday, August 18, 2003 6:11 PM
Subject: Re: [omniORB] Interceptor/CORBA::Request 


> On Monday 18 August, "Ameya Virkar" wrote:
> 
> > Sorry for re-posting this question. But I urgently need to know how to
> > map "info_T" object to a CORBA::Request object.
> > 
> > As mentioned in the earlier posting, I need to use the "Corba::Request"
> > object in the "serverReceiveRequest" Interceptor as follows.
> 
> It can't be done, since the serverReceiveRequest interceptor is run
> before the operation arguments are unmarshalled. The only information
> available when the interceptor runs is that contained in the info
> structure. Note that omniORB doesn't use Request objects internally at
> all, so there is no possibility of getting one later in the call
> chain, either.
> 
> What are you actually trying to achieve?
> 
> Cheers,
> 
> Duncan.
> 
> -- 
>  -- Duncan Grisby         --
>   -- duncan at grisby.org     --
>    -- http://www.grisby.org --
> 
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20030819/bfdcf963/attachment-0001.htm


More information about the omniORB-list mailing list