Hello, I have this in a class to return a Cayenne connection. It works ok at first, but after a number of calls, it fails.
public class DBConnections {....
public Connection getAS400Connection() {
try {
Configuration config = Configuration.getSharedConfiguration();
DataDomain domain = config.getDomain();
DataNode node = domain.getNode("cdsurveyDomainNode1");
return node.getDataSource().getConnection();
} catch (Exception ex) {
return null;
}
}
Thanks
Frank
