[ome-devel] loadOmero('localhost') from Matlab

Munro, Ian i.munro at imperial.ac.uk
Wed Feb 1 15:57:39 GMT 2012


Hi Josh

Thanks for your reply
The next thing I do is a call to createsSession.
But unfortunately it looks to me as if it never returns from this call if the server doesn't exist.

Ian

On 1 Feb 2012, at 13:12, Josh Moore wrote:

> 
> On Feb 1, 2012, at 1:18 PM, Munro, Ian wrote:
> 
>> Hello
>> 
>> I'm curently developing  some Matlab code to access OMERO using a virtualbox server
>> running on the development machine to do the testing.
>> 
>> when I call
>> 
>> client = loadOmero('localhost');
>> 
>> either when the server isn't running or with an invalid address
>> it returns with no problem.
>> 
>> Is there a way of telling whether the value returned ( 'client' in the code snippet )
>> represents a valid server or not?
>> 
>> The reason I want to know is that if the server isn't valid
>> a subsequent call to
>> 
>> session = client.createSession(userName,passwd);
>> 
>> fails to return properly.
> 
> Hi Ian,
> 
> the only way to know whether or not the client will connect to the given server is to call createSession. If you call loadOmero with more than one return argument, however, createSession will be called for you:
> 
> properties = java.util.Properties();
> properties.setProperty('omero.host', 'localhost');
> properties.setProperty('omero.user', userName);
> % etc.
> [client, session] = loadOmero(properties);
> % similarly with passing an Ice.Config file.
> 
> Cheers,
> ~Josh
> 
>> Thanks
>> Ian
> 



More information about the ome-devel mailing list