Author: pferraro
Date: 2008-09-25 12:53:57 -0400 (Thu, 25 Sep 2008)
New Revision: 1906
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/DefaultMCMPHandler.java
Log:
Rollback last few desperate debugging measures.
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/DefaultMCMPHandler.java
===================================================================
---
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/DefaultMCMPHandler.java 2008-09-25
16:09:59 UTC (rev 1905)
+++
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/DefaultMCMPHandler.java 2008-09-25
16:53:57 UTC (rev 1906)
@@ -785,7 +785,7 @@
else
{
proxy.setState(Proxy.State.ERROR);
- log.error(this.sm.getString("modcluster.error.other", new
Object[] { command, proxy, errorType, message, responseStatus }));
+ log.error(this.sm.getString("modcluster.error.other", command,
proxy, errorType, message));
}
}
catch (IOException e)
@@ -947,8 +947,6 @@
{
this.socket = this.socketFactory.createSocket(this.address, this.port);
this.socket.setSoTimeout(this.socketTimeout);
- this.reader = new BufferedReader(new
InputStreamReader(this.socket.getInputStream()));
- this.writer = new BufferedWriter(new
OutputStreamWriter(this.socket.getOutputStream()));
}
return this.socket;
}
@@ -956,18 +954,24 @@
/**
* Convenience method that returns a reader to the proxy.
*/
- BufferedReader getConnectionReader() throws IOException
+ synchronized BufferedReader getConnectionReader() throws IOException
{
- this.getConnection();
+ if (this.reader == null)
+ {
+ this.reader = new BufferedReader(new
InputStreamReader(this.getConnection().getInputStream()));
+ }
return this.reader;
}
/**
* Convenience method that returns a writer to the proxy.
*/
- BufferedWriter getConnectionWriter() throws IOException
+ synchronized BufferedWriter getConnectionWriter() throws IOException
{
- this.getConnection();
+ if (this.writer == null)
+ {
+ this.writer = new BufferedWriter(new
OutputStreamWriter(this.getConnection().getOutputStream()));
+ }
return this.writer;
}
Show replies by date