[ 
https://issues.apache.org/jira/browse/AXIS2C-664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518924
 ] 

Nandika Jayawardana commented on AXIS2C-664:
--------------------------------------------

I ran the above code with with one change as follows.
#include <iostream>
#include <axis2_util.h>
#include <axis2_client.h>

using namespace std;

int main() {
       axutil_env_t* env = axutil_env_create_all("hello_client.log", 
AXIS2_LOG_LEVEL_TRACE);

       const int TIMES = 1000;
       for(int i = 1; i <= TIMES; ++i) {
               cout << i << endl;
                           axis2_svc_client_t* svc_client = 
axis2_svc_client_create(env, AXIS2_GETENV("AXIS2C_HOME"));
               axis2_svc_client_free(svc_client, env);
       }

       axutil_env_free(env);
       return 0;
}

I did not see any handle leaks in the task manager and the program did not crash

> It seems that axis2/c lib has an upper limitation on the number of service 
> client objects that have been created.
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-664
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-664
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: core/clientapi
>    Affects Versions: 1.0.0
>         Environment: Windodw Server 2003, English Version, Microsoft Visual 
> C++.net 2005, Intel Petium D CPU 3.0G dual core, 2G memory
>            Reporter: Rock Wang
>            Priority: Critical
>
> It seems that axis2/c lib has an upper limitation on the number of service 
> client objects that have ever been created. 
> Note that I used the the word "have ever",  which means the limitation is not 
> on the number of clients that are simultaneously active, but on the total 
> number of clients that have ever been created, including all those already 
> freed.
> The following program can be used to generate the problem. In my Visual C++ 
> 2005, it incurs an "Unhandled Win32 exception".  And to make more strange, 
> using "Ctrl-F5"(start debugging) to run the program can make the exception 
> occurs more easily than using just "F5"(start without debugging). I mean more 
> "early" or more "rapidly".
> #include <iostream>
> #include <axis2_util.h>
> #include <axis2_client.h>
> using namespace std;
> int main() {
>       axutil_env_t* env = axutil_env_create_all("hello_client.log", 
> AXIS2_LOG_LEVEL_TRACE);
>       const int TIMES = 1000;
>       for(int i = 1; i <= TIMES; ++i) {
>               cout << i << endl;
>               axis2_svc_client_t* svc_client = axis2_svc_client_create(env, 
> "axis2_repository");
>               axis2_svc_client_free(svc_client, env);
>       }
>       axutil_env_free(env);
>       return 0;
> }
> Using ctrl-F5, the program terminated with that exception when i becomes only 
> 10.
>  I really feel that this code should not fail, because every client object is 
> freed before creating a new one, which means, there is always at most only 
> one client object living in my program.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to