susantha 2003/08/14 21:31:26
Modified: c/src/common GDefine.h
c/src/engine HandlerPool.cpp SharedObject.cpp SharedObject.h
c/src/server/handlers/custom/loghandler LogHandler.cpp
c/src/server/handlers/global/testhandler1 TestGlobal.cpp
c/src/server/handlers/transport/testhandler2
TestTransport.cpp
Added: c/src/common GDefine.cpp
Log:
Added new file GDefine.cpp which will contain Global Platform specific coding
Revision Changes Path
1.3 +2 -0 xml-axis/c/src/common/GDefine.h
Index: GDefine.h
===================================================================
RCS file: /home/cvs/xml-axis/c/src/common/GDefine.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- GDefine.h 26 Jul 2003 12:19:12 -0000 1.2
+++ GDefine.h 15 Aug 2003 04:31:25 -0000 1.3
@@ -72,4 +72,6 @@
#define SOAPACTIONHEADER "SOAPAction"
+extern void Ax_Sleep(int);
+
#endif //__GDEFINE_INCLUDED__
1.1 xml-axis/c/src/common/GDefine.cpp
Index: GDefine.cpp
===================================================================
#include "GDefine.h"
#ifdef WIN32
#include <Windows.h>
#else
#include <unistd.h>
#endif
void Ax_Sleep(int nTime)
{
#ifdef WIN32
Sleep(0);
#else
sleep(0);
#endif
}
1.7 +1 -5 xml-axis/c/src/engine/HandlerPool.cpp
Index: HandlerPool.cpp
===================================================================
RCS file: /home/cvs/xml-axis/c/src/engine/HandlerPool.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- HandlerPool.cpp 13 Aug 2003 14:07:47 -0000 1.6
+++ HandlerPool.cpp 15 Aug 2003 04:31:25 -0000 1.7
@@ -103,11 +103,7 @@
}
else if (Status == HANDLER_BEING_USED)
{ //block this thread not this object
- #ifdef WIN32
- Sleep(0);
- #else
- sleep(0);
- #endif
+ Ax_Sleep(0);
}
else
{
1.2 +2 -9 xml-axis/c/src/engine/SharedObject.cpp
Index: SharedObject.cpp
===================================================================
RCS file: /home/cvs/xml-axis/c/src/engine/SharedObject.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SharedObject.cpp 13 Aug 2003 14:07:47 -0000 1.1
+++ SharedObject.cpp 15 Aug 2003 04:31:26 -0000 1.2
@@ -3,11 +3,7 @@
//////////////////////////////////////////////////////////////////////
#include "SharedObject.h"
-#ifdef WIN32
-#include <Windows.h>
-#else
-#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
@@ -27,11 +23,7 @@
{
while (m_bLocked)
{
-#ifdef WIN32
- Sleep(0);
-#else
- sleep(0);
-#endif
+ Ax_Sleep(0);
}
m_bLocked = true;
return 0;
@@ -42,3 +34,4 @@
m_bLocked = false;
return 0;
}
+
1.2 +2 -0 xml-axis/c/src/engine/SharedObject.h
Index: SharedObject.h
===================================================================
RCS file: /home/cvs/xml-axis/c/src/engine/SharedObject.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SharedObject.h 13 Aug 2003 14:07:47 -0000 1.1
+++ SharedObject.h 15 Aug 2003 04:31:26 -0000 1.2
@@ -10,6 +10,8 @@
#pragma once
#endif // _MSC_VER > 1000
+#include "../common/GDefine.h"
+
class SharedObject
{
public:
1.3 +3 -6 xml-axis/c/src/server/handlers/custom/loghandler/LogHandler.cpp
Index: LogHandler.cpp
===================================================================
RCS file: /home/cvs/xml-axis/c/src/server/handlers/custom/loghandler/LogHandler.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LogHandler.cpp 17 Jul 2003 07:04:44 -0000 1.2
+++ LogHandler.cpp 15 Aug 2003 04:31:26 -0000 1.3
@@ -28,8 +28,7 @@
// Implementation of BasicHandler interface.
int LogHandler::Invoke(IMessageData* md)
{
- try
- {
+ AXIS_TRY
DEBUG1("LogHandler::Invoke(IMessageData* md)");
m_iNumAccess = 0;
@@ -75,11 +74,9 @@
{
return FAIL;
}
- }
- catch (...)
- {
+ AXIS_CATCH(...)
return FAIL;
- }
+ AXIS_ENDCATCH
}
void LogHandler::OnFault(IMessageData* mc)
1.3 +3 -6
xml-axis/c/src/server/handlers/global/testhandler1/TestGlobal.cpp
Index: TestGlobal.cpp
===================================================================
RCS file:
/home/cvs/xml-axis/c/src/server/handlers/global/testhandler1/TestGlobal.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TestGlobal.cpp 17 Jul 2003 07:00:22 -0000 1.2
+++ TestGlobal.cpp 15 Aug 2003 04:31:26 -0000 1.3
@@ -28,16 +28,13 @@
// Implementation of BasicHandler interface.
int TestGlobal::Invoke(IMessageData* md)
{
- try
- {
+ AXIS_TRY
DEBUG1("Hi, you successfully invoked TestGlobal handler");
return SUCCESS;
- }
- catch (...)
- {
+ AXIS_CATCH(...)
DEBUG1("inside catch block");
return FAIL;
- }
+ AXIS_ENDCATCH
}
void TestGlobal::OnFault(IMessageData* mc)
1.3 +3 -6
xml-axis/c/src/server/handlers/transport/testhandler2/TestTransport.cpp
Index: TestTransport.cpp
===================================================================
RCS file:
/home/cvs/xml-axis/c/src/server/handlers/transport/testhandler2/TestTransport.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TestTransport.cpp 17 Jul 2003 07:01:05 -0000 1.2
+++ TestTransport.cpp 15 Aug 2003 04:31:26 -0000 1.3
@@ -28,15 +28,12 @@
// Implementation of BasicHandler interface.
int TestTransport::Invoke(IMessageData* md)
{
- try
- {
+ AXIS_TRY
DEBUG1("Hi, you have successfully invoked the TestTransport handler");
return SUCCESS;
- }
- catch (...)
- {
+ AXIS_CATCH(...)
return FAIL;
- }
+ AXIS_ENDCATCH
}
void TestTransport::OnFault(IMessageData* mc)