Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

issues in spring and jms integration with glassfish v2

Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

We are tryring to implement jms in our application which has been developed using spring framework.We are using glassfish v2 as jms provider(no third party message broker like ActiveMQ or openMQ).
Also the sender and receiver clients are implemented without using Spring JMS framework( i.e. no use of spring jmstemplate etc.).Application also uses Spring ioC(dependency injection) to create objects to be used later.

The issue arises when the receiver client which is asynchronous(implements message listener) ,receives message and onmessage function is called.Here we are using Spring ioC created object to do further processing relevant with the message received.This object is null(null pointer exception is thrown),This spring ioc created object is null although it was created successfully during the startup of the receiver.Similarly other Spring ioC created objects in application are null during this call back once the message is received.

What can be the issue that Spring ioc created objects are not available once the receiver receives a message and further processing needs to be there some context related issue?Will this issue be resolved by using Sprng JMS framework? can spring JMS framework used with Glassfish v2 as message broker without using other brokers like ActiveMQ and OpenMQ which then require integrating with Glassfish.

Any pointers to resolve this will be appreciated ,waiting for reponses. mail me @ [email][/email].
Ranch Hand
Posts: 85
Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In you message consumer how are you trying to call the spring bean ? have you made your msg listner application context aware ?

Aslo it will be easier if you can post your msg listener code here.
Paper beats rock. Scissors beats tiny ad.
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!