Hi Srini,

I'm sorry for this late reply!

2005/10/29, srini <mailtosri@yahoo.com>:
One more question and i really appreciate your help.
 
Is it legal to bind the same instance of the IoHandler class with multiple service instances as shown below:
 
ServiceRegistry registry = new SimpleServiceRegistry();
 
Service s1  = new Service ("app1", TransportType.SOCKET, 100000);
Service s1  = new Service ("app2", TransportType.SOCKET, 100010);
Service s1  = new Service ("app3", TransportType.SOCKET, 100020);
 
IOHandlerAdapter handler = new IOHandlerAdapter();
 
registry.bind(s1, handler);
registry.bind(s2.handler);
registry.bind(s3,handler);
 
My application requires to open different ports for different purposes and wondering whether the above is correct or not?

Correct definitely. :)

Three services will share the same IoAcceptor, so if you add any filter to the acceptor, then all services will get affected.

HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/