File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMS?

 
kriti sharma
Ranch Hand
Posts: 160
  • 0
  • Mark post as helpful
  • send pies
  • 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!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Malli Raman
Ranch Hand
Posts: 312
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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?
 
xixi wang
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • 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).
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic