org.apache.jmeter.protocol.jms.client

Class ConnectionFactory

Implemented Interfaces:
TestListener

public class ConnectionFactory
extends Object
implements TestListener

ConnectionFactory is responsible for creating new connections. Eventually, the connection factory should read an external configuration file and create a pool of connections. The current implementation just does the basics. Once the tires get kicked a bit, we can add connection pooling support. Note: the connection factory will retry to get the connection factory 5 times before giving up. Thanks to Peter Johnson for catching the bug and providing the patch.

Constructor Summary

ConnectionFactory()

Method Summary

static QueueConnection
getQueueConnection(Context ctx, String queueConn)
static QueueConnectionFactory
getQueueConnectionFactory(Context ctx, String fac)
static TopicConnection
getTopicConnection()
static TopicConnectionFactory
getTopicConnectionFactory(Context ctx, String fac)
void
testEnded()
endTest cleans up the client
void
testEnded(String test)
void
testIterationStart(LoopIterationEvent event)
void
testStarted()
startTest sets up the client and gets it ready for the test.
void
testStarted(String test)

Constructor Details

ConnectionFactory

protected ConnectionFactory()

Method Details

getQueueConnection

public static QueueConnection getQueueConnection(Context ctx,
                                                 String queueConn)

getQueueConnectionFactory

public static QueueConnectionFactory getQueueConnectionFactory(Context ctx,
                                                               String fac)

getTopicConnection

public static TopicConnection getTopicConnection()

getTopicConnectionFactory

public static TopicConnectionFactory getTopicConnectionFactory(Context ctx,
                                                               String fac)

testEnded

public void testEnded()
endTest cleans up the client
Specified by:
testEnded in interface TestListener
See Also:
junit.framework.TestListener.endTest(junit.framework.Test)

testEnded

public void testEnded(String test)
Specified by:
testEnded in interface TestListener

testIterationStart

public void testIterationStart(LoopIterationEvent event)
Specified by:
testIterationStart in interface TestListener

testStarted

public void testStarted()
startTest sets up the client and gets it ready for the test. Since async messaging is different than request/ response applications, the connection is created at the beginning of the test and closed at the end of the test.
Specified by:
testStarted in interface TestListener

testStarted

public void testStarted(String test)
Specified by:
testStarted in interface TestListener

Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.