Re: [j-t-c] HexUtils.java no longer compiles for me...

2002-01-19 Thread Remy Maucherat

 without explicitly casting each entry in the HEX array to a byte, like
this:

 public static final byte[] HEX =
 { (byte)'0', (byte)'1', (byte)'2', (byte)'3',
   (byte)'4', (byte)'5', (byte)'6', (byte)'7',
   (byte)'8', (byte)'9', (byte)'a', (byte)'b',
   (byte)'c', (byte)'d', (byte)'e', (byte)'f' };

 any objections to my checking this in?

+1.
Note: It builds fine for me.

Remy


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




Re: [j-t-c] post bug in latest ajp (a.k.a. jk1) code

2002-01-19 Thread Remy Maucherat

 fyi:  i have found and fixed this bug.

The code for jk and webapp needs to be tagged then. Please let me know when
it's done.

Remy


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




Re: cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session StandardSession.java

2002-01-19 Thread Remy Maucherat

 craigmcc02/01/18 14:14:08

   Modified:catalina/src/share/org/apache/catalina/session
 StandardSession.java
   Log:
   Remove the redundant unbinding of session attriutes in writeObject() --
the
   decision of whether or not this should be done is not appropriate here.

   Remy, are you OK with me porting this to the 4.0.2 branch?

   Submitted by: David Lecomber [EMAIL PROTECTED]

+1. Last change before I tag then.

Remy


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




RE: [j-t-c] HexUtils.java no longer compiles for me...

2002-01-19 Thread Kevin Seguin

 
  without explicitly casting each entry in the HEX array to a 
 byte, like
 this:
 
  public static final byte[] HEX =
  { (byte)'0', (byte)'1', (byte)'2', (byte)'3',
(byte)'4', (byte)'5', (byte)'6', (byte)'7',
(byte)'8', (byte)'9', (byte)'a', (byte)'b',
(byte)'c', (byte)'d', (byte)'e', (byte)'f' };
 
  any objections to my checking this in?
 
 +1.
 Note: It builds fine for me.
 

it turns out that i was using an older version of jikes than i thought -
1.12 vs. 1.14.  the current code builds fine with jikes 1.14.  so, unless
somebody else runs into the same problem, i don't think there's any reason
to make the change.

-kevin.

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




RE: [j-t-c] post bug in latest ajp (a.k.a. jk1) code

2002-01-19 Thread Kevin Seguin

 
  fyi:  i have found and fixed this bug.
 
 The code for jk and webapp needs to be tagged then. Please 
 let me know when
 it's done.
 

from my perspective, it's done.  don't know about costin, jf, et al, though.

-kevin.

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




DO NOT REPLY [Bug 5925] New: - Apache server hangs up and consumes 100% CPU resource when upload file to server

2002-01-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5925.
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=5925

Apache server hangs up and consumes 100% CPU resource when upload file to server

   Summary: Apache server hangs up and consumes 100% CPU resource
when upload file to server
   Product: Tomcat 3
   Version: 3.2.3 Final
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Critical
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]


1st test environment: Windows 2000 Server
2nd test environment: Windwos 200 Professional

Both are running Apache 1.3.20 + mod_jk + Tomcat 3.2.3 + JDK 1.3.1 and an 
application (written in Java) which serves upload file requests.

I used a browser (IE5) to upload file through the application, it's ok if I 
don't close the browser during uploading file. If I close the browser during 
uploading file, the Apache server hangs up and consume 100% CPU resource. Why???

What I could see is Apache process consume 100% CPU resource, not Tomcat. And I 
could stop tomcat process easily, but for apache, I issued a stop command , it 
took a long long time to stop the apache process.

According to my colleague, there is the same problem in the application when 
running in UNIX platform.

1) Is it a bug of Tomcat or mod_jk or Apache?
2) How to solve that problem?

Joseph.

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




Re: Alternate JMX implementation

2002-01-19 Thread Remy Maucherat

 Craig R. McClanahan wrote:
 
 [snip]
 
 (www.open-jmx.org).
 
 Note: OpenJMX 1.0b1 will not work with Tomcat, but a build
 
 from OpenJMX CVS
 
 will
 
 
 This is good to know since the BUILDING.txt states:
 * Download OpenJMX (version 1.0 beta 2 or later) from

Only 1.0 b1 is available at the moment, actually.
You also need a nightly build of the modeler.

Remy


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




cvs commit: jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin SetUpContextAction.java TomcatTreeBuilder.java

2002-01-19 Thread patrickl

patrickl02/01/19 16:51:54

  Modified:webapps/admin/WEB-INF/classes/org/apache/webapp/admin
