DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21754>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21754

NullPointerException when releasing connection





------- Additional Comments From [EMAIL PROTECTED]  2003-07-21 05:34 -------
Hello Chris,

is there a particular reason why you are trying to manage the connection
yourself? I suggest the following changes to your code:

- remove your "getConnection()" method
- use HttpClient.setTimeout(int) to specify the timeout
- use HttpClient.executeMethod(...) rather than HttpMethod.execute(...),
  so you don't need to allocate and release the connection explicitly
- use HttpMethod.releaseConnection() to release the connection

You'll have to keep a single instance of HttpClient, which itself
keeps the references to the connection manager and state that are
currently in your class.

I know this doesn't explain the behaviour you observed,
but it might help you to resolve the issue.

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

Reply via email to