Results 1 to 5 of 5

Thread: dynamic multipule tcp server and client connections

  1. #1

    Default 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. #2
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,038

    Default

    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
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  3. #3

    Default

    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

  4. #4
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,038

    Default

    You can create them programmatically, or just use the child context techniques I pointed you to.
    Last edited by Gary Russell; Jan 21st, 2013 at 12:54 PM.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  5. #5

    Default

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •