Announcement Announcement Module
Collapse
No announcement yet.
dynamic multipule tcp server and client connections Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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
    Srini

  • #2
    See the dynamic-ftp sample for how to do this on the client side... https://github.com/SpringSource/spri...ed/dynamic-ftp

    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... http://forum.springsource.org/showth...apter-creation

    Comment


    • #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 client.is 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
      Srinibas

      Comment


      • #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, 01:54 PM.

        Comment


        • #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.

          cheers......

          Comment

          Working...
          X