AW: Tomcat Connector 1.2.15 - JkOption FlushPackets-Bug

2006-02-20 Thread Pelikan Stephan
Hallo Mladen,

FlushPacket works, and the patch is invalid.
The service ws_flush is invoked from ajp_common.

My original problem is that I produce a big servlet-response. This 
servlet-response builds a progress-bar, so there are interruption (serversided 
sleeps to wait for the next 'progress-bar-event') between some pieces of 
html-parts. I want to send these chunks directly to the browser to update the 
progress-bar but this did not heapen (without mod_jk it works). I tried to turn 
off every buffer I found but it still did not work. Turning debug-level of the 
mod_jk-log on I saw, that these parts where transmitted to the apache and the 
apache does not transmit it to the browser. The patch was the only way to get 
it work. Perhaps you could tell me how to solve this correctly - without a 
patch?

In theory there can be problems if there is no
content_body packets, but the flushing is implied
after the handler by apache itself.

As I explained I need flushed within the response after each chunk transmitted 
from tomcat to apache not only at the end.

Regards,
Stephan

PS: My current configuration:

server.xml:
  !-- A AJP 1.3 Connector on port 8009 --
  Connector port=8009 address=${jboss.bind.address}
 emptySessionPath=true enableLookups=false redirectPort=8443
 protocol=AJP/1.3 socketBuffer=-1 bufferSize=-1 /

httpd.conf:
JkWorkersFile /appl/www/apache/etc/workers.config
JkOptions FlushPackets
JkLogFile /appl/www/apache/logs/mod_jk.log
JkLogLevel warn
JkMount /* jboss

workers.config:
worker.list=jboss
worker.jboss.type=ajp13
worker.jboss.host=dpa.aomwebappl01.apa.at
worker.jboss.port=8009
worker.jboss.cachesize=0



-Ursprüngliche Nachricht-
Von: Mladen Turk [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 17. Februar 2006 11:43
An: Tomcat Developers List
Betreff: Re: Tomcat Connector 1.2.15 - JkOption FlushPackets-Bug

Pelikan Stephan wrote:
 Hello,
  
 I detected that the FlushPackets JkOption does not work. I could 
 solve the problem by the patch
  

FlushPacket works, and the patch is invalid.
The service ws_flush is invoked from ajp_common.

In theory there can be problems if there is no content_body packets, but the 
flushing is implied after the handler by apache itself.


Regards,
Mladen.

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



Re: AW: Tomcat Connector 1.2.15 - JkOption FlushPackets-Bug

2006-02-20 Thread Peter Rossbach

I thing you mus set
JkOptions +FlushPackets

regards
Peter


Am 20.02.2006 um 09:28 schrieb Pelikan Stephan:


JkOptions FlushPackets




RE: AW: Tomcat Connector 1.2.15 - JkOption FlushPackets-Bug

2006-02-20 Thread Fenlason, Josh
Are you sure that + is the default for the FlushPackets option?  I had a
similar issue where I was trying to stream data from a servlet.  Once I
added 'JkOptions +FlushPackets' to my mod_jk config, everything worked
as expected.
,
Josh.

 -Original Message-
 From: Mladen Turk [mailto:[EMAIL PROTECTED] 
 Sent: Monday, February 20, 2006 3:47 AM
 To: Tomcat Developers List
 Subject: Re: AW: Tomcat Connector 1.2.15 - JkOption FlushPackets-Bug
 
 
 Peter Rossbach wrote:
  I thing you mus set
  JkOptions +FlushPackets
  
 
 No need. Default is +.
 
 Regards,
 Mladen.
 
 
 -
 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: AW: Tomcat Connector 1.2.15 - JkOption FlushPackets-Bug

2006-02-20 Thread Rainer Jung

Hi Mladen,

are you sure? I have the impression default is

c-options = JK_OPT_FWDURIDEFAULT;

and

#define JK_OPT_FWDURIDEFAULTJK_OPT_FWDURICOMPAT
#define JK_OPT_FWDURICOMPAT 0x0001

but needed is

#define JK_OPT_FLUSHPACKETS 0x0020

It looks like JK_OPT_FLUSHPACKETS is only set when JkOption parsed.

Anything I missed?

Regards,

Rainer

Fenlason, Josh wrote:


Are you sure that + is the default for the FlushPackets option?  I had a
similar issue where I was trying to stream data from a servlet.  Once I
added 'JkOptions +FlushPackets' to my mod_jk config, everything worked
as expected.
,
Josh.



-Original Message-
From: Mladen Turk [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 20, 2006 3:47 AM

To: Tomcat Developers List
Subject: Re: AW: Tomcat Connector 1.2.15 - JkOption FlushPackets-Bug


Peter Rossbach wrote:


I thing you mus set
JkOptions +FlushPackets



No need. Default is +.

Regards,
Mladen.


-
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: AW: Tomcat Connector 1.2.15 - JkOption FlushPackets-Bug

2006-02-20 Thread Mladen Turk

Rainer Jung wrote:

Hi Mladen,

are you sure? I have the impression default is



I meant that the '+' is default:

if (action == '-') {
conf-options = ~opt;
}
else if (action == '+') {
conf-options |= opt;
}
else {  /* for now +Opt == Opt */
conf-options |= opt;
}

So it shouldn't make any difference between:
JkOptions +FlushPackets
and
JkOptions FlushPackets


Regards,
Mladen.

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



Tomcat Connector 1.2.15 - JkOption FlushPackets-Bug

2006-02-17 Thread Pelikan Stephan
Hello,
 
I detected that the FlushPackets JkOption does not work. I could solve
the problem by the patch
 
*** jakarta-tomcat-connectors-1.2.15-src/jk/native/apache-2.0/mod_jk.c
2005-09-21 15:59:50.0 +0200
---
jakarta-tomcat-connectors-1.2.15flushing-src/jk/native/apache-2.0/mod_jk
.c   2006-02-17 10:59:05.0 +0100
***
*** 412,417 
--- 412,420 
  jk_log(main_log, JK_LOG_DEBUG,
 written %d out of %d, r, ll);

+ if (s-flush_packets)
+ ws_flush(s);
+
  if (r  0)
  return JK_FALSE;
  ll -= r;

Regards, Stephan

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



Re: Tomcat Connector 1.2.15 - JkOption FlushPackets-Bug

2006-02-17 Thread Mladen Turk

Pelikan Stephan wrote:

Hello,
 
I detected that the FlushPackets JkOption does not work. I could solve

the problem by the patch
 


FlushPacket works, and the patch is invalid.
The service ws_flush is invoked from ajp_common.

In theory there can be problems if there
is no content_body packets, but the flushing
is implied after the handler by apache itself.


Regards,
Mladen.

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