• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JMS?

 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have to write a small java application which is constantly connected to the application server.this application runs on the client machine all day. as soon as the EJB code in the app-server makes a particular entry in the RDBMS, a message needs to be sent to the client machine, a ticker kind of a thing, just like when we are logged in on the yahoo messenger and we recieve a new mail a message is popped up that we have a new message. can i do this with JMS?or is there any other way?please guide!
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If your application is constantly connected to a server you wouldn't need JMS, just use this constant connection (how are you doing that, by the way?). The problem usually with two way communication in J2EE apps, is that usually the front end is a web app (or something simmilar), and web apps mean HTTP, which isn't a good route for two way communication. What you could do is use RMI - create an RMI application in your server app, and have your client poll this for updates.
 
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by kriti sharma:
i have to write a small java application which is constantly connected to the application server.this application runs on the client machine all day. as soon as the EJB code in the app-server makes a particular entry in the RDBMS, a message needs to be sent to the client machine, a ticker kind of a thing, just like when we are logged in on the yahoo messenger and we recieve a new mail a message is popped up that we have a new message. can i do this with JMS?or is there any other way?please guide!



Hi,

JMS is mainly for asynchronous message communication. But for your application I think you can use normal RMI calls as your client is always attached with the Application server.

Regards,
M.S.Raman
 
kriti sharma
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Paul Sturrock:
If your application is constantly connected to a server you wouldn't need JMS, just use this constant connection (how are you doing that, by the way?). The problem usually with two way communication in J2EE apps, is that usually the front end is a web app (or something simmilar), and web apps mean HTTP, which isn't a good route for two way communication. What you could do is use RMI - create an RMI application in your server app, and have your client poll this for updates.



what should be the time intervel for polling?5 mins or even less?
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When using RMI (Your client is actually a RMI server, then), you can actually make your server (EJB) to call back the client (RMI).
 
Arthur, where are your pants? Check under this tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic