[ome-devel] Launching VisBio from the OME web interface

Ilya Goldberg igg at nih.gov
Fri Apr 8 20:26:33 BST 2005


On Apr 8, 2005, at 1:44 PM, Curtis Rueden wrote:

> 2) I noticed that the server field comes up blank. Tom's code uses the  
> "hostname" command to grab the server name, which returns "skyking" on  
> my machine, so I am not sure why that isn't showing up in VisBio's  
> login dialog. However, even if it did show up, it really should be the  
> full "skyking.microscopy.wisc.edu" address since there is no guarantee  
> that the client machine resides on the same domain. Unfortunately,  
> none of the command line flags for "hostname" or related commands seem  
> to return the complete string. I did construct a command that does  
> what is needed, but it's ugly:
>
>    grep ^ServerName /etc/apache/httpd.conf | sed -e 's/[^ ]* //g'
>
> Chris, do you or anyone else know a better/stronger/safer way to glean  
> the full OMEDS address? The command would be used in OME/Web/VisBio.pm  
> line 67.


The perlish way to do this is supposed to be
use Sys::Hostname;
		$server = hostname();
It reports a fully qualified hostname everywhere I tried it so far.   
See if that works better.
I committed it to HEAD.

We probably should put this in the configuration table during  
installation and always get it from there.  There are a few places  
where a FQDN needs to be generated and sent to a remote client.   
Register a bug maybe?


> Lastly, regarding the multiple instances issue, I did some research  
> and found out that I can prevent multiple instances of VisBio from  
> running with a simple socket server, or using RMI, or with a file  
> lock. But since there is no built-in support in Java for this level of  
> control, it is a little bit of work to add to VisBio. But it should be  
> feasible to pass command line parameters from a newly spawned instance  
> of the application to an existing instance before shutting down the  
> superfluous instance. It's going on my list of things to code when I  
> have time. I will do my best to code this logic as modularly as  
> possible, so that all our Java apps (VisBio, Shoola, ImageJ plugin,  
> etc.) that want to connect to OME can use it to pass command line  
> parameters to existing instances with a minimum of hassle.

Do you really need to launch the whole application instance?  Can you  
launch a little bitty application that just checks if there are any  
instances running, then passes the arguments to any running ones, or  
loads up the whole application if there's not?  I don't know what I'm  
talking about, so I'll butt out now.

-Ilya


>
> -Curtis
>
> Tom Macura wrote:
>
>> Hey Curtis,
>>
>> I embedded your JNLP magic into the OME web-ui. Committed to HEAD.
>> To see it in action view Image Detail and click on 'View Image in  
>> VisBio' (under Original Files).
>> Now you can do e.g.: *OME::Web::VisBio&ImageID=3.
>> *
>> Probably the most relevant file for you to play with is:
>> http://cvs.openmicroscopy.org.uk/horde/chora/co.php?f=/OME/src/perl2/ 
>> OME/Web/VisBio.pm&r=NONE
>>
>> It would be better if you passed the session-key to VisBio because  
>> then the user password won't have to be entered.
>> I noticed that if VisBio is currently running on the client and I  
>> open another image through JNLP, another VisBio is launched. That's  
>> far from ideal.
>>
>> Please let me know how things work out for you,
>>
>> Tom
>
>
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>



More information about the ome-devel mailing list