4 Replies Latest reply on Jul 16, 2012 1:27 PM by paul_

    Client-Server communication via JBoss 7

    paul_

      Hi,

       

      I managed to do invocations on a remote EJB deployed on a jboss 7 server. Now I have a question..

       

      How would I route information from one client to another? Since the other client would have to be listening somehow and keep an open connection awaiting said information... (Is that what's JMS is for? )

       

      Greetings from Germany

        • 1. Re: Client-Server communication via JBoss 7
          wdfink

          Hi Pascal,

          what you want to achieve? Client-Client communication for what?

          With JMS you might sent informations from a producer to a consumer but it is not specified which consumer will get the message (unless you program it)

           

          So please be a bit more specific

          • 2. Re: Client-Server communication via JBoss 7
            paul_

            Hi,

             

            I'm building a small instant messaging application (yes I know there are plenty out there, it's merely for educational purposes).

             

            I already found a solution (storing values / messages in // retrieving values / messages from a singleton ejb), so no need for JMS.

            (JMS would also bring the headache of how to notify the receiving client, since most clients will sit behind a NAT or firewall.. So I can't do "push".. instead I settled for quartz-scheduled polling)

             

            Thanks for your response anyway =)

             

            Greetings from Germany

            ps

            • 3. Re: Client-Server communication via JBoss 7
              wdfink

              For JMS client you have to connect to the JMS queue/topic (I suppose you want to use topic as this is a one-to-many issue).

              There is no push.

               

              A singleton might have memory problems as you need to store the messages.

              1 of 1 people found this helpful
              • 4. Re: Client-Server communication via JBoss 7
                paul_

                Well either way, the receiving client has to do active polling whether it uses jms or my solution.

                 

                I also can disregard the memory problem relating to the singleton as the application won't go public (as I said I'm writing it more for its educational value)

                 

                But thank you for your respones.

                 

                Greetings from Germany,

                ps