tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: help needed building a Tomcat Connector
Date Fri, 23 Aug 2002 16:03:06 GMT


On Fri, 23 Aug 2002, Mark Hansen wrote:

> Date: Fri, 23 Aug 2002 11:43:14 -0400
> From: Mark Hansen <khookguy@yahoo.com>
> Reply-To: Tomcat Developers List <tomcat-dev@jakarta.apache.org>,
>      khookguy@yahoo.com
> To: tomcat-dev@jakarta.apache.org
> Subject: help needed building a Tomcat Connector
>
> I'm building a Tomcat Connector to enable JMS communication with
> HttpServlets.
>
> I'm having problems understanding how the connector properties defined in
> server.xml (e.g., port, enableLookups, minProcessors) are set when a
> connector class (e.g., HttpConnector) gets loaded.  Obviously, my connector,
> JmsConnector, will have a variety of JMS specific properties and I want to
> be sure that I am setting them in a manner that is consistent with how this
> is done for other connectors.
>

It's magic :-).

Actually, its a module called Digester (Tomcat 4.1 and later) or XmlMapper
(earlier versions of Tomcat) that looks at the attributes of the
<Connector> element, and matches them up to JavaBeans property setters for
the corresponding property names.  So, if you have configuration
properties "foo" and "bar" that you want to set in the server.xml element,
just make sure you have public setters "setFoo()" and "setBar()" for them.

For further info about Digester itself, see:

  http://jakarta.apache.org/commons/digester/api/

> Thanks for your help.
>
> Sincerely,
>
> Mark Hansen
> khookguy@yahoo.com
>

Craig


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message