[jboss-user] [JBoss Eclipse IDE (users)] - Re: Setup for single box cluster on 2 Alpha
jatsrt
do-not-reply at jboss.com
Fri Jul 14 09:51:41 EDT 2006
I threw this together quickly and I will put this into the issues also , but why would this not work
public boolean isLocalHost(String hostAddress) {
| try {
| Enumeration<NetworkInterface> interfaces = NetworkInterface
| .getNetworkInterfaces();
|
| while (interfaces.hasMoreElements()) {
| NetworkInterface inter = interfaces.nextElement();
| Enumeration<InetAddress> addresses = inter.getInetAddresses();
|
| while (addresses.hasMoreElements()) {
| InetAddress address = addresses.nextElement();
| if (StringUtils.equals(hostAddress, address
| .getHostAddress())) {
| return true;
| }
| }
| }
| } catch (Exception e) {
| e.printStackTrace();
| }
|
| return false;
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958075#3958075
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958075
More information about the jboss-user
mailing list