0

I am new to TIBCO and trying to communicate with EMS Server using loadrunner.

The communication between the client and server takes place generally over TCP.

I have following details with me:

  • URL: tcp://someserver.com:port
  • Username:
  • Password:
  • Queue Connection Factory: QueueConnectionFactory

Did any one try publishing messages on EMS Server with Loadrunner.

Please suggest on how can I start scripting?

Nigel Ren
  • 56,122
  • 11
  • 43
  • 55
Neha
  • 57
  • 1
  • 1
  • 9
  • 3
    Did you *try* anything ? Please show any research effort you made on this question – Rafalon Oct 16 '17 at 08:58
  • i tried using soap request and imported xml(mesg), but it shows only endpoint url, where can i provide the target queue name? – Neha Oct 16 '17 at 09:47
  • I dont know whether doing a soap request is a good approach.just trying. – Neha Oct 16 '17 at 09:48
  • Can i use JMS protocol to send message to EMS as it is the extension to JMS – Neha Oct 16 '17 at 10:20

3 Answers3

0

I believe you should be using tibjmsnaming:// not tcp. and Keep the needed JMS/EMS libraries available in the Path.

you should be using WebServices template. I remember publishing messages to Load runner long back.

Venu S
  • 3,251
  • 1
  • 9
  • 25
0

You have a number of paths to any JMS compliant target. Some use web services protocol. My preference is a small Java template virtual user leveraging the appropriate connection factory elements. Very likely your queue solution also has a C level interface which could be incorporated into a C template virtual user. You have options for a virtual user developed in Visual Studio (see documentation, advanced topics) using C++/C#/VB. If you have an existing client you may even be able to record a "push" and a "pop" from the queues with Winsock and manipulate the appropriate buffers for exercise - I have used this path with MQ in the past.

So, lots of options based upon your skills, your licensed virtual user types, etc...

James Pulley
  • 5,606
  • 1
  • 14
  • 14
0

After searching it on google and trying out with different protocols, i found out a simple way to publish message on EMS server.
As EMS is an extension of JMS(java messaging service) we have to use jms protocol to communicate with EMS.
Using a java vuser in VUGEN is the best option.
Below is the code you can paste in actions.java file.

public int action() throws Throwable {
        String serverUrl = "tcp://localhost:7222";
        String userName = "admin";
        String password = "admin";

        String queueName = "your queue name";

        try {
        System.out.println("Sending JMS message to server " + serverUrl + "...");

        QueueConnectionFactory factory = new TibjmsQueueConnectionFactory(serverUrl);
        QueueConnection connection = factory.createQueueConnection(userName, password);
        QueueSession session = connection.createQueueSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);

        // Use createQueue() to enable sending into dynamic queues.
        Queue senderQueue = session.createQueue(queueName);
        QueueSender sender = session.createSender(senderQueue);

        /* publish messages */

        TextMessage jmsMessage = session.createTextMessage("your message");
        //String text = (String) data.elementAt(i);
        //jmsMessage.setText(text);
        sender.send(jmsMessage);
        System.out.println("Sent message!");


        connection.close();
        } catch (JMSException e) {
        e.printStackTrace();
        System.exit(0);
    }
        return 0;
}//end of action
Neha
  • 57
  • 1
  • 1
  • 9
  • It's an old question but I found this snippet very helpful, thanks. Unfortunately, I keep on getting a compiling error on several lines, like following, maybe you can help again, I would really appreciate: `/Actions.java:29: error: cannot find symbol QueueConnectionFactory factory = new TibjmsQueueConnectionFactory(serverUrl);` – twinge Nov 24 '21 at 16:27
  • I answer myself :) Those imports were missing: `import javax.jms.*; import com.tibco.tibjms.*;` – twinge Nov 25 '21 at 15:55