[ openjms-Bugs-750870 ] Cannot bind to a specific interface

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.java.openjms.devel
Message-ID <[email protected]>
Bugs item #750870, was opened at 2003-06-08 06:27
Message generated for change (Comment added) made by lgas
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=750870&group_id=54559

Category: server
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: John Evans (lgas)
Assigned to: Tim Anderson (tanderson)
Summary: Cannot bind to a specific interface

Initial Comment:
I would like to be able to bind to specific interfaces, 
specifically 127.0.0.1, however it appears that this is 
not possible.  I looked briefly for where to make the 
changes and the only place I can find where a 
ServerSocket is even used is in the apache JNDI stuff.  
If someone can point me in the right direction to get me 
started I'll gladly make the changes and submit a patch.

----------------------------------------------------------------------

>Comment By: John Evans (lgas)
Date: 2003-06-18 15:43

Message:
Logged In: YES 
user_id=137603

Here are the patches to allow binding to a specific interface 
in the exolab core libraries.  

----------------------------------------------------------------------

Comment By: Tim Anderson (tanderson)
Date: 2003-06-16 20:45

Message:
Logged In: YES 
user_id=557161

Sure - the sources for exolabcore can be obtained as follows:
cvs -
d:pserver:[email protected]:/cvsroot/openjms 
login 
 
cvs -z3 -
d:pserver:[email protected]:/cvsroot/openjms 
co exolabcore



----------------------------------------------------------------------

Comment By: John Evans (lgas)
Date: 2003-06-16 12:43

Message:
Logged In: YES 
user_id=137603

It looks like maybe the connections are being created in the 
init() method of the org.exolab.jms.server.mipc.IpcJmsServer 
class through a call to the .createServer(int port) method 
which creates a new org.exolab.jms.server.mipc.IpcJmsServer 
which only has a single interface which just takes the port to 
listen on and the ConnectionNotifier to notify... so if I'm not 
mistaken, all of this stuff would have to be updated to take 
an optional address to bind to.  If the source is available for 
the exolabcore stuff, I'll take a shot at it....

----------------------------------------------------------------------

Comment By: John Evans (lgas)
Date: 2003-06-16 11:44

Message:
Logged In: YES 
user_id=137603

When I leave the host attribute of the ServerConfiguration 
parameter set to "localhost" (as it is by default) or set it 
explicitly to "127.0.0.1" as you tanderson suggested, the 
server binds to all interfaces on the machine (0.0.0.0) and 
not just 127.0.0.1.

I would like to be able to bind to JUST 127.0.0.1 (or the 
address of any other specific interface, instead of 0.0.0.0 
which is the address that maps to all interfaces).

Again, I'd be happy to make the changes but I have not yet 
found the place in the code where the binding is done, so any 
guidance would be helpful.

----------------------------------------------------------------------

Comment By: Tim Anderson (tanderson)
Date: 2003-06-08 09:17

Message:
Logged In: YES 
user_id=557161

I'm not exactly sure what you're trying to do, but you should 
be able to configure the server for 127.0.0.1. E.g,
in openjms.xml:

  <ServerConfiguration host="127.0.0.1"/>

As for the JNDI code - the part you're referring to isn't used 
by OpenJMS.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=750870&group_id=54559
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.