You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ga...@free.fr on 2006/06/14 16:15:08 UTC

[mod_jk] Documentation


Hi,

I'm working on a J2EE server (JOnAS) using Tomcat as web
container. I'm trying to add some mechanisms to allow the updating of
an application. The aim is to preserve HA (Hight AVaibility) by not
stopping completely the application.
So, I want to understand the code of mod_jk (the connector between
Apache, wich is he front end, and Tomcat) . I've already generated the
documentation (scandoc.pl : javadoc-like) and read the Howto on the web about
mod_jk. But it is not quite sufficient.

I'm looking for UML diagrams and sequence diagrams.

About mod_jk.c, my file is quit huge (2757 lines wc -l mod_jk.c) and there is
not a lot of comments so I've some issues to understand it, is there any others
documentations?


Regards,

Thomas

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


Re: [mod_jk] Documentation

Posted by Jean-frederic Clere <jf...@gmail.com>.
gaston.azerty@free.fr wrote:

>Quoting Jean-frederic Clere <jf...@gmail.com>:
>
>  
>
>>gaston.azerty@free.fr wrote:
>>
>>    
>>
>>>>Quoting David Rees <dr...@gmail.com>:
>>>>
>>>>
>>>>        
>>>>
>>>
>>>      
>>>
>>>>>On 6/15/06, gaston.azerty@free.fr <ga...@free.fr> wrote:
>>>>>My problem is not a user problem, for the moment I don't want to use
>>>>>mod_jk, I
>>>>>only want to modify it and thus understand the mod_jk code before. So I
>>>>>think
>>>>>my question might be on the right list, but if I am again wrong I excuse
>>>>>myself
>>>>>and I will send this message on the user mailing list.
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>I see, I misunderstood your question, then. I thought you were looking
>>>>to use mod_jk to load balance JOnAS
>>>>
>>>>
>>>>        
>>>>
>>>In fact, mod_jk is already used to load balance JOnAS (JOnAS=web container
>>>(Tomcat) + ejb container) and mod_jk is the plugin between HTTP server
>>>(Apache)
>>>and the web container (Tomcat). And I would like to change mod_jk behavior.
>>>
>>>Well, a restricted question of my initial problem will be : what is the
>>>structure name which is managing the Round Robin Weighted Algorithm? The
>>>same
>>>question for the function name.
>>>
>>>
>>>      
>>>
>>Again please look to httpd (mod_proxy_ajp and mod_proxy_balancer) you
>>may already find what you need.
>>
>>    
>>
>
>Thanks, I have not understand at the first time, I will take a look...
>So you mean mod_jk directly uses mod_proxy_ajp (why not mod_jk depends on ajp1.3
>protocols) and mod_proxy_balancer (why not mod_jk needs a LB)?
>  
>
No mod_proxy of httpd-2.2.x supports the ajp protocol directly.

Cheers

Jean-Frederic

>I think when I finish this job, I will write any lines of documentation about
>mod_jk code, perhaps later someone will appreciate.
>
>Thomas
>
>  
>
>>Cheers
>>
>>
>>Jean-Frederic
>>
>>    
>>
>>>Thanks
>>>
>>>Thomas
>>>
>>>
>>>
>>>      
>>>
>>>>(does it have a JK connector? I
>>>>know nothing about it), perhaps mod_proxy would be better suited
>>>>rather than modifying mod_jk to talk to JOnAS if it doesn't have a JK
>>>>connector.
>>>>
>>>>-Dave
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>>>For additional commands, e-mail: dev-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>>For additional commands, e-mail: dev-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>>
>>    
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>  
>


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


Re: [mod_jk] Documentation

Posted by ga...@free.fr.
Quoting Jean-frederic Clere <jf...@gmail.com>:

> gaston.azerty@free.fr wrote:
>
> >>Quoting David Rees <dr...@gmail.com>:
> >>
> >>
> >
> >
> >
> >>>On 6/15/06, gaston.azerty@free.fr <ga...@free.fr> wrote:
> >>>My problem is not a user problem, for the moment I don't want to use
> >>>mod_jk, I
> >>>only want to modify it and thus understand the mod_jk code before. So I
> >>>think
> >>>my question might be on the right list, but if I am again wrong I excuse
> >>>myself
> >>>and I will send this message on the user mailing list.
> >>>
> >>>
> >>I see, I misunderstood your question, then. I thought you were looking
> >>to use mod_jk to load balance JOnAS
> >>
> >>
> >In fact, mod_jk is already used to load balance JOnAS (JOnAS=web container
> >(Tomcat) + ejb container) and mod_jk is the plugin between HTTP server
> > (Apache)
> >and the web container (Tomcat). And I would like to change mod_jk behavior.
> >
> >Well, a restricted question of my initial problem will be : what is the
> >structure name which is managing the Round Robin Weighted Algorithm? The
> > same
> > question for the function name.
> >
> >
> Again please look to httpd (mod_proxy_ajp and mod_proxy_balancer) you
> may already find what you need.
>

Thanks, I have not understand at the first time, I will take a look...
So you mean mod_jk directly uses mod_proxy_ajp (why not mod_jk depends on ajp1.3
protocols) and mod_proxy_balancer (why not mod_jk needs a LB)?

I think when I finish this job, I will write any lines of documentation about
mod_jk code, perhaps later someone will appreciate.

Thomas

> Cheers
>
>
> Jean-Frederic
>
> >Thanks
> >
> >Thomas
> >
> >
> >
> >>(does it have a JK connector? I
> >>know nothing about it), perhaps mod_proxy would be better suited
> >>rather than modifying mod_jk to talk to JOnAS if it doesn't have a JK
> >>connector.
> >>
> >>-Dave
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> >>For additional commands, e-mail: dev-help@tomcat.apache.org
> >>
> >>
> >>
> >>
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> >For additional commands, e-mail: dev-help@tomcat.apache.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>



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


Re: [mod_jk] Documentation

Posted by Jean-frederic Clere <jf...@gmail.com>.
gaston.azerty@free.fr wrote:

>>Quoting David Rees <dr...@gmail.com>:
>>    
>>
>
>  
>
>>>On 6/15/06, gaston.azerty@free.fr <ga...@free.fr> wrote:
>>>My problem is not a user problem, for the moment I don't want to use
>>>mod_jk, I
>>>only want to modify it and thus understand the mod_jk code before. So I
>>>think
>>>my question might be on the right list, but if I am again wrong I excuse
>>>myself
>>>and I will send this message on the user mailing list.
>>>      
>>>
>>I see, I misunderstood your question, then. I thought you were looking
>>to use mod_jk to load balance JOnAS
>>    
>>
>In fact, mod_jk is already used to load balance JOnAS (JOnAS=web container
>(Tomcat) + ejb container) and mod_jk is the plugin between HTTP server (Apache)
>and the web container (Tomcat). And I would like to change mod_jk behavior.
>
>Well, a restricted question of my initial problem will be : what is the
>structure name which is managing the Round Robin Weighted Algorithm? The same
>question for the function name.
>  
>
Again please look to httpd (mod_proxy_ajp and mod_proxy_balancer) you 
may already find what you need.

Cheers


Jean-Frederic

>Thanks
>
>Thomas
>
>  
>
>>(does it have a JK connector? I
>>know nothing about it), perhaps mod_proxy would be better suited
>>rather than modifying mod_jk to talk to JOnAS if it doesn't have a JK
>>connector.
>>
>>-Dave
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>>
>>    
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>  
>


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


Re: [mod_jk] Documentation

Posted by ga...@free.fr.
> Quoting David Rees <dr...@gmail.com>:

> > On 6/15/06, gaston.azerty@free.fr <ga...@free.fr> wrote:
> > My problem is not a user problem, for the moment I don't want to use
> > mod_jk, I
> > only want to modify it and thus understand the mod_jk code before. So I
> > think
> > my question might be on the right list, but if I am again wrong I excuse
> > myself
> > and I will send this message on the user mailing list.
>
> I see, I misunderstood your question, then. I thought you were looking
> to use mod_jk to load balance JOnAS
In fact, mod_jk is already used to load balance JOnAS (JOnAS=web container
(Tomcat) + ejb container) and mod_jk is the plugin between HTTP server (Apache)
and the web container (Tomcat). And I would like to change mod_jk behavior.

Well, a restricted question of my initial problem will be : what is the
structure name which is managing the Round Robin Weighted Algorithm? The same
question for the function name.

Thanks

Thomas

> (does it have a JK connector? I
> know nothing about it), perhaps mod_proxy would be better suited
> rather than modifying mod_jk to talk to JOnAS if it doesn't have a JK
> connector.
>
> -Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>



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


Re: [mod_jk] Documentation (offtopic)

