fixed reconnection test which was creating a new connection with a client ID before closing the previous one which threw the InvalidClientIDException

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@366188 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-01-05 14:48:09 +00:00
parent c68a1460ba
commit 95a2aa6b8f
1 changed files with 1 additions and 2 deletions

View File

@ -426,12 +426,11 @@ abstract public class JmsTransactionTestSupport extends TestSupport implements M
*/
protected void reconnect() throws JMSException {
Connection t = resourceProvider.createConnection(connectionFactory);
if (connection != null) {
// Close the previous connection.
connection.close();
}
connection = t;
connection = resourceProvider.createConnection(connectionFactory);
session = resourceProvider.createSession(connection);
destination = resourceProvider.createDestination(session, getSubject());