Announcement Announcement Module
No announcement yet.
dynamic multipule tcp server and client connections Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • dynamic multipule tcp server and client connections

    Hi All,

    we have one requirement where we need to create dynamic tcp socket connection as server and as well as client depending upon properties defined in properties file stating no of tcp server and tcp client each having port no and ip etc..

    Thanks in Advance

  • #2
    See the dynamic-ftp sample for how to do this on the client side...

    On the server side, the context needs to be made a child of the main context, so the adapter can send a message into a common shared channel.

    That is described in this post...


    • #3
      Thanks Gray,

      i just gone through sample code.
      as our requirement is little tipical,like we need to start set of client and servers defined in a xml file with ip,port etc.
      i had written a coustm factory class which will parse the xml set and start correspending TcpNetServerConnectionFactory for server and TcpNetClientConnectionFactory as this the right way to do this ? please suggest
      please let me do you need any more information to understand our requirement.

      Thanks in Advance


      • #4
        You can create them programmatically, or just use the child context techniques I pointed you to.
        Last edited by Gary Russell; Jan 21st, 2013, 12:54 PM.


        • #5
          Thanks a lot Gray for you help.
          i used the template context file for client and server tcp connections,
          As these new beans need to be added to parent context while creating context i passed the parent context as consturctor arg to ClassPathXmlApplicationContext.