SetUpContextAction.java TomcatTreeBuilder.java
  Log:
  Replace all references to the DefaultContext and StandardContext MBeans' name 
property with path. This change matches the renaming of the name property to 
path in the mbeans-descriptor.xml file.
  
  Revision  ChangesPath
  1.2   +5 -5  
jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/SetUpContextAction.java
  
  Index: SetUpContextAction.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/SetUpContextAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SetUpContextAction.java   18 Jan 2002 05:53:26 -  1.1
  +++ SetUpContextAction.java   20 Jan 2002 00:51:53 -  1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/SetUpContextAction.java,v
 1.1 2002/01/18 05:53:26 patrickl Exp $
  - * $Revision: 1.1 $
  - * $Date: 2002/01/18 05:53:26 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/SetUpContextAction.java,v
 1.2 2002/01/20 00:51:53 patrickl Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/01/20 00:51:53 $
*
* 
*
  @@ -99,7 +99,7 @@
* a context is chosen.
*
* @author Manveen Kaur
  - * @version $Revision: 1.1 $ $Date: 2002/01/18 05:53:26 $
  + * @version $Revision: 1.2 $ $Date: 2002/01/20 00:51:53 $
*/
   
   public class SetUpContextAction extends Action {
  @@ -112,7 +112,7 @@
   public final static String DEBUG_PROP_NAME = debug;
   public final static String DOC_BASE_PROP_NAME = docBase;
   public final static String OVERRIDE_PROP_NAME = override;
  -public final static String PATH_PROP_NAME = name;
  +public final static String PATH_PROP_NAME = path;
   public final static String RELOADABLE_PROP_NAME = reloadable;
   public final static String USENAMING_PROP_NAME = useNaming;
   public final static String WORKDIR_PROP_NAME = workDir;
  
  
  
  1.8   +5 -6  
jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java
  
  Index: TomcatTreeBuilder.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TomcatTreeBuilder.java18 Jan 2002 05:53:26 -  1.7
  +++ TomcatTreeBuilder.java20 Jan 2002 00:51:53 -  1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java,v
 1.7 2002/01/18 05:53:26 patrickl Exp $
  - * $Revision: 1.7 $
  - * $Date: 2002/01/18 05:53:26 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java,v
 1.8 2002/01/20 00:51:53 patrickl Exp $
  + * $Revision: 1.8 $
  + * $Date: 2002/01/20 00:51:53 $
*
* 
*
  @@ -91,7 +91,7 @@
*
* @author Jazmin Jonson
* @author Manveen Kaur
  - * @version $Revision: 1.7 $ $Date: 2002/01/18 05:53:26 $
  + * @version $Revision: 1.8 $ $Date: 2002/01/20 00:51:53 $
*/
   
   
  @@ -305,8 +305,7 @@
   ObjectInstance contextObj = (ObjectInstance)contextItr.next();
   
   String contextName =
  -(String)mBServer.getAttribute(contextObj.getObjectName(),
  -name);
  +(String)mBServer.getAttribute(contextObj.getObjectName(), path);
   
   encodedContextName =  
URLEncoder.encode(contextObj.getObjectName().toString());
   
  
  
  

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session StandardSession.java

2002-01-19 Thread craigmcc

craigmcc02/01/19 17:40:15

  Modified:catalina/src/share/org/apache/catalina/session Tag:
tomcat_40_branch StandardSession.java
  Log:
  Port from HEAD branch the removal of redundant session attribute
  unbinding in the writeObject() method.
  
  Submitted by:  David Lecomber [EMAIL PROTECTED]
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.25.2.1  +5 -14 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java
  
  Index: StandardSession.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java,v
  retrieving revision 1.25
  retrieving revision 1.25.2.1
  diff -u -r1.25 -r1.25.2.1
  --- StandardSession.java  31 Jul 2001 02:00:02 -  1.25
  +++ StandardSession.java  20 Jan 2002 01:40:15 -  1.25.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java,v
 1.25 2001/07/31 02:00:02 craigmcc Exp $
  - * $Revision: 1.25 $
  - * $Date: 2001/07/31 02:00:02 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java,v
 1.25.2.1 2002/01/20 01:40:15 craigmcc Exp $
  + * $Revision: 1.25.2.1 $
  + * $Date: 2002/01/20 01:40:15 $
*
* 
*
  @@ -115,7 +115,7 @@
* @author Craig R. McClanahan
* @author Sean Legassick
* @author a href=mailto:[EMAIL PROTECTED];Jon S. Stevens/a
  - * @version $Revision: 1.25 $ $Date: 2001/07/31 02:00:02 $
  + * @version $Revision: 1.25.2.1 $ $Date: 2002/01/20 01:40:15 $
*/
   
   class StandardSession
  @@ -1316,7 +1316,6 @@
   String keys[] = keys();
   ArrayList saveNames = new ArrayList();
   ArrayList saveValues = new ArrayList();
  -ArrayList unbinds = new ArrayList();
   for (int i = 0; i  keys.length; i++) {
   Object value = null;
   synchronized (attributes) {
  @@ -1327,8 +1326,7 @@
   else if (value instanceof Serializable) {
   saveNames.add(keys[i]);
   saveValues.add(value);
  -} else
  -unbinds.add(keys[i]);
  +}
   }
   
   // Serialize the attribute count and the Serializable attributes
  @@ -1348,14 +1346,7 @@
   if (debug = 2)
   log(  storing attribute ' + saveNames.get(i) +
   ' with value NOT_SERIALIZED);
  -unbinds.add(saveNames.get(i));
   }
  -}
  -
  -// Unbind the non-Serializable attributes
  -Iterator names = unbinds.iterator();
  -while (names.hasNext()) {
  -removeAttribute((String) names.next());
   }
   
   }
  
  
  

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users - New directory

2002-01-19 Thread craigmcc

craigmcc02/01/19 18:50:56

  jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users - New directory

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




cvs commit: jakarta-tomcat-4.0/tester/web/WEB-INF web.xml

2002-01-19 Thread craigmcc

craigmcc02/01/19 19:00:58

  Modified:catalina build.xml
   catalina/src/share/org/apache/catalina/core
NamingContextListener.java StandardServer.java
   catalina/src/share/org/apache/catalina/realm
LocalStrings.properties
   tester/web/WEB-INF web.xml
  Added:   catalina/src/share/org/apache/catalina Group.java User.java
UserDatabase.java
   catalina/src/share/org/apache/catalina/users
AbstractGroup.java AbstractUser.java Constants.java
LocalStrings.properties MemoryGroup.java
MemoryUser.java MemoryUserDatabase.java
MemoryUserDatabaseFactory.java
  Log:
  Initial check-ins to support a database of users and groups that can
  be edited through the administration application.  Groups are an
  enhancement over the existing capabilities, and allow users to inherit
  the roles of all groups that they are members of.
  
  * org.apache.catalina.{Group,User,UserDatabase} - Component definitions
for groups, users, and the user database itself.
  
  * org.apache.catalina.users.Abstract{Group,User} - Convenience
base classes for groups and users.
  
  * org.apache.catalina.users.Memory{Group,User} - Concrete implementations
used with a memory database fed by an enhanced version of the existing
conf/tomcat-users.xml file.
  
  * org.apache.catalina.users.MemoryUserDatabase - Concrete implementation
of o.a.c.UserDatabase that can load *and store* groups and users in the
conf/tomcat-users.xml file.  See below for revised syntax.
  
  * org.apache.catalina.users.MemoryUserDatabaseFactory - JNDI resource
factory so that an instance of MemoryUserDatabase can be configured
in the global JNDI resources, and then used by an appropriate Realm
implementation (see next check-in) as well as being editable.
  
  The revised syntax for the tomcat-users.xml file introduces a group
  element, and adds a groups attribute to the user element.  Groups
  must be defined first.  An example:
  
?xml version='1.0'?
tomcat-users
  group groupname='admins' description='System Administrators'
 roles='admin'/
  user username='tomcat' password='tomcat'
groups='admins' roles='tomcat,manager'/
  user username='role1' password='tomcat' roles='role1'/
  user username='both' password='tomcat'
