> -----Message d'origine-----
> De: Luke Taylor [mailto:[EMAIL PROTECTED]]
> Coetmeur, Alain wrote:
> > by the way your ideas seems good, and moreover
> > to help people whou want to explicitly configure
> > each of their catalina connector
> > (like the people tryin to have both http and https),
> > the type "none" could be added
> > with the only changes at
> > if( type.equals("http") == false && type.equals("warp")
> >== false &&
> > type.equals("ajp")==false && type.equals("none") )
>
>
> what about just using
>
> if(type.equals("none"))
>
> :)
#8))
right, in fact
I have done it yesterday, and this works...
I have experimented few changes:
1- the "none" kind of connector
it differs from my proposition here in the fact
that I create the catalina engine even for the
"none" (same code as HTTP connector
but without the connector)
2- allowing "Engine", "Service" "Host" "Server" elements in Config attribute
I've found no code in the confighandle to
support Engine elements in the Config attribute.
We always need an Engine, but it may be cool
to allow the user to configure it more precisely.
but if the user is allowed to configure the engine,
the "none" kind of connector have not to create one.
maybe will I try that soon.
Host elements, may also be interesting to support.
SERVER and SERVICE parameters may too...
3- added MBEan parameters for HTTO-HTTPS redirectPort and for reverse Proxy
I've also patched the catalina MBean so that
it now support
redirectPort, proxyName and proxyServer parameters
but in fact with the None connector type, and
the Config attribute these change are not needed...
all one have to do is to configure
all the connectors he wants in the Config attribute.
by the way I've found 2 problems, solved one,
and turned around the second
4- DOM to SAX conversion
(catalina Mbean dependent on crimson implementation)
the Config Handler class used by catalina MBean
have to convert the XML Element from DOM
to Sax, and do that through the toString()
method of DOM Elements that, in crimson parser, serialize
the Element as XML text. then the config handler parse it with Sax.
however with xerces this does not work
(toString is not in the standard,
and I need xerces for cocoon)
my solution have been to implement a DOM to SAX conversion function that
just navigate in the tree and call the SAX handler methods as needed... this
works well...
5- Multiple XML Top Elements in MBean XML Attribute
are not supported and the problem is not signaled
the second problem is that only ONE DOM Element
is read by the <Attribute > in
the MBean property is a DOM Element...
moreover this is not checked and thus
the following siblings are silently ignored
by example you can try to configure 2 <Connector> elements
with catalina MBean, but only the first will be
read !!!
the turnaround is just to create a
<SERVICE> element that embeds
many connectors...
In fact I did it myself
adding the SERVER and SERVICE
(which are BTW needed for the SERVER/SERVICE/Connector/Listener element)
eg this config seems to work,
and could serve a a model
(be carefull, I've not tested all, especially the http->https redirectPort
and the proxy) :
note that the redirectport attribute work only with my own version
of the catalina Mbean
(I'll send it here soon as a proposed patch)
<!-- Embedded Tomcat 4.x - JBossSX SecurityDomain (JaasSecurityDomain) -->
<mbean code="org.jboss.security.plugins.JaasSecurityDomain"
name="Security:name=JaasSecurityDomain,domain=tomcat">
<constructor>
<arg type="java.lang.String" value="tomcat" />
</constructor>
<attribute name="KeyStoreURL">../conf/tomcat.jks</attribute>
<attribute name="KeyStorePass">changeit</attribute>
</mbean>
<mbean code="org.jboss.web.catalina.EmbeddedCatalinaServiceSX"
name="DefaultDomain:service=EmbeddedTomcat" >
<attribute name="Port">80</attribute>
<attribute name="ConnectorType">http</attribute>
<attribute name="RedirectPort">443</attribute>
<attribute name="Config">
<Server >
<Service >
<Connector
className="org.apache.catalina.connector.http.HttpConnector"
port="8080" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="60000"/>
<Connector
className="org.apache.catalina.connector.http.HttpConnector"
port="8443" minProcessors="5" maxProcessor="75" acceptCount="10"
enableLookups="true" scheme="https" secure="true" >
<Factory
className="org.jboss.web.catalina.security.SSLServerSocketFactory"
securityDomainName="java:/jaas/tomcat" clientAuth="false"
protocol="TLS" />
</Connector>
<Connector
className="org.apache.catalina.connector.http.HttpConnector"
port="443" minProcessors="5" maxProcessor="75" acceptCount="10"
enableLookups="true" scheme="https" secure="true" >
<Factory
className="org.jboss.web.catalina.security.SSLServerSocketFactory"
securityDomainName="java:/jaas/tomcat" clientAuth="false"
protocol="TLS" />
</Connector>
</Service>
</Server>
</attribute>
</mbean>
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development