Reputation: 973
I start the JBOSS server from within eclipse and it is able to bind to the computer name [ ip address] , but when i try to start it using run.bat , it just binds to 127.0.0.1 .
From run.bat :
*INFO [WebService] Using RMI server codebase : http://127.0.0.1:8083/*
From within Eclispe :
*INFO [WebService] Using RMI server codebase: http://myIP:8083/*
So is it something that Eclipse uses different files , whereas run.bat uses separate ones .
My Analysis :
When the server starts , the run.jar is called , inside which there is a Main.class
C:\jboss-5.0.1.GA\jboss-5.0.1.GA\bin\run.jar
and in this : org.jboss.Main and this sets the property to 127.0.0.1 :
this.props.setProperty("jboss.bind.address", "127.0.0.1");
System.setProperty("jboss.bind.address", "127.0.0.1");
Then it checks if any option i.e. -b or something else has been specified and if so then uses it .
So i understand , why JBOSS without any options connects to 127.0.0.1 and with an option connects to the specified IP .
But what i still cannot understand is why does Eclipse connect to my ip . I am not specifying any options , or maybe i am but i don't know . So if anyone can point me to that Or maybe does it have its own implementation of JBOSS , or different files set ??
Upvotes: 1
Views: 11104
Reputation: 435
After adding server to Eclipse IDE from:
Then select your required project and from the context menu select
Run As -> Run On Server
Then select your added Jboss server and then replace the:
Server's host name field value from localhost to your PC IP address.
Then click Finish. Hope this will work Thanks.
Upvotes: 2
Reputation: 973
The answer being that you can set it in eclipse . I guess it got set for my server Or by default it is already set .
And since it is set to -b 0.0.0.0 .. So it works .
Wel it took me close to 2 hours to figure this out . I just hope someone stumbles it on quicker .
There are a lot of other threads , but they just don't specify this step .
Hope it helps .
Upvotes: 12