[mod_jk] Documentation

2006-06-14 Thread gaston . azerty


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [mod_jk] Documentation

2006-06-15 Thread gaston . azerty
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 <[EMAIL PROTECTED]>:

> On 6/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [mod_jk] Documentation

2006-06-15 Thread gaston . azerty
Quoting Rainer Jung <[EMAIL PROTECTED]>:

> 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
>
> [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> --
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [mod_jk] Documentation

2006-06-16 Thread gaston . azerty
> Quoting David Rees <[EMAIL PROTECTED]>:

> > On 6/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [mod_jk] Documentation

2006-06-16 Thread gaston . azerty
Quoting Jean-frederic Clere <[EMAIL PROTECTED]>:

> [EMAIL PROTECTED] wrote:
>
> >>Quoting David Rees <[EMAIL PROTECTED]>:
> >>
> >>
> >
> >
> >
> >>>On 6/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AJP version

2006-06-30 Thread gaston . azerty

Hi,

I am working on mod_jk in order to add a mechanism wich would be able to bind
dynamically a client to a particular worker, something like the sticky-session.

So, I have found three files jk_ajp1{2|3|4}_worker.c, I suppose
jk_ajp12_worker.c is for the version 1.2 of the ajp protocol, and so on for the
others files...

I am currently using the version 1.3, and I have two questions:
First question :
Simply, what is the difference between ajp12, ajp13 and ajp14?
I want to understand, if this may influence the loadbalancer work.

Second question:
Is there a best version?

Thanks


Thomas d'Erceville

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Mod_jk : function maintain()

2006-07-13 Thread gaston . azerty

Hi,

I'm currently working in mod_jk in order to add a particular mechanism, in this
work I have to understand the structure and the behavior of the different
workers (status, lb,...).

So I spend my time in the reverse engineering of mod_jk... An for example I
don't really understand the meaning of the function wc_maintain in the
jk_worker.c file.

Any help will is greatly appreciated.

Thanks

Thomas d'Erceville

PS : If you know a version of mod_jk source code with comments for the
functions, I will appreciate.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Mod_JK / Tomcat : How does Tomcat know its name in mod_jk side?

2006-07-20 Thread gaston . azerty

Hi,

I'm always working on mod_jk and I have got a question about cookie generation
on the Tomcat side.
When a request has been send by a new client, he obtains a Cookie, this cookie
has been generated by Tomcat (worker). In this cookie, we find the route to the
correct worker for the next request (JSESSIONID=EF45..B01.worker1, worker1 is
the route) (if sticky_session is on), but how Tomcat knows that his name in
mod_jk side is "worker1"?
Where this information has been sent in the ajp protocol?

Regards,

Thomas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mod_JK / Tomcat : How does Tomcat know its name in mod_jk side?

2006-07-24 Thread gaston . azerty

Thanks

Quoting Rainer Jung <[EMAIL PROTECTED]>:

> The name associated with each worker must match the one used for the
> jvmRoute attribute specified on the Engine element of the corresponding
> node's server.xml.
>
> It's not explicitely passed via AJP. You need to keep the names in
> workers.properties/server.xml in sync by yourself.
>
> Rainer
>
> [EMAIL PROTECTED] wrote:
> > Hi,
> >
> > I'm always working on mod_jk and I have got a question about cookie
> generation
> > on the Tomcat side.
> > When a request has been send by a new client, he obtains a Cookie, this
> cookie
> > has been generated by Tomcat (worker). In this cookie, we find the route to
> the
> > correct worker for the next request (JSESSIONID=EF45..B01.worker1, worker1
> is
> > the route) (if sticky_session is on), but how Tomcat knows that his name in
> > mod_jk side is "worker1"?
> > Where this information has been sent in the ajp protocol?
> >
> > Regards,
> >
> > Thomas
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Testing

2006-07-26 Thread gaston . azerty

Hi,

I suppose the answer to my question will be no, but I need so much that I prefer
to ask the question...

Is it possible for an external program to test if a session exists on the server
Tomcat?
In fact, I am working on mod_jk and I would like to send a HTTP request to
Tomcat only if the cookie JSESSIONID linked to this request is a valid session
on Tomcat.

This work has been realized in a context where we want to update the application
running on Tomcat (and JOnAS for the EJB server), as a result we have to
separate the clients working on the old version from the clients working on the
new one.

Regards,

Thomas


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Testing

2006-07-26 Thread gaston . azerty

Hi,

I suppose the answer to my question will be no, but I need so much that I prefer
to ask the question...

Is it possible for an external program to test if a session exists on the server
Tomcat?
In fact, I am working on mod_jk and I would like to send a HTTP request to
Tomcat only if the cookie JSESSIONID linked to this request is a valid session
on Tomcat.

This work has been realized in a context where we want to update the application
running on Tomcat (and JOnAS for the EJB server), as a result we have to
separate the clients working on the old version from the clients working on the
new one.

Regards,

Thomas


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Testing

2006-07-26 Thread gaston . azerty
Quoting Jean-frederic Clere <[EMAIL PROTECTED]>:

> [EMAIL PROTECTED] wrote:
>
> >Hi,
> >
> >I suppose the answer to my question will be no, but I need so much that I
> prefer
> >to ask the question...
> >
> >Is it possible for an external program to test if a session exists on the
> server
> >Tomcat?
> >In fact, I am working on mod_jk and I would like to send a HTTP request to
> >Tomcat only if the cookie JSESSIONID linked to this request is a valid
> session
> >on Tomcat.
> >
> >
> I would do this in mod_jk (or mod_proxy): You receive the JSESSIONID
> from the Tomcat with the AJP response, you just have to store them.
>

Yes, of course I have already considered this approach but in a context where
there are a lot of clients and severals mod_jks, I will need to synchronize the
mod_jks (The HTTP requests may be dispatched randomly on the mod_jks) then
provide memory to store this data and mechanisms to find the stored JSESSIONID
whereas all that already exist in Tomcat...

Thank you for your answer, I wonder whether I will not take a look on the Tomcat
mechanism of replication... (Not really delighted by that :[ )

Regards,

Thomas

> Cheers
>
> Jean-Frederic
>
> >This work has been realized in a context where we want to update the
> application
> >running on Tomcat (and JOnAS for the EJB server), as a result we have to
> >separate the clients working on the old version from the clients working on
> the
> >new one.
> >
> >Regards,
> >
> >Thomas
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Testing

2006-07-27 Thread gaston . azerty

Thnaks for your councils, but really to obtain this information (i.e The cookie
JSESSIONID in the request is it always valid.) I mostly prefer asking it to
Tomcat than to create a probably incomplete mechanism on Apache.
(And personnally I think that adding an interface to obtain an information
already existing in a java code is much easier than recreating a mechanism in a
C project in order to obtain the same information :) )

So, I reformulate my question differently :
Do you know the name of the structure/object managing Tomcat's cookies in a
cluster? Or how does Tomcat make to know if cookie is valid?

Regard,

Thomas

Quoting Jean-frederic Clere <[EMAIL PROTECTED]>:

> [EMAIL PROTECTED] wrote:
>
> >Quoting Jean-frederic Clere <[EMAIL PROTECTED]>:
> >
> >
> >
> >>[EMAIL PROTECTED] wrote:
> >>
> >>
> >>
> >>>Hi,
> >>>
> >>>I suppose the answer to my question will be no, but I need so much that I
> >>>
> >>>
> >>prefer
> >>
> >>
> >>>to ask the question...
> >>>
> >>>Is it possible for an external program to test if a session exists on the
> >>>
> >>>
> >>server
> >>
> >>
> >>>Tomcat?
> >>>In fact, I am working on mod_jk and I would like to send a HTTP request to
> >>>Tomcat only if the cookie JSESSIONID linked to this request is a valid
> >>>
> >>>
> >>session
> >>
> >>
> >>>on Tomcat.
> >>>
> >>>
> >>>
> >>>
> >>I would do this in mod_jk (or mod_proxy): You receive the JSESSIONID
> >>from the Tomcat with the AJP response, you just have to store them.
> >>
> >>
> >>
> >
> >Yes, of course I have already considered this approach but in a context
> where
> >there are a lot of clients and severals mod_jks, I will need to synchronize
> the
> >mod_jks (The HTTP requests may be dispatched randomly on the mod_jks) then
> >provide memory to store this data and mechanisms to find the stored
> JSESSIONID
> >whereas all that already exist in Tomcat...
> >
> >
> For the memory handing have a look on the
> httpd(httpd-proxy-scoreboard)/modules/mem ;-)
> You probably have to create one slot mem per JSESSION and you need
> "controled" access.
>
> Cheers
>
> Jean-Frederic
>
> >Thank you for your answer, I wonder whether I will not take a look on the
> Tomcat
> >mechanism of replication... (Not really delighted by that :[ )
> >
> >Regards,
> >
> >Thomas
> >
> >
> >
> >>Cheers
> >>
> >>Jean-Frederic
> >>
> >>
> >>
> >>>This work has been realized in a context where we want to update the
> >>>
> >>>
> >>application
> >>
> >>
> >>>running on Tomcat (and JOnAS for the EJB server), as a result we have to
> >>>separate the clients working on the old version from the clients working
> on
> >>>
> >>>
> >>the
> >>
> >>
> >>>new one.
> >>>
> >>>Regards,
> >>>
> >>>Thomas
> >>>
> >>>
> >>>-
> >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]