I am trying to create a thread operation to increase performance in my application. I have created a connectFactory object(example code)that get a tamino connection and returns it to the requesting class. This work fine running as a interactive process, but when I spawn the whole processing as a thread I get “server not available” errors. Is what I am trying to do possible?
/** get a connection to the Tamino database
public synchronized TConnection getConnection(String databaseURI, String collection) throws Exception
// local transaction object
// The database connection
// Obtain the connection factory
TConnectionFactory connectionFactory = TConnectionFactory.getInstance();
// Obtain the connection to the database
connection = connectionFactory.newConnection( databaseURI );
catch (Exception e)
Debug.out(“EXCEPTION: ConnectionFactory >> getConnection–” + e);
} // end of getConnection method
from looking at your code, we can not see any problem. It should work. The only thing I can think of right now is: When the exception occurs, can you print it out with the method toXMLString() and post the output here. Maybe our experts can spot a detail, which hints us to the reason for the problem.