Socket communication not happening between components after JRE upgrade
<p>I have two components: one is a gateway and the other is the Application which has been deployed in the Jboss-5.0 GA Application Server. Our old code base was developed in jdk 1.4 and after migrating to jdk 1.6 there are some issues with socket timeout.</p>

<p>Initially we have a service which initiates timeout. This socket timeout is not happening in our timeoutscenario after migrating to 1.6 version.</p>

<p>But after developing the my socket based client in 1.6 and fire a request on the server which is on 1.4 this timeout works fine. But when i build my sources in 1.6 and up my server the same hit is not working.</p>

<p>Any ideas why i am facing this problem?
Please provide your valuable inputs, thanks in advance.</p>

<p>RMISocketFactory.setSocketFactory(new RMISocketFactory() 
{</p>

<pre><code>public Socket createSocket(String host, int port) throws IOException {

Socket socket = new Socket();

socket.connect(new InetSocketAddress(host, port), connectionTimeout);

socket.setSoTimeout(readTimeout);

socket.setSoLinger(false, 0);

return socket;
</code></pre>

<p>}</p>

<p>public ServerSocket createServerSocket(int port) throws IOException {</p>

<pre><code>return new ServerSocket(port);
</code></pre>

<p>}</p>

<p>});</p>

<p>The above is the code......</p>

<p>We have also given security permission also in this manner:</p>

<pre><code>if(System.getSecurityManager() == null)
{
 System.setSecurityManager(new RMISecurityManager());
  }
  grant { 
permission java.security.AllPermission; 
}; 
</code></pre>
