[Show all top banners]

GoneCrazy
Replies to this thread:

More by GoneCrazy
What people are reading
Subscribers
:: Subscribe
Back to: Computer/IT Refresh page to view new replies
 fitnesse, JMS and Spring framework
[VIEWED 4951 TIMES]
SAVE! for ease of future access.
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.
 
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!
 
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
 
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.
 
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.
 
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.





 
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
 
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.
 
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

 
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.
 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 90 days
Recommended Popular Threads Controvertial Threads
What are your first memories of when Nepal Television Began?
निगुरो थाहा छ ??
TPS Re-registration case still pending ..
Basnet or Basnyat ??
Sajha has turned into MAGATs nest
NRN card pros and cons?
Nas and The Bokas: Coming to a Night Club near you
Will MAGA really start shooting people?
मन भित्र को पत्रै पत्र!
Top 10 Anti-vaxxers Who Got Owned by COVID
emergency donation needed
TPS Work Permit/How long your took?
काेराेना सङ्क्रमणबाट बच्न Immunity बढाउन के के खाने ?How to increase immunity against COVID - 19?
Breathe in. Breathe out.
3 most corrupt politicians in the world
Guess how many vaccines a one year old baby is given
अमेरिकामा बस्ने प्राय जस्तो नेपालीहरु सबै मध्यम बर्गीय अथवा माथि (higher than middle class)
चितवनको होस्टलमा १३ वर्षीया शालिन पोखरेल झुण्डिएको अवस्था - बलात्कार पछि हत्याको शंका - होस्टेलहरु असुरक्षित
शीर्षक जे पनि हुन सक्छ।
Disinformation for profit - scammers cash in on conspiracy theories
Nas and The Bokas: Coming to a Night Club near you
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters