This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes asynchronous coomunication using java & servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

asynchronous coomunication using java & servlets

sharief shaik
Greenhorn

Joined: Feb 27, 2004
Posts: 2
Hello Friends,
I would like to know if there is any way of achieving asynchronous communication from java to a URL(i.e. servlet).
I have a java method from which I shall post some information to a url(by opening a url connection) and keep going without waiting for response from the url. I would like to know if a POST request is synchronous or asynchronous. If the url takes 10 minutes to process the request(for example :-)), my java code is impatient to wait that long. It just wants to post the data and continue without caring for the response from the url.
(I know that messaging architecture could be used here. However, do not want to go into such complications in the architecture.)
Just tell me what happens if I do the following:
1. I open a url connection from java code.
2. Post data to the url from java code (the url starts processing data...).
3. I close the connection (the url has not finished processing yet).
4. I continue with rest of my java code.
Do you guys think that this would achieve my purpose. Any takers or am I a plain stupid?
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Sharief, good question, but it is a duplicate post. Bill has answered in your other thread. Kind of like a worker Thread.
I am closing this Dup.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: asynchronous coomunication using java & servlets
 
Similar Threads
Session Facade
asynchronous communication between java and servlets
Multi-thread client-server / ObjectInputStream
Asynchronous Web services with Axis2
Non Blocking HttpPost Request / Client-Server communication