tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andygumbre...@apache.org
Subject tomee git commit: Just get next available port in range
Date Mon, 01 Dec 2014 22:06:31 GMT
Repository: tomee
Updated Branches:
  refs/heads/tomee-1.7.x 1e2c844db -> 2fece229d


Just get next available port in range


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/2fece229
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/2fece229
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/2fece229

Branch: refs/heads/tomee-1.7.x
Commit: 2fece229d9a0312e5bc447033a5e06be2a32229c
Parents: 1e2c844
Author: andygumbrecht <andygumbrecht@apache.org>
Authored: Mon Dec 1 23:05:48 2014 +0100
Committer: andygumbrecht <andygumbrecht@apache.org>
Committed: Mon Dec 1 23:05:48 2014 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/openejb/util/NetworkUtil.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/2fece229/container/openejb-core/src/main/java/org/apache/openejb/util/NetworkUtil.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/util/NetworkUtil.java
b/container/openejb-core/src/main/java/org/apache/openejb/util/NetworkUtil.java
index d0ce67e..40a83e9 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/util/NetworkUtil.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/util/NetworkUtil.java
@@ -41,7 +41,7 @@ public final class NetworkUtil {
      * Lock file property name
      */
     public static final String TOMEE_LOCK_FILE = "TOMEE_LOCK_FILE";
-    public static final int[] RANDOM = new int[] { 0 };
+    //public static final int[] RANDOM = new int[]{0};
 
     private static final ReentrantLock lock = new ReentrantLock();
     private static final ByteBuffer buf = ByteBuffer.allocate(512);
@@ -63,7 +63,7 @@ public final class NetworkUtil {
         final ReentrantLock l = lock;
         l.lock();
         try {
-            return getNextAvailablePort(RANDOM);
+            return getNextAvailablePort(PORT_MIN, PORT_MAX, null);
         } finally {
             l.unlock();
         }
@@ -113,7 +113,7 @@ public final class NetworkUtil {
                 }
 
                 try {
-                    s = create(new int[]{ i }, lastPorts);
+                    s = create(new int[]{i}, lastPorts);
                     port = s.getLocalPort();
                     break;
 


Mime
View raw message