Feng,
I simply converted Sun’s “KnockKnockServer” example from their “All About Sockets” tutorial to an IS java service. I am in no way suggesting that this represents a webMethods best practice.
Actually, if it were me, I would work first to design the socket-level communication out of my integration application due to the complexities of implementing the stateful communications protocol in either java or a Flow service. If the resource has any other means of communicating with the outside world (HTTP, Java API, web services, database, FTP, etc.) I would explore that before tackling the socket-level i/o.
Given that your requirements might not allow you that flexibility, I would look next at developing a custom adapter using the Integration Server ADK 6.1. Note: This is not a task that I would recommend for inexperienced Java developers or for those brand new to webMethods Integration Server.
Perhaps others here could offer suggestions on doing socket-level i/o within Integration Server.
Mark
#Integration-Server-and-ESB#webMethods#Flow-and-Java-services