Hello,
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?
Kind regards,
Andy
/** get a connection to the Tamino database
*/
public synchronized TConnection getConnection(String databaseURI, String collection) throws Exception
{
// local transaction object
TLocalTransaction localTransaction;
// The database connection
TConnection connection=null;
try
{
// Obtain the connection factory
TConnectionFactory connectionFactory = TConnectionFactory.getInstance();
// Obtain the connection to the database
connection = connectionFactory.newConnection( databaseURI );
connection.useAutoCommitMode();
}
catch (Exception e)
{
Debug.out(“EXCEPTION: ConnectionFactory >> getConnection–” + e);
}
return connection;
} // end of getConnection method
}
#webMethods-Tamino-XML-Server-APIs#API-Management#webMethods