Re: "j-t-c/jk/native(2) build.xml": Global Server Property InitializationIssue

2002-05-28 Thread jean-frederic clere

Anthony W. Marino wrote:
 > For example, the "apache13.home" property is set with too a generic/common
 > directory location which should, 100% of the time, evaluate to true when
 > checked with an "available" task (ie; target "detect").
 >
 > This global assignment will only occur, of course, when one has purposely
 > commented-out (indicating apache13 not available) or inadvertantly omitted
 > that particular property from a properties file.
 >
 >
 > Several possible solutions:
 >
 > 1) Initialize the property with a more specific dir path (ie;
 > /usr/local/apache13 (see "apache2.home" intialization).  Only issue here is
 > if the user had several installs of apache13 including in the default path
 > and intended to use another installation path.
 >
 > 2) Remove the global assignment and make it a prerequisite for the user to add
 > this to a properties file which will always fail if not preset in a
 > properties file.
 >
 >
 > If you are going to setup global properties in "build.xml" maybe some
 > conditional statements are in order, where applicable, to be more os
 > specific/compliant.  Or mabe os specific properties files that could be
 > generated/used automatically?

The configure of native2 build the ../build.properties out of the
../build.properties.autoconf

 >
 > Thanks,
 > Anthony
 >
 >
 >
 >
 > --
 > To unsubscribe, e-mail:   
 > For additional commands, e-mail: 
 >
 >
 >





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native2/scripts/build/unix dummy

2002-05-28 Thread jfclere

jfclere 02/05/28 00:48:54

  Removed: jk/native2/scripts/build/unix dummy
  Log:
  Remove the dummy file (dummy.am replaces it).

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native2 buildconf.sh

2002-05-28 Thread jfclere

jfclere 02/05/28 00:52:27

  Modified:jk/native2 buildconf.sh
  Log:
  automake needs the aclocal.m4 file so we have to run aclocal before automake
  
  Revision  ChangesPath
  1.7   +2 -2  jakarta-tomcat-connectors/jk/native2/buildconf.sh
  
  Index: buildconf.sh
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/buildconf.sh,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- buildconf.sh  27 May 2002 13:28:03 -  1.6
  +++ buildconf.sh  28 May 2002 07:52:27 -  1.7
  @@ -2,9 +2,9 @@
   
   echo "libtoolize --force --automake --copy"
   libtoolize --force --automake --copy
  -echo "automake --copy --add-missing"
  -automake --copy --add-missing
   echo "aclocal"
   aclocal
  +echo "automake --copy --add-missing"
  +automake --copy --add-missing
   echo "autoconf"
   autoconf
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native buildconf.sh

2002-05-28 Thread jfclere

jfclere 02/05/28 00:54:24

  Modified:jk/native buildconf.sh
  Log:
  put automake after aclocal.
  
  Revision  ChangesPath
  1.7   +2 -2  jakarta-tomcat-connectors/jk/native/buildconf.sh
  
  Index: buildconf.sh
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/buildconf.sh,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- buildconf.sh  22 May 2002 15:46:32 -  1.6
  +++ buildconf.sh  28 May 2002 07:54:24 -  1.7
  @@ -2,11 +2,11 @@
   
   echo "libtoolize --force --automake --copy"
   libtoolize --force --automake --copy
  -echo "automake -a --foreign -i --copy"
  -automake -a --foreign -i --copy
   echo "aclocal"
   #aclocal --acdir=`aclocal --print-ac-dir`
   #aclocal --acdir=/usr/local/share/aclocal
   aclocal
  +echo "automake -a --foreign -i --copy"
  +automake -a --foreign -i --copy
   echo "autoconf"
   autoconf
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




JNDI/Webapp ClassLoader Bug (ContextBindings.java), patch (?)attached

2002-05-28 Thread David Haraburda

Hi,

I believe I have found a bug (or a problem at least) with the way Tomcat
handles associating webapp contexts to JNDI naming contexts.

ContextBindings.java, which apparently handles these associations does
not account for the fact that a web application may have its own
ClassLoader.  I am trying to use Apache Cocoon which does this.  I've
properly enlisted the object I want in the namespace using the
server.xml file and the web.xml file.  After Tomcat creates this
NamingContext, it "binds" it to Cocoon's context in
ContextBindings.java, using the current ClassLoader as a key, which
happens to be Tomcat's WebAppClassLoader.  Cocoon provides its own
ClassLoader (because it is a rather complex beast :-), so when I try to
get to my object in the namespace it can't be found (even though its
parent ClassLoader is the correct WebAppClassLoader)

This may or may not be appropriate, but I've found that it works for
me.  I've modified the following methods in ContextBindings.java:

getClassLoader()
getClassLoaderName()
isClassLoaderBound()

so that they check the hashtable for the current ClassLoader, and
continue to search up the heirarchy by looking at that ClassLoader's
parent -- returning success at the first match, and returning failure
once it has been all the way up the heirarchy.  A method I did not
modify was unbindClassLoader() -- I'll leave that to further discussion
because (if my solution is acceptable) I'm not sure if it is appropriate
to leave it or change it.

This patch is against CVS revision 1.4 of the file, which I got from the
source distribution of Tomcat 4.0.4 beta 3.

Hope this helps others with the same problem.

Thanks,

David Haraburda



--- ContextBindings.javaFri May 10 21:30:30 2002
+++ ContextBindings.dharaburda.java Tue May 28 02:38:28 2002
@@ -345,12 +345,14 @@
  */
 public static Context getClassLoader()
 throws NamingException {
-Context context = (Context) clBindings.get
-(Thread.currentThread().getContextClassLoader());
-if (context == null)
+ClassLoader cl = Thread.currentThread().getContextClassLoader();
+Context context = null;
+do {
+  context = (Context) clBindings.get(cl);
+  if( context != null ) return context;
+} while( (cl = cl.getParent()) != null );
 throw new NamingException
 (sm.getString("contextBindings.noContextBoundToCL"));
-return context;
 }
 
 
@@ -359,12 +361,14 @@
  */
 static Object getClassLoaderName()
 throws NamingException {
-Object name = 
-clNameBindings.get(Thread.currentThread().getContextClassLoader());
-if (name == null)
+ClassLoader cl = Thread.currentThread().getContextClassLoader();
+Object name = null;
+do {
+  name = clNameBindings.get(cl);
+  if( name != null ) return name;
+} while( (cl = cl.getParent()) != null );
 throw new NamingException
 (sm.getString("contextBindings.noContextBoundToCL"));
-return name;
 }
 
 
@@ -372,8 +376,11 @@
  * Tests if current class loader is bound to a context.
  */
 public static boolean isClassLoaderBound() {
-return (clBindings.containsKey
-(Thread.currentThread().getContextClassLoader()));
+ClassLoader cl = Thread.currentThread().getContextClassLoader();
+do {
+if( clBindings.containsKey(cl) ) return true;
+} while( (cl = cl.getParent()) != null );
+return false;
 }
 
 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: "j-t-c/jk/native(2) build.xml": Global Server Property Initialization Issue

2002-05-28 Thread Anthony W. Marino

> Anthony W. Marino wrote:
>  > For example, the "apache13.home" property is set with too a
>  > generic/common directory location which should, 100% of the time,
>  > evaluate to true when checked with an "available" task (ie; target
>  > "detect").
>  >
>  > This global assignment will only occur, of course, when one has
>  > purposely commented-out (indicating apache13 not available) or
>  > inadvertantly omitted that particular property from a properties file.
>  >
>  >
>  > Several possible solutions:
>  >
>  > 1) Initialize the property with a more specific dir path (ie;
>  > /usr/local/apache13 (see "apache2.home" intialization).  Only issue here
>  > is if the user had several installs of apache13 including in the default
>  > path and intended to use another installation path.
>  >
>  > 2) Remove the global assignment and make it a prerequisite for the user
>  > to add this to a properties file which will always fail if not preset in
>  > a properties file.
>  >
>  >
>  > If you are going to setup global properties in "build.xml" maybe some
>  > conditional statements are in order, where applicable, to be more os
>  > specific/compliant.  Or mabe os specific properties files that could be
>  > generated/used automatically?
>
> The configure of native2 build the ../build.properties out of the
> ../build.properties.autoconf
>

Isn't that for configure/make process and not for ant?  Also, that still 
doesn't take care of "native" build process with ant.

Anthony


>  > Thanks,
>  > Anthony
>  >
>  >
>  >
>  >
>  > --
>  > To unsubscribe, e-mail:  
>  >  For additional
>  > commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: "j-t-c/jk/native(2) build.xml": Global Server Property Initialization Issue

2002-05-28 Thread Anthony W. Marino

Jean-Frederic,
If it isn't too much trouble, just initialize "apache13.home" property in 
"j-t-c/jk/native(2) build.xml" to "/opt/apache13".  This will be consistant 
with how "apache2.home" is initialized and goes toward a more specific 
initialization.

Thank You,
Anthony
 

> Anthony W. Marino wrote:
>  > For example, the "apache13.home" property is set with too a
>  > generic/common directory location which should, 100% of the time,
>  > evaluate to true when checked with an "available" task (ie; target
>  > "detect").
>  >
>  > This global assignment will only occur, of course, when one has
>  > purposely commented-out (indicating apache13 not available) or
>  > inadvertantly omitted that particular property from a properties file.
>  >
>  >
>  > Several possible solutions:
>  >
>  > 1) Initialize the property with a more specific dir path (ie;
>  > /usr/local/apache13 (see "apache2.home" intialization).  Only issue here
>  > is if the user had several installs of apache13 including in the default
>  > path and intended to use another installation path.
>  >
>  > 2) Remove the global assignment and make it a prerequisite for the user
>  > to add this to a properties file which will always fail if not preset in
>  > a properties file.
>  >
>  >
>  > If you are going to setup global properties in "build.xml" maybe some
>  > conditional statements are in order, where applicable, to be more os
>  > specific/compliant.  Or mabe os specific properties files that could be
>  > generated/used automatically?
>
> The configure of native2 build the ../build.properties out of the
> ../build.properties.autoconf
>
>  > Thanks,
>  > Anthony
>  >
>  >
>  >
>  >
>  > --
>  > To unsubscribe, e-mail:  
>  >  For additional
>  > commands, e-mail: 

-- 
Anthony W. Marino
Pres./CTO, AWM Objects
email:  [EMAIL PROTECTED]
phone:  (732) 610-2441


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 9456] New: - Problem saving server.xml file: invalid XML markup

2002-05-28 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=9456

Problem saving server.xml file: invalid XML markup

   Summary: Problem saving server.xml file: invalid XML markup
   Product: Tomcat 4
   Version: 4.1.2
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Webapps:Administration
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I have been having a little trouble with the new admin application in 4.1.2 
(which is /very/ nice, BTW). I added an access log valve to localhost, using 
the 'common' log format which is equivalent to the pattern %h %l %u %t "%r" %s %
b

Unfortunately, when you commit the changes this results in a server.xml file 
that is not valid XML. I am getting the following entry in server.xml:

  

Note the quote signs within the pattern attribute; the StandardServerMBean 
storeAttributes(PrintWriter, boolean, Object) method is simply writing out the 
attribute value without any escaping &c.

But I also wonder whether it would be worth changing AccessLogValve so that its 
getPattern() method returns "common" or "combined" for those shortcuts, rather 
than expanding them to "%h %l %u %t \"%r\" %s %b" and "%h %l %u %t \"%r\" %s %b 
\"%{Referer}i\" \"%{User-Agent}i\"" ? This would make saved server.xml files 
easier to read; the present behaviour is a little disconcerting.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Proposal] Removing 64K limit in jasper 2

2002-05-28 Thread peter lin



Remy Maucherat wrote:
> 
> > I've been giving this topic considerable thought for
> > the last month. Now that JSTL is getting close to
> > official release, performance may become a bigger
> > issue.
> >
> > I've been evaluating JSTL and experimenting with using
> > it for complex rendering logic. From what I've seen,
> > the common pattern of usage tends to have a limited
> > number of tags, with a few tags use repeatedly.  As
> > denis pointed out, the performance would improve,
> > though one other benefit is improved reliability.
> >
> > In my early benchmarks with JMeter and JProbe, deeply
> > nested try/catch statements results in excessive GC,
> > which kills reliability and performance. The work
> > Denis and Kin-man did recently has improved
> > performance dramatically for pages with lots of tags.
> > I have noticed on long tests that memory usage slowly
> > creeps up until I get "out of memory error".
> 
> The OOM errors may be caused because you have too many active sessions.

what I have noticed in JProbe is over time the trof gradually increases
and the spikes in memory usage increases in frequency. This behavior was
really noticeable in 4.0.3 jasper.  I haven't tried the latest patch by
kin-man and denis, but the earlier patch improved this significantly. 
An additional note, the behavior appeared when I ran benchmarks using 8+
threads in JMeter for several hours. I need to look into this in greater
detail to figure exactly why it happens.

> 
> > reusing tags probably won't improve performance by
> > 2-4x, but it should make deployments with JSTL tags
> > more stable.
> 
> I think you're pessimistic here. Depending on the page and the tags used
> (JDBC tags would kill throughtput, obvioulsy), it may be very significant.
> 
> Remy
You have a great point there.  I was thinking of the results I've seen
first hand, which do no use JDBC. the way JSTL works it could provide
significant performance improvement. if some one is using connection
pooling driver, the improvement might be significantly less.  I look
forward to further discussions on this topic. One thing I did do was to
manually tweak a jsp page and reuse a tag a couple of times. The page
compiled just fine and ran, but I never got around to changing all the
tags and running benchmarks.

if only I had 8 more hours a day, or didn't need sleep I could
experiment with different solutions a bit more.

peter

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 9456] - Problem saving server.xml file: invalid XML markup

2002-05-28 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=9456

Problem saving server.xml file: invalid XML markup

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Normal  |Enhancement



--- Additional Comments From [EMAIL PROTECTED]  2002-05-28 15:35 ---
The attribute values need some escaping. The fix has been implemented, and will 
be present in 4.1.3. So at least, it won't crash.

I agree it may be a good idea to select only "common" and "combined", for ease 
of use reasons.
Converting to enhancement, as the bug does not exist anymore.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes RequestInfoExample.java

2002-05-28 Thread ekr

ekr 02/05/28 07:19:47

  Modified:webapps/examples/WEB-INF/classes RequestInfoExample.java
  Log:
  Added support for displaying SSL cipher suite attribute
  
  Revision  ChangesPath
  1.3   +14 -1 
jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/RequestInfoExample.java
  
  Index: RequestInfoExample.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/RequestInfoExample.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RequestInfoExample.java   23 Apr 2002 15:17:25 -  1.2
  +++ RequestInfoExample.java   28 May 2002 14:19:47 -  1.3
  @@ -1,4 +1,4 @@
  -/* $Id: RequestInfoExample.java,v 1.2 2002/04/23 15:17:25 remm Exp $
  +/* $Id: RequestInfoExample.java,v 1.3 2002/05/28 14:19:47 ekr Exp $
*
*/
   
  @@ -70,9 +70,22 @@
   out.println(HTMLFilter.filter(request.getPathInfo()));
   out.println("");
   out.println(rb.getString("requestinfo.label.remoteaddr"));
  +
  + String cipherSuite=
  + (String)request.getAttribute("javax.servlet.request.cipher_suite");
   out.println("");
   out.println(request.getRemoteAddr());
   out.println("");
  +
  + if(cipherSuite!=null){
  + out.println("");  
  + out.println("SSLCipherSuite:");
  + out.println("");
  + out.println("");
  + out.println(request.getAttribute("javax.servlet.request.cipher_suite"));
  + out.println("");   
  + }
  + 
   }
   
   public void doPost(HttpServletRequest request,
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4 CoyoteAdapter.java CoyoteConnector.java CoyoteRequest.java CoyoteServerSocketFactory.java

2002-05-28 Thread ekr

ekr 02/05/28 07:24:32

  Modified:coyote/src/java/org/apache/coyote/tomcat4 CoyoteAdapter.java
CoyoteConnector.java CoyoteRequest.java
CoyoteServerSocketFactory.java
  Log:
  CoyoteConnector.java: pass through the configuration directives that PureTLS
  needs.
  CoyoteServerSocket: more passthrough for the configuration directives PureTLS
  needs
  CoyoteAdapter.java: call the action to set the SSL attributes
  CoyoteRequest.java: get attributes from the coyoteRequest if they're not
  available locally. The coyoteRequest is where the SSL attributes all get set.
  
  Revision  ChangesPath
  1.7   +7 -5  
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java
  
  Index: CoyoteAdapter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CoyoteAdapter.java18 Apr 2002 18:12:46 -  1.6
  +++ CoyoteAdapter.java28 May 2002 14:24:31 -  1.7
  @@ -1,6 +1,6 @@
  -/* * $Header: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java,v
 1.6 2002/04/18 18:12:46 remm Exp $
  - * $Revision: 1.6 $
  - * $Date: 2002/04/18 18:12:46 $
  +/* * $Header: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java,v
 1.7 2002/05/28 14:24:31 ekr Exp $
  + * $Revision: 1.7 $
  + * $Date: 2002/05/28 14:24:31 $
*
* 
*
  @@ -119,7 +119,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.6 $ $Date: 2002/04/18 18:12:46 $
  + * @version $Revision: 1.7 $ $Date: 2002/05/28 14:24:31 $
*/
   
   final class CoyoteAdapter
  @@ -307,7 +307,9 @@
   
   // Parse cookies
   parseCookies(req, request);
  -
  + 
  + // Set the SSL properties
  + res.action(ActionCode.ACTION_REQ_SSL_ATTRIBUTE,request.getRequest());
   }
   
   /**
  
  
  
  1.15  +9 -7  
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java
  
  Index: CoyoteConnector.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- CoyoteConnector.java  16 May 2002 18:57:39 -  1.14
  +++ CoyoteConnector.java  28 May 2002 14:24:31 -  1.15
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java,v
 1.14 2002/05/16 18:57:39 remm Exp $
  - * $Revision: 1.14 $
  - * $Date: 2002/05/16 18:57:39 $
  + * $Header: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java,v
 1.15 2002/05/28 14:24:31 ekr Exp $
  + * $Revision: 1.15 $
  + * $Date: 2002/05/28 14:24:31 $
*
* 
*
  @@ -112,7 +112,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.14 $ $Date: 2002/05/16 18:57:39 $
  + * @version $Revision: 1.15 $ $Date: 2002/05/28 14:24:31 $
*/
   
   
  @@ -979,6 +979,11 @@
   }
   IntrospectionUtils.setProperty(protocolHandler, "keystore", 
  ssf.getKeystoreFile());
  +IntrospectionUtils.setProperty(protocolHandler, "randomfile", 
  +   ssf.getRandomFile());
  +IntrospectionUtils.setProperty(protocolHandler, "rootfile", 
  +   ssf.getRootFile());
  + 
   IntrospectionUtils.setProperty(protocolHandler, "keypass", 
  ssf.getKeystorePass());
   IntrospectionUtils.setProperty(protocolHandler, "keytype", 
  @@ -988,8 +993,6 @@
   IntrospectionUtils.setProperty(protocolHandler, 
  "sSLImplementation", 
  ssf.getSSLImplementation());
  -IntrospectionUtils.setProperty(protocolHandler, "socketFactory", 
  -   ssf.getSocketFactoryName());
   } else {
   IntrospectionUtils.setProperty(protocolHandler, "secure", 
  "" + false);
  @@ -1002,7 +1005,6 @@
   (sm.getString
("coyoteConnector.protocolHandlerInitializationFailed", e));
   }
  -
   }
   
   
  
  
  
  1.23  +12 -6 
j

RE: large requests crash mod_jk on HP-UX 11.0

2002-05-28 Thread Ashton, Bruce

Well not a whisper of interest in this bug, but I have found a workaround at
least.  HP distribute a package which includes Apache 2 and mod_jk evidently
with the bug fixed.  It does mean porting our site to Apache 2 but this is
less of an effort than tracking down this bug.

If anybody else has this problem you could at least point them to that as a
workaround.

I have abandoned my efforts to fix the bug in the code now, I can't justify
it at work anymore, and there doesn't seem to be much interest in it here
either.



Bruce Ashton
Java Developer
Internet Application Development
The Met Office   http://www.metoffice.com/
ext. 4560

> -Original Message-
> From: Ashton, Bruce 
> Sent: Monday, May 27, 2002 3:49 PM
> To:   '[EMAIL PROTECTED]'
> Subject:  large requests crash mod_jk on HP-UX 11.0
> 
> I am really a tomcat user, but I have ended up trolling through the mod_jk
> code looking for this bug, so I thought this was the appropriate place to
> post my discoveries;
> 
> 
> Background:
> Our Unix team have built Apache from the source for HP-UX 11.0 with the HP
> cc compiler, not gcc.
> cpp and ccom versions are A.11.01.00, ld version is B.11.25
> mod_jk has been built with the same compiler using apxs and the
> build-hpux-cc.sh script.
> Apache is version 1.3.22.
> The mod_jk source comes from the file
> jakarta-tomcat-connectors-4.0.2-01-src.zip from the Jakarta site.
> 
> 
> The problem:
> Mostly this build works except: certain URL's on our site fail with an
> "internal server error" message to the browser.  The request doesn't show
> up in Apache's access log.
> 
> The following shows up in Apache's error log:
> 
> [Mon May 27 14:07:01 2002] [notice] child pid 13574 exit signal
> Segmentation fault (11)
> [Mon May 27 14:07:01 2002] [notice] child pid 12572 exit signal
> Segmentation fault (11)
> 
> always two lines.
> 
> With JkLogLevel set to debug, the following shows up in the mod_jk log:
> 
> [Mon May 27 14:07:01 2002]  [jk_uri_worker_map.c (447)]: Into
> jk_uri_worker_map_t::map_uri_to_worker
> [Mon May 27 14:07:01 2002]  [jk_uri_worker_map.c (464)]: Attempting to map
> URI '/openroadTextFC.do'
> [Mon May 27 14:07:01 2002]  [jk_uri_worker_map.c (529)]:
> jk_uri_worker_map_t::map_uri_to_worker, Found a suffix match web -> *.do
> [Mon May 27 14:07:01 2002]  [jk_uri_worker_map.c (447)]: Into
> jk_uri_worker_map_t::map_uri_to_worker
> [Mon May 27 14:07:01 2002]  [jk_uri_worker_map.c (464)]: Attempting to map
> URI '/openroadTextFC.do'
> [Mon May 27 14:07:01 2002]  [jk_uri_worker_map.c (529)]:
> jk_uri_worker_map_t::map_uri_to_worker, Found a suffix match web -> *.do
> 
> 
> I add some extra debugging myself and ascertained that jk_translate runs
> through to completion, but no debugging code in jk_handler ever gets run.
> If jk_handler is entered at all it must fail at line 1075, "const char
> *worker_name = ap_table_get(r->notes, JK_WORKER_ID);"
> 
> I've kind of shied away from trying to debug through apache.  I didn't do
> the original build anyway.
> 
> For any given URL that fails, it is possible to make it work again by
> making the URL *SHORTER*.  This is possible if there is extraneous crap in
> the query string, which you can cut out.  I have discovered that for a
> particular page (any one bad page will fail consistently)  There will be a
> particular length of URL: An 86 character URL may work say, but an 87
> character URL will fail.  The useable length of URL will vary from page to
> page though, and I haven't seen any other pattern in it.
> My speculation is that it's the size of the request object or something,
> of which the URL is only a component.  A bit woolly I admit, but it's all
> I've got.
> 
> Part of my problem is that I don't really know in what order Apache calls
> methods from mod_jk, so I don't know if any other part of mod_jk is being
> run between jk_translate and jk_handler.
> I also don't know that it isn't Apache code that is falling over instead
> of mod_jk code.
> Also IANACP (I Am Not A C Programmer) - not really anyway.  Mostly Java,
> and I've just started dabbling in C in incidental ways such as this.
> And I'm new to HP-UX as well.
> 
> Can anyone maybe shed a little light on the Apache/mod_jk interface for
> me?  A bit of a rundown on the order in which the methods are called would
> be useful.  Also is there any Apache API or mod_jk API documentation
> online which I might not be aware of.  And if anyone tells me that I need
> to start hacking the Apache code, I'll be very depressed.
> 
> Thanks in advance,
> 
> 
> 
> Bruce Ashton
> Java Developer
> Internet Application Development
> The Met Office   http://www.metoffice.com/
> ext. 4560
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




ResultSet

2002-05-28 Thread Manuel Rodriguez Diaz


Hi all,
I'm working with java 1.1. (this is a mandatory requirement).
In this version of Java, resultset are "FORWARD ONLY".
The fact is that i need to count the rows contained in a resultset
before displaying its data and the  way i've thought to do this is read
all the resultset.
rows= 0;
while( rs.next()) {
rows++;
}

With my actual version of java, I would need to re-execute the query
again to get the pointer "beforeFirsted".
Is there any way to obtain a independent copy of a ResultSet without
executing the query again?

Thankyou


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JNDI/Webapp ClassLoader Bug (ContextBindings.java), patch (?)attached

2002-05-28 Thread Remy Maucherat

