• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Asynchronous message from server to client

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I have to create a web service for one of my clients. The requirement is such that the client will access my web services to do some processing and get the result back.

I am building the architecture. My requirement is to get and xml from the client. convert the xml children into xml list and process each child individually. by processing i mean i have to do some work with the information of the child nodes. After the processing for a particular child is complete i want to send a result back to the client asynchronously.

Now i have no idea how to send messages asynchronously from server to client. I have used JMS with MDB before. But it was when both the producer and the consumer were in the same JVM.
But in this case, the producer will be residing on the server and consumer would be the client from some entirely different JVM.
Can you please tell me if it is possible in web services.
 
Ranch Hand
Posts: 296
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ashwin Raghavan wrote:Now i have no idea how to send messages asynchronously from server to client.


There are only 2 options available: polling and pushing. Either you connect to the server periodically and check if there is a new message exists, or keep Socket opened to make server push data to the client any time.
 
Ashwin Raghavan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks surlac

I believe by pushing you are saying that i use topics. subsrcibe a topic for the client, and then keep on passing messages to it. can you please guide me how i can create jms topics in tomcat and pass message to the client. or can you guide me to a link where they have an example.

you help is appreciated.

Thanks in advance.
 
surlac surlacovich
Ranch Hand
Posts: 296
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ashwin Raghavan wrote:I believe by pushing you are saying that i use topics.


Pushing is a concept. There can be various implementations. JMS topics based on one of them, which I believe can vary depending on a vendor.
 
surlac surlacovich
Ranch Hand
Posts: 296
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ashwin Raghavan wrote: can you please guide me how i can create jms topics in tomcat and pass message to the client


First of all, you will need jms broker to do that. Install one and let us know about the results.
 
reply
    Bookmark Topic Watch Topic
  • New Topic