cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net AprEndpoint.java

2005-06-13 Thread mturk
mturk   2005/06/13 23:55:20

  Modified:util/java/org/apache/tomcat/util/net AprEndpoint.java
  Log:
  Use the same locking object for add and maintain.
  Also make sure that sockets in the add queue are
  closed on destroy.
  
  Revision  ChangesPath
  1.42  +5 -1  
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java
  
  Index: AprEndpoint.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- AprEndpoint.java  10 Jun 2005 14:36:18 -  1.41
  +++ AprEndpoint.java  14 Jun 2005 06:55:20 -  1.42
  @@ -796,6 +796,10 @@
* Destroy the poller.
*/
   protected void destroy() {
  +/* Remove the sockets in the add queue */
  +for (int i = 0; i < addCount; i--) {
  +Pool.destroy(addP[i]);
  +}
   Pool.destroy(pool);
   }
   
  @@ -899,7 +903,7 @@
   }
   }
   if (rv == 0 || maintainTime > 100L) {
  -synchronized (this) {
  +synchronized (addS) {
   rv = Poll.maintain(serverPollset, desc, true);
   maintainTime = 0;
   }
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/common jk_global.h jk_lb_worker.c jk_shm.h jk_status.c

2005-06-13 Thread mturk
mturk   2005/06/13 23:34:13

  Modified:jk/native/common jk_global.h jk_lb_worker.c jk_shm.h
jk_status.c
  Log:
  Use 64 bit unsigned ints instead doubles for transferred/read.
  
  Revision  ChangesPath
  1.50  +4 -1  jakarta-tomcat-connectors/jk/native/common/jk_global.h
  
  Index: jk_global.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_global.h,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- jk_global.h   18 May 2005 18:04:53 -  1.49
  +++ jk_global.h   14 Jun 2005 06:34:13 -  1.50
  @@ -253,6 +253,9 @@
   #define snprintf _snprintf
   #define vsnprintf _vsnprintf
   #endif
  +typedef unsigned __int64 jk_u64_t;
  +#else
  +typedef unsigned long long jk_u64_t;
   #endif
   
   /* Use apr snprintf() and vsnprintf() when needed */
  
  
  
  1.91  +5 -5  jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c
  
  Index: jk_lb_worker.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c,v
  retrieving revision 1.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- jk_lb_worker.c13 Jun 2005 07:55:51 -  1.90
  +++ jk_lb_worker.c14 Jun 2005 06:34:13 -  1.91
  @@ -225,8 +225,8 @@
   {
   unsigned int i;
   int total_factor = 0;
  -double mytraffic = 0;
  -double curmin = 0;
  +jk_u64_t mytraffic = 0;
  +jk_u64_t curmin = 0;
   
   worker_record_t *candidate = NULL;
   if (p->lblock == JK_LB_LOCK_PESSIMISTIC)
  @@ -313,8 +313,8 @@
jk_logger_t *l)
   {
   unsigned int i;
  -double mytraffic = 0;
  -double curmin = 0;
  +jk_u64_t mytraffic = 0;
  +jk_u64_t curmin = 0;
   worker_record_t *candidate = NULL;
   
   if (p->lblock == JK_LB_LOCK_PESSIMISTIC)
  
  
  
  1.22  +3 -3  jakarta-tomcat-connectors/jk/native/common/jk_shm.h
  
  Index: jk_shm.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_shm.h,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- jk_shm.h  13 Jun 2005 07:55:51 -  1.21
  +++ jk_shm.h  14 Jun 2005 06:34:13 -  1.22
  @@ -81,9 +81,9 @@
   /* Statistical data */
   volatile time_t  error_time;
   /* Number of bytes read from remote */
  -volatile double  readed;
  +volatile jk_u64_t readed;
   /* Number of bytes transferred to remote */
  -volatile double  transferred;
  +volatile jk_u64_t transferred;
   /* Number of times the worker was elected */
   volatile size_t  elected;
   /* Number of non 200 responses */
  
  
  
  1.43  +16 -4 jakarta-tomcat-connectors/jk/native/common/jk_status.c
  
  Index: jk_status.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_status.c,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- jk_status.c   13 Jun 2005 07:55:51 -  1.42
  +++ jk_status.c   14 Jun 2005 06:34:13 -  1.43
  @@ -166,10 +166,11 @@
   }
   
   /* Actually APR's apr_strfsize */
  -static char *status_strfsize(double size, char *buf)
  +static char *status_strfsize(jk_u64_t size, char *buf)
   {
   const char ord[] = "KMGTPE";
   const char *o = ord;
  +unsigned int remain, siz;
   
   if (size < 0) {
   return strcpy(buf, "  - ");
  @@ -180,12 +181,23 @@
   return buf;
   }
   do {
  -size /= 1024;
  +remain = (unsigned int)(size & 0x03FF);
  +size >>= 10;
   if (size >= 973) {
   ++o;
   continue;
   }
  -if (sprintf(buf, "%.2f%c", size, *o) < 0)
  +siz = (unsigned int)(size & 0x);
  +if (siz < 9 || (siz == 9 && remain < 973)) {
  +if ((remain = ((remain * 5) + 256) / 512) >= 10)
  +++siz, remain = 0;
  +if (sprintf(buf, "%d.%d%c", siz, remain, *o) < 0)
  +return strcpy(buf, "");
  +return buf;
  +}
  +if (remain >= 512)
  +++siz;
  +if (sprintf(buf, "%3d%c", siz, *o) < 0)
   return strcpy(buf, "");
   return buf;
   } while (1);
  
  
  

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



DO NOT REPLY [Bug 35351] - Unable to reference nested/inner classes in tags

2005-06-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35351





--- Additional Comments From [EMAIL PROTECTED]  2005-06-14 07:33 ---
Request support for both reference styles described in comment 1 as there is
some ambiguity as to the correct notation in this case.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 35352] New: - Servlet runs 3x (with the same session) after one GET/POST

2005-06-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35352

   Summary: Servlet runs 3x (with the same session) after one
GET/POST
   Product: Tomcat 5
   Version: 5.5.9
  Platform: All
OS/Version: All
Status: NEW
  Severity: minor
  Priority: P2
 Component: Unknown
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


I've noticed that on a simple Servlet Page that contains forms and I click on a 
standard Submit button, sometimes my Servlet runs 2x-3x times. I'm running the 
Tomcat on my own PC under WinXP+SP2 but this happens under Linux (RedHat 3ES) 
too. I'm a single user. I know because at the begining of my servlet is a 
System.out.println("Starting: MyServlet"); and at the end is a 
System.out.prinlnt("Ending: MyServlet");
Form looks like:







When everything is ok I get the following in the Tomcat Console:

Starting: MyServlet
Ending: MyServlet

But in some cases the following message appears:

Starting: MyServlet
Starting: MyServlet
Ending: MyServlet
Ending: MyServlet

And at the worst case:

Starting: MyServlet
Starting: MyServlet
Ending: MyServlet
Starting: MyServlet
Ending: MyServlet
Ending: MyServlet

I used the following Browsers: IE6+SP2, Mozilla1.7.8 (XP&Linux), Firefox1.0.4 
(XP&Linux), Opera8.0, Netscape7.2

It seems that all 3 instances recieve the same Session content, but they put 
and clear values from session (because they think that that session is just 
theirs). The MyServlet does database INSERT-s too so running multiple times 
causes a Primary Key Violation.

I checked my Browsers with a proxy snooper and they send only one request.

Something causes the Tomcat to run my servlets multiple times with the exact 
same session.

I use Eclipse 3.0 + MyEclipse 3.8.4 to generate Servlets and JSPs and for 
debugging.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 35351] - Unable to reference nested/inner classes in tags

2005-06-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35351





--- Additional Comments From [EMAIL PROTECTED]  2005-06-14 06:43 ---
Tomcat v5.0 also produces similar errors to comment 1, eg:

1) Using "nested.TestComponent$InnerViewBean" results in:
  An error occurred at line: 8 in the jsp file: /inner_viewbean1.jsp
  Generated servlet error:
 
C:\apache\tomcat_50\work\Catalina\localhost\NestedViewBean\org\apache\jsp\inner_005fviewbean1_jsp.java:56:
cannot resolve symbol
  symbol  : class TestComponent$InnerViewBean 
  location: package nested
  perchance you meant 'TestComponent.InnerViewBean'
viewBean = new nested.TestComponent$InnerViewBean();
 ^
  3 errors

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)

org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

2) Using "nested.TestComponent.InnerViewBean" (as for comment 1)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 35351] New: - Unable to reference nested/inner classes in tags [T200506140027]

2005-06-13 Thread business
Dear tomcat-dev@jakarta.apache.org,

Thanks for writing to Webshots!

We received your message on 6/13/2005.
Your tracking number for this message is : T200506140027

** IMPORTANT: PLEASE DO NOT REPLY TO THIS EMAIL! **

This is an automatic response to let you know that your Webshots Corporate 
email will be personally answered as soon as possible, usually within 3 
business days.

Our customer support staff is available to respond to messages during regular 
business hours, excluding holidays.

Thanks again for your questions and comments,

The Webshots Support Team


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



DO NOT REPLY [Bug 35351] New: - Unable to reference nested/inner classes in tags

2005-06-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35351

   Summary: Unable to reference nested/inner classes in
 tags
   Product: Tomcat 5
   Version: 5.5.9
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


Jasper does not support nested class references in  tags. 

For example, neither of the following nested class references are permitted:
1) 
2) 

In detail:
1) Using "nested.TestComponent$InnerViewBean" results in:
  An error occurred at line: 8 in the jsp file: /inner_viewbean1.jsp
  Generated servlet error:
  The nested type nested.TestComponent$InnerViewBean cannot be referenced using
its binary name
 
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

2) Using "nested.TestComponent.InnerViewBean" results in:
  org.apache.jasper.JasperException: /inner_viewbean2.jsp(8,0) 
  The value for the useBean class attribute nested.TestComponent.InnerViewBean
is invalid.
   
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)

org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)

org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1223)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Generator.generate(Generator.java:3270)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



Re: cvs commit: jakarta-tomcat-connectors/jk/native/common jk_lb_worker.c jk_shm.h jk_status.c

2005-06-13 Thread William A. Rowe, Jr.
Mladen; are you sure you weren't looking for 'long long', 
al la int64_t?  Falling over to the FPU is rarely the best
performance decision.

Bill

At 02:55 AM 6/13/2005, [EMAIL PROTECTED] wrote:
>mturk   2005/06/13 00:55:51
>
>  Modified:jk/native/common jk_lb_worker.c jk_shm.h jk_status.c
>  Log:
>  Use double instead size_t for trensferred/read, so that lb doesn't
>  break on trnasferred mode when 2G of data has been send/read.
>  
>  -size_t mytraffic = 0;
>  -size_t curmin = 0;
>  +double mytraffic = 0;
>  +double curmin = 0;



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



DO NOT REPLY [Bug 35347] New: - class-path entry in webapp's jar's manifest.mf ignored.

2005-06-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35347

   Summary: class-path entry in webapp's jar's manifest.mf ignored.
   Product: Tomcat 5
   Version: 5.5.9
  Platform: Other
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


Our war, available here 
http://forge.objectweb.org/project/download.php?group_id=168&file_id=3451
, has layout like

WEB-INF/lib/y.jar
WEB-INF/lib/private/x.jar

where y.jar's MANIFEST.MF contains
Class-Path: private/x.jar

.  However despite this entry in the manifest the classes in x.jar are not
being found.

Btw, if you download the war and deploy the war you will not see an exception 
because we released with a work around in place.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



Re: cvs commit: jakarta-tomcat-connectors/jk/native/common jk_lb_worker.c jk_shm.h jk_status.c

2005-06-13 Thread Tom Anderson

Mladen,

I appreciate you addressing this issue.   But isn't this fix just  
delaying the problem?   An IEEE double has 52 bits of mantissa versus  
32 bits for size_t.   So the problem will now occur at 4 PB  
(petabytes).   Sure, that's a lot of bytes and my webservers would  
never see this kind of load.   But there might be some sites serving  
lots of large files that could have a problem with this ... maybe ...  
sometime.


So, perhaps it's something that can be overlooked for now.   But  
maybe you should consider doing it like the Request method.   In that  
method it adds the lbfactor from each worker's value and subtracts  
the total from the worker that is used.   For the Traffic method I  
imaging adding and adding/subtracting the lbfactor*bytes_read (or  
lbfactor*bytes_transferred) might accomplish the same thing.


~Tom

On Jun 13, 2005, at 1:55 AM, [EMAIL PROTECTED] wrote:


mturk   2005/06/13 00:55:51

  Modified:jk/native/common jk_lb_worker.c jk_shm.h jk_status.c
  Log:
  Use double instead size_t for trensferred/read, so that lb doesn't
  break on trnasferred mode when 2G of data has been send/read.

  Revision  ChangesPath
  1.90  +5 -5  jakarta-tomcat-connectors/jk/native/common/ 
jk_lb_worker.c


  Index: jk_lb_worker.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/ 