> Hi,
>
> I believe I have found a bug (or a problem at least) with the way Tomcat
> handles associating webapp contexts to JNDI naming contexts.
>
> ContextBindings.java, which apparently handles these associations does
> not account for the fact that a web application may have its own
> ClassLoader.  I am trying to use Apache Cocoon which does this.  I've
> properly enlisted the object I want in the namespace using the
> server.xml file and the web.xml file.  After Tomcat creates this
> NamingContext, it "binds" it to Cocoon's context in
> ContextBindings.java, using the current ClassLoader as a key, which
> happens to be Tomcat's WebAppClassLoader.  Cocoon provides its own
> ClassLoader (because it is a rather complex beast :-), so when I try to
> get to my object in the namespace it can't be found (even though its
> parent ClassLoader is the correct WebAppClassLoader)
>
> This may or may not be appropriate, but I've found that it works for
> me.  I've modified the following methods in ContextBindings.java:
>
> getClassLoader()
> getClassLoaderName()
> isClassLoaderBound()
>
> so that they check the hashtable for the current ClassLoader, and
> continue to search up the heirarchy by looking at that ClassLoader's
> parent -- returning success at the first match, and returning failure
> once it has been all the way up the heirarchy.  A method I did not
> modify was unbindClassLoader() -- I'll leave that to further discussion
> because (if my solution is acceptable) I'm not sure if it is appropriate
> to leave it or change it.
>
> This patch is against CVS revision 1.4 of the file, which I got from the
> source distribution of Tomcat 4.0.4 beta 3.

The J2EE ENC is, by definition, a J2EE features. Applications which would
like to use it should comply with the J2EE model, which implies:
- not forking threads
- not creating classloaders
- running inside a security manager

Cocoon does not adhere to this model, and will probably have problems using
the J2EE ENC in other app servers. To get around this, it would be better
for Cocoon to set the webapp CL as the thread context CL during the
processing of the user code.

Since this patch does not seem to introduce any problems and improves
robustness, I think I'll apply it to the 4.1.x codebase.

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: ResultSet

2002-05-28 Thread James Mitchell

have you tried getting the row count from the db instead of looping
yourself?

this approach will offload a few resources (counting) back to the db
(assuming its tiered) where it belongs(IMHO)

//assuming your db supports count() [duh]
//if you build your sql in chunks
String sqlSelect = "Select Col1, Col2 "
String sqlFrom   = "From myTable "
String sqlWhere  = "Where Col3 = 'SomeVal'";

//typically a helper function
//execute the sql on your connection
Resultset rs = getMyResults("Select count(*) as ct " + sqlFrom + sqlWhere);
size = rs.getLong("ct")
//proceed as you did before, but this time you have the row count.

Hope this helps.

James Mitchell

> -Original Message-
> From: Manuel Rodriguez Diaz [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 28, 2002 12:56 PM
> To: [EMAIL PROTECTED]
> Subject: ResultSet
>
>
>
> Hi all,
> I'm working with java 1.1. (this is a mandatory requirement).
> In this version of Java, resultset are "FORWARD ONLY".
> The fact is that i need to count the rows contained in a resultset
> before displaying its data and the  way i've thought to do this is read
> all the resultset.
> rows= 0;
> while( rs.next()) {
> rows++;
> }
>
> With my actual version of java, I would need to re-execute the query
> again to get the pointer "beforeFirsted".
> Is there any way to obtain a independent copy of a ResultSet without
> executing the query again?
>
> Thankyou
>
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




New releases

2002-05-28 Thread Remy Maucherat

As there was no major problems reported with 4.0.4 Beta 3, I plan to release
a final version of it later today, in accordance to what was voted last
week. The announcement will happen later this week, so that the RPMs can be
uploaded, among other things.

(BTW, it would be a good idea to populate the j-t-c directory with builds,
at least for Windows; they're all empty at the moment)

There has been no changes to the Tomcat core, and very few changes made to
Coyote (fix to chunking handling, as well as adding PureTLS support).
I also plan to release Coyote 1.0 simultaneously.

In addition to that, I plan to release a new test milestone of Tomcat 4.1
(4.1.3), which would include the new Ant based compiler. Some additional
refactoring of the compiler code will be needed, and the compiler is not
configurable at the moment, but it should be functional and fix the last
major problem Jasper 2 has (the code it generates often doesn't get compiled
correctly by the old compiler).

Comments ?

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 9466] New: - Tomcat 4.0.3 fails to find location of certain files in the classpath

2002-05-28 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=9466

Tomcat 4.0.3 fails to find location of certain files in the classpath

   Summary: Tomcat 4.0.3 fails to find location of certain files in
the classpath
   Product: Tomcat 4
   Version: 4.0.3 Final
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


In Tomcat3.3.1 I am able to access my *.mnu files, located in \WEB-
INF\classes directory, using the following command:

InputStream is = getClass().getResourceAsStream("/" + fileName);

However, using the same war file and making sure that the *.mnu files are 
located in the Tomcat4.0.3 ... \WEB-INF\classes directory, this same 
command is not able to find these files.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: New releases

2002-05-28 Thread Eric Rescorla

"Remy Maucherat" <[EMAIL PROTECTED]> writes:
> There has been no changes to the Tomcat core, and very few changes made to
> Coyote (fix to chunking handling, as well as adding PureTLS support).
> I also plan to release Coyote 1.0 simultaneously.
I'm pretty confident of the commits I made today, but it would be nice
if someone could test them or look them over or something before we call
them soup :)

-Ekr


-- 
[Eric Rescorla   [EMAIL PROTECTED]]
http://www.rtfm.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/xdocs AJPv13.xml

2002-05-28 Thread jfclere

jfclere 02/05/28 15:20:46

  Modified:jk/xdocs AJPv13.xml
  Log:
  Add explanations for the headers.
  
  Revision  ChangesPath
  1.2   +50 -8 jakarta-tomcat-connectors/jk/xdocs/AJPv13.xml
  
  Index: AJPv13.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/AJPv13.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AJPv13.xml26 May 2002 21:41:20 -  1.1
  +++ AJPv13.xml28 May 2002 22:20:46 -  1.2
  @@ -297,7 +297,7 @@
   
   
   AJP13_FORWARD_REQUEST :=
  -prefix_code  2
  +prefix_code  (byte) 0x02 = JK_AJP13_FORWARD_REQUEST
   method   (byte)
   protocol (string)
   req_uri  (string)
  @@ -308,6 +308,55 @@
   is_ssl   (boolean)
   num_headers  (integer)
   request_headers *(req_header_name req_header_value)
  +attributes  *(attribut_type attribute_value)
  +
  +
  +The request_headers are:
  +
  +
  +req_header_name := 
  +sc_req_header_name | (string)  [see below for how this is parsed]
  +
  +sc_req_header_name := 0xA0xx (integer)
  +
  +req_header_value := (string)
  +
  +
  +
  +The request_headers are req_header_name
  +(string) or integer (0xAOxx) and req_header_value.
  +Where xx are the followings:
  +
  +
  +  
  +Value
  +Name
  +Meaning
  +  
  +  
  +0x08
  +SC_REQ_CONTENT_LENGTH
  +content length
  +  
  +  
  +0x07
  +SC_REQ_CONTENT_TYPE
  +content type
  +  
  +  
  +0x05
  +SC_REQ_AUTHORIZATION
  +Authorization
  +  
  +
  +
  +When req_header_name is a string req_header_value
  +is a string.
  +
  +The attributs are optional and have the following
  + structure:
  +
  +
   
   ?context   (byte string)
   ?servlet_path  (byte string)
  @@ -321,13 +370,6 @@
   
   ?attributes   *(attribute_name attribute_value)
   request_terminator (byte)
  -
  -req_header_name := 
  -sc_req_header_name | (string)  [see below for how this is parsed]
  -
  -sc_req_header_name := 0xA0 (byte)
  -
  -req_header_value := (string)
   
   attribute_name := (string)
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native2/jni jk_jni_aprImpl.c org_apache_jk_apr_AprImpl.h

2002-05-28 Thread costin