groups='admins'  roles='tomcat,role1'/
/tomcat-users
  
  In this scenario, users 'tomcat' and 'both' inherit the 'admin' role by
  virtue of the fact that they belong to the admins group.
  
  For backwards compatibility, the file reader accepts either name or
  username on the user element, but it always writes username.
  
  Revision  ChangesPath
  1.97  +1 -1  jakarta-tomcat-4.0/catalina/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/build.xml,v
  retrieving revision 1.96
  retrieving revision 1.97
  diff -u -r1.96 -r1.97
  --- build.xml 17 Jan 2002 20:00:01 -  1.96
  +++ build.xml 20 Jan 2002 03:00:56 -  1.97
  @@ -880,7 +880,7 @@
   /jar
   
   !-- Naming - Factory JAR File --
  -jar jarfile=${catalina.deploy}/shared/lib/naming-factory.jar
  +jar jarfile=${catalina.deploy}/common/lib/naming-factory.jar
 fileset dir=${catalina.build}/server/classes
   include name=org/apache/naming/factory/** /
   exclude name=org/apache/naming/factory/Constants.class /
  
  
  
  1.1  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Group.java
  
  Index: Group.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Group.java,v 1.1 
2002/01/20 03:00:56 craigmcc Exp $
   * $Revision: 1.1 $
   * $Date: 2002/01/20 03:00:56 $
   *
   * 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *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 

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm UserDatabaseRealm.java

2002-01-19 Thread craigmcc

craigmcc02/01/19 19:16:35

  Modified:catalina/src/conf server.xml
  Added:   catalina/src/share/org/apache/catalina/realm
UserDatabaseRealm.java
  Log:
  Add a new realm that knows how to authenticate against a UserDatabase
  object that is configured in the global resources.  This provides
  equivalent behavior to the old MemoryRealm, but allows the database
  to be edited and saved at the same time.
  
  Modify server.xml as follows:
  
  * Define a resource for the MemoryUserDatabase implementation,
configuring the relative pathname of the XML file containing the data,
under name catalina/UserDatabase in the global JNDI resources.
  
  * Change the default Realm to an instance of UserDatabaseRealm
that uses this exact same UserDatabase instance (identified by
the resource name being catalina/UserDatabase and matching the
global JNDI resource name).
  
  * Add a commented-out example of how you would define a resource link
to make the user database available as a JNDI-accessible object to
a web application.  Note that an application can *not* do this itself
(in web.xml -- it must be deliberately enabled by editing server.xml).
  
  Doc updates to cover all this stuff are coming soon.
  
  Revision  ChangesPath
  1.50  +49 -0 jakarta-tomcat-4.0/catalina/src/conf/server.xml
  
  Index: server.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/conf/server.xml,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- server.xml17 Jan 2002 20:16:53 -  1.49
  +++ server.xml20 Jan 2002 03:16:35 -  1.50
  @@ -21,7 +21,27 @@
   
 !-- Global JNDI resources --
 GlobalNamingResources
  +
  +!-- Test entry for demonstration purposes --
   Environment name=simpleValue type=java.lang.Integer value=30/
  +
  +!-- Editable user database that can also be used by
  + UserDatabaseRealm to authenticate users --
  +Resource name=catalina/UserDatabase auth=Container
  +  type=org.apache.catalina.UserDatabase
  +   description=User database that can be updated and saved
  +/Resource
  +ResourceParams name=catalina/UserDatabase
  +  parameter
  +namefactory/name
  +valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  +  /parameter
  +  parameter
  +namepathname/name
  +valueconf/tomcat-users.xml/value
  +  /parameter
  +/ResourceParams
  +
 /GlobalNamingResources
   
 !-- A Service is a collection of one or more Connectors that share
  @@ -139,7 +159,18 @@
   
 !-- Because this Realm is here, an instance will be shared globally --
   
  +  !-- This Realm uses the UserDatabase configured in the global JNDI
  +   resources under the key catalina/UserDatabase.  Any edits
  +   that are performed against this UserDatabase are immediately
  +   available for use by the Realm.  --
  +  Realm className=org.apache.catalina.realm.UserDatabaseRealm
  + debug=0 resourceName=catalina/UserDatabase/
  +
  +  !-- Comment out the old realm but leave here for now in case we
  +   need to go back quickly --
  +!--
 Realm className=org.apache.catalina.realm.MemoryRealm /
  +--
   
 !-- Replace the above Realm with one of the following to get a Realm
  stored in a database and accessed via JDBC --
  @@ -224,6 +255,24 @@
 Ejb   name=ejb/EmplRecord type=Entity
home=com.wombat.empl.EmployeeRecordHome
  remote=com.wombat.empl.EmployeeRecord/
  +
  +  !-- If you wanted the examples app to be able to edit the
  +   user database, you would uncomment the following entry.
  +   Of course, you would want to enable security on the
  +   application as well, so this is not done by default!
  +   The database object could be accessed like this:
  +
  +   Context initCtx = new InitialContext();
  +   Context envCtx = (Context) initCtx.lookup(java:comp/env);
  +   UserDatabase database =
  +(UserDatabase) envCtx.lookup(userDatabase);
  +  --
  +!--
  +  ResourceLink name=userDatabase global=catalina/UserDatabase
  +type=org.apache.catalina.UserDatabase/
  +--
  +
  +
 !-- PersistentManager: Uncomment the section below to test Persistent 
   Sessions.

  
  
  
  1.1  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/UserDatabaseRealm.java
  
  Index: UserDatabaseRealm.java
  ===
  /*
   * $Header: