Delay of RMI Call only when called from IS JavaService

Hey @ll,

following situation in a clients HPUX IS environment.

Using a Java Service which transfers a webservice call to a homemade “Adapter” java program shows a significant dealy on the first call (around 5-7seconds). Every call after this one gets the result from the connected remote system almost immediately with no delay.
The delay rises again after the build connection to the remote host is released (60 sec). (checked via netstat)

if i compile a TestMainClass together with the same Java “Adapter” Class to connect to the remote system, and start it via java -jar etc. from the console, there is no delay at the first or following calls at all. No matter if WinXP or HPUX environment.

The “Adapter” itself handles all rmi connection stuff and gives the received rmi.object back. If i turn all possible rmi loggings on for the jvm (via or on the console via java -D parameters) i made the following observation:

Call from inside IS flow :

[B]Dec 13, 2010 1:01:10[/b] PM sun.rmi.server.UnicastRef done
FINE: HTTP Handler free connection (reuse = true)
[B]Dec 13, 2010 1:01:13[/b] PM sun.rmi.server.UnicastRef newCall
FINE: HTTP Handler get connection
Dec 13, 2010 1:01:13 PM sun.rmi.transport.proxy.RMIMasterSocketFactory createSocket
FINE: HTTP Handler host:, port: 53499
Dec 13, 2010 1:01:13 PM sun.rmi.server.UnicastRef newCall

this delay (varies between 3-5 sec) at this point of the rmi log is only visible in the IS Jvm log. the same outside on the same HPUX server shows:

Dec 13, 2010 4:42:37 PM sun.rmi.server.UnicastRef done
FINE: main: free connection (reuse = true)
Dec 13, 2010 4:42:37 PM sun.rmi.server.UnicastRef newCall
FINE: main: get connection

i spare you the rest of the log because its identical on all environments and i think inside this section is the reason for the delay.

Anyone expirienced the same and found some solution or at least some hints where to dig deeper ?

thanks in advance

Can you please validate the availability of threads on the target side as from the log if you see the 1st call is “free connection” which is to check for the availability of a free connection and the 2nd call in the sequence is “get connection” which is to acquire a connection. There might be a delay induced by the transport layer which is caused when a new thread is needed to take the free connection which was just made available and use it for your transaction to get processed.


I am trying to call the RMI services from wM IS. Do you have any idea that wM IS need to use the similar kind of adapters or we can handle it throgh the java services in wM.