<?xml version="1.0" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.jacorb.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://www.jacorb.org/bugzilla/"
          
          maintainer="jacorb@goots.org"
>

    <bug>
          <bug_id>208</bug_id>
          
          <creation_ts>2002-06-14 15:32:19 +0000</creation_ts>
          <short_desc>Request at ServantManager-local call not processed according CORBA-spec 2.3</short_desc>
          <delta_ts>2003-08-11 15:49:07 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>JacORB</product>
          <component>ORB</component>
          <version>1.4 beta 4</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="marie-louise ernst">marie-louise.ernst</reporter>
          <assigned_to name="Nick Cross">rnc</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>364</commentid>
    <comment_count>0</comment_count>
    <who name="marie-louise ernst">marie-louise.ernst</who>
    <bug_when>2002-06-14 15:32:19 +0000</bug_when>
    <thetext>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() &amp;&amp; !poa.isUseServantManager() ) || 
                    poa.useDefaultServant() )
                {
                    so.servant = poa.reference_to_servant(self);
                } else if( poa.isUseServantManager() )
                */
                // new code --&gt;
                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() ) // --&gt; 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;   
    }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>689</commentid>
    <comment_count>1</comment_count>
    <who name="Nick Cross">rnc</who>
    <bug_when>2003-08-11 15:49:07 +0000</bug_when>
    <thetext>Part 1 fix committed. Attempted to contact reporter for clarification re part 2
but company has gone bankrupt.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>