I had some trouble with the session scope of soap calls myself, so what I did was create a Singleton class to hold a pool of database connections. The SOAP server then runs with request scope and gets a connection from the pool. As well as solving the immediate problem, connection pooling like this confers a number of performance and scalability advantages.

Mark


At 11:29 AM 26/08/2002 +0530, you wrote:
Hello
   I tried to use Apache SOAP rpc call to access the classes(running in a remote server)
which in turn connect to the database and perform the database operations.I deployed the service in a Apache TomCat Server while making the scope  as  "Session".. It was required to maintain a single database connection for different method invocations for a particular session..The client classes were running in my machine. When testing the thing inside a local network,it worked smoothly without any problems and I could maintain a single database connection variable over different method invocations for a single session.. But when I run the server in a very remote machine, for each rpc method call, the constructor of the server class(which is the deployed service) is called and a new databse connection is made for the session..Thus for each method call within one single session, a new database connection is used...I don't know why it happens..Is it due to session timeout?
I would be great if anyone you can  provide a solution to the problem..

 
regards
Rafi

Reply via email to