jk_lb_worker.c,v

  retrieving revision 1.89
  retrieving revision 1.90
  diff -u -r1.89 -r1.90
  --- jk_lb_worker.c15 May 2005 16:33:47 -1.89
  +++ jk_lb_worker.c13 Jun 2005 07:55:51 -1.90
  @@ -225,8 +225,8 @@
   {
   unsigned int i;
   int total_factor = 0;
  -size_t mytraffic = 0;
  -size_t curmin = 0;
  +double mytraffic = 0;
  +double curmin = 0;

   worker_record_t *candidate = NULL;
   if (p->lblock == JK_LB_LOCK_PESSIMISTIC)
  @@ -313,8 +313,8 @@
jk_logger_t *l)
   {
   unsigned int i;
  -size_t mytraffic = 0;
  -size_t curmin = 0;
  +double mytraffic = 0;
  +double curmin = 0;
   worker_record_t *candidate = NULL;

   if (p->lblock == JK_LB_LOCK_PESSIMISTIC)



  1.21  +3 -3  jakarta-tomcat-connectors/jk/native/common/ 
jk_shm.h


  Index: jk_shm.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/ 
jk_shm.h,v

  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- jk_shm.h15 May 2005 11:23:50 -1.20
  +++ jk_shm.h13 Jun 2005 07:55:51 -1.21
  @@ -81,9 +81,9 @@
   /* Statistical data */
   volatile time_t  error_time;
   /* Number of bytes read from remote */
  -volatile size_t  readed;
  +volatile double  readed;
   /* Number of bytes transferred to remote */
  -volatile size_t  transferred;
  +volatile double  transferred;
   /* Number of times the worker was elected */
   volatile size_t  elected;
   /* Number of non 200 responses */



  1.42  +4 -15 jakarta-tomcat-connectors/jk/native/common/ 
jk_status.c


  Index: jk_status.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/ 
jk_status.c,v

  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- jk_status.c15 May 2005 15:22:05 -1.41
  +++ jk_status.c13 Jun 2005 07:55:51 -1.42
  @@ -166,11 +166,10 @@
   }

   /* Actually APR's apr_strfsize */
  -static char *status_strfsize(size_t size, char *buf)
  +static char *status_strfsize(double size, char *buf)
   {
   const char ord[] = "KMGTPE";
   const char *o = ord;
  -int remain;

   if (size < 0) {
   return strcpy(buf, "  - ");
  @@ -181,22 +180,12 @@
   return buf;
   }
   do {
  -remain = (int)(size & 1023);
  -size >>= 10;
  +size /= 1024;
   if (size >= 973) {
   ++o;
   continue;
   }
  -if (size < 9 || (size == 9 && remain < 973)) {
  -if ((remain = ((remain * 5) + 256) / 512) >= 10)
  -++size, remain = 0;
  -if (sprintf(buf, "%d.%d%c", (int) size, remain, *o)  
< 0)

  -return strcpy(buf, "");
  -return buf;
  -}
  -if (remain >= 512)
  -++size;
  -if (sprintf(buf, "%3d%c", (int) size, *o) < 0)
  +if (sprintf(buf, "%.2f%c", size, *o) < 0)
   return strcpy(buf, "");
   return buf;
   } while (1);




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






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

Session replication question

2005-06-13 Thread Pankaj Mishra
Hi,

 

  I have a question about Tomcat's session replication design. 

 

  I would like to know the reasons behind the design choice to move from
JGroups based replication to TCP based replication. Because it seems to me
that TCP based replication will have higher overhead than JGroups [multicast
based] replication. 

 

  I would greatly appreciate it if someone could shed some light on this
topic.

 

 

Thanks,

Pankaj



Ideas for optimization (Jasper)

2005-06-13 Thread Scott West
Hello all,

I'm a student, and I'm taking a very belated stab at the summer of
code. Actually, I already submitted one proposal, but I really didn't
understand what was expected (apparently google filters the proposals,
then they go to the mentoring organizations?).

Regardless, I figured better late than never, so: what do you feel
would be beneficial to the Jasper compiler? I've done a little work
with languages in the past, making a primitive
lexer,parser,interpretter in Java and Haskell.

Since the general direction of this is to optimize the compilation
process, I was wondernig where people feel it tends to drag? Or I
guess more importantly, is it even *known* where it could use some
improvement? I read the post on bugzilla, and I would like to use that
as a starting point.

I know that I'd like to include documentation as part of the proposal,
so that there is an overall design document. I feel this would be a
great way to encourage more people, who are still unfamiliar with the
design (as I am), to extend and improve Jasper. The one thing that
usually stops me from really wanting get involved in a large project
is the initial inertia that must be overcome before you can start.
It'd be wonderful to reduce this by giving people a really good
overview (read: design document) of what is currently present. Then as
people add they can update the design to reflect the changes.

Also, if there are any suggestions you have for the proposal, things
you feel would make it better, don't be afraid to mention it.
Please... please... mention it ;).

Regards,
Scott West

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



DO NOT REPLY [Bug 35342] - Unexpected behaviour using uriworkermap.properties autoreload

2005-06-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35342


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2005-06-13 18:05 ---
To remove the entry from the uriworkermap.propeties it is not
enough just to comment the entry. You have to explicitly say to
remove the mapping by prefixing it with the '-' singn according to
the previous directive.
So if the directive was:
!/demo/welcome.do=demo
The you have to change that to:
-!/demo/welcome.do=demo
to be removed from the uri mappings.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 35342] New: - Unexpected behaviour using uriworkermap.properties autoreload

2005-06-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35342

   Summary: Unexpected behaviour using uriworkermap.properties
autoreload
   Product: Tomcat 5
   Version: 5.0.30
  Platform: Other
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connector:AJP
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


I'm using Connectors 1.2.12 with Apache 2.0.54 with SSL support.

Under the Apache "DocumentRoot" there is a static HTML file 
called "welcome.do".

When I'm using uriworkermap.properties like:

/status=status
/demo*=demo
!/demo/welcome.do=demo

This static page will come up when calling "https://server/demo/welcome.do";.

Now I change the uriworkermap.properties:

/status=status
/demo*=demo
#!/demo/welcome.do=demo

but the static page will come up again without restarting httpd and WITH 
working autoreload of the uriworkermap.properties file.
To get rid of the static answer I have to restart Apache or I have to change 
the properties file like 

/status=status
/demo*=demo
/demo/welcome.do=demo

