Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Asynchronous to synchronous thread conversion

Reply
Thread Tools

Asynchronous to synchronous thread conversion

 
 
raavi
Guest
Posts: n/a
 
      01-25-2006
Hi
I am now involved in a telnet application.i am using struts
framework for this.the problem i am facing is that i am using a number
of threads in this application and this threads are running
asynchronously and i can't get the stream in one thread from other
one.how is this possible? if anyone have any idea please tell me.Thanks
in advance.

 
Reply With Quote
 
 
 
 
Chris Smith
Guest
Posts: n/a
 
      01-25-2006
raavi <> wrote:
> I am now involved in a telnet application.i am using struts
> framework for this.


You're using Struts for a telnet application? Struts is a framework for
HTTP request-response processing using HTML. It is not designed for
telnet -- which is a completely different protocol employing an
abstraction of constant two-way dialogue. You won't have a lot of
success integrating the two; and you'd be better off just implementing a
telnet server on top of sockets.

> the problem i am facing is that i am using a number
> of threads in this application and this threads are running
> asynchronously and i can't get the stream in one thread from other
> one.how is this possible?


It's possible using shared state. This could be a static field
somewhere, or it could be an object that you communicate to each of the
threads' Runnable instances when you create them. Synchronization
becomes very important when you start using shared state, though, so
don't do this until you understand it well. Doug Lea has a good book on
it.

--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between synchronous (proactor pattern) and synchronous model in web server Rickert C++ 0 10-06-2011 04:54 AM
HELP:What is the difference between asynchronous and synchronous counter? ckyz VHDL 0 07-29-2006 04:34 AM
Asynchronous <-> Synchronous bridging patterns Chris Stiles Java 0 11-02-2005 05:48 PM
HttpWebRequest: Processing synchronous or asynchronous Sojwal Chitnis ASP .Net 1 06-09-2005 06:15 PM
Asynchronous Messages (using JMS) improves performance even when the desired comm. mode is synchronous eJAYBee Java 0 12-10-2004 08:52 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57