Asynchronous to synchronous thread conversion

Discussion in 'Java' started by raavi, Jan 25, 2006.

  1. raavi

    raavi Guest

    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.
    raavi, Jan 25, 2006
    #1
    1. Advertising

  2. raavi

    Chris Smith Guest

    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
    Chris Smith, Jan 25, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sojwal Chitnis
    Replies:
    1
    Views:
    2,762
    Jinsong Liu
    Jun 9, 2005
  2. Chris Stiles
    Replies:
    0
    Views:
    448
    Chris Stiles
    Nov 2, 2005
  3. ckyz
    Replies:
    0
    Views:
    4,521
  4. arant
    Replies:
    1
    Views:
    2,114
  5. Rickert
    Replies:
    0
    Views:
    644
    Rickert
    Oct 6, 2011
Loading...

Share This Page