[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jacorb-bugs
Subject:    [jacorb-bugs] [Bug 208] New: Request at ServantManager-local call not processed according CORBA-spec
From:       bugzilla-daemon () inf ! fu-berlin ! de
Date:       2002-06-14 13:32:19
Message-ID: E17IrBb-0002Zg-00 () berners
[Download RAW message or body]

http://www.jacorb.org/cgi-bin/bugzilla/show_bug.cgi?id=208

           Summary: Request at ServantManager-local call not processed
                    according CORBA-spec 2.3
           Product: JacORB
           Version: 1.4 beta 4
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ORB
        AssignedTo: gerald.brose@acm.org
        ReportedBy: marie-louise.ernst@sirius-eos.com
         QAContact: jacorb-bugs@lists.spline.inf.fu-berlin.de


1) ForwardRequest defined for ServantActivator.incarnate and 
ServantLocator.preinvoke not catched separately in class 
org.jacorb.orb.Delegate method servant_preinvoke and processed according Spec 
(MinorRevision 2.3.1 Oct 99) 11.3.4.1 and 11.2.10.

2) For local call, ServantManager is used also if there is an active servant in 
the ActiveObjectMap (see Spec 2.3.1, 11.3.4).

proposition for Bug 2): 

    public ServantObject servant_preinvoke( org.omg.CORBA.Object self, 
                                            String operation, 
                                            Class expectedType) 
    {     
        if (poa != null) 
        {
            try 
            {
                ServantObject so = new ServantObject();
                // old version beta4
                /*if( ( poa.isRetain() && !poa.isUseServantManager() ) || 
                    poa.useDefaultServant() )
                {
                    so.servant = poa.reference_to_servant(self);
                } else if( poa.isUseServantManager() )
                */
                // new code -->
                while( true ) {
                  if ( poa.isRetain() || poa.isUseDefaultServant() ) {
                    try {
                      so.servant = poa.reference_to_servant(self);
                      break;
                    }catch ( ObjectNotActive ona ) {
                      if ( poa.isUseDefaultServant() ) throw ona; // also if 
defaultServant==null
                    }
                  }
                  if( poa.isUseServantManager() ) // --> new code end
                  {
                      byte [] oid = 
                          org.jacorb.poa.util.POAUtil.extractOID(getParsedIOR
().get_object_key());
                      org.omg.PortableServer.ServantManager sm = 
                          poa.get_servant_manager();

                      if( poa.isRetain() )
                      {
                          org.omg.PortableServer.ServantActivator sa = 
                              
org.omg.PortableServer.ServantActivatorHelper.narrow( sm );
                          so.servant = sa.incarnate( oid, poa );

                      }
                      else
                      {
                          org.omg.PortableServer.ServantLocator sl = 
                              org.omg.PortableServer.ServantLocatorHelper.narrow
( sm );
                          so.servant = 
                              sl.preinvoke( oid, poa, operation, 
                                            new 
org.omg.PortableServer.ServantLocatorPackage.CookieHolder() );
                      }                   
                  }
                  else
                  {
                      //
                  }
                }
                if (!expectedType.isInstance(so.servant)) 
                    return null;
                else 
                {                           
                    ((org.jacorb.orb.ORB)orb).getPOACurrent()._addContext(
                        Thread.currentThread(),
                        new org.jacorb.poa.LocalInvocationContext(
                            orb, 
                            poa, 
                            getObjectId(), 
                            (org.omg.PortableServer.Servant)so.servant
                        )
                    );
                }
                return so;
            }
            catch ( Throwable e ) 
            {
                Debug.output(2,e);
            }
        }
        return null;   
    }



------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic