Frank,

after a number of calls, it fails.

it would help if you provide the details of your problems, like Exception stack traces.

My guess will be that you are not closing the connections\. You must call Connection.close() every time after you finish working with a connection.

Andrus


On Feb 13, 2007, at 11:14 AM, Frank wrote:
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


Reply via email to