There's no reason you shouldn't use a ServerSocket from a servlet
        - you could either set it listening in the init method, or get it
        to start and stop listening by sending it messages through the web
        server (if you don't want the servlet listening all the time).

        You could then get the listening servlet to inform the other
        servlet (the one running in multiple threads) when info is coming
        through, by broadcasting an event, or using a session or shared
        object.

        Alternatively, you might be able to have the threaded servlet
        listen for itself, if you were careful about synchronisation -
        I don't know too much about this are, but I suspect it could get
        messy.

        It all depends on the kind of contact you want - is it just
        some information? If you actually want to invoke methods on the
        servlet, you might be able to use RMI instead.....


        Actually I'm going to be doing something similar, a client will
        communicate with a servlet, which will talk to the backend systems
        to get what it needs - I'm currently deciding whether RMI or
        Sockets are good ideas, or whether to use Java Messaging Service
        which also sound ideal for the job.....

        I hope I've muddied the waters enough <grin>

        Catherine

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to