[VIEWED 5186
TIMES]
|
SAVE! for ease of future access.
|
|
|
GoneCrazy
Please log in to subscribe to GoneCrazy's postings.
Posted on 04-06-15 2:49
PM
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
Hi Sajha mitra haru, Is there anyone who has knowledge about testing JMS message and sending the message in the message queue using the fitnesse tool. I need an urgent help and also some configuration help. I am dead in water as the examples in google are very simple and will not be able to test the messages. The JMS is created using the Spring Framework. This is something new to me and any help would be appreciated. If anyone has successfully implemented this, please let me know.
|
|
|
|
sojoketo
Please log in to subscribe to sojoketo's postings.
Posted on 04-06-15 3:15
PM [Snapshot: 19]
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
why are you using JMS? queue or Topic? what are you trying to accomplish and how are you trying to test? what application server you are using? These details kind of matters!
|
|
|
NE_Patriots
Please log in to subscribe to NE_Patriots's postings.
Posted on 04-06-15 3:26
PM [Snapshot: 22]
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
Crazy, Tell me your use case? What are you testing? For getting started with the Spring JMS template, read these examples from Spring. http://docs.spring.io/spring/docs/current/spring-framework-reference/html/jms.html Above example will tell you how to send a message in a queue/topic and how to hook up a JMS listener. Let me know if you need more help on the Spring JMS template. And if you just want to test the queues manually then you can use GUI tools like GEMS, JMS browser etc. NE_Pats
|
|
|
GoneCrazy
Please log in to subscribe to GoneCrazy's postings.
Posted on 04-06-15 3:38
PM [Snapshot: 48]
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
Hi, Requirement is to send the xml request to the queue and read the message from the queue. When the message is send as xml to the JMS queue, I need to validate the process is working. For example: I need to test the ping operation. In ping, I need to send the message to the first factory where it generates the key and then uses it as a request for second queue. Similarly, there are 4 steps before the message is generated. So, for the ping operation, I need to test all the four steps involved. To achieve this, I need to send the test data in the fitnesse format and post the response from the test to the fitnesse.
|
|
|
NE_Patriots
Please log in to subscribe to NE_Patriots's postings.
Posted on 04-07-15 2:20
PM [Snapshot: 169]
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
Ok. So I went through this FitNesse framework here : https://www.youtube.com/watch?v=KQa3kJIyOS8 So that framework is just for testing any java classes like JUnit or TestNG and has nothing to do with JMS. So for testing your JMS queues you need to write java code using Spring framework and initialize those jms beans in the application context. So this Spring JMS Template will have all the class you need to send message to a queue and receive (OnMessage()). You just need to write classes and call those methods. Go through this to create your simple JMS message and test first using Junit.
|
|
|
sojoketo
Please log in to subscribe to sojoketo's postings.
Posted on 04-07-15 2:51
PM [Snapshot: 190]
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
These are the terms to be accounted for JMS JMS Sender JMS Listener JMS Template onMessage() JMS configuration needs to be setup in APP server(webspher, JBoss or other) Also needs to configure JMS stuff in spring application context file too. Will provide you more details if time allows.
|
|
|
GoneCrazy
Please log in to subscribe to GoneCrazy's postings.
Posted on 04-07-15 3:35
PM [Snapshot: 213]
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
Thanks @NE_Patriots and @sojoketo. I will look more into it. I need to have some sort of framework idea present by next week and simple configuration of JMS message testing. I am new to JMS and fitnesse. Although I looked into fitnesse, I only get simple examples and which I have already implemented. As for JMS, I get from you guys that JMS template is what I need to use. I will dig more into it and see how can I test it. At the same time, if you guys can provide me more information about the infrastructure setup that would be more helpful. :) Thanks GoneCrazy
|
|
|
sojoketo
Please log in to subscribe to sojoketo's postings.
Posted on 04-07-15 5:23
PM [Snapshot: 257]
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
what application server you are using? I will provide you more details soon.
|
|
|
sojoketo
Please log in to subscribe to sojoketo's postings.
Posted on 04-08-15 1:22
AM [Snapshot: 305]
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
- JMS is used for asynchronous transaction. ( i assume you know what is asynchronous transaction) - JMS queue for only one consumer (NOTE: for Queue, In cluster environment, you need to handle it as there would be multiple consumers) - JMS topic for multiple consumers CONFIGURATION PART (goggle it for configuration doc. You may get one) In your application server (Websphere, JBOSS) 1. create bus 2. create queue 3. create queue connection factory (JMS provider)and select bus(the one you created) Then need to configure queue. -------------------------- Classes: JMSQueueSender class //send the xml request to the queue - send(//it can take parameter depending on your requirement) { jmsTemplate.send("your queue", new MessageCreator() { public Message createMessage(Session session) throws JMSException { //set message property // your xml request object return message; } }) } JMSQueueListener class - onMessage(Message message){ // get message property you set // validate or other functionality }
-------------------- In spring application context, you need to inject/initialize/configure your bean and spring jms container (google it)
Last edited: 08-Apr-15 01:23 AM
|
|
|
GoneCrazy
Please log in to subscribe to GoneCrazy's postings.
Posted on 04-08-15 8:26
AM [Snapshot: 356]
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
Thanks @sojoketo, I will look into all the topics you mentioned.
|
|
|