Patches item #512854, was opened at 2002-02-04 09:14
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376687&aid=512854&group_id=22866

Category: None
Group: v2.4 (stable)
Status: Open
Resolution: None
Priority: 5
Submitted By: Alain Coetmeur (coetmeur)
Assigned to: Nobody/Anonymous (nobody)
Summary: catalina:xerces,httpsredir,vhost,valve

Initial Comment:
this patch is based on distributed jboss-2.4.4

this patch was made to solve many problems
encountered by me ([EMAIL PROTECTED])
 and other people on jboss-user

this try to solve the following:
* allow to use Xerces or any XML parser (not only 
crimson as before)
* eases HTTP->HTTPS redirection
* allows clean AJP13 config (without spurious default 
connector)
* ease reverse proxy usage.
* allows catalina valve
* allows virtual host



my patch add the following:

* you can use xerces, or any parser you want, 
  as the default JAXP provider,
  and not only crimson as before.
  technically, befor my patch catalina mbean
  was using Element.toString to serialize
  the content of the Config attribute DOM Element,
  and the parse it. this work only with crimson parser.
  Now I've made a function that parse the DOM Tree
  and generate SAX Events. best solution would be
  to use TRAX XML identity transformers, but this 
impose TRAX API.

* a warning message is printed when you include
  more than one root XML element in the <Attribute 
name="Config"> in 
   <mbean 
code="org.jboss.web.catalina.EmbeddedCatalinaServiceSX"
  in jboss.jcml.
   it reminds that only the first sibling is used. 
(should be treated as a bug IMHO)

  my .02Euro advice to users  is ALWAYS to put a dummy 
root element of type
  <Service> inside <Attribute name="Config"> like in
  <Attribute name="Config"><Service> 
<Connector .../> ... ... </Service></Attrib>


* logging of the config element parsing used the jboss 
logger and not System.out

* add attributes to manage HTTPS redirectPort
  <attribute name="RedirectPort">443</attribute>

* add attributes to manage HTTP reverse proxy config
  <attribute 
name="proxyName">www.corp.com</attribute>  
  <attribute name="proxyPort">80</attribute>

* add a catalina debug level attribute
    <attribute name="DebugLevel">2</attribute>
  practical for debug, but maybe redundunt with 
log4j.properties
 
* allow a "NONE" kind of default connector , in order 
to allow
  someone to specify all in the Config attribute
  <attribute name="ConnectorType">none</attribute>

  this would allow someone to configure in an 
orthogonal way HTTP/HTTPS/AJP13...
  kind of connectors (it supposes the Engine is the 
standardEngine).

* add support for <Engine> tag which refers to the 
existing Engine
  initialised by catalina Mbean befor Config attribute 
is read.
  this tag, can contain <Host>,<DefaultHost> and 
<Valve>.
  Engine attributes can be sets throug XML attributes.
 In order to allow Connectors and Engine subtree to be 
used
  you must embed all theseXML element in a single 
enclosing TAG
   like <Service>

* adds support for <DefaultHost> tag inside <Engine>
  which refers to the default host created on the 
BindingAddress...
  attributes can be set through XML attributes. 
  It can contains <Valve> tags, and even <Alias> tags.

* adds support for <Host> tag inside <Engine>, which 
allow to create
   new virtual host of a given "name=" , 
and "className="
  attributes can be set through XML attributes. 
  It can contains <Valve> tags, and <Alias> tags.

* adds support for <Alias> tags inside <Host> and 
<DefaultHost>. the text content
  of this tag defin another accepted alias for the 
parent Host or DefaultHost.

* adds support for <Valve> tags inside 
<Engine>,<Host>,<DefaultHost>
  it allows to stack custom valve object of a 
given "className", with
  attributes set through XML attributes.

* add support for virtualHost deployment through the 
virtual host prefix attribute
    <attribute 
name="VirtualHostPrefix">/host=</attribute>
  when a context name begins with this prefix, the 
rest of the name until the next '/'
   is used as the virtuel host name as configured in 
catalina Mbean
  in the <HOST name="virtual.host.com"> elements...

  the default value "/host=" allows to deploy war 
package named like
   host=virtual.host.com.war onto the root context of 
the virtual host virtual.host.com 
 
  if a virtual host is not found, the package is 
deploys as usual as a subdiroctory of the
  default host context.


PROBLEMS:

*case is significant for XML Element names inside 
<attribute name="Config">...
it should not I agree, but it does.

* if a deployed contexts match the VirtualHostPrefix 
but the remaining
   hostname does not match a configures virtual host,
  the context is deployes as usual under this strange 
name.
  this may be stupid or even dangerous. an error 
messge should be more appopriate.

  this is practical if the prefix is "/" since this 
allow "hostname.war" to deploy
  as the root of hostname virtual host.

* the fact that one must shut down the catalina mbean 
(thus the server for common users)
  to add a virtual host is not a good thing, if we 
want to have a 24*7 server.
  It would be COOL to have hot deployment of virtual 
hosts... 
  however one may have to check DNS (not sure)...
  to allow that by deploying webapp with special 
context name, would be very COOL,
   but may lead to incoherence (the real context name 
  is different from the application.xml context is it 
problematic?)

  by the way, why not to add a kind of deployable 
objects called
  "hostlet" ...

[EMAIL PROTECTED]
hope this helps

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376687&aid=512854&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to