Showing posts with label rmiregistry. Show all posts
Showing posts with label rmiregistry. Show all posts

Friday, February 22, 2008

Running 'rmiregistry' as Windows service

I wanted to configure JMeter for remote testing ( configuring master-slave model ), jmeter uses Remote Method Invocation (RMI) as the remote communication mechanism.

To run jmeter as slave on remote machine - i wanted to make jmeter and rmi as windows services. windows utilities failed to make rmi application as windows service.
I wrote following Java code and resulting class file is used to create rmi windows service - using Java Service Wrapper.

public class RMI{public static void main(String args[]) throws
Exception{ Object obj = new Object();
Runtime.getRuntime().exec("rmiregistry"); synchronized(obj)
{ obj.wait(); }}}

only issue with this program is - when you stop windows RMI service, rmiregistry process is not
getting killed. Also you need to be careful about using ports 1099 for other applications running on the system, because rmiregistry uses port *1099* as default port.

I will post on "how to configure jmeter master slave model" soon...