1 Reply Latest reply on Feb 26, 2004 10:34 AM by karimrg

    Serversockets

    meijerpeter

      All,

      I was wondering if it is possible to open a serversocket on a port (e.g. 1111) and accepting connections in the application server (JBoss).

      I know it is not wise to open a serversocket in a thread on a application server, but how is possible using for instance JBoss.

      The context of the question is this: I have multiple Java clients on different machines, which I would like to send messages. Since it is security wise not a good idea to open a serversocket on a client (desktop), I thought that I could open a client socket to a server, set the timeout to '0' and put all incoming connections in an (keyed) pool. This way, when a message has to be sent to the client, the server can locate the connection and sends his message.
      Of course, I can write a standalone application for this which opens a server socket, but I want to use the application server (JBoss) for this.

      I hope you can help me.

      Thanks in advance,

      P. Meijer

        • 1. Re: Serversockets
          karimrg

          hi

          in my litlle knowledge, this kind of task needs to be implemented using mbeans.
          I have a scenary like that but with plain c clients. I found my way with jboss.net (web services) with soap at the clients.