mina-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r546034 - in /mina/branches/1.1/core/src/main/java/org/apache/mina/transport/socket/nio: SocketSessionConfigImpl.java support/DatagramSessionConfigImpl.java
Date Mon, 11 Jun 2007 07:21:06 GMT
Author: trustin
Date: Mon Jun 11 00:21:05 2007
New Revision: 546034

URL: http://svn.apache.org/viewvc?view=rev&rev=546034
Log:
Fixed issue: DIRMINA-386 (SocketSessionConfigImpl: initialize() uses "localhost" to bind InetSocketAddress,
should use IP instead)
* Made sure fall-back default values are used even if all tests fail.

Modified:
    mina/branches/1.1/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionConfigImpl.java
    mina/branches/1.1/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionConfigImpl.java

Modified: mina/branches/1.1/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionConfigImpl.java
URL: http://svn.apache.org/viewvc/mina/branches/1.1/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionConfigImpl.java?view=diff&rev=546034&r1=546033&r2=546034
==============================================================================
--- mina/branches/1.1/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionConfigImpl.java
(original)
+++ mina/branches/1.1/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionConfigImpl.java
Mon Jun 11 00:21:05 2007
@@ -81,13 +81,13 @@
         try {
             initializeDefaultSocketParameters(unconnectedSocket);
         } catch (SocketException se) {
+            ExceptionMonitor.getInstance().exceptionCaught(se);
+
             try {
                 unconnectedSocket.close();
             } catch (IOException ioe) {
                 ExceptionMonitor.getInstance().exceptionCaught(ioe);
             }
-            
-            throw new ExceptionInInitializerError(se);
         }
     }
     

Modified: mina/branches/1.1/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionConfigImpl.java
URL: http://svn.apache.org/viewvc/mina/branches/1.1/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionConfigImpl.java?view=diff&rev=546034&r1=546033&r2=546034
==============================================================================
--- mina/branches/1.1/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionConfigImpl.java
(original)
+++ mina/branches/1.1/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionConfigImpl.java
Mon Jun 11 00:21:05 2007
@@ -22,6 +22,7 @@
 import java.net.DatagramSocket;
 import java.net.SocketException;
 
+import org.apache.mina.common.ExceptionMonitor;
 import org.apache.mina.common.support.BaseIoSessionConfig;
 import org.apache.mina.transport.socket.nio.DatagramSessionConfig;
 
@@ -36,11 +37,11 @@
     private static boolean GET_TRAFFIC_CLASS_AVAILABLE = false;
     private static boolean SET_TRAFFIC_CLASS_AVAILABLE = false;
 
-    private static boolean DEFAULT_BROADCAST;
-    private static boolean DEFAULT_REUSE_ADDRESS;
-    private static int DEFAULT_RECEIVE_BUFFER_SIZE;
-    private static int DEFAULT_SEND_BUFFER_SIZE;
-    private static int DEFAULT_TRAFFIC_CLASS;
+    private static boolean DEFAULT_BROADCAST = false;
+    private static boolean DEFAULT_REUSE_ADDRESS = false;
+    private static int DEFAULT_RECEIVE_BUFFER_SIZE = 1024;
+    private static int DEFAULT_SEND_BUFFER_SIZE = 1024;
+    private static int DEFAULT_TRAFFIC_CLASS = 0;
     
     static
     {
@@ -93,7 +94,7 @@
                 DEFAULT_TRAFFIC_CLASS = 0;
             }
         } catch (SocketException e) {
-            throw new ExceptionInInitializerError(e);
+            ExceptionMonitor.getInstance().exceptionCaught(e);
         }
         finally {
             if( socket != null )



Mime
View raw message