O
ociardhp
Hi
I've come across an unusual situation where a thread started in the
init method of an applet returns a particular value for
InetAddress.getLocalHost() whereas threads started at a later point in
time return a different value.
The output I see in my logs is as follows:
INFO: 17:41:39 com.cominded.diag.UpstreamProxy@6131844: Thread started
in init running on MSIE6/10.0.1.185
INFO: 17:41:47 com.cominded.diag.UpstreamProxy@6131844: New thread
running on localhost/127.0.0.1
INFO: 17:41:49 com.cominded.diag.UpstreamProxy@6131844: Thread started
in init running on MSIE6/10.0.1.185
This has been a pain to deal with as the applet acts as an RMI server
and client and so connections created by the new thread result in an
AccessControlException. Invoking
System.setProperty("java.rmi.server.hostname", "localhost"); before
taking any RMI action works on OSX/Firefox, but sadly not on Vista/
Firefox. Regardless, I assume creating a thread pool will solve the
problem.
Mostly I'd be interested in an explanation of why InetAddress exhibits
this behaviour. Many thanks to anyone who provides one.
Paul
I've come across an unusual situation where a thread started in the
init method of an applet returns a particular value for
InetAddress.getLocalHost() whereas threads started at a later point in
time return a different value.
The output I see in my logs is as follows:
INFO: 17:41:39 com.cominded.diag.UpstreamProxy@6131844: Thread started
in init running on MSIE6/10.0.1.185
INFO: 17:41:47 com.cominded.diag.UpstreamProxy@6131844: New thread
running on localhost/127.0.0.1
INFO: 17:41:49 com.cominded.diag.UpstreamProxy@6131844: Thread started
in init running on MSIE6/10.0.1.185
This has been a pain to deal with as the applet acts as an RMI server
and client and so connections created by the new thread result in an
AccessControlException. Invoking
System.setProperty("java.rmi.server.hostname", "localhost"); before
taking any RMI action works on OSX/Firefox, but sadly not on Vista/
Firefox. Regardless, I assume creating a thread pool will solve the
problem.
Mostly I'd be interested in an explanation of why InetAddress exhibits
this behaviour. Many thanks to anyone who provides one.
Paul