Posted by Rick Knowles <ri...@knowleses.org>.
Filip Hanik - Dev Lists wrote:
> yes, mod_proxy is probably a better choice, since it is HTTP,
> if you wanna use mod_jk the end point has to support the AJP protocol, 
> I don't know that any other than jserv and tomcat are doing that right 
> now.
Actually I think you'll find it's in a little wider use than that. 
Winstone (see below) supports mod_jk AJP13, and a quick google showed 
that there's even a Perl module that acts as a listener.

Sorry for the offtopic, I just thought I'd mention it so you know there 
are others using it.

Rick

-- 
Servlet v2.4 container in a single 160KB jar file ? Try Winstone (http://winstone.sourceforge.net/)


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


Re: [mod_jk] Documentation

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
yes, mod_proxy is probably a better choice, since it is HTTP,
if you wanna use mod_jk the end point has to support the AJP protocol, I 
don't know that any other than jserv and tomcat are doing that right now.

Filip


David Rees wrote:
> On 6/15/06, gaston.azerty@free.fr <ga...@free.fr> wrote:
>> My problem is not a user problem, for the moment I don't want to use 
>> mod_jk, I
>> only want to modify it and thus understand the mod_jk code before. So 
>> I think
>> my question might be on the right list, but if I am again wrong I 
>> excuse myself
>> and I will send this message on the user mailing list.
>
> I see, I misunderstood your question, then. I thought you were looking
> to use mod_jk to load balance JOnAS (does it have a JK connector? I
> know nothing about it), perhaps mod_proxy would be better suited
> rather than modifying mod_jk to talk to JOnAS if it doesn't have a JK
> connector.
>
> -Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>


-- 


Filip Hanik

Re: [mod_jk] Documentation

Posted by David Rees <dr...@gmail.com>.
On 6/15/06, gaston.azerty@free.fr <ga...@free.fr> wrote:
> My problem is not a user problem, for the moment I don't want to use mod_jk, I
> only want to modify it and thus understand the mod_jk code before. So I think
> my question might be on the right list, but if I am again wrong I excuse myself
> and I will send this message on the user mailing list.

I see, I misunderstood your question, then. I thought you were looking
to use mod_jk to load balance JOnAS (does it have a JK connector? I
know nothing about it), perhaps mod_proxy would be better suited
rather than modifying mod_jk to talk to JOnAS if it doesn't have a JK
connector.

-Dave

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


Re: [mod_jk] Documentation

Posted by Mark Thomas <ma...@apache.org>.
gaston.azerty@free.fr wrote:
>>> I'm looking for UML diagrams and sequence diagrams.

Sorry, they don't exist.

>>> About mod_jk.c, my file is quit huge (2757 lines wc -l mod_jk.c) and
>>> there is not a lot of comments so I've some issues to understand it,
>>> is there others docs?

Again. Sorry, but no. What you see is what you get.

If you want to contribute some patches to the documentation, that
would be great.

Mark

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


Re: [mod_jk] Documentation

Posted by ga...@free.fr.
I don't know why a part of my initial message is not visible in this answer,
perhaps you cut it... So I recopy the end of my initial message :

> > So, I want to understand the code of mod_jk (the connector between
> > Apache, wich is he front end, and Tomcat) . I've already generated the
> > documentation (scandoc.pl : javadoc-like) and read the Howto on the web
> > about mod_jk. But it is not quite sufficient.

> > I'm looking for UML diagrams and sequence diagrams.

> > About mod_jk.c, my file is quit huge (2757 lines wc -l mod_jk.c) and
> > there is not a lot of comments so I've some issues to understand it,
> > is there others docs?


Quoting David Rees <dr...@gmail.com>:

> On 6/14/06, gaston.azerty@free.fr <ga...@free.fr> wrote:
> > I'm working on a J2EE server (JOnAS) using Tomcat as web
> > container. I'm trying to add some mechanisms to allow the updating of
> > an application. The aim is to preserve HA (Hight AVaibility) by not
> > stopping completely the application.
>
> You'll want to read the Tomcat cluster docs as well as the Connector
> docs. That should give you an idea of how to setup multiple Tomcat
> >instances which automatically fail over when load balanced by
> Apache/mod_jk.

I have already read the Connector docs, thanks, but I am not looking for this
kind of information.

>
> BTW, you posted to the wrong list, this is a user-related question
> which should be posted there so if you have any followup questions
> post them there instead of the dev list.
>

My problem is not a user problem, for the moment I don't want to use mod_jk, I
only want to modify it and thus understand the mod_jk code before. So I think
my question might be on the right list, but if I am again wrong I excuse myself
and I will send this message on the user mailing list.

Regards,

Thomas

> -Dave
>



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


Re: [mod_jk] Documentation

Posted by David Rees <dr...@gmail.com>.
On 6/14/06, gaston.azerty@free.fr <ga...@free.fr> wrote:
> I'm working on a J2EE server (JOnAS) using Tomcat as web
> container. I'm trying to add some mechanisms to allow the updating of
> an application. The aim is to preserve HA (Hight AVaibility) by not
> stopping completely the application.

You'll want to read the Tomcat cluster docs as well as the Connector
docs. That should give you an idea of how to setup multiple Tomcat
instances which automatically fail over when load balanced by
Apache/mod_jk.

BTW, you posted to the wrong list, this is a user-related question
which should be posted there so if you have any followup questions
post them there instead of the dev list.

-Dave

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


Re: [mod_jk] Documentation

Posted by ga...@free.fr.
Quoting Rainer Jung <ra...@kippdata.de>:

> As there is no developer documentation: what are you trying to achieve?
>

I would like to change dynamically the Round Robin Weighted (RRW), this takeover
depends on the application state wich is running on the cluster. Typically I
want to cut the cluster in two parts and to be able to send a request only to
one part of the cluster in function of the cookie.
It seems to me that some mechanisms close to those already exist, but where...

If there is no developer documentation, how do you do if you have to change
something?

> mod_jk.c is the file that contains the apache specific code. To
> understand it you will need to have some knowledge of the apache module API.
>

For the moment, I haven't got knowledge of the apache module API, I suppose it
may exist good docs.

> All web server plugins use shared code contained in the directory "common".
>
> Rainer
>
> gaston.azerty@free.fr wrote:
> >
> > Hi,
> >
> > I'm working on a J2EE server (JOnAS) using Tomcat as web
> > container. I'm trying to add some mechanisms to allow the updating of
> > an application. The aim is to preserve HA (Hight AVaibility) by not
> > stopping completely the application.
> > So, I want to understand the code of mod_jk (the connector between
> > Apache, wich is he front end, and Tomcat) . I've already generated the
> > documentation (scandoc.pl : javadoc-like) and read the Howto on the web
> about
> > mod_jk. But it is not quite sufficient.
> >
> > I'm looking for UML diagrams and sequence diagrams.
> >
> > About mod_jk.c, my file is quit huge (2757 lines wc -l mod_jk.c) and there
> is
> > not a lot of comments so I've some issues to understand it, is there any
> others
> > documentations?
> >
> >
> > Regards,
> >
> > Thomas
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: dev-help@tomcat.apache.org
> >
>
> --
> kippdata informationstechnologie GmbH
> Bornheimer Str. 33a
> 53111 Bonn
>
> Tel.: 0228/98549-0
> Fax:  0228/98549-50
> www.kippdata.de
> =======================
> kippdata informationstechnologie GmbH
> Bornheimer Str. 33a
> D-53111 Bonn
>
> Tel.: +49/0228/98549-0
> Fax:  +49/0228/98549-50
> www.kippdata.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

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


Re: [mod_jk] Documentation

Posted by Rainer Jung <ra...@kippdata.de>.
As there is no developer documentation: what are you trying to achieve?

mod_jk.c is the file that contains the apache specific code. To 
understand it you will need to have some knowledge of the apache module API.

All web server plugins use shared code contained in the directory "common".

Rainer

gaston.azerty@free.fr wrote:
> 
> Hi,
> 
> I'm working on a J2EE server (JOnAS) using Tomcat as web
> container. I'm trying to add some mechanisms to allow the updating of
> an application. The aim is to preserve HA (Hight AVaibility) by not
> stopping completely the application.
> So, I want to understand the code of mod_jk (the connector between
> Apache, wich is he front end, and Tomcat) . I've already generated the
> documentation (scandoc.pl : javadoc-like) and read the Howto on the web about
> mod_jk. But it is not quite sufficient.
> 
> I'm looking for UML diagrams and sequence diagrams.
> 
> About mod_jk.c, my file is quit huge (2757 lines wc -l mod_jk.c) and there is
> not a lot of comments so I've some issues to understand it, is there any others
> documentations?
> 
> 
> Regards,
> 
> Thomas
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
> 

-- 
kippdata informationstechnologie GmbH
Bornheimer Str. 33a
53111 Bonn

Tel.: 0228/98549-0
Fax:  0228/98549-50
www.kippdata.de
=======================
kippdata informationstechnologie GmbH
Bornheimer Str. 33a
D-53111 Bonn

Tel.: +49/0228/98549-0
Fax:  +49/0228/98549-50
www.kippdata.de

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