On Feb 24, 2011, at 7:38 AM, joe wrote:

>> ********************************************************************************
>> public void runningVMs() throws MonitorException, URISyntaxException {
>> MonitoredHost monitoredHost = MonitoredHost.getMonitoredHost("localhost");
>>       Set<Integer>  activeVms = monitoredHost.activeVms();
>>       for (int psId : activeVms)
>>       {
>>          MonitoredVm monitoredVm = monitoredHost.getMonitoredVm(new
>> VmIdentifier(String.valueOf(psId)));
>>          String mainClass = MonitoredVmUtil.mainClass(monitoredVm, false);
>>          System.out.println(mainClass + " [" + psId + "]");
>>       }
>> }
> 
> interesting, output here is:
> 
> Program [5540] <--- OpenEJB
> [3056]
> [4240]
> App [4220]
> NetworkServerControl [2720]
> 
> currently i stay with my java socket approach, but this is something good to 
> know, thx

The command line tools use the EJB port as well.  I've noticed when adding our 
JMX support that JConsole has some magical way of knowing the running java 
process on the local machine and can connect to them.  Whatever it is I would 
really love to know how it works cause that could really improve our tools!

Side note, any ease of management stuff you come up with, I think would be 
great additions.   The more users that are contributors and committers, the 
better!  One of the advantages of open source should be that you don't have to 
build infrastructure *around* something, but you can actually build it *into* 
directly.



-David

Reply via email to