public void Setup() { MamaCommon.getCmdLineArgs(); mBridge = Mama.loadBridge(MamaCommon.middlewareName); Mama.open(); // Create the message m_msg = new MamaMsg(); // Create the array of messages m_vectorMsg = InitialiseMessageArray(m_numberMessages, 69); m_vectorMsg2 = InitialiseMessageArray(m_numberMessages, 144); }
public void Setup() { MamaCommon.getCmdLineArgs(); // Load the wmw bridge m_bridge = Mama.loadBridge(MamaCommon.middlewareName); // Create the mama queue m_queue = new MamaQueue(m_bridge); // Create the auto reset event m_event = new AutoResetEvent(false); // Spin a thread to dispatch events m_dispatcher = new Thread(new ThreadStart(this.DispatcherThread)); // Reset all other member variables m_closure = null; m_numberEvents = 0; // Start the thread m_dispatcher.Start(); }
public void Setup() { // Set the logging to this level Mama.enableLogging(MamaLogLevel.MAMA_LOG_LEVEL_FINEST); MamaCommon.getCmdLineArgs(); createCount = 0; errorCount = 0; destroyCount = 0; // Load the wmw bridge m_bridge = Mama.loadBridge(MamaCommon.middlewareName); Mama.open(); Mama.log(MamaLogLevel.MAMA_LOG_LEVEL_FINE, "MamaPublisherTest.Setup: transport=" + MamaCommon.middlewareName + " tport=" + MamaCommon.transportName + " source=" + MamaCommon.source + " symbol=" + MamaCommon.symbol); // Create the mama queue m_queueGroup = new MamaQueueGroup(m_bridge, 1); m_msg = new MamaMsg(); m_transport = new MamaTransport(); m_transport.create(MamaCommon.transportName, m_bridge); Mama.startBackground(m_bridge, this); Thread.Sleep(1000); GC.KeepAlive(m_bridge); GC.KeepAlive(m_transport); GC.KeepAlive(m_queueGroup); GC.KeepAlive(m_msg); }