On 12/30/2011 03:59 PM, Pankaj Kharwal wrote:

Dear all,

I have an application written in C/C++ (runs as a webservice) which was previously running on some other platform. Now, the application has been ported to Linux and now we are using AXIS2C 1.6.0. So far, I have been successful in running the application on AXIS2C with minor glitches.

However, the application has some constructors which query tables (heavy SELECTS) and based on the data read from the tables, the application processes the request. The problem is that when I fire a request, AXIS2C executes these constructors for each request. This is not desirable because I do not want these heavy SELECTs to be executed each time the request comes to AXIS since it takes upto 3 seconds for the constructors to execute the SQL SELECTs.

Is there any way to call these constructors only at the start of AXIS engine and save this as a context to be used by the upcoming requests?

try using AXIS2_SVC_SKELETON_INIT_WITH_CONF.
Use this just like AXIS2_SVC_SKELETON_INIT method except that axis2_conf struct is passed to this method. Store whatever things you need to
keep between requests as parameter in axis2_conf struct.
See a sample service like math to see how init function can be used. init and init_with_conf are called only at service load time.

Damitha

Thanks and Regards,

Pankaj Kharwal

Stockholm, Sweden


______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________


--
__________________________________________________________________

Damitha Kumarage
Technical Lead; WSO2 Inc.
email:[email protected]; phone:+94 332262389; cell:+94 719169327
"Oxygenating the Web Service Platform; " http://www.wso2.com/

blog: " http://damithakumarage.wordpress.com/
__________________________________________________________________

Reply via email to