mina-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r546032 - in /mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio: DefaultDatagramSessionConfig.java DefaultSocketSessionConfig.java
Date Mon, 11 Jun 2007 07:20:58 GMT
Author: trustin
Date: Mon Jun 11 00:20:56 2007
New Revision: 546032

URL: http://svn.apache.org/viewvc?view=rev&rev=546032
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/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DefaultDatagramSessionConfig.java
    mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DefaultSocketSessionConfig.java

Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DefaultDatagramSessionConfig.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DefaultDatagramSessionConfig.java?view=diff&rev=546032&r1=546031&r2=546032
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DefaultDatagramSessionConfig.java
(original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DefaultDatagramSessionConfig.java
Mon Jun 11 00:20:56 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;
 
 /**
@@ -37,11 +38,11 @@
     private static boolean GET_TRAFFIC_CLASS_AVAILABLE = false;
     private static final 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
     {
@@ -94,7 +95,7 @@
                 DEFAULT_TRAFFIC_CLASS = 0;
             }
         } catch (SocketException e) {
-            throw new ExceptionInInitializerError(e);
+            ExceptionMonitor.getInstance().exceptionCaught(e);
         }
         finally {
             if( socket != null )

Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DefaultSocketSessionConfig.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DefaultSocketSessionConfig.java?view=diff&rev=546032&r1=546031&r2=546032
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DefaultSocketSessionConfig.java
(original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DefaultSocketSessionConfig.java
Mon Jun 11 00:20:56 2007
@@ -80,13 +80,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);
         }
     }
     



Mime
View raw message