]
Manuel Dominguez Sarmiento commented on JGRP-1290:
--------------------------------------------------
I don't have Win7 either, only a couple of our devs do on their home-office notebooks
... but the fix would be simple:
1) Find all instances of the string "catch*(*BindException" (the stars are to
account for possible spacing differences)
2) Replace with
} catch (SocketException e) {
if (e instanceof BindException || isWindows7() {
doWhateverNeedsToBeDone();
} else {
throw e; // Assuming there's not another catch block for SocketException ...
}
}
...........
isWindows7() can be implemented by checking system properties os.name (should contain
"windows" ignoring case) and os.version (Windows 7 returns 6.1) - this should be
put in some utility class' static method.
Windows 7 might throw SocketException instead of BindException
--------------------------------------------------------------
Key: JGRP-1290
URL:
https://issues.jboss.org/browse/JGRP-1290
Project: JGroups
Issue Type: Enhancement
Affects Versions: 2.12
Environment: Windows 7
Reporter: Manuel Dominguez Sarmiento
Assignee: Bela Ban
Priority: Minor
Fix For: 2.12
This is not actually a JGroups bug, it's more of a Sun JVM bug. See the following:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6939037
In short, when a port is in use in Windows 7, SocketException is thrown instead of the
more specific BindException.
JGroups has code in several places that probes for available ports. Perhaps Windows 7
should be detected, and SocketException be caught instead of BindException in these
circumstances.
Before anyone cries out "get a real OS", we use RHEL on our production servers,
but some of our developers use Windows 7 on their development boxes.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: