• Post Reply Bookmark Topic Watch Topic
  • New Topic

synchronous call between two servers

 
Puja Agarwal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Can JMS be used for synchronous call between two servers.Can i get a pseudo code around it , would be of great help.

Thanks in advance
Puja
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JMS is by its nature asynchronous. You might want to look into socket communication or web services for synchronous communication.
 
Puja Agarwal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf, actually i have requirement where i have to take a user from one jsp hosted on one webserver server
to another jsp which is on different web server. I am not sure if it could be done using response.sendRedirect
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A JSP can submit to any server you want, not just to the server where it originated. You could submit to the 2nd server, and then have the response do a redirect back to the 1st server.

Or does the 1st server also need the form values? In that case, you might consider using the HttpUrlConnection class to transfer them from the 1st to the 2nd server.
 
Puja Agarwal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or does the 1st server also need the form values? In that case, you might consider using the HttpUrlConnection class to transfer them from the 1st to the 2nd server.


Yes, i think i got it now, would be good if you share a sample code using HttpUrlConnection

Thanks in advance
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
www.exampledepot.com/egs has sample code for that class.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!