You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2005/08/25 11:32:40 UTC
cvs commit: ws-axis/c/src/engine HandlerPool.cpp HandlerPool.h RequestScopeHandlerPool.cpp RequestScopeHandlerPool.h
samisa 2005/08/25 02:32:40
Modified: c/src/engine HandlerPool.cpp HandlerPool.h
RequestScopeHandlerPool.cpp
RequestScopeHandlerPool.h
Log:
Updated code to drop init/fini pair being invoked for each method invocation for web services
Revision Changes Path
1.37 +9 -10 ws-axis/c/src/engine/HandlerPool.cpp
Index: HandlerPool.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/engine/HandlerPool.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- HandlerPool.cpp 9 Feb 2005 10:12:36 -0000 1.36
+++ HandlerPool.cpp 25 Aug 2005 09:32:40 -0000 1.37
@@ -87,7 +87,7 @@
}
int HandlerPool::poolHandler (string &sSessionId, BasicHandler* pHandler,
- int nScope, int nLibId)
+ int nScope, int nLibId, bool bWebService)
{
switch (nScope)
{
@@ -99,7 +99,7 @@
nLibId);
break;
case AH_REQUEST:
- g_pRequestScopeHandlerPool->putInstance (pHandler, nLibId);
+ g_pRequestScopeHandlerPool->putInstance (pHandler, nLibId, bWebService);
break;
}
return AXIS_SUCCESS;
@@ -323,9 +323,9 @@
pService->getLibId ())) == AXIS_SUCCESS)
{
if (0 != (*ppHandler)->_functions)
- /* C web service */
+ // C web service
{
- if (AXIS_SUCCESS !=
+ /*if (AXIS_SUCCESS !=
(Status =
(*ppHandler)->_functions->init ((*ppHandler)->_object)))
{
@@ -333,14 +333,14 @@
poolHandler (sSessionId, *ppHandler, pService->getScope (),
pService->getLibId ());
*ppHandler = NULL;
- }
+ }*/
}
else if (0 == (*ppHandler)->_object)
return AXIS_FAIL;
else
- /* C++ web service */
+ // C++ web service
{
- if (AXIS_SUCCESS !=
+ /*if (AXIS_SUCCESS !=
(Status =
((HandlerBase *) (*ppHandler)->_object)->init ()))
{
@@ -348,7 +348,7 @@
poolHandler (sSessionId, *ppHandler, pService->getScope (),
pService->getLibId ());
*ppHandler = NULL;
- }
+ }*/
}
}
return Status;
@@ -357,8 +357,7 @@
void HandlerPool::poolWebService (string &sSessionId, BasicHandler* pHandler,
const WSDDHandler * pHandlerInfo)
{
- poolHandler (sSessionId, pHandler, pHandlerInfo->getScope (),
- pHandlerInfo->getLibId ());
+ poolHandler (sSessionId, pHandler, pHandlerInfo->getScope (), pHandlerInfo->getLibId (), true);
}
AXIS_CPP_NAMESPACE_END
1.14 +1 -1 ws-axis/c/src/engine/HandlerPool.h
Index: HandlerPool.h
===================================================================
RCS file: /home/cvs/ws-axis/c/src/engine/HandlerPool.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- HandlerPool.h 23 Nov 2004 17:21:03 -0000 1.13
+++ HandlerPool.h 25 Aug 2005 09:32:40 -0000 1.14
@@ -51,7 +51,7 @@
int getHandler (BasicHandler** ppHandler, string &sSessionId,
int nScope, int nLibId);
int poolHandler (string &sSessionId, BasicHandler* pHandler, int nScope,
- int nLibId);
+ int nLibId, bool bWebService = false);
int getHandlerChain (string &sSessionId, HandlerChain** pChain,
const WSDDHandlerList* pHandlerList);
public:
1.13 +3 -2 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.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- RequestScopeHandlerPool.cpp 26 Aug 2004 09:56:00 -0000 1.12
+++ RequestScopeHandlerPool.cpp 25 Aug 2005 09:32:40 -0000 1.13
@@ -94,7 +94,7 @@
}
}
-int RequestScopeHandlerPool::putInstance (BasicHandler* pHandler, int nLibId)
+int RequestScopeHandlerPool::putInstance (BasicHandler* pHandler, int nLibId, bool bWebService)
{
lock ();
@@ -104,7 +104,8 @@
}
else if (0 != pHandler->_object)
{
- ((HandlerBase *)(pHandler->_object))->fini();
+ if (!bWebService)
+ ((HandlerBase *)(pHandler->_object))->fini();
}
m_Handlers[nLibId].push_back (pHandler);
1.12 +1 -1 ws-axis/c/src/engine/RequestScopeHandlerPool.h
Index: RequestScopeHandlerPool.h
===================================================================
RCS file: /home/cvs/ws-axis/c/src/engine/RequestScopeHandlerPool.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- RequestScopeHandlerPool.h 23 Nov 2004 17:21:03 -0000 1.11
+++ RequestScopeHandlerPool.h 25 Aug 2005 09:32:40 -0000 1.12
@@ -45,7 +45,7 @@
map < int, list <BasicHandler*> >m_Handlers;
public:
int getInstance (BasicHandler** pHandler, int nLibId);
- int putInstance (BasicHandler* pHandler, int nLibId);
+ int putInstance (BasicHandler* pHandler, int nLibId, bool bWebService = false );
};
AXIS_CPP_NAMESPACE_END