Hi,
We are facing some randoms issues in our app which uses Java Access Provider. We wonder if we are using it correctly.
To make it short, when a user logged in it will create a server object :
Server server = new Server();
server.setConnectionString(ifsProperties.getConnectionString());
server.setLocale("fr-FR");
server.setCredentials(username, password);
Then we put this server in a server map associated with the username. So each user have his own server object stored in the Map. When a request is made we retrieve the corresponding server in the list and use it for our request :
Server server = ifsServerPool.getServer(username);
if(server == null) {
// [...]
}
PlsqlSelectCommand cmd = new PlsqlSelectCommand(server,
String.format(
"SELECT * FROM &AO.activity_short_name_company_pa WHERE 1=1 %s ORDER BY SHORT_NAME OFFSET :OFFSET ROWS FETCH NEXT :LIMIT ROWS ONLY", searchStmt));
Record params = cmd.getBindVariables();
params.add("OFFSET", String.valueOf(offset));
params.add("LIMIT", String.valueOf(limit));
Is it the good way to use this library?
Thanks !