costin  02/05/28 15:34:59

  Modified:jk/native2/jni jk_jni_aprImpl.c org_apache_jk_apr_AprImpl.h
  Log:
  Removed the ( duplicated )  unix socket code. We'll use jk_channel_un instead
  ( directly ).
  
  Fixes in initialization ( make sure workerEnv is init, log ).
  
  Added a 'raw' param to jkInvoke - to support unprocessed buffers. If
  raw is set the jk component will use the buffer as a byte[], not
  ajp messages ( for example channel.read() is doing that ).
  
  No need to copy the data from the JNI buffer to msg.
  
  Use the new jk_bean.invoke() directly instead of the dispatch.
  I think it's cleaner.
  
  Revision  ChangesPath
  1.26  +49 -260   jakarta-tomcat-connectors/jk/native2/jni/jk_jni_aprImpl.c
  
  Index: jk_jni_aprImpl.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/jni/jk_jni_aprImpl.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- jk_jni_aprImpl.c  27 May 2002 15:54:44 -  1.25
  +++ jk_jni_aprImpl.c  28 May 2002 22:34:59 -  1.26
  @@ -77,6 +77,7 @@
   #include "jk_global.h"
   #include "jk_map.h"
   #include "jk_pool.h"
  +#include "jk_logger.h"
   
   #ifndef WIN32
   #include 
  @@ -131,7 +132,9 @@
   return JK_ERR;
   }
   
  -env->l=jkb->object;;
  +env->l=jkb->object;
  +env->l->name="stderr";
  +env->l->level=JK_LOG_DEBUG_LEVEL;
   env->alias( env, "logger.file:", "logger");
   
   jkb=env->createBean2( env, env->globalPool,"workerEnv", "");
  @@ -142,6 +145,8 @@
   }
   
   workerEnv=jkb->object;
  +
  +workerEnv->init( env, workerEnv );
   }
   /* fprintf( stderr, "XXX aprImpl: %p %p\n", env, workerEnv); */
   return 0;
  @@ -155,6 +160,7 @@
   }
   
   /*  Signals  */
  +/* XXX Move it to jk_signal.c */
   
   #ifdef HAVE_SIGNALS
   static struct sigaction jkAction;
  @@ -248,6 +254,7 @@
   
   
   /*  User related functions  */
  +/* XXX move it to jk_user.c */
   
   JNIEXPORT jint JNICALL 
   Java_org_apache_jk_apr_AprImpl_getPid(JNIEnv *jniEnv, jobject _jthis)
  @@ -290,251 +297,6 @@
   return (jint)rc;
   }
   
  -/*  interprocess mutexes  */
  -
  -/*  Unix sockets  */
  -/* It seems apr doesn't support them yet, so this code will use the
  -   'native' calls. For 'tcp' sockets we just use what java provides.
  -*/
  -
  -/* XXX @deprecated !!! All this will move to jk_channel_un, and we'll
  -   use the same dispatch that we use for the jni channel !!!
  -*/
  -   
  -JNIEXPORT jlong JNICALL 
  -Java_org_apache_jk_apr_AprImpl_unSocketClose(JNIEnv *jniEnv, jobject _jthis, 
  - jlong socketJ, jint typeJ )
  -{
  -int socket=(int)socketJ;
  -int type=(int)typeJ;
  -/* shutdown( socket, type ); */
  -close(socket);
  -return 0L;
  -}
  -
  -JNIEXPORT jlong JNICALL 
  -Java_org_apache_jk_apr_AprImpl_unSocketListen(JNIEnv *jniEnv, jobject _jthis, 
  -  jstring hostJ, jint backlog )
  -{
  -const char *host;
  -int status;
  -int unixSocket=-1L;
  -#ifdef HAVE_UNIXSOCKETS
  -struct sockaddr_un unixAddr;
  -mode_t omask;
  -
  -memset(& unixAddr, 0, sizeof(struct sockaddr_un));
  -unixAddr.sun_family=AF_UNIX;
  -
  -host=(*jniEnv)->GetStringUTFChars(jniEnv, hostJ, 0);
  -strcpy(unixAddr.sun_path, host);
  -(*jniEnv)->ReleaseStringUTFChars(jniEnv, hostJ, host);
  -
  -/* remove the exist socket. (it had been moved in ChannelUn.java).
  -if (unlink(unixAddr.sun_path) < 0 && errno != ENOENT) {
  -// The socket cannot be remove... Well I hope that no problems ;-)
  -}
  - */
  -
  -unixSocket = socket(AF_UNIX, SOCK_STREAM, 0);
  -if (unixSocket<0) {
  -return 0L;
  -}
  -
  -omask = umask(0117); /* so that only Apache can use socket */
  -
  -status=bind(unixSocket,
  -(struct sockaddr *)& unixAddr,
  -strlen( unixAddr.sun_path ) +
  -sizeof( unixAddr.sun_family) );
  -
  -umask(omask); /* can't fail, so can't clobber errno */
  -if (status<0)
  -return -errno;
  -
  -listen( unixSocket, (int)backlog );
  -
  -fprintf(stderr, "Listening on %d \n",
  -unixSocket);
  -#endif
  -return (jlong)unixSocket;
  -}
  -
  -JNIEXPORT jlong JNICALL 
  -Java_org_apache_jk_apr_AprImpl_unSocketConnect(JNIEnv *jniEnv, jobject _jthis, 
  -   jstring hostJ )
  -{
  -const char *host;
  -int status;
  -int unixSocket=-1L;
  -#ifdef HAVE_UNIXSOCKETS
  -struct sockaddr_un unixAddr;
  -
  -memset(& unixAddr, 0, sizeo

cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_bean.h

2002-05-28 Thread costin

costin  02/05/28 15:47:43

  Modified:jk/native2/common jk_env.c jk_handler_response.c
jk_workerEnv.c
   jk/native2/include jk_bean.h
  Log:
  Few other small fixes. Save the index of the component in the object table.
  All jk components are long-lived, and this will make a faster dispatch.
  
  Revision  ChangesPath
  1.30  +10 -1 jakarta-tomcat-connectors/jk/native2/common/jk_env.c
  
  Index: jk_env.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- jk_env.c  27 May 2002 21:56:19 -  1.29
  +++ jk_env.c  28 May 2002 22:47:43 -  1.30
  @@ -206,6 +206,7 @@
   jk_bean_t *result=NULL;
   jk_pool_t *workerPool;
   char *name;
  +int i;
   
   if( localName!=NULL ) 
   result=env->getBean2( env, type, localName );
  @@ -307,7 +308,15 @@
   }
   
   jk_env_globalEnv->_objects->put( env, jk_env_globalEnv->_objects, result->name, 
result, NULL );
  -
  +
  +for( i=jk_env_globalEnv->_objects->size( env, jk_env_globalEnv->_objects ) - 1; 
i>=0 ; i-- ) {
  +if( jk_env_globalEnv->_objects->valueAt( env, jk_env_globalEnv->_objects, i 
) == result ) {
  +fprintf( stderr, "Component id %s= %d\n", result->name, i );
  +result->objId=i;
  +break;
  +}
  +}
  +
   if( strcmp(localName,"")==0 ) {
   /* "" for local name is used as 'default'. Allow "type" as an alias for 
"type:"
*/
  
  
  
  1.20  +22 -2 
jakarta-tomcat-connectors/jk/native2/common/jk_handler_response.c
  
  Index: jk_handler_response.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_handler_response.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- jk_handler_response.c 15 May 2002 19:45:45 -  1.19
  +++ jk_handler_response.c 28 May 2002 22:47:43 -  1.20
  @@ -251,7 +251,26 @@
   return JK_HANDLER_FATAL; 
   }
   
  -int JK_METHOD jk2_handler_response_init( jk_env_t *env, jk_handler_t *_this,
  +static int JK_METHOD jk2_handler_response_invoke(jk_env_t *env, jk_bean_t *bean, 
jk_endpoint_t *ep,
  + int code, jk_msg_t *msg, int raw)
  +{
  +void *target=ep->currentRequest;
  +
  +switch( code ) {
  +case JK_HANDLE_AJP13_SEND_HEADERS:
  +return jk2_handler_startResponse( env, target, ep, msg );
  +case JK_HANDLE_AJP13_SEND_BODY_CHUNK:
  +return jk2_handler_sendChunk(env, target, ep, msg );
  +case JK_HANDLE_AJP13_END_RESPONSE:
  +return jk2_handler_endResponse(env, target, ep, msg );
  +case JK_HANDLE_AJP13_GET_BODY_CHUNK:
  +return jk2_handler_getChunk(env, target, ep, msg );
  +}
  +return JK_OK;
  +}
  +
  +
  +static int JK_METHOD jk2_handler_response_init( jk_env_t *env, jk_handler_t *_this,
jk_workerEnv_t *wEnv) 
   {
   wEnv->registerHandler( env, wEnv, "handler.response",
  @@ -282,7 +301,8 @@
   h=(jk_handler_t *)pool->calloc( env, pool, sizeof( jk_handler_t));
   
   h->init=jk2_handler_response_init;
  -
  +result->invoke=jk2_handler_response_invoke;
  +
   result->object=h;
   
   return JK_OK;
  
  
  
  1.46  +6 -1  jakarta-tomcat-connectors/jk/native2/common/jk_workerEnv.c
  
  Index: jk_workerEnv.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_workerEnv.c,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- jk_workerEnv.c26 May 2002 07:30:01 -  1.45
  +++ jk_workerEnv.c28 May 2002 22:47:43 -  1.46
  @@ -59,7 +59,7 @@
* Description: Workers controller *
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
* Author:  Henri Gomez <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.45 $   *
  + * Version: $Revision: 1.46 $   *
***/
   
   #include "jk_env.h"
  @@ -472,6 +472,11 @@
   if( ep->worker->mbean->debug > 10 )
   ep->request->dump( env, msg, "Received" );
   
  +/* XXX Use this _only_ for backward compatibility.
  +   invoke() and jk_bean should be used, probably with a first parameter
  +   indicating the target component and a second param indicating the
  +   code ( local to each component ).
  +*/
   code = (int)msg->g

cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common ChannelUn.java

2002-05-28 Thread costin

costin  02/05/28 15:50:04

  Modified:jk/java/org/apache/jk/apr AprImpl.java
   jk/java/org/apache/jk/common ChannelUn.java
  Log:
  Update signatures.
  
  Remove old/duplicated code, now HandlerJni is used for all java components with
  a C peer.
  
  Revision  ChangesPath
  1.17  +1 -1  jakarta-tomcat-connectors/jk/java/org/apache/jk/apr/AprImpl.java
  
  Index: AprImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/apr/AprImpl.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- AprImpl.java  26 May 2002 07:13:02 -  1.16
  +++ AprImpl.java  28 May 2002 22:50:04 -  1.17
  @@ -145,7 +145,7 @@
*  do things like continuations.
*/
   public static native int jkInvoke(long xEnv, long componentP, long endpointP,
  -  int code, byte data[], int len);
  +  int code, byte data[], int off, int len, int 
raw);
   
   /** Recycle an endpoint after use.
*/
  
  
  
  1.19  +70 -160   
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelUn.java
  
  Index: ChannelUn.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelUn.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ChannelUn.java26 May 2002 07:13:59 -  1.18
  +++ ChannelUn.java28 May 2002 22:50:04 -  1.19
  @@ -77,12 +77,14 @@
*
* @author Costin Manolache
*/
  -public class ChannelUn extends JkHandler {
  +public class ChannelUn extends JniHandler {
  +static final int CH_OPEN=4;
  +static final int CH_CLOSE=5;
  +static final int CH_READ=6;
  +static final int CH_WRITE=7;
   
   String file;
   ThreadPool tp;
  -String jkHome;
  -String aprHome;
   
   /*  Tcp socket options  */
   
  @@ -94,51 +96,36 @@
   file=f;
   }
   
  -/** Set the base dir of the jk webapp. This is used to locate
  - *  the (fixed) path to the native lib.
  - */
  -public void setJkHome( String s ) {
  -jkHome=s;
  -}
  -
  -/** Directory where APR and jni_connect are installed.
  - */
  -public void setAprHome( String s ) {
  -aprHome=s;
  -}
  -
   /*   */
  -long unixListenSocket;
   int socketNote=1;
   int isNote=2;
   int osNote=3;
  -AprImpl apr;
   
  -public void accept( MsgContext ep ) throws IOException {
  -long l= apr.unAccept(unixListenSocket);
  -/* We could create a real java.net.Socket, or a UnixSocket, etc
  - */
  -ep.setNote( socketNote, new Long( l ) );
  -
  -if( log.isDebugEnabled() )
  -log.debug("Accepted socket " + l );
  -}
  -
   public void init() throws IOException {
  -apr=(AprImpl)wEnv.getHandler("apr");
  -if( apr==null || ! apr.isLoaded() ) {
  -log.debug("Apr is not available, disabling unix channel ");
  -apr=null;
  -return;
  -}
   if( file==null ) {
   log.error("No file, disabling unix channel");
  -return;
  +throw new IOException( "No file for the unix socket channel");
   }
   if( wEnv.getLocalId() != 0 ) {
   file=file+ wEnv.getLocalId();
   }
  +
  +super.initNative( "channel.un:" + file );
  +
  +if( apr==null || ! apr.isLoaded() ) {
  +log.debug("Apr is not available, disabling unix channel ");
  +apr=null;
  +return;
  +}
   
  +// Set properties and call init.
  +setNativeAttribute( "file", file );
  +// unixListenSocket=apr.unSocketListen( file, 10 );
  +
  +setNativeAttribute( "listen", "10" );
  +setNativeAttribute( "debug", "10" );
  +
  +// Initialize the thread pool and execution chain
   if( next==null ) {
   if( nextName!=null ) 
   setNext( wEnv.getHandler( nextName ) );
  @@ -156,9 +143,8 @@
   if (!socketFile.delete())
 throw(new IOException("Cannot remove " + file));
   }
  -unixListenSocket=apr.unSocketListen( file, 10 );
  -if (unixListenSocket<0)
  -throw(new IOException("Cannot create listening socket " + file));
  +
  +super.initJkComponent();
   
   log.info("JK: listening on unix socket: " + file );
   
  @@ -168,161 +154,79 @@
   tp.runIt( acceptAjp);
   }
   
  -public void open(MsgContext ep) throws IOException {
  -}
  -
  -
  -public void close(MsgContext ep

cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common JniHandler.java

2002-05-28 Thread costin

costin  02/05/28 15:50:37

  Modified:jk/java/org/apache/jk/common JniHandler.java
  Log:
  Few fixes and enhancements, making sure everything works.
  
  Revision  ChangesPath
  1.6   +71 -9 
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JniHandler.java
  
  Index: JniHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JniHandler.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JniHandler.java   26 May 2002 07:13:59 -  1.5
  +++ JniHandler.java   28 May 2002 22:50:37 -  1.6
  @@ -151,6 +151,9 @@
   try {
   MsgContext msgCtx=new MsgContext();
   MsgAjp msg=new MsgAjp();
  +
  +msgCtx.setSource( this );
  +msgCtx.setWorkerEnv( wEnv );
   
   msgCtx.setNext( this );
   
  @@ -168,11 +171,60 @@
   }
   }
   
  +public void setNativeAttribute(String name, String val) throws IOException {
  +if( apr==null ) return;
  +
  +if( nativeJkHandlerP == 0 ) {
  +log.error( "Unitialized component " + name+ " " + val );
  +return;
  +}
  +
  +long xEnv=apr.getJkEnv();
  +
  +apr.jkSetAttribute( xEnv, nativeJkHandlerP, name, val );
  +
  +apr.releaseJkEnv( xEnv );
  +}
  +
  +public void initJkComponent() throws IOException {
  +if( apr==null ) return;
  +
  +if( nativeJkHandlerP == 0 ) {
  +log.error( "Unitialized component " );
  +return;
  +}
  +
  +long xEnv=apr.getJkEnv();
  +
  +apr.jkInit( xEnv, nativeJkHandlerP );
  +
  +apr.releaseJkEnv( xEnv );
  +}
  +
  +public void destroyJkComponent() throws IOException {
  +if( apr==null ) return;
  +
  +if( nativeJkHandlerP == 0 ) {
  +log.error( "Unitialized component " );
  +return;
  +}
  +
  +long xEnv=apr.getJkEnv();
  +
  +apr.jkDestroy( xEnv, nativeJkHandlerP );
  +
  +apr.releaseJkEnv( xEnv );
  +}
  +
  +
  +
   protected void setNativeEndpoint(MsgContext msgCtx) {
   long xEnv=apr.getJkEnv();
   msgCtx.setJniEnv( xEnv );
   
   long epP=apr.createJkHandler(xEnv, "endpoint");
  +log.debug("create ep " + epP );
  +if( epP == 0 ) return;
   apr.jkInit( xEnv, epP );
   msgCtx.setJniContext( epP );
   
  @@ -184,12 +236,19 @@
   
   /** send and get the response in the same buffer.
*/
  -protected int nativeDispatch( Msg msg, MsgContext ep, int code )
  +protected int nativeDispatch( Msg msg, MsgContext ep, int code, int raw )
   throws IOException
   {
  -if( log.isDebugEnabled() ) log.debug( "Sending packet ");
  -msg.end();
  -if( log.isTraceEnabled() ) msg.dump("OUT:" );
  +if( log.isDebugEnabled() ) log.debug( "Sending packet " + code + " " + raw);
  +
  +if( raw == 0 ) {
  +msg.end();
  +
  +if( log.isTraceEnabled() ) msg.dump("OUT:" );
  +}
  +
  +// Create ( or reuse ) the jk_endpoint ( the native pair of
  +// MsgContext )
   long xEnv=ep.getJniEnv();
   long nativeContext=ep.getJniContext();
   if( nativeContext==0 || xEnv==0 ) {
  @@ -204,11 +263,13 @@
   }
   
   // Will process the message in the current thread.
  -// No wait needed to receive the response
  +// No wait needed to receive the response, if any
   int status=apr.jkInvoke( xEnv,
nativeJkHandlerP,
nativeContext,
  - code, msg.getBuffer(), msg.getLen()); 
  + code, msg.getBuffer(), 0, msg.getLen(), raw ); 
  +if( status != 0 )
  +log.error( "nativeDispatch: error " + status );
   
   if( log.isDebugEnabled() ) log.debug( "Sending packet - done " + status);
   return status;
  @@ -227,13 +288,14 @@
   //return send( msg, ep );
   }
   
  -int status=nativeDispatch(msg, ep, type );
  +int status=nativeDispatch(msg, ep, type, 0 );
   
   apr.jkRecycle(xEnv, ep.getJniContext());
   
   if(log.isInfoEnabled() ) log.info("Shm invoke status " + status);
  -
  -return 0;
  + 
  +apr.releaseJkEnv( xEnv );
  +   return 0;
   }
   
   private static org.apache.commons.logging.Log log=
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common ChannelJni.java HandlerRequest.java MsgAjp.java Shm.java

2002-05-28 Thread costin

costin  02/05/28 15:51:11

  Modified:jk/java/org/apache/jk/common ChannelJni.java
HandlerRequest.java MsgAjp.java Shm.java
  Log:
  Minor fixes and updates.
  
  Revision  ChangesPath
  1.11  +1 -3  
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelJni.java
  
  Index: ChannelJni.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelJni.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ChannelJni.java   22 May 2002 23:52:13 -  1.10
  +++ ChannelJni.java   28 May 2002 22:51:11 -  1.11
  @@ -121,11 +121,9 @@
   public int send( Msg msg, MsgContext ep )
   throws IOException
   {
  -int rc=super.nativeDispatch( msg, ep, JK_HANDLE_JNI_DISPATCH);
  +int rc=super.nativeDispatch( msg, ep, JK_HANDLE_JNI_DISPATCH, 0);
   ep.setNote( receivedNote, msg );
   return rc;
  -
  -
   }
   
   /** Receive a packet from the C side. This is called from the C
  
  
  
  1.13  +2 -0  
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java
  
  Index: HandlerRequest.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- HandlerRequest.java   10 May 2002 23:56:49 -  1.12
  +++ HandlerRequest.java   28 May 2002 22:51:11 -  1.13
  @@ -387,6 +387,8 @@
   System.exit(0);
   
return OK;
  +default:
  +/*DEBUG*/ try {throw new Exception(); } catch(Exception ex) 
{ex.printStackTrace();}
}
   
   return OK;
  
  
  
  1.7   +1 -0  
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/MsgAjp.java
  
  Index: MsgAjp.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/MsgAjp.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- MsgAjp.java   27 Feb 2002 06:41:18 -  1.6
  +++ MsgAjp.java   28 May 2002 22:51:11 -  1.7
  @@ -343,6 +343,7 @@
   int max=pos;
   if( len + 4 > pos )
   max=len+4;
  +if( max >1000 ) max=1000;
   for( int j=0; j < max; j+=16 )
   System.out.println( hexLine( buf, j, len ));

  
  
  
  1.12  +3 -41 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/Shm.java
  
  Index: Shm.java
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/Shm.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Shm.java  9 May 2002 23:46:33 -   1.11
  +++ Shm.java  28 May 2002 22:51:11 -  1.12
  @@ -101,13 +101,9 @@
   Vector groups=new Vector();
   
   // Will be dynamic ( getMethodId() ) after things are stable 
  -static final int SHM_SET_ATTRIBUTE=0;
   static final int SHM_WRITE_SLOT=2;
  -static final int SHM_ATTACH=3;
  -static final int SHM_DETACH=4;
   static final int SHM_RESET=5;
   static final int SHM_DUMP=6;
  -static final int SHM_DESTROY=7;
   
   public Shm() {
   }
  @@ -193,18 +189,8 @@
   setNativeAttribute( "file", file );
   if( size > 0 )
   setNativeAttribute( "size", Integer.toString( size ) );
  -attach();
  -}
  -
  -public void attach() throws IOException {
  -if( apr==null ) return;
  -MsgContext mCtx=createMsgContext();
  -Msg msg=(Msg)mCtx.getMsg(0);
  -msg.reset();
  -
  -msg.appendByte( SHM_ATTACH );
   
  -this.invoke( msg, mCtx );
  +initJkComponent();
   }
   
   public void resetScoreboard() throws IOException {
  @@ -232,22 +218,6 @@
   this.invoke( msg, mCtx );
   }
   
  -public void setNativeAttribute(String name, String val) throws IOException {
  -if( apr==null ) return;
  -MsgContext mCtx=createMsgContext();
  -Msg msg=(Msg)mCtx.getMsg(0);
  -C2BConverter c2b=(C2BConverter)mCtx.getNote(C2B_NOTE);
  -msg.reset();
  -
  -msg.appendByte( SHM_SET_ATTRIBUTE );
  -
  -appendString( msg, name, c2b);
  -
  -appendString(msg, val, c2b );
  -
  -this.invoke( msg, mCtx );
  -}
  -
   /** Register a tomcat instance
*  XXX make it more flexible
*/
  @@ -316,15 +286,7 @@
   }
   
   public void destroy() throws IOException {
  -if( apr==null ) return;
  -
  -MsgContext mCtx=createMsgContext();

cvs commit: jakarta-tomcat-connectors/jk/native2/server/isapi jk_logger_win32.c jk_logger_win32_message.mc

2002-05-28 Thread nacho

nacho   02/05/28 16:59:14

  Added:   jk/native2/server/isapi jk_logger_win32.c
jk_logger_win32_message.mc
  Log:
  *Win32 native logger implementation
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-connectors/jk/native2/server/isapi/jk_logger_win32.c
  
  Index: jk_logger_win32.c
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   *  Copyright (c) 1999-2001 The Apache Software Foundation.  *
   *   All rights reserved.*
   *   *
   * = *
   *   *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *   *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *notice, this list of conditions and the following disclaimer.  *
   *   *
   * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
   *notice,  this list of conditions  and the following  disclaimer in the *
   *documentation and/or other materials provided with the distribution.   *
   *   *
   * 3. The end-user documentation  included with the redistribution,  if any, *
   *must include the following acknowlegement: *
   *   *
   *   "This product includes  software developed  by the Apache  Software *
   *Foundation ."  *
   *   *
   *Alternately, this acknowlegement may appear in the software itself, if *
   *and wherever such third-party acknowlegements normally appear. *
   *   *
   * 4. The names  "The  Jakarta  Project",  "Jk",  and  "Apache  Software *
   *Foundation"  must not be used  to endorse or promote  products derived *
   *from this  software without  prior  written  permission.  For  written *
   *permission, please contact <[EMAIL PROTECTED]>.*
   *   *
   * 5. Products derived from this software may not be called "Apache" nor may *
   *"Apache" appear in their names without prior written permission of the *
   *Apache Software Foundation.*
   *   *
   * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
   * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
   * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
   * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
   * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
   * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
   * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
   * STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
   * ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE *
   * POSSIBILITY OF SUCH DAMAGE.   *
   *   *
   * = *
   *   *
   * This software  consists of voluntary  contributions made  by many indivi- *
   * duals on behalf of the  Apache Software Foundation.  For more information *
   * on the Apache Software Foundation, please see .   *
   *   *
   * = */
  
  /**
   * Description: Logger implementation using

cvs commit: jakarta-tomcat-connectors/jk/native2/server/isapi jk_isapi_plugin.c

2002-05-28 Thread nacho

nacho   02/05/28 17:10:18

  Modified:jk/native2/common jk_config.c jk_endpoint.c jk_env.c
jk_registry.c jk_registry.h jk_workerEnv.c
   jk/native2/include jk_config.h jk_env.h jk_workerEnv.h
   jk/native2/jni jk_jni_aprImpl.c
   jk/native2/server/isapi jk_isapi_plugin.c
  Log:
  * Native win32 logger is the default for IIS
  * Uri parse option now it's part of the standard wk2.p, deleted registry key and 
asociated defines, and changed code to use workerEnv->options
  * Added env->SoName  for the win32 logger registry settings
  * Added workerEnv->logger_name and used it at init to use some logger different form 
default one ( currently logger.file only )
  * Reordered initializations, to read first the config file, and later try to 
initialize the logger.
  
  Revision  ChangesPath
  1.22  +59 -52jakarta-tomcat-connectors/jk/native2/common/jk_config.c
  
  Index: jk_config.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_config.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- jk_config.c   23 May 2002 14:54:07 -  1.21
  +++ jk_config.c   29 May 2002 00:10:17 -  1.22
  @@ -58,7 +58,7 @@
   /***
* Description: General purpose config object *
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.21 $   *
  + * Version: $Revision: 1.22 $   *
***/
   
   #include "jk_global.h"
  @@ -439,61 +439,69 @@
*  and any removal may have disastrous consequences. Using critical
*  sections would drastically affect the performance.
*/
  -static int jk2_config_processConfigData(jk_env_t *env, jk_config_t *cfg,
  -jk_map_t *cfgData, int firstTime )
  +static int jk2_config_processConfigData(jk_env_t *env, jk_config_t *cfg,int 
firstTime )
   {
   int i;
  -int j;
  +int rc;
   
  -for( i=0; isize( env, cfgData ); i++ ) {
  -char *name=cfgData->nameAt(env, cfgData, i);
  -jk_map_t *prefNode=cfgData->valueAt(env, cfgData, i);
  -jk_bean_t *bean;
  -int ver;
  -char *verString;
  -
  -bean=env->getBean( env, name );
  -if( bean==NULL ) {
  -if( cfg->mbean->debug > 0 ) {
  -env->l->jkLog(env, env->l, JK_LOG_INFO, 
  -  "config.setConfig():  Creating %s\n", name );
  -}
  -bean=env->createBean( env, cfg->pool, name );
  -}
  +for( i=0; icfgData->size( env, cfg->cfgData ); i++ ) {
  +char *name=cfg->cfgData->nameAt(env, cfg->cfgData, i);
  +rc=cfg->processNode(env, cfg , name, firstTime);
  +}
  +return rc;
  +}
   
  -if( bean == NULL ) {
  -/* Can't create it, save the value in our map */
  -env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -  "config.update(): Can't create %s\n", name );
  -continue;
  +static int jk2_config_processNode(jk_env_t *env, jk_config_t *cfg, char *name, int 
firstTime )
  +{
  +int j;   
  +
  +jk_map_t *prefNode=cfg->cfgData->get(env, cfg->cfgData, name);
  +jk_bean_t *bean;
  +int ver;
  +char *verString;
  +
  +bean=env->getBean( env, name );
  +if( bean==NULL ) {
  +if( cfg->mbean->debug > 0 ) {
  +env->l->jkLog(env, env->l, JK_LOG_INFO, 
  +  "config.setConfig():  Creating %s\n", name );
   }
  +bean=env->createBean( env, cfg->pool, name );
  +}
   
  -verString= prefNode->get( env, prefNode, "ver" );
  -if( !firstTime ) {
  -if( verString == NULL ) continue;
  -
  -ver=atoi( verString );
  -
  -if( ver <= bean->ver) {
  -/* Object didn't change
  - */
  -continue;
  -}
  +if( bean == NULL ) {
  +/* Can't create it, save the value in our map */
  +env->l->jkLog(env, env->l, JK_LOG_ERROR,
  +  "config.update(): Can't create %s\n", name );
  +return JK_ERR;
  +}
  +
  +verString= prefNode->get( env, prefNode, "ver" );
  +if( !firstTime ) {
  +if( verString == NULL ) {
  +return JK_OK;
   }
  +ver=atoi( verString );
   
  -if( !firstTime )
  -env->l->jkLog(env, env->l, JK_LOG_INFO,
  -  "config.update(): Updating %s\n", name );
  -
  -/* XXX Maybe we shoud destro

cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 mod_jk2.c

2002-05-28 Thread nacho

nacho   02/05/28 17:13:00

  Modified:jk/native2/server/apache2 mod_jk2.c
  Log:
  * Getting soName for mod_jk2, now it's possible to log to native win32 logger from 
apache
  
  Revision  ChangesPath
  1.26  +28 -1 jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c
  
  Index: mod_jk2.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- mod_jk2.c 22 May 2002 23:44:23 -  1.25
  +++ mod_jk2.c 29 May 2002 00:13:00 -  1.26
  @@ -59,7 +59,7 @@
* Description: Apache 2 plugin for Jakarta/Tomcat *
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
* Henri Gomez <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.25 $   *
  + * Version: $Revision: 1.26 $   *
***/
   
   /*
  @@ -82,6 +82,10 @@
   
   #include "util_script.h"
   
  +#ifdef WIN32
  +static char  file_name[_MAX_PATH];
  +#endif
  +
   /*
* Jakarta (jk_) include files
*/
  @@ -284,6 +288,17 @@
   
   env->l=l;
   
  +#ifdef WIN32
  +env->soName=env->globalPool->calloc(env, env->globalPool, strlen(file_name)+1);
  +
  +if( env->soName == NULL ){
  +env->l->jkLog(env, env->l, JK_LOG_ERROR, "Error creating env->soName\n");
  +return env;
  +}
  +strcpy(env->soName,file_name);
  +#else 
  +env->soName=NULL;
  +#endif
   /* We should make it relative to JK_HOME or absolute path.
  ap_server_root_relative(cmd->pool,opt); */
   
  @@ -708,3 +723,15 @@
   jk2_register_hooks /* register hooks */
   };
   
  +#ifdef WIN32
  +
  +BOOL WINAPI DllMain(HINSTANCE hInst,// Instance Handle of the DLL
  +ULONG ulReason, // Reason why NT called this DLL
  +LPVOID lpReserved)  // Reserved parameter for future use
  +{
  +GetModuleFileName( hInst, file_name, sizeof(file_name)));
  +return TRUE;
  +}
  +
  +
  +#endif
  \ No newline at end of file
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native2/server/isapi isapi.dsp

2002-05-28 Thread nacho

nacho   02/05/28 17:14:21

  Modified:jk/native2/server/isapi isapi.dsp
  Log:
  * Build no calls mc to compile the message file
  
  XXX Is needed to add a ant wrapper for mc.exe ( the ms message compiler )
  
  Revision  ChangesPath
  1.12  +37 -0 jakarta-tomcat-connectors/jk/native2/server/isapi/isapi.dsp
  
  Index: isapi.dsp
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/isapi/isapi.dsp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- isapi.dsp 23 May 2002 12:05:52 -  1.11
  +++ isapi.dsp 29 May 2002 00:14:21 -  1.12
  @@ -145,6 +145,10 @@
   # End Source File
   # Begin Source File
   
  +SOURCE=.\jk_logger_win32.c
  +# End Source File
  +# Begin Source File
  +
   SOURCE=..\..\common\jk_map.c
   # End Source File
   # Begin Source File
  @@ -323,6 +327,39 @@
   # Begin Group "Resource Files"
   
   # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
  +# Begin Source File
  +
  +SOURCE=.\jk_logger_win32_message.mc
  +
  +!IF  "$(CFG)" == "isapi - Win32 Release"
  +
  +# PROP Ignore_Default_Tool 1
  +# Begin Custom Build - Creating resources from $(InputPath)
  +InputPath=.\jk_logger_win32_message.mc
  +
  +"jk_logger_win32_message.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
  + mc $(InputPath)
  +
  +# End Custom Build
  +
  +!ELSEIF  "$(CFG)" == "isapi - Win32 Debug"
  +
  +# PROP Ignore_Default_Tool 1
  +# Begin Custom Build - Creating resources from $(InputPath)
  +InputPath=.\jk_logger_win32_message.mc
  +
  +"jk_logger_win32_message.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
  + mc $(InputPath)
  +
  +# End Custom Build
  +
  +!ENDIF 
  +
  +# End Source File
  +# Begin Source File
  +
  +SOURCE=.\jk_logger_win32_message.rc
  +# End Source File
   # End Group
   # End Target
   # End Project
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native2/server/isapi jk_logger_win32.c

2002-05-28 Thread nacho

nacho   02/05/28 17:18:24

  Modified:jk/native2/server/isapi jk_logger_win32.c
  Log:
  * Cut&Paste issues, better no comments than other file ones.
  
  Revision  ChangesPath
  1.2   +4 -17 
jakarta-tomcat-connectors/jk/native2/server/isapi/jk_logger_win32.c
  
  Index: jk_logger_win32.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/isapi/jk_logger_win32.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jk_logger_win32.c 28 May 2002 23:59:14 -  1.1
  +++ jk_logger_win32.c 29 May 2002 00:18:24 -  1.2
  @@ -56,22 +56,9 @@
* = */
   
   /**
  - * Description: Logger implementation using apache's native logging.
  - *
  - * This is the result of lazyness - a single log file to watch ( error.log )
  - * instead of 2, no need to explain/document/decide where to place mod_jk
  - * logging, etc.
  - *
  - * Normal apache logging rules apply.
  - *
  - * XXX Jk will use per/compoment logging level. All logs will be WARN level
  - * in apache, and the filtering will happen on each component level.
  - *
  - * XXX Add file/line
  - *
  - * XXX Use env, use the current request structure ( so we can split the log
  - * based on vhost configs ).
  - *
  + * Description: Logger implementation using win32's native logger,
  + * 
  + * 
* @author Costin Manolache
* @author Ignacio J. Ortega
*/ 
  @@ -85,7 +72,7 @@
   
   
   #define HUGE_BUFFER_SIZE (8*1024)
  -#define JAKARTA_EVENT_SOURCE "Apache isapi_redirector2"
  +#define JAKARTA_EVENT_SOURCE "Apache Jakarta Connector2"
   
   #ifdef WIN32
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 9475] New: - with path != docBase & autodeployment causes double deployment

2002-05-28 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=9475

 with path != docBase & autodeployment causes double deployment

   Summary:  with path != docBase & autodeployment causes
double deployment
   Product: Tomcat 4
   Version: 4.0.4 Beta 3
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Minor
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


eg.

   


This configuration would deploy both /apps and /mywebapp. /mywebapp would be
lacking any resources in the context (instead deployed as a DefaultContext).

This is not the behaviour I'd expect - Tomcat should not autodeploy any
directories or WAR files where the docBase is already specified.

Workaround: remove appBase and specify docBase as an absolute path:


 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_workerEnv.c

2002-05-28 Thread nacho

nacho   02/05/28 17:40:45

  Modified:jk/native2/common jk_workerEnv.c
  Log:
  * loggers for dynamic config need to be expressed as type:localname form i.e 
"logger.file:0"
  
  Revision  ChangesPath
  1.48  +3 -4  jakarta-tomcat-connectors/jk/native2/common/jk_workerEnv.c
  
  Index: jk_workerEnv.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_workerEnv.c,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- jk_workerEnv.c29 May 2002 00:10:17 -  1.47
  +++ jk_workerEnv.c29 May 2002 00:40:44 -  1.48
  @@ -59,7 +59,7 @@
* Description: Workers controller *
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
* Author:  Henri Gomez <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.47 $   *
  + * Version: $Revision: 1.48 $   *
***/
   
   #include "jk_env.h"
  @@ -354,12 +354,11 @@
   }
   
   if( wEnv->logger_name!=NULL){
  -char alias_name[100]="";
   jkb=env->getBean(env,wEnv->logger_name);
   if (jkb == NULL){
  -jkb=env->createBean2( env, env->globalPool, wEnv->logger_name, "");
  +jkb=env->createBean( env, env->globalPool, wEnv->logger_name);
   }
  -env->alias( env, strcat(strcat(alias_name,wEnv->logger_name),":"), 
"logger");
  +env->alias( env, wEnv->logger_name, "logger");
   env->l = jkb->object;
   }
   env->l->init( env, env->l );
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native2/server/isapi jk_isapi_plugin.c

2002-05-28 Thread nacho

nacho   02/05/28 17:50:50

  Modified:jk/native2/server/isapi jk_isapi_plugin.c
  Log:
  * default win32 native logger needs to be inited before first use, to make the 
needed registry changes.
  
  XXX Need a way to undone this registry mods?
  
  Revision  ChangesPath
  1.21  +5 -3  
jakarta-tomcat-connectors/jk/native2/server/isapi/jk_isapi_plugin.c
  
  Index: jk_isapi_plugin.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/isapi/jk_isapi_plugin.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- jk_isapi_plugin.c 29 May 2002 00:10:18 -  1.20
  +++ jk_isapi_plugin.c 29 May 2002 00:50:49 -  1.21
  @@ -60,7 +60,7 @@
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
* Author:  Larry Isaacs <[EMAIL PROTECTED]>   *
* Author:  Ignacio J. Ortega <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.20 $   *
  + * Version: $Revision: 1.21 $   *
***/
   
   // This define is needed to include wincrypt,h, needed to get client certificates
  @@ -728,8 +728,8 @@
   l = jkb->object;
   
   env->l=l;
  -
   env->soName=env->globalPool->calloc(env, env->globalPool, strlen(file_name)+1);
  +env->l->init(env,env->l);
   
   if( env->soName == NULL ){
   env->l->jkLog(env, env->l, JK_LOG_ERROR, "Error creating env->soName\n");
  @@ -762,11 +762,13 @@
   jk_env_t *env;
   if(  workerEnv==NULL ) {
   env = jk2_create_workerEnv();
  +env->l->jkLog(env, env->l, JK_LOG_ERROR, "JK2 Config Created");
   } else {
   env = workerEnv->globalEnv->getEnv( workerEnv->globalEnv );
  +env->l->jkLog(env, env->l, JK_LOG_ERROR, "JK2 Config Reused");
   }
   
  -env->l->jkLog(env, env->l, JK_LOG_ERROR, "JK2 Config Created");
  +
  
   return env;
   }
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native2/server/isapi jk_isapi_plugin.c

2002-05-28 Thread nacho

nacho   02/05/28 17:59:33

  Modified:jk/native2/server/isapi jk_isapi_plugin.c
  Log:
  * Oops, init needs to be after setting soName
  
  Revision  ChangesPath
  1.22  +3 -2  
jakarta-tomcat-connectors/jk/native2/server/isapi/jk_isapi_plugin.c
  
  Index: jk_isapi_plugin.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/isapi/jk_isapi_plugin.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- jk_isapi_plugin.c 29 May 2002 00:50:49 -  1.21
  +++ jk_isapi_plugin.c 29 May 2002 00:59:33 -  1.22
  @@ -60,7 +60,7 @@
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
* Author:  Larry Isaacs <[EMAIL PROTECTED]>   *
* Author:  Ignacio J. Ortega <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.21 $   *
  + * Version: $Revision: 1.22 $   *
***/
   
   // This define is needed to include wincrypt,h, needed to get client certificates
  @@ -729,13 +729,14 @@
   
   env->l=l;
   env->soName=env->globalPool->calloc(env, env->globalPool, strlen(file_name)+1);
  -env->l->init(env,env->l);
   
   if( env->soName == NULL ){
   env->l->jkLog(env, env->l, JK_LOG_ERROR, "Error creating env->soName\n");
   return env;
   }
   strcpy(env->soName,file_name);
  +env->l->init(env,env->l);
  +
   /* We should make it relative to JK_HOME or absolute path.
  ap_server_root_relative(cmd->pool,opt); */
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native2/server/isapi jk_isapi_plugin.c

2002-05-28 Thread nacho

nacho   02/05/28 18:16:40

  Modified:jk/native2/server/isapi jk_isapi_plugin.c
  Log:
  * logger reconfigurations need to be done at globalEnv.
  
  XXX Thread issues, isapi needs a complete revamp of initialization, now is a mess, 
works, but needs a complete rewrite
  
  Revision  ChangesPath
  1.23  +2 -2  
jakarta-tomcat-connectors/jk/native2/server/isapi/jk_isapi_plugin.c
  
  Index: jk_isapi_plugin.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/isapi/jk_isapi_plugin.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- jk_isapi_plugin.c 29 May 2002 00:59:33 -  1.22
  +++ jk_isapi_plugin.c 29 May 2002 01:16:40 -  1.23
  @@ -60,7 +60,7 @@
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
* Author:  Larry Isaacs <[EMAIL PROTECTED]>   *
* Author:  Ignacio J. Ortega <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.22 $   *
  + * Version: $Revision: 1.23 $   *
***/
   
   // This define is needed to include wincrypt,h, needed to get client certificates
  @@ -571,7 +571,7 @@
   {
   int rc = JK_TRUE;  
  
  -jk_env_t *env = workerEnv->globalEnv->getEnv( workerEnv->globalEnv );
  +jk_env_t *env = workerEnv->globalEnv;
   workerEnv->initData->add( env, workerEnv->initData, "serverRoot",
 workerEnv->pool->pstrdup( env, workerEnv->pool, 
server_root));
   /* Logging the initialization type: registry or properties file in virtual dir
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 9475] - with path != docBase & autodeployment causes double deployment

2002-05-28 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=9475

 with path != docBase & autodeployment causes double deployment

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX



--- Additional Comments From [EMAIL PROTECTED]  2002-05-29 02:12 ---
This has been discussed in the past, and will not be fixed. Disable auto 
deployment if you don't want this to happen.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/deploy NamingResources.java

2002-05-28 Thread remm

remm02/05/28 19:16:35

  Modified:catalina/src/share/org/apache/catalina/deploy
NamingResources.java
  Log:
  - Tighten up JNDI resources handling, by disallowing any overriding.
  
  Revision  ChangesPath
  1.5   +51 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/deploy/NamingResources.java
  
  Index: NamingResources.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/deploy/NamingResources.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NamingResources.java  3 May 2002 00:13:01 -   1.4
  +++ NamingResources.java  29 May 2002 02:16:35 -  1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/deploy/NamingResources.java,v
 1.4 2002/05/03 00:13:01 craigmcc Exp $
  - * $Revision: 1.4 $
  - * $Date: 2002/05/03 00:13:01 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/deploy/NamingResources.java,v
 1.5 2002/05/29 02:16:35 remm Exp $
  + * $Revision: 1.5 $
  + * $Date: 2002/05/29 02:16:35 $
*
* 
*
  @@ -68,6 +68,7 @@
   import java.beans.PropertyChangeListener;
   import java.beans.PropertyChangeSupport;
   import java.util.HashMap;
  +import java.util.Hashtable;
   
   
   /**
  @@ -75,7 +76,7 @@
* Naming Context and their associated JNDI context.
*
* @author Remy Maucherat
  - * @version $Revision: 1.4 $ $Date: 2002/05/03 00:13:01 $
  + * @version $Revision: 1.5 $ $Date: 2002/05/29 02:16:35 $
*/
   
   public final class NamingResources {
  @@ -95,6 +96,13 @@
   
   
   /**
  + * List of naming entries, keyed by name. The value is the entry type, as
  + * declared by the user.
  + */
  +private Hashtable entries = new Hashtable();
  +
  +
  +/**
* The EJB resource references for this web application, keyed by name.
*/
   private HashMap ejbs = new HashMap();
  @@ -154,6 +162,12 @@
*/
   public void addEjb(ContextEjb ejb) {
   
  +if (entries.containsKey(ejb.getName())) {
  +return;
  +} else {
  +entries.put(ejb.getName(), ejb.getType());
  +}
  +
   synchronized (ejbs) {
   ejb.setNamingResources(this);
   ejbs.put(ejb.getName(), ejb);
  @@ -170,6 +184,12 @@
*/
   public void addEnvironment(ContextEnvironment environment) {
   
  +if (entries.containsKey(environment.getName())) {
  +return;
  +} else {
  +entries.put(environment.getName(), environment.getType());
  +}
  +
   synchronized (envs) {
   environment.setNamingResources(this);
   envs.put(environment.getName(), environment);
  @@ -187,6 +207,9 @@
   public void addResourceParams(ResourceParams resourceParameters) {
   
   synchronized (resourceParams) {
  +if (resourceParams.containsKey(resourceParameters.getName())) {
  +return;
  +}
   resourceParameters.setNamingResources(this);
   resourceParams.put(resourceParameters.getName(),
  resourceParameters);
  @@ -203,6 +226,12 @@
*/
   public void addLocalEjb(ContextLocalEjb ejb) {
   
  +if (entries.containsKey(ejb.getName())) {
  +return;
  +} else {
  +entries.put(ejb.getName(), ejb.getType());
  +}
  +
   synchronized (localEjbs) {
   ejb.setNamingResources(this);
   localEjbs.put(ejb.getName(), ejb);
  @@ -231,6 +260,12 @@
*/
   public void addResource(ContextResource resource) {
   
  +if (entries.containsKey(resource.getName())) {
  +return;
  +} else {
  +entries.put(resource.getName(), resource.getType());
  +}
  +
   synchronized (resources) {
   resource.setNamingResources(this);
   resources.put(resource.getName(), resource);
  @@ -248,6 +283,12 @@
*/
   public void addResourceEnvRef(String name, String type) {
   
  +if (entries.containsKey(name)) {
  +return;
  +} else {
  +entries.put(name, type);
  +}
  +
   synchronized (resourceEnvRefs) {
   resourceEnvRefs.put(name, type);
   }
  @@ -263,6 +304,12 @@
* @param resource New resource link
*/
   public void addResourceLink(ContextResourceLink resourceLink) {
  +
  +if (entries.containsKey(resourceLink.getName())) {
  +return;
  +} else {
  +entries.put(resourceLink.getName(), resourceLink.getType());
  +}
   
   synchronized (resourceLinks) {

cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common ChannelUn.java

2002-05-28 Thread remm

remm02/05/28 19:17:40

  Modified:jk/java/org/apache/jk/common ChannelUn.java
  Log:
  - Remove errors and stack traces (users file bugs otherwise).
  - IMO, the default configuration should not produce any stack trace.
  
  Revision  ChangesPath
  1.20  +3 -2  
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelUn.java
  
  Index: ChannelUn.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelUn.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- ChannelUn.java28 May 2002 22:50:04 -  1.19
  +++ ChannelUn.java29 May 2002 02:17:40 -  1.20
  @@ -103,8 +103,9 @@
   
   public void init() throws IOException {
   if( file==null ) {
  -log.error("No file, disabling unix channel");
  -throw new IOException( "No file for the unix socket channel");
  +log.info("No file, disabling unix channel");
  +return;
  +//throw new IOException( "No file for the unix socket channel");
   }
   if( wEnv.getLocalId() != 0 ) {
   file=file+ wEnv.getLocalId();
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 9478] New: - jk_nt_service's wrapper.properties does not accept spaces in path names

2002-05-28 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=9478

jk_nt_service's wrapper.properties does not accept spaces in path names

   Summary: jk_nt_service's wrapper.properties does not accept
spaces in path names
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Major
  Priority: Other
 Component: Connector:JK/AJP (deprecated)
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Trying to startup Tomcat Webserver as a NT service or as a 
Windows2000 Service

I'm using the following rule to specify a path in wrapper.properties.
wrapper.CDS_50_HOME=D:\Program Files\Inktomi\CDS 5.0

This is not accepted. I have tried using quotes (single, double)
and escape characters as well as %20 (ascii for space) in this
path.

It works fine when there's no space in the path, though

Please give me a workaround to this problem, and/or suggest
an alternate way to startup Tomcat as a NT service

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0 RELEASE-NOTES-4.1.txt

2002-05-28 Thread remm

remm02/05/28 20:06:50

  Modified:.RELEASE-NOTES-4.1.txt
  Log:
  - Status update.
  
  Revision  ChangesPath
  1.6   +91 -46jakarta-tomcat-4.0/RELEASE-NOTES-4.1.txt
  
  Index: RELEASE-NOTES-4.1.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/RELEASE-NOTES-4.1.txt,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RELEASE-NOTES-4.1.txt 15 May 2002 04:42:31 -  1.5
  +++ RELEASE-NOTES-4.1.txt 29 May 2002 03:06:50 -  1.6
  @@ -3,7 +3,7 @@
   Release Notes
   =
   
  -$Id: RELEASE-NOTES-4.1.txt,v 1.5 2002/05/15 04:42:31 remm Exp $
  +$Id: RELEASE-NOTES-4.1.txt,v 1.6 2002/05/29 03:06:50 remm Exp $
   
   
   
  @@ -43,6 +43,14 @@
   Catalina New Features:
   -
   
  +[4.1.3] Catalina:
  +Implement custom logger which can be used to capture System.out and
  +System.err to a buffer for later use.
  +
  +[4.1.3] SSIServlet:
  +Complete rewrite of the SSI functionality (WARNING: servlet class name
  +has changed).
  +
   
   ---
   Jasper New Features:
  @@ -55,6 +63,9 @@
   [4.1.1] JspServlet:
   Refactor the JSP modification checking as a background thread.
   
  +[4.1.3] Compiler:
  +Ant 1.5 based compiler.
  +
   
   ==
   BUG FIXES AND IMPROVEMENTS:
  @@ -76,6 +87,9 @@
   [4.1.2] Administration Webapp:
   Many cosmetic fixes.
   
  +[4.1.3] Administration Webapp:
  +Fix creation of new connectors through the admin webapp.
  +
   
   --
   Catalina Bug Fixes:
  @@ -100,6 +114,57 @@
   Fixed a problem where the facades would still keep a pointer to the 
   facaded objects after the end of the processing of the request.
   
  +[4.1.3] #7578
  +Summary: Signed jars loses their certificates when in /WEB-INF/lib
  +WebappClassLoader:
  +Fix the timing of the call to JarEntry.getCertificates(), so that the
  +certificates are set correctly.
  +
  +[4.1.3] WebappClassLoader:
  +Modify the filters to have a matched class be delegated first, instead
  +of refusing to load it altogether. Also add filters for javax.*, Xerces
  +and Xalan.
  +
  +[4.1.3] Endpoint:
  +Add support for a two phase connector initialization in Coyote, so that
  +Tomcat can be used as nobody on Unix.
  +
  +[4.1.3] Http11Protocol:
  +i18n.
  +
  +[4.1.3] StandardServerMBean:
  +Encode special characters when writing configuration file.
  +
  +[4.1.3] ContextConfig:
  +Fix NPE when the Embedded class is used.
  +
  +[4.1.3] DBCP:
  +Use the JNDI factory provided by the commons-dbcp project.
  +
  +[4.1.3] StandardHost:
  +Modify mapping error uri to provide the source uri.
  +
  +[4.1.3] NamingContextListener:
  +Fix a bug where the listener was registered on all lifecycle events.
  +
  +[4.1.3] #7656
  +Summary: Webapplications deployed using PUT don't survive 
  +a tomcat restart
  +StandardServer:
  +Move the save to XML functionality out of the JMX code, and make the
  +ManagerServlet use it after a deploy, so that the deployed application
  +is persistent.
  +
  +[4.1.3] #9353
  +Transfer-Encoding: chunked (on Request fails)
  +ChunkedInputFilter:
  +In rare cases, the data read could be corrupted.
  +
  +[4.1.3] ManagerServlet:
  +Handle resources nested in subcontexts.
  +
  +
  +
   
   
   Jasper Bug Fixes:
  @@ -121,6 +186,30 @@
   JspServletWrapper:
   Fix JSP recompilation when the new "development" flag is set to "true".
   
  +[4.1.3] #5793
  +Summary: Variable element in tld with TagExtraInfo class
  +TagLibraryInfoImpl:
  +Fix spec compliance problem.
  +
  +[4.1.3] PagaDataImpl:
  +Fix bug where only one validator could be used on a page.
  +
  +[4.1.3] #8565
  +Summary: MyEntityResolver doesn't allow including user-defined entities
  +
  +[4.1.3] Generator:
  +Use an array instead of a collection to simulate the try/catch nesting.
  +
  +[4.1.3] Generator:
  +Fix spec compliance bug where a tag could define scripting variables in
  +both the TLD and the TagExtraInfo class.
  +
  +[4.1.3] CoyoteConnector:
  +Add PureTLS support.
  +
  +[4.1.3] NamingResources:
  +Prevent naming resources overriding.
  +
   
   
   KNOWN ISSUES IN THIS RELEASE:
  @@ -132,9 +221,7 @@
   * Web application reloading and static fields in shared libraries
   * JAVAC leaking memory
   * Linux and Sun JDK 1.2.x - 1.3.x
  -* Jasper and Jikes
   * Enabling SSI and CGI Support
  -* Tomcat examples web application
   
   
   ---

cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 LocalStrings.properties

2002-05-28 Thread remm

remm02/05/28 20:12:04

  Modified:http11/src/java/org/apache/coyote/http11
LocalStrings.properties
  Log:
  - Improved messages.
  
  Revision  ChangesPath
  1.4   +3 -3  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/LocalStrings.properties,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- LocalStrings.properties   16 May 2002 19:25:41 -  1.3
  +++ LocalStrings.properties   29 May 2002 03:12:04 -  1.4
  @@ -1,4 +1,4 @@
  -# $Id: LocalStrings.properties,v 1.3 2002/05/16 19:25:41 remm Exp $
  +# $Id: LocalStrings.properties,v 1.4 2002/05/29 03:12:04 remm Exp $
   
   # language 
   
  @@ -10,7 +10,7 @@
   
   http11protocol.endpoint.initerror=Error initializing endpoint
   http11protocol.endpoint.starterror=Error starting endpoint
  -http11protocol.init=Initializing Coyote HTTP/1.1 protocol handler on port {0}
  +http11protocol.init=Initializing Coyote HTTP/1.1 on port {0}
   http11protocol.proto.error=Error reading request, ignored
   http11protocol.proto.ioexception.debug=IOException reading request
   http11protocol.proto.ioexception.info=IOException reading request, ignored
  @@ -18,7 +18,7 @@
   http11protocol.proto.socketexception.info=SocketException reading request, ignored
   http11protocol.setattribute=Attribute {0}: {1}
   http11protocol.socketfactory.initerror=Error initializing socket factory
  -http11protocol.start=Starting Coyote HTTP/1.1 protocol handler on port {0}
  +http11protocol.start=Starting Coyote HTTP/1.1 on port {0}
   
   #
   # Http11Processor
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: New releases

2002-05-28 Thread Remy Maucherat

> "Remy Maucherat" <[EMAIL PROTECTED]> writes:
> > There has been no changes to the Tomcat core, and very few changes made
to
> > Coyote (fix to chunking handling, as well as adding PureTLS support).
> > I also plan to release Coyote 1.0 simultaneously.
> I'm pretty confident of the commits I made today, but it would be nice
> if someone could test them or look them over or something before we call
> them soup :)

As long as the old functionality isn't broken, I'd like to release 4.0.4
(many fixes there that people have been waiting for a long time).
The release of Coyote 1.0 may be delayed, as it is not the connector used by
default.

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: New releases

2002-05-28 Thread Eric Rescorla

"Remy Maucherat" <[EMAIL PROTECTED]> writes:
> > "Remy Maucherat" <[EMAIL PROTECTED]> writes:
> > > There has been no changes to the Tomcat core, and very few changes made
> to
> > > Coyote (fix to chunking handling, as well as adding PureTLS support).
> > > I also plan to release Coyote 1.0 simultaneously.
> > I'm pretty confident of the commits I made today, but it would be nice
> > if someone could test them or look them over or something before we call
> > them soup :)
> 
> As long as the old functionality isn't broken, I'd like to release 4.0.4
> (many fixes there that people have been waiting for a long time).
> The release of Coyote 1.0 may be delayed, as it is not the connector used by
> default.
Well, I didn't intentionally break anything, but I don't have a complete
regression harness either. (Incidentally, does someone have such a thing
that can be run before checkin?)

-Ekr

-- 
[Eric Rescorla   [EMAIL PROTECTED]]
http://www.rtfm.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Tomcat4 and apache1.3 and JSP

2002-05-28 Thread Rupert Young

Hi,

I am testing a very simple jsp, which displays the date (see below).
I can get the page up ok, but when I click refresh it works a few times then
the browser seems to hang and the page doesn't come up.  If I click stop and
then refresh I get an error (webapp:error 500).

I am expecting the page to refrsh as many times as it is accessed. Any idea
what is happening ?

Regards,
Rupert Young




   
   
   
   


 Today
  <%= new
java.util.Date()%> 





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 9416] - Memory usage by Tomcat

2002-05-28 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=9416

Memory usage by Tomcat





--- Additional Comments From [EMAIL PROTECTED]  2002-05-29 06:40 ---
Our Java Web application is running on Tomcat 3.2.3 and once in every 
few days,we are getting the following sort of error.

java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start(Native Method)
at SeBase.DataConnection.createConnection(DataConnection.java:211)
at SeBase.DataConnection.getConnection(DataConnection.java:191)
at SeBase.CommonLogin.checkDatabase(CommonLogin.java:100)
at SeBase.CommonLogin.setValues(CommonLogin.java:88)
at 
sebase._0002fsebase_0002fcommon_0005floginaction_0002ejspcommon_0005floginactio
n_jsp_0._jspService
(_0002fsebase_0002fcommon_0005floginaction_0002ejspcommon_0005floginaction_jsp_
0.java:211)


This happens only on pages which access the Database. Other JSPs are running 
fine even after the error has occurred. Because we are not creating threads in 
our application except for Database connection.

For Database connection, we are using a custom Data connection pooling 
mechanism (code given below). In that, while creating every new connection, we 
are creating a new thread which will check the usage of the connections after 
put to sleep for 2 minutes. If the connections are not in use for more than 1 
minute, it will  close the connections and come out of run method. We have 
verified that the data connections are getting closed properly. But the 
threads created during the process are not getting removed. 

Is it the right way? Or can we use one single thread which will check 
all the data connections every 2 minutes and will run from the starting of the 
application server till it is closed? Can it lead us to any other problem?

/**
 * Returns a JDCConnecton object if it is availabe in vector or creates a
 * new connection add it to vector and returns the same
 */
   public synchronized Connection getConnection() throws Exception,SQLException
   {
  ConnectionPool f_obj_conn;   //for storing the connection pool object
  for(int i = 0; i < f_obj_connections.size(); i++) //for loop for getting 
any free connection
  {
 f_obj_conn = (ConnectionPool)f_obj_connections.elementAt(i);
 if (f_obj_conn.lease() && !f_obj_conn.isClosed())   //check for status
 {
System.out.print("\nUsing Old Connection #" +  
f_int_total_conn + "Connection name " + f_obj_conn);
return f_obj_conn;
 }   //end of if loop
  }   //end of for loop
  f_obj_conn = createConnection();
  return f_obj_conn;
   }


/**
 * Creates a physical connection with the concerned database
 */
   public synchronized ConnectionPool createConnection()throws Exception
   {
  ConnectionPool f_obj_conn_pool = null;   //for storing the pool object
  if(f_obj_connections.size() < f_int_max_conn)   //check for max size
  {
Class.forName(f_str_driver);
Connection f_obj_connection;   //for storing the connection
f_obj_connection = DriverManager.getConnection
(f_str_url,f_str_user,f_str_password);
f_obj_conn_pool = new ConnectionPool(f_obj_connection, this);
f_obj_reaper = new ConnectionReaper(f_obj_conn_pool);
  f_int_total_conn = f_int_total_conn + 1;  
f_obj_conn_pool.putThread(f_obj_reaper);
f_obj_conn_pool.lease();
f_obj_connections.addElement(f_obj_conn_pool);
  f_obj_reaper.start(); 
  System.out.print("\nNo Of Connection #" +  f_int_total_conn 
+ "New Connection Created " + f_obj_connection);
  }
  if(f_obj_conn_pool == null)throw new Exception("SERVER TOO BUSY");
  return f_obj_conn_pool;
   }


/**
 * Closes all the stale connection as per specfied in vector size
 */

   public synchronized void reapConnections()throws Exception
   {
  int f_int_index = 0;
  long f_long_stale;   //for storing the stale or elapse time of connection
  f_long_stale = System.currentTimeMillis() - f_long_timeout;
  Enumeration f_obj_connlist;   //for getting the enumeration of connection
  f_obj_connlist = f_obj_connections.elements();
  //while loop for reaping connection
  while((f_obj_connlist != null) && (f_obj_connlist.hasMoreElements()))
  {
 ConnectionPool f_obj_pool;   //for storing the connection pool object
 f_obj_pool = (ConnectionPool)f_obj_connlist.nextElement();
 //checking for status of connection
 if(!f_obj_pool.inUse())
 {
removeConnection(f_obj_pool.f_obj_conn);
Thread thread = f_obj

DO NOT REPLY [Bug 9480] New: - Data connection pooiling

2002-05-28 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=9480

Data connection pooiling

   Summary: Data connection pooiling
   Product: Tomcat 3
   Version: 3.2.3 Final
  Platform: All
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Our Java Web application is running on Tomcat 3.2.3 and once in every 
few days,we are getting the following sort of error.

java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start(Native Method)
at SeBase.DataConnection.createConnection(DataConnection.java:211)
at SeBase.DataConnection.getConnection(DataConnection.java:191)
at SeBase.CommonLogin.checkDatabase(CommonLogin.java:100)
at SeBase.CommonLogin.setValues(CommonLogin.java:88)
at 
sebase._0002fsebase_0002fcommon_0005floginaction_0002ejspcommon_0005floginactio
n_jsp_0._jspService
(_0002fsebase_0002fcommon_0005floginaction_0002ejspcommon_0005floginaction_jsp_
0.java:211)


This happens only on pages which access the Database. Other JSPs are running 
fine even after the error has occurred. Because we are not creating threads in 
our application except for Database connection.

For Database connection, we are using a custom Data connection pooling 
mechanism (code given below). In that, while creating every new connection, we 
are creating a new thread which will check the usage of the connections after 
put to sleep for 2 minutes. If the connections are not in use for more than 1 
minute, it will  close the connections and come out of run method. We have 
verified that the data connections are getting closed properly. But the 
threads created during the process are not getting removed. 

Is it the right way? Or can we use one single thread which will check 
all the data connections every 2 minutes and will run from the starting of the 
application server till it is closed? Can it lead us to any other problem?

/**
 * Returns a JDCConnecton object if it is availabe in vector or creates a
 * new connection add it to vector and returns the same
 */
   public synchronized Connection getConnection() throws Exception,SQLException
   {
  ConnectionPool f_obj_conn;   //for storing the connection pool object
  for(int i = 0; i < f_obj_connections.size(); i++) //for loop for getting 
any free connection
  {
 f_obj_conn = (ConnectionPool)f_obj_connections.elementAt(i);
 if (f_obj_conn.lease() && !f_obj_conn.isClosed())   //check for status
 {
System.out.print("\nUsing Old Connection #" +  
f_int_total_conn + "Connection name " + f_obj_conn);
return f_obj_conn;
 }   //end of if loop
  }   //end of for loop
  f_obj_conn = createConnection();
  return f_obj_conn;
   }


/**
 * Creates a physical connection with the concerned database
 */
   public synchronized ConnectionPool createConnection()throws Exception
   {
  ConnectionPool f_obj_conn_pool = null;   //for storing the pool object
  if(f_obj_connections.size() < f_int_max_conn)   //check for max size
  {
Class.forName(f_str_driver);
Connection f_obj_connection;   //for storing the connection
f_obj_connection = DriverManager.getConnection
(f_str_url,f_str_user,f_str_password);
f_obj_conn_pool = new ConnectionPool(f_obj_connection, this);
f_obj_reaper = new ConnectionReaper(f_obj_conn_pool);
  f_int_total_conn = f_int_total_conn + 1;  
f_obj_conn_pool.putThread(f_obj_reaper);
f_obj_conn_pool.lease();
f_obj_connections.addElement(f_obj_conn_pool);
  f_obj_reaper.start(); 
  System.out.print("\nNo Of Connection #" +  f_int_total_conn 
+ "New Connection Created " + f_obj_connection);
  }
  if(f_obj_conn_pool == null)throw new Exception("SERVER TOO BUSY");
  return f_obj_conn_pool;
   }


/**
 * Closes all the stale connection as per specfied in vector size
 */

   public synchronized void reapConnections()throws Exception
   {
  int f_int_index = 0;
  long f_long_stale;   //for storing the stale or elapse time of connection
  f_long_stale = System.currentTimeMillis() - f_long_timeout;
  Enumeration f_obj_connlist;   //for getting the enumeration of connection
  f_obj_connlist = f_obj_connections.elements();
  //while loop for reaping connection
  while((f_obj_connlist != null) && (f_obj_connlist.hasMoreElements()))
  {
 ConnectionPool f_obj_pool;   //for storing the connection pool o

DO NOT REPLY [Bug 9480] - Data connection pooling

2002-05-28 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=9480

Data connection pooling

[EMAIL PROTECTED] changed:

   What|Removed |Added

Summary|Data connection pooiling|Data connection pooling

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[PATCH] Apache2 mod_jk2

2002-05-28 Thread Mladen Turk

Hi,

Introducing native WIN32 logger breaks the Apache2 mod_jk2.
Either implement the logger factory func in mod_jk2 (I'm personally
against it),
or ifdef it out from jk_registry.

Here is the patch...

MT.


RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native2/common/jk_registry.c,v
retrieving revision 1.25
diff -u -r1.25 jk_registry.c
--- jk_registry.c   29 May 2002 00:10:17 -  1.25
+++ jk_registry.c   29 May 2002 07:07:09 -
@@ -110,7 +110,11 @@
* error, I'm casting the function pointers to (void *) - mmanders
*/
   env->registerFactory( env, "logger.file",   jk2_logger_file_factory );
+/* This switch should be more descriptive like JK2_HAS_WIN32_LOGGER
+ */
+#ifndef HAS_APR
   env->registerFactory( env, "logger.win32",   jk2_logger_win32_factory );
+#endif
   env->registerFactory( env, "workerEnv", jk2_workerEnv_factory );
   env->registerFactory( env, "uriMap", jk2_uriMap_factory );
   env->registerFactory( env, "uriEnv", jk2_uriEnv_factory );


RCS file: 
/home/cvspublic/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c,v
retrieving revision 1.26
diff -u -r1.26 mod_jk2.c
--- mod_jk2.c   29 May 2002 00:13:00 -  1.26
+++ mod_jk2.c   29 May 2002 07:06:21 -
@@ -293,7 +293,7 @@
 
 if( env->soName == NULL ){
 env->l->jkLog(env, env->l, JK_LOG_ERROR, "Error creating env->soName\n");
-return env;
+return;
 }
 strcpy(env->soName,file_name);
 #else 
@@ -729,7 +729,7 @@
 ULONG ulReason, // Reason why NT called this DLL
 LPVOID lpReserved)  // Reserved parameter for future use
 {
-GetModuleFileName( hInst, file_name, sizeof(file_name)));
+GetModuleFileName( hInst, file_name, sizeof(file_name));
 return TRUE;
 }
 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: