I've made a web service using Java 7 and Matlabcontrol-4.1.0. In this web service, i'm starting a Matlab r2015a session to execute a function. As far as I can see, isExistingSession and setUsePreviouslyControlledSession are functions to use a previously created session.
Q: In order to get the best performance, which method should I use?
isExistingSession (MatlabProxy) and/or setUsePreviouslyControlledSession (MatlabProxyFactoryOptions)?
I am using the following code at the moment:
// setting up connection to MatLab
MatlabProxyFactoryOptions options = new MatlabProxyFactoryOptions.Builder()
.setUsePreviouslyControlledSession(true).setHidden(true)
.setMatlabLocation(null).build();
MatlabProxyFactory factory = new MatlabProxyFactory(options);
MatlabProxy proxy = factory.getProxy();
I have checked setUsePreviouslyControlledSession and isExistingSession, but I don't quite understand.