You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Sander A. Smith" <sm...@sericontech.com> on 2005/04/26 22:22:21 UTC
Embedded Tomcat - adding Connectors on the fly
I have a copy of Tomcat embedded inside my application, and it runs
great. During the processing, I'd like to open another port to service
requests on. The documentation on the Embedded object states:
"After normal operations have begun, you can add and remove
Connectors, Engines, Hosts, and Contexts on the fly."
Great, that's exactly what I want to do. However, I'm finding that if
I try to add a new Connector to my Embedded object, I still can't
connect on that port. Here's my code:
CoyoteConnector connector = (CoyoteConnector)embedded.createConnector
((InetAddress)null,
newPort,
false);
// not sure why/if these are necessary
// I don't call these when I set up the initial port to listen on
connector.initialize();
connector.start();
embedded.addConnector(connector);
I after running this code I call embedded.findConnectors(), my new
connector shows up in the isAvailable state. However, I can't connect
on the new port.
Any ideas on what could be going wrong? I'm running Tomcat 5.0.28.
Sander Smith
--
Sander A. Smith
President
Sericon Technology Inc.
71 Marquette Ave.
Toronto, Ontario M6A 1X8
(416)781-3988
www.sericontech.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org