IMHO, this is a strange behaviour.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



cvs commit: jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni BIOSSLServer.java

2005-06-13 Thread jfclere
jfclere 2005/06/13 07:00:04

  Modified:jni/examples/org/apache/tomcat/jni BIOSSLServer.java
  Log:
  Arrange it according to the new SSL and SSLSocket methods.
  
  Revision  ChangesPath
  1.2   +4 -3  
jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni/BIOSSLServer.java
  
  Index: BIOSSLServer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni/BIOSSLServer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BIOSSLServer.java 10 Jun 2005 17:15:56 -  1.1
  +++ BIOSSLServer.java 13 Jun 2005 14:00:04 -  1.2
  @@ -107,9 +107,10 @@
  ":" + raddr.port);
   }
   // SSLCallBack.setsock(clientSock);
  -int retcode = SSLSocket.accept(serverCtx, clientSock, 
serverPool);
  +long sslSocket = SSLSocket.attach(serverCtx, clientSock, 
serverPool);
  +int retcode = SSLSocket.handshake(sslSocket);
   if (retcode<=0) {
  -throw(new Exception("Can't SSL accept: " + 
SSLBIO.geterror(serverSSL, retcode)));
  +throw(new Exception("Can't SSL accept: " + 
SSL.getLastError()));
   }
   
   } catch (Exception e) {
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni SSLSocket.java

2005-06-13 Thread jfclere
jfclere 2005/06/13 06:01:12

  Modified:jni/java/org/apache/tomcat/jni SSLSocket.java
  Log:
  typo.
  
  Revision  ChangesPath
  1.9   +1 -21 
jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/SSLSocket.java
  
  Index: SSLSocket.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/SSLSocket.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SSLSocket.java13 Jun 2005 10:48:55 -  1.8
  +++ SSLSocket.java13 Jun 2005 13:01:12 -  1.9
  @@ -110,26 +110,6 @@
* APR_EINTR is never returned.
* 
* @param sock The socket to send the data over.
  - * @param buf The buffer which contains the data to be sent.
  - * @param offset Offset in the byte buffer.
  - * @param len The number of bytes to write; (-1) for full array.
  - * @return The number of bytes send.
  - *
  - */
  -public static native int send(long sock, byte[] buf, int offset, int 
len);
  -
  -/**
  - * Send data over a network.
  - * 
  - * This functions acts like a blocking write by default.  To change
  - * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
  - * socket option.
  - *
  - * It is possible for both bytes to be sent and an error to be returned.
  - *
  - * APR_EINTR is never returned.
  - * 
  - * @param sock The socket to send the data over.
* @param buf The Byte buffer which contains the data to be sent.
* @param offset The offset within the buffer array of the first buffer 
from
*   which bytes are to be retrieved; must be non-negative
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jni/native/os/unix system.c

2005-06-13 Thread jfclere
jfclere 2005/06/13 06:07:31

  Modified:jni/native/os/unix system.c
  Log:
  typo.
  
  Revision  ChangesPath
  1.7   +2 -2  jakarta-tomcat-connectors/jni/native/os/unix/system.c
  
  Index: system.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/os/unix/system.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- system.c  11 Jun 2005 07:03:45 -  1.6
  +++ system.c  13 Jun 2005 13:07:31 -  1.7
  @@ -22,7 +22,7 @@
   #include "apr.h"
   #include "apr_pools.h"
   #include "apr_network_io.h"
  -#include "apr_pol.h"
  +#include "apr_poll.h"
   
   #include "tcn.h"
   #if defined(__linux__)
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jni/native libtcnative.dsp

2005-06-13 Thread mturk
mturk   2005/06/13 04:14:05

  Modified:jni/native libtcnative.dsp
  Log:
  Always prefer the static libraries over dll's.
  
  Revision  ChangesPath
  1.11  +2 -2  jakarta-tomcat-connectors/jni/native/libtcnative.dsp
  
  Index: libtcnative.dsp
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/libtcnative.dsp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- libtcnative.dsp   7 Jun 2005 13:09:31 -   1.10
  +++ libtcnative.dsp   13 Jun 2005 11:14:05 -  1.11
  @@ -53,7 +53,7 @@
   # ADD BSC32 /nologo
   LINK32=link.exe
   # ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib 
wldap32.lib psapi.lib ole32.lib /nologo /base:"0x6EE0" /subsystem:windows 
/dll /debug /machine:I386 /opt:ref
  -# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib 
psapi.lib ole32.lib libeay32.lib ssleay32.lib /nologo /base:"0x6EE0" 
/subsystem:windows /dll /debug /machine:I386 /out:"Release/libtcnative-1.dll" 
/libpath:"../openssl/out32dll" /libpath:"../openssl/out32" /opt:ref
  +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib 
psapi.lib ole32.lib libeay32.lib ssleay32.lib /nologo /base:"0x6EE0" 
/subsystem:windows /dll /debug /machine:I386 /out:"Release/libtcnative-1.dll" 
/libpath:"../openssl/out32" /libpath:"../openssl/out32dll" /opt:ref
   
   !ELSEIF  "$(CFG)" == "libtcnative - Win32 Debug"
   
  @@ -79,7 +79,7 @@
   # ADD BSC32 /nologo
   LINK32=link.exe
   # ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib 
wldap32.lib psapi.lib ole32.lib /nologo /base:"0x6EE0" /subsystem:windows 
/dll /incremental:no /debug /machine:I386
  -# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib 
psapi.lib ole32.lib libeay32.lib ssleay32.lib /nologo /base:"0x6EE0" 
/subsystem:windows /dll /incremental:no /debug /machine:I386 
/out:"Debug/libtcnative-1.dll" /libpath:"../openssl/out32dll" 
/libpath:"../openssl/out32"
  +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib 
psapi.lib ole32.lib libeay32.lib ssleay32.lib /nologo /base:"0x6EE0" 
/subsystem:windows /dll /incremental:no /debug /machine:I386 
/out:"Debug/libtcnative-1.dll" /libpath:"../openssl/out32" 
/libpath:"../openssl/out32dll"
   
   !ENDIF 
   
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jni/native tcnative.dsp

2005-06-13 Thread mturk
mturk   2005/06/13 04:11:24

  Modified:jni/native tcnative.dsp
  Log:
  For static build favor the static OpenSSL libraries.
  
  Revision  ChangesPath
  1.11  +2 -2  jakarta-tomcat-connectors/jni/native/tcnative.dsp
  
  Index: tcnative.dsp
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/tcnative.dsp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- tcnative.dsp  7 Jun 2005 13:09:31 -   1.10
  +++ tcnative.dsp  13 Jun 2005 11:11:24 -  1.11
  @@ -53,7 +53,7 @@
   # ADD BSC32 /nologo
   LINK32=link.exe
   # ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib 
wldap32.lib psapi.lib ole32.lib /nologo /base:"0x6EE0" /subsystem:windows 
/dll /debug /machine:I386 /opt:ref
  -# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib 
psapi.lib ole32.lib rpcrt4.lib libeay32.lib ssleay32.lib /nologo 
/base:"0x6EE0" /subsystem:windows /dll /debug /machine:I386 
/out:"LibR/tcnative-1.dll" /libpath:"../openssl/out32dll" 
/libpath:"../openssl/out32" /opt:ref
  +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib 
psapi.lib ole32.lib rpcrt4.lib libeay32.lib ssleay32.lib /nologo 
/base:"0x6EE0" /subsystem:windows /dll /debug /machine:I386 
/out:"LibR/tcnative-1.dll" /libpath:"../openssl/out32" 
/libpath:"../openssl/out32dll" /opt:ref
   
   !ELSEIF  "$(CFG)" == "tcnative - Win32 Debug"
   
  @@ -79,7 +79,7 @@
   # ADD BSC32 /nologo
   LINK32=link.exe
   # ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib 
wldap32.lib psapi.lib ole32.lib /nologo /base:"0x6EE0" /subsystem:windows 
/dll /incremental:no /debug /machine:I386
  -# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib 
psapi.lib ole32.lib rpcrt4.lib libeay32.lib ssleay32.lib /nologo 
/base:"0x6EE0" /subsystem:windows /dll /incremental:no /debug /machine:I386 
/out:"LibD/tcnative-1.dll" /libpath:"../openssl/out32dll" 
/libpath:"../openssl/out32"
  +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib 
psapi.lib ole32.lib rpcrt4.lib libeay32.lib ssleay32.lib /nologo 
/base:"0x6EE0" /subsystem:windows /dll /incremental:no /debug /machine:I386 
/out:"LibD/tcnative-1.dll" /libpath:"../openssl/out32" 
/libpath:"../openssl/out32dll" 
   
   !ENDIF 
   
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jni/native/src sslnetwork.c

2005-06-13 Thread mturk
mturk   2005/06/13 03:48:55

  Modified:jni/java/org/apache/tomcat/jni SSLSocket.java
   jni/native/src sslnetwork.c
  Log:
  Added SSLSocket.destroy method so we can add the SSLSocket as
  client data to the poller and destroy all the ssl objects in a single call.
  
  Revision  ChangesPath
  1.8   +11 -1 
jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/SSLSocket.java
  
  Index: SSLSocket.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/SSLSocket.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SSLSocket.java13 Jun 2005 07:31:11 -  1.7
  +++ SSLSocket.java13 Jun 2005 10:48:55 -  1.8
  @@ -69,6 +69,16 @@
   public static native int close(long thesocket);
   
   /**
  + * Destroy the socket.
  + * 
  + * This function destroys the pool used for attach call.
  + * The main usage for this function is to allow the SSLSocket to be
  + * passed as client data to the Poll.
  + * @param thesocket The socket to destroy
  + */
  +public static native int destroy(long thesocket);
  +
  +/**
* Send data over a network.
* 
* This functions acts like a blocking write by default.  To change
  
  
  
  1.11  +25 -3 jakarta-tomcat-connectors/jni/native/src/sslnetwork.c
  
  Index: sslnetwork.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/sslnetwork.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- sslnetwork.c  13 Jun 2005 07:31:11 -  1.10
  +++ sslnetwork.c  13 Jun 2005 10:48:55 -  1.11
  @@ -172,12 +172,27 @@
   {
   apr_interval_time_t timeout;
   apr_pollfd_t pfd;
  -int type = for_what == SSL_ERROR_WANT_WRITE ? APR_POLLOUT : APR_POLLIN;
  +int type;
   apr_status_t status;
   
  +/* Figure out the the poll direction */
  +switch (for_what) {
  +case SSL_ERROR_WANT_WRITE:
  +case SSL_ERROR_WANT_CONNECT:
  +case SSL_ERROR_WANT_ACCEPT:
  +type = APR_POLLOUT;
  +break;
  +case SSL_ERROR_WANT_READ:
  +type = APR_POLLIN;
  +break;
  +default:
  +return APR_EINVAL;
  +break;
  +}
  +
   apr_socket_timeout_get(con->sock, &timeout);
   pfd.desc_type = APR_POLL_SOCKET;
  -pfd.desc.s = con->sock;
  +pfd.desc.s= con->sock;
   pfd.reqevents = type;
   
   /* Remove the object if it was in the pollset, then add in the new
  @@ -249,6 +264,13 @@
   return (jint)rv;
   }
   
  +TCN_IMPLEMENT_CALL(void, SSLSocket, destroy)(TCN_STDARGS, jlong sock)
  +{
  +tcn_ssl_conn_t *con = J2P(sock, tcn_ssl_conn_t *);
  +UNREFERENCED_STDARGS;
  +apr_pool_destroy(con->pool);
  +}
  +
   #define JFC_TEST 0
   #if JFC_TEST
   /*
  
  
  

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



DO NOT REPLY [Bug 35266] - Unable to compile class for JSP, libJ3D.jnilib falsely recognized as zip

2005-06-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35266


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



cvs commit: jakarta-tomcat-connectors/jk/native/common jk_lb_worker.c jk_shm.h jk_status.c

2005-06-13 Thread mturk
mturk   2005/06/13 00:55:51

  Modified:jk/native/common jk_lb_worker.c jk_shm.h jk_status.c
  Log:
  Use double instead size_t for trensferred/read, so that lb doesn't
  break on trnasferred mode when 2G of data has been send/read.
  
  Revision  ChangesPath
  1.90  +5 -5  jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c
  
  Index: jk_lb_worker.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c,v
  retrieving revision 1.89
  retrieving revision 1.90
  diff -u -r1.89 -r1.90
  --- jk_lb_worker.c15 May 2005 16:33:47 -  1.89
  +++ jk_lb_worker.c13 Jun 2005 07:55:51 -  1.90
  @@ -225,8 +225,8 @@
   {
   unsigned int i;
   int total_factor = 0;
  -size_t mytraffic = 0;
  -size_t curmin = 0;
  +double mytraffic = 0;
  +double curmin = 0;
   
   worker_record_t *candidate = NULL;
   if (p->lblock == JK_LB_LOCK_PESSIMISTIC)
  @@ -313,8 +313,8 @@
jk_logger_t *l)
   {
   unsigned int i;
  -size_t mytraffic = 0;
  -size_t curmin = 0;
  +double mytraffic = 0;
  +double curmin = 0;
   worker_record_t *candidate = NULL;
   
   if (p->lblock == JK_LB_LOCK_PESSIMISTIC)
  
  
  
  1.21  +3 -3  jakarta-tomcat-connectors/jk/native/common/jk_shm.h
  
  Index: jk_shm.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_shm.h,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- jk_shm.h  15 May 2005 11:23:50 -  1.20
  +++ jk_shm.h  13 Jun 2005 07:55:51 -  1.21
  @@ -81,9 +81,9 @@
   /* Statistical data */
   volatile time_t  error_time;
   /* Number of bytes read from remote */
  -volatile size_t  readed;
  +volatile double  readed;
   /* Number of bytes transferred to remote */
  -volatile size_t  transferred;
  +volatile double  transferred;
   /* Number of times the worker was elected */
   volatile size_t  elected;
   /* Number of non 200 responses */
  
  
  
  1.42  +4 -15 jakarta-tomcat-connectors/jk/native/common/jk_status.c
  
  Index: jk_status.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_status.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- jk_status.c   15 May 2005 15:22:05 -  1.41
  +++ jk_status.c   13 Jun 2005 07:55:51 -  1.42
  @@ -166,11 +166,10 @@
   }
   
   /* Actually APR's apr_strfsize */
  -static char *status_strfsize(size_t size, char *buf)
  +static char *status_strfsize(double size, char *buf)
   {
   const char ord[] = "KMGTPE";
   const char *o = ord;
  -int remain;
   
   if (size < 0) {
   return strcpy(buf, "  - ");
  @@ -181,22 +180,12 @@
   return buf;
   }
   do {
  -remain = (int)(size & 1023);
  -size >>= 10;
  +size /= 1024;
   if (size >= 973) {
   ++o;
   continue;
   }
  -if (size < 9 || (size == 9 && remain < 973)) {
  -if ((remain = ((remain * 5) + 256) / 512) >= 10)
  -++size, remain = 0;
  -if (sprintf(buf, "%d.%d%c", (int) size, remain, *o) < 0)
  -return strcpy(buf, "");
  -return buf;
  -}
  -if (remain >= 512)
  -++size;
  -if (sprintf(buf, "%3d%c", (int) size, *o) < 0)
  +if (sprintf(buf, "%.2f%c", size, *o) < 0)
   return strcpy(buf, "");
   return buf;
   } while (1);
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jni/native/src sslnetwork.c

2005-06-13 Thread mturk
mturk   2005/06/13 00:31:11

  Modified:jni/java/org/apache/tomcat/jni SSLSocket.java
   jni/native/src sslnetwork.c
  Log:
  Copy/paste the rest of the recv*/send* methods from APR sockets.
  
  Revision  ChangesPath
  1.7   +134 -1
jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/SSLSocket.java
  
  Index: SSLSocket.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/SSLSocket.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SSLSocket.java12 Jun 2005 10:31:16 -  1.6
  +++ SSLSocket.java13 Jun 2005 07:31:11 -  1.7
  @@ -89,6 +89,68 @@
   public static native int send(long sock, byte[] buf, int offset, int 
len);
   
   /**
  + * Send data over a network.
  + * 
  + * This functions acts like a blocking write by default.  To change
  + * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
  + * socket option.
  + *
  + * It is possible for both bytes to be sent and an error to be returned.
  + *
  + * APR_EINTR is never returned.
  + * 
  + * @param sock The socket to send the data over.
  + * @param buf The buffer which contains the data to be sent.
  + * @param offset Offset in the byte buffer.
  + * @param len The number of bytes to write; (-1) for full array.
  + * @return The number of bytes send.
  + *
  + */
  +public static native int send(long sock, byte[] buf, int offset, int 
len);
  +
  +/**
  + * Send data over a network.
  + * 
  + * This functions acts like a blocking write by default.  To change
  + * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
  + * socket option.
  + *
  + * It is possible for both bytes to be sent and an error to be returned.
  + *
  + * APR_EINTR is never returned.
  + * 
  + * @param sock The socket to send the data over.
  + * @param buf The Byte buffer which contains the data to be sent.
  + * @param offset The offset within the buffer array of the first buffer 
from
  + *   which bytes are to be retrieved; must be non-negative
  + *   and no larger than buf.length
  + * @param len The maximum number of buffers to be accessed; must be 
non-negative
  + *and no larger than buf.length - offset
  + * @return The number of bytes send.
  + *
  + */
  +public static native int sendb(long sock, ByteBuffer buf,
  +   int offset, int len);
  +
  +/**
  + * Send multiple packets of data over a network.
  + * 
  + * This functions acts like a blocking write by default.  To change
  + * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
  + * socket option.
  + * The number of bytes actually sent is stored in argument 3.
  + *
  + * It is possible for both bytes to be sent and an error to be returned.
  + *
  + * APR_EINTR is never returned.
  + * 
  + * @param sock The socket to send the data over.
  + * @param vec The array from which to get the data to send.
  + *
  + */
  +public static native int sendv(long sock, byte[][] vec);
  +
  +/**
* Read data from a network.
*
* 
  @@ -110,4 +172,75 @@
*/
   public static native int recv(long sock, byte[] buf, int offset, int 
nbytes);
   
  +/**
  + * Read data from a network with timeout.
  + *
  + * 
  + * This functions acts like a blocking read by default.  To change
  + * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
  + * socket option.
  + * The number of bytes actually received is stored in argument 3.
  + *
  + * It is possible for both bytes to be received and an APR_EOF or
  + * other error to be returned.
  + *
  + * APR_EINTR is never returned.
  + * 
  + * @param sock The socket to read the data from.
  + * @param buf The buffer to store the data in.
  + * @param offset Offset in the byte buffer.
  + * @param nbytes The number of bytes to read (-1) for full array.
  + * @param timeout The socket timeout in microseconds.
  + * @return the number of bytes received.
  + */
  +public static native int recvt(long sock, byte[] buf, int offset,
  +   int nbytes, long timeout);
  +
  +/**
  + * Read data from a network.
  + *
  + * 
  + * This functions acts like a blocking read by default.  To change
  + * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
  + * socket option.
  + * The number of bytes actually received is stored in argument 3.
  + *
  + * It is possible for both bytes to be received and an APR_EOF or
  + * other error