Posted By:
Sam_G
Posted On:
Monday, March 20, 2006 04:54 PM
From WAS (WebSphere) 5.1.1.3 I connect to remote MQ server for JMS application. Following is connection pool setting for connection factory. Connection Timeout : 180 sec Max Connections : 35 Min Connections : 30 Reap Time : 180 sec Unused Timeout : 1800 sec Aged Timeout : 0 Purge Policy : FailingConnection Only Code is like: try{ queueConn = qConnFactory.createQueueConnection(); queueSession = queueConn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE); QueueSender queueSender = queueSession.createSender(sendQueue); queueSender.send(theMsg); }catch(Exception e){ e.printS
More>>
From WAS (WebSphere) 5.1.1.3 I connect to remote MQ server for JMS application.
Following is connection pool setting for connection factory.
Connection Timeout : 180 sec
Max Connections : 35
Min Connections : 30
Reap Time : 180 sec
Unused Timeout : 1800 sec
Aged Timeout : 0
Purge Policy : FailingConnection Only
Code is like:
try{
queueConn = qConnFactory.createQueueConnection();
queueSession = queueConn.createQueueSession(false,
QueueSession.AUTO_ACKNOWLEDGE);
QueueSender queueSender = queueSession.createSender(sendQueue);
queueSender.send(theMsg);
}catch(Exception e){
e.printStackTrace();
}finally{
try{
if(queueSession !=null){
queueSession.close();
}
if(queueConnection !=null){
queueConnection.close();
}
}catch(JMSException e){
e.printStackTrace();
}
}
I do not see any exception related to unable to close queueconnection, or queuesession in error log. In other words, Java program can successfully close connections in finally.
More than specified max connections do get created.
Yes, all the connections get consumed during the load test.
Any thoughts on why the number of connections getting created is higher than being specified?
<<Less