Hello Nicol About your questions: 1.I used Apache SOAP Version 2.2,TomCat Server 4.0 and Jdk 1.3.. And I would like to elaborate the things... I am using Castor(Mapping tool) to map my Java Objects to database(which is DB2)..So I have to initialize a CastorPersistentDatastore variable(Similar to a database connection variable; let us call this as "store"; for easiness) for a particular session and this "store" variable is to be used for multiple method invocations under a single session..Firstly, we are initializing a rpc call on the client side for a session.. In the constructor of the server Class we are initializing a store..Suppose a number of methods are to be invoked within a session using the single "store".i.e. when we invoke one method for the first time,we are starting the transaction using the store.. So subsequent method invocations under the same session must be using the same "store" ... and for the entire session there is only one "store" variable..
and the scenarios:- 1.The Server and Client machines running in a LAN.:-.No problem occurs here..and a single "store" is maintained throughout the session... 2.The Server and Client machines are inside a WAN ; but within a local loop..:- Here also the program runs smoothly..again maintaining a single "store" variable for the entire session across different method invocations irrespective of whether the WAN Connection go through a proxy or not... 3.The Server and Client machines are in remote locations(like Server is in India and Client is in Germany):- For the first method invocation using rpc call,the program works, but for the next method call a new "store" variable is initialized again(I think all the variables of the deployed Class are initialized again!!)...remember that the transaction is not committed..It is required that the next method call also use the same old "store" variable; not the new one initialized... and I have a doubt that it happens due to the expiry of session..I used the method setTimeOut(0) of the SOAPHTTPConnection class..but of no use!!! Here no Proxy is used.. hope you would help to find out a solution.. Thank you very much for the interest shown.. Also thanks to Mark Childerson and Niclas Hedhman ... regards Rafi ----- Original Message ----- From: Scott Nichol <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, August 26, 2002 7:15 PM Subject: Re: maintaing single db connection over multiple rpc calls > Rafi, > > To help investigate this, the following would be useful: > > 1. Versions of software used (Apache SOAP, Tomcat, JVM, etc.) for both LAN > and WAN scenarios. Also, does your WAN connection go through a proxy. > 2. Capture (e.g. using TcpTunnelGui) of a pair of messages that you expect > to be in a single session in WAN scenario. If you have not used > TcpTunnelGui before, it is invoked like > > java org.apache.soap.util.net.TcpTunnelGui 81 host port > > In this case, it would listen on localhost:81 and forward messages to > host:port. You would point your client to localhost:81, e.g. an endpoint > URL of http://localhost:81/soap/servlet/rpcrouter. > > Scott Nichol > > ----- Original Message ----- > From: "Rafi M M" <[EMAIL PROTECTED]> > To: "soap developers" <[EMAIL PROTECTED]> > Sent: Monday, August 26, 2002 1:59 AM > Subject: maintaing single db connection over multiple rpc calls > > > 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 > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>