Win a copy of Hands On Software Engineering with Python this week in the Jython/Python 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Instant Messaging using JMS with the help of JSP and Servlets  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Everybody,

I am creating a web application using JSP and Servlets which enables users to chat using JMS. I need to know how to know the solution to the following situation:


user1 and user2 are chatting with each other.
when user1 sends a message to user2 I use JMSQueue to insert the message at the server end.
But user2 retrieves the message from the queue only when I manually refresh the page or set the page to an autorefresh using a timer.

Please suggest how to overcome this drawback ie. how can I retrieve the message at the client end which is user2 only when the user1 submits the message ?

[P.S. Guys ....have you people stopped using JMS 4 IM services or what as all the posts date back to 2001....!!!]
 
Marshal
Posts: 67192
169
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless you are using some technology like Comet to maintain (expensive) open connections, you'll need to resort to polling.
 
Arindam Bose
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Sherriff ...... I am presently using polling to keep the service in working condition. But I need to be sure
that there is nothing more I can do programatically ....... also I need to know if there is ANY free technology available to mantain connections......
 
I'm so happy! And I wish to make this tiny ad happy too:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!