[ome-devel] Launching VisBio from the OME web interface
Curtis Rueden
ctrueden at wisc.edu
Fri Apr 8 18:44:58 BST 2005
Thanks Tom, it works.
There are a couple of issues:
1) I like the idea of passing the session key to VisBio instead of
username. I checked the ome-java API and it does not look like there is
currently a way to specify a session key. However,
org.openmicroscopy.ds.XmlRpcCaller does have an internal sessionKey
field, which can be retrieved with getSessionKey, and which is used
everywhere for authentication. It is simply missing the corresponding
setSessionKey(String) method. Harry, do you or anyone else know if
adding a setSessionKey method to the RemoteCaller interface and putting
a simple implementation into XmlRpcCaller would pose a problem? If not,
I will give it a try and see if it works.
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.
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.
-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
More information about the ome-devel
mailing list