You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ro...@apache.org on 2004/08/26 11:56:00 UTC

cvs commit: ws-axis/c/src/engine/client ClientAxisEngine.h ClientAxisEngine.cpp

roshan      2004/08/26 02:56:00

  Modified:    c/src/engine RequestScopeHandlerPool.cpp
               c/src/engine/client ClientAxisEngine.h ClientAxisEngine.cpp
  Log:
  added code to enable to call the fini method when handlers are released
  
  Revision  Changes    Path
  1.12      +16 -1     ws-axis/c/src/engine/RequestScopeHandlerPool.cpp
  
  Index: RequestScopeHandlerPool.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/RequestScopeHandlerPool.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- RequestScopeHandlerPool.cpp	6 Aug 2004 14:44:31 -0000	1.11
  +++ RequestScopeHandlerPool.cpp	26 Aug 2004 09:56:00 -0000	1.12
  @@ -19,6 +19,11 @@
    *
    */
   
  +/*
  + * Revision 1.1  2004/08/26 roshan
  + * Added code to the putInstance method, so that it calls the "fini" method of
  + *  a Handler when the handler is released
  + */
   
   #include "RequestScopeHandlerPool.h"
   #include "HandlerLoader.h"
  @@ -92,9 +97,19 @@
   int RequestScopeHandlerPool::putInstance (BasicHandler* pHandler, int nLibId)
   {
       lock ();
  +
  +    if (0 != pHandler->_functions)
  +    {
  +        /* C Handler */
  +    }
  +    else if (0 != pHandler->_object)
  +    {
  +         ((HandlerBase *)(pHandler->_object))->fini();
  +    }
  +
       m_Handlers[nLibId].push_back (pHandler);
       unlock ();
       return AXIS_SUCCESS;
   }
   
  -AXIS_CPP_NAMESPACE_END
  \ No newline at end of file
  +AXIS_CPP_NAMESPACE_END
  
  
  
  1.10      +7 -0      ws-axis/c/src/engine/client/ClientAxisEngine.h
  
  Index: ClientAxisEngine.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/client/ClientAxisEngine.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ClientAxisEngine.h	6 Aug 2004 14:44:34 -0000	1.9
  +++ ClientAxisEngine.h	26 Aug 2004 09:56:00 -0000	1.10
  @@ -15,6 +15,12 @@
    *   limitations under the License.
    */
   
  +/*
  + * Revision 1.1  2004/08/26 roshan
  + * Added the method "releaseHandlers(string sSessionId)" in order to release the
  + *  Handlers once they are used.
  + */
  +
   #if !defined(AXIS_CLIENTAXISENGINE_H__OF_AXIS_INCLUDED_)
   #define AXIS_CLIENTAXISENGINE_H__OF_AXIS_INCLUDED_
   
  @@ -38,6 +44,7 @@
           virtual int invoke (MessageData* pMsg);
           virtual void onFault (MessageData* pMsg);
       private:
  +	void releaseHandlers(string sSessionId);
           SOAPTransport* m_pSoap;
   };
   AXIS_CPP_NAMESPACE_END
  
  
  
  1.16      +22 -9     ws-axis/c/src/engine/client/ClientAxisEngine.cpp
  
  Index: ClientAxisEngine.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/client/ClientAxisEngine.cpp,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ClientAxisEngine.cpp	6 Aug 2004 14:44:34 -0000	1.15
  +++ ClientAxisEngine.cpp	26 Aug 2004 09:56:00 -0000	1.16
  @@ -15,6 +15,13 @@
    *   limitations under the License.
    */
   
  +/*
  + * Revision 1.1  2004/08/26 roshan
  + * Added the method "releaseHandlers(string sSessionId)" in order to release the
  + *  Handlers once they are used.
  + */
  +
  +
   #include "ClientAxisEngine.h"
   #include "../../wsdd/WSDDDeployment.h"
   #include "../HandlerPool.h"
  @@ -97,14 +104,8 @@
       }
       while (0);
   
  -    /* // Pool back the Service specific handlers
  -     * if (m_pSReqFChain) g_pHandlerPool->PoolHandlerChain(m_pSReqFChain, 
  -     *     sSessionId);
  -     * if (m_pSResFChain) g_pHandlerPool->PoolHandlerChain(m_pSResFChain, 
  -     *     sSessionId);
  -     * // Pool back the Global and Transport handlers
  -     * UnInitializeHandlers(sSessionId, soap->trtype);
  -     */
  +    //release the handlers
  +    releaseHandlers(sSessionId);	     
       }
       catch(AxisException& e)
       {
  @@ -113,6 +114,18 @@
       return Status;
   }
   
  +void ClientAxisEngine::releaseHandlers(string sSessionId)
  +{
  +    // Pool back the Service specific handlers
  +    if (m_pSReqFChain) 
  +	g_pHandlerPool->poolHandlerChain(m_pSReqFChain, sSessionId);
  +    if (m_pSResFChain) 
  +	g_pHandlerPool->poolHandlerChain(m_pSResFChain, sSessionId);
  +
  +     // Pool back the Global and Transport handlers
  +     //UnInitializeHandlers(sSessionId, soap->trtype);	
  +}
  +
   int ClientAxisEngine::invoke (MessageData* pMsg)
   {
       enum AE_LEVEL
  @@ -226,4 +239,4 @@
   
   }
   
  -AXIS_CPP_NAMESPACE_END
  \ No newline at end of file
  +AXIS_CPP_NAMESPACE_END