Is there any tidy way to keep the same thread name when making an RMI call? At the moment if I have a named thread that makes an RMI call, on the server side of the RMI call, Thread.currentThread().getName()
returns something un-illuminating like "RMI TCP Connection(4)-10.0.0.2".
Of course, I could go and add to all my RMI methods a parameter String callingThreadName
and make the first line of each RMI method implementation Thread.currentThread().setName(callingThreadName)
, but that's hardly the neatest way of doing so. Is there any way to get at least some of the meaning behind the thread name transferred over the RMI connection?