[jboss-dev-forums] [Design of JBoss Transaction Services] - Re: TransactionManager and AS' ServiceBindingManager

bstansberry@jboss.com do-not-reply at jboss.com
Thu Aug 28 10:50:26 EDT 2008


Yes and no.  There is an overloaded constructor with 4 params; the third is the host name and accepts null:


  | <constructor>
  |    <parameter>TransactionManager</parameter>
  |    <parameter>socketProcessId</parameter>
  |    <parameter><null/></parameter>
  |    <parameter>10001</parameter>
  | </constructor>
  | 

ServiceBinding actually exposes two getters related to the hostname passed to the constructor:

String getHostName() -- simple getter
InetAddress getBindAddress() -- derived from hostname

The first is a simple getter of what's passed in; the second is derived from hostname:

this.bindAddress = InetAddress.getByName(hostName);

InetAddress.getByName() will return the loopback address if passed null; so in your case calling getBindAddress() will return the loopback address, not null. 

That could probably be changed to return null; I didn't think about it much when I rewrote SBM; just left in place the existing behavior.

Of course, what getBindAddress() returns only matters if someone invokes on SBM asking for it, which I imagine JBossTS won't be doing. :-)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173097#4173097

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173097



More information about the jboss-dev-forums mailing list