cvs commit: jakarta-commons/daemon/src/native/nt/procrun/samples cchild.vcproj cchild.c

2004-04-08 Thread mturk
mturk   2004/04/08 00:43:01

  Added:   daemon/src/native/nt/procrun/samples cchild.vcproj cchild.c
  Log:
  Child sample application.
  Simple console application used for teststing stdio redirection and
  signaling mechanism between parent and child.
  
  Revision  ChangesPath
  1.1  
jakarta-commons/daemon/src/native/nt/procrun/samples/cchild.vcproj
  
  Index: cchild.vcproj
  ===
  ?xml version=1.0 encoding=Windows-1252?

  VisualStudioProject

ProjectType=Visual C++

Version=7.10

Name=cchild

ProjectGUID={E9ABF9C5-CCF7-4372-B42A-07584D2441D8}

Keyword=Win32Proj

Platforms

Platform

Name=Win32/

/Platforms

Configurations

Configuration

Name=Release|Win32

OutputDirectory=..\obj\Release

IntermediateDirectory=..\obj\Release

ConfigurationType=1

CharacterSet=2

Tool

Name=VCCLCompilerTool

PreprocessorDefinitions=WIN32;NDEBUG;_CONSOLE

RuntimeLibrary=2

UsePrecompiledHeader=0

WarningLevel=3

Detect64BitPortabilityProblems=TRUE

DebugInformationFormat=3/

Tool

Name=VCCustomBuildTool/

Tool

Name=VCLinkerTool

OutputFile=../bin/cchild.exe

LinkIncremental=1

GenerateDebugInformation=TRUE

SubSystem=1

OptimizeReferences=2

EnableCOMDATFolding=2

EntryPointSymbol=

TargetMachine=1/

Tool

Name=VCMIDLTool/

Tool

Name=VCPostBuildEventTool/

Tool

Name=VCPreBuildEventTool/

Tool

Name=VCPreLinkEventTool/

Tool

Name=VCResourceCompilerTool/

Tool

Name=VCWebServiceProxyGeneratorTool/

Tool

Name=VCXMLDataGeneratorTool/

Tool

Name=VCWebDeploymentTool/

Tool

Name=VCManagedWrapperGeneratorTool/

Tool

Name=VCAuxiliaryManagedWrapperGeneratorTool/

/Configuration

Configuration

Name=Debug|Win32

OutputDirectory=..\obj\Debug

IntermediateDirectory=..\obj\Debug

ConfigurationType=1

CharacterSet=2

Tool

Name=VCCLCompilerTool

Optimization=0

PreprocessorDefinitions=WIN32;_DEBUG;_CONSOLE

MinimalRebuild=TRUE

BasicRuntimeChecks=3

RuntimeLibrary=3

UsePrecompiledHeader=0

WarningLevel=3

Detect64BitPortabilityProblems=TRUE

DebugInformationFormat=4/

Tool

Name=VCCustomBuildTool/

Tool

Name=VCLinkerTool

OutputFile=../bin/cchildd.exe

LinkIncremental=2

GenerateDebugInformation=TRUE

ProgramDatabaseFile=$(OutDir)/cchild.pdb

SubSystem=1

TargetMachine=1/

Tool

Name=VCMIDLTool/

Tool

Name=VCPostBuildEventTool/

Tool

Name=VCPreBuildEventTool/

Tool

Name=VCPreLinkEventTool/

Tool

Name=VCResourceCompilerTool/

Tool


RE: [all] Shared build causes issues in releases

2004-04-08 Thread Shapira, Yoav

Hi,

 Steitz:
 just that each project then looses its atomic status and is
dependent
 on commons-build, I think we need to try to get back to only the site
 generation being dependent on commons-build, I really starting to
 believe everything else should be standalone.

I agree with the basic sentiment above; but one thing that has not been
mentioned in this thread is that site generation also needs to be
possible
from the source distro, since several components include xdocs user
guides
or other important info that users should be able to build.

Yup, +1 to both of those.

 Diggory:
 Now, I'm starting to see headaches in all this. Its looking alot like
a
 premature optimization to me. I'm becomeing more tempted to suggest we

 loose the extend of commons-build/project.xml in each project. We
simply
 maintain consistent project.xml's across all the projects.

Ditto +1 on that.

What's the big deal with using src/java or src/share?  Commons projects
are separate projects, and each project's developers can do what suits
them.  If we want to enforce a common look and feel, that's one thing
(that I don't think is that important, but no biggie as long as it
doesn't get in the way of more important things, like users downloading
and building easily without extra dependencies).  But to add this
dependency on commons-build and raise the bar of required Maven
expertise for release managers at least, and probably component
developers as well, is not cool.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: [digester] @author and @version

2004-04-08 Thread David Graham

--- Henri Yandell [EMAIL PROTECTED] wrote:
 
 I've never seen much point in @version. I'd much rather see really good
 use of @since.

+1

David

 
 Hen
 
 On Wed, 7 Apr 2004, Gary Gregory wrote:
 
   Two common forms are
  
   @version $Id: $
   @version $Revision: $ $Date: $
  
   Stephen
 
  Personally and in our product we use @version $Id: $.
 
  Gary
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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



Re: [all] Shared build causes issues in releases

2004-04-08 Thread Mark R. Diggory
Shapira, Yoav wrote:

Diggory:
Now, I'm starting to see headaches in all this. Its looking alot like
 a

premature optimization to me. I'm becomeing more tempted to suggest we



  

loose the extend of commons-build/project.xml in each project. We


simply 
  

maintain consistent project.xml's across all the projects.



Ditto +1 on that.

What's the big deal with using src/java or src/share?  Commons projects
are separate projects, and each project's developers can do what suits
them.  

There really is none. This isn't an issue, it just seemed to be an 
example that was brought up about differences between projects.

If we want to enforce a common look and feel, that's one thing
(that I don't think is that important, but no biggie as long as it
doesn't get in the way of more important things, like users downloading
and building easily without extra dependencies).  

I agree

But to add this
dependency on commons-build and raise the bar of required Maven
expertise for release managers at least, and probably component
developers as well, is not cool.  

Yoav Shapira

Its important to understand that we are attempting to use Maven for two 
goals:

1.) Common Site LF

2.) Common Distribution Packaging Strategy.

Now, using Maven or Ant to do your packaging is up to you. If you use 
Maven to package, the bar doesn't need to be raised, there is alot we 
can do to establish a simple an common strategy for building the distro's.

-Mark



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



cvs commit: jakarta-commons/cli/src/test/org/apache/commons/cli CLI2ConverterTest.java

2004-04-08 Thread roxspring
roxspring2004/04/08 08:56:14

  Modified:cli/src/java/org/apache/commons/cli Tag:
RESEARCH_CLI_2_ROXSPRING CLI2Converter.java
   cli/src/test/org/apache/commons/cli Tag:
RESEARCH_CLI_2_ROXSPRING CLI2ConverterTest.java
  Log:
  Grand package renaming:

  .builders - .builder

  .impl - option

  .resources - .resource

  .apps - .application

  .bugs - .bug
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.1.2.3   +4 -4  
jakarta-commons/cli/src/java/org/apache/commons/cli/Attic/CLI2Converter.java
  
  Index: CLI2Converter.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli/Attic/CLI2Converter.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- CLI2Converter.java30 Mar 2004 01:46:11 -  1.1.2.2
  +++ CLI2Converter.java8 Apr 2004 15:56:14 -   1.1.2.3
  @@ -23,10 +23,10 @@
   
   import org.apache.commons.cli2.Group;
   import org.apache.commons.cli2.Option;
  -import org.apache.commons.cli2.builders.ArgumentBuilder;
  -import org.apache.commons.cli2.builders.DefaultOptionBuilder;
  -import org.apache.commons.cli2.builders.GroupBuilder;
  -import org.apache.commons.cli2.impl.GroupImpl;
  +import org.apache.commons.cli2.builder.ArgumentBuilder;
  +import org.apache.commons.cli2.builder.DefaultOptionBuilder;
  +import org.apache.commons.cli2.builder.GroupBuilder;
  +import org.apache.commons.cli2.option.GroupImpl;
   import org.apache.commons.cli2.validation.InvalidArgumentException;
   import org.apache.commons.cli2.validation.Validator;
   
  
  
  
  No   revision
  No   revision
  1.1.2.3   +2 -2  
jakarta-commons/cli/src/test/org/apache/commons/cli/Attic/CLI2ConverterTest.java
  
  Index: CLI2ConverterTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli/Attic/CLI2ConverterTest.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- CLI2ConverterTest.java30 Mar 2004 01:46:11 -  1.1.2.2
  +++ CLI2ConverterTest.java8 Apr 2004 15:56:14 -   1.1.2.3
  @@ -16,8 +16,8 @@
   package org.apache.commons.cli;
   
   import org.apache.commons.cli2.Group;
  -import org.apache.commons.cli2.builders.PatternBuilder;
  -import org.apache.commons.cli2.impl.GroupImpl;
  +import org.apache.commons.cli2.builder.PatternBuilder;
  +import org.apache.commons.cli2.option.GroupImpl;
   
   import junit.framework.TestCase;
   
  
  
  

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



RE: [configuration] Subsets and JNDIConfiguration

2004-04-08 Thread Noel J. Bergman
 IMHO Spice JNDIKit could be a better foundation for PropertyContext etc.

What about all of the other JNDI work we have here?  What is missing that
Spice provides?

--- Noel


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



cvs commit: jakarta-commons/daemon/src/native/nt/procrun/apps/prunmgr prunmgr.rc

2004-04-08 Thread mturk
mturk   2004/04/08 09:50:30

  Modified:daemon/src/native/nt/procrun/apps/prunmgr prunmgr.rc
  Log:
  Change the stack size from bytes to Kilobytes.
  
  Revision  ChangesPath
  1.2   +1 -1  
jakarta-commons/daemon/src/native/nt/procrun/apps/prunmgr/prunmgr.rc
  
  Index: prunmgr.rc
  ===
  RCS file: 
/home/cvs/jakarta-commons/daemon/src/native/nt/procrun/apps/prunmgr/prunmgr.rc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- prunmgr.rc7 Apr 2004 11:22:44 -   1.1
  +++ prunmgr.rc8 Apr 2004 16:50:30 -   1.2
  @@ -167,7 +167,7 @@
   LTEXT   MB,IDC_STATIC,195,156,25,8
   LTEXT   Thread stack size:,IDC_STATIC,10,172,80,8
   EDITTEXTIDC_PPJSS,90,171,100,12,ES_AUTOHSCROLL | ES_NUMBER
  -LTEXT   Bytes,IDC_STATIC,195,172,25,8
  +LTEXT   KB,IDC_STATIC,195,172,25,8
   END
   
   IDD_PROPPAGE_START DIALOGEX 0, 0, 260, 186
  
  
  

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



cvs commit: jakarta-commons/daemon/src/native/nt/procrun/src javajni.c

2004-04-08 Thread mturk
mturk   2004/04/08 09:50:50

  Modified:daemon/src/native/nt/procrun/src javajni.c
  Log:
  Change the stack size from bytes to Kilobytes.
  
  Revision  ChangesPath
  1.2   +1 -1  jakarta-commons/daemon/src/native/nt/procrun/src/javajni.c
  
  Index: javajni.c
  ===
  RCS file: /home/cvs/jakarta-commons/daemon/src/native/nt/procrun/src/javajni.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- javajni.c 7 Apr 2004 11:24:47 -   1.1
  +++ javajni.c 8 Apr 2004 16:50:50 -   1.2
  @@ -397,7 +397,7 @@
   --sOptions;
   }
   if (dwSs) {
  -wsprintfA(iB[2], -Xss%d, dwSs);
  +wsprintfA(iB[2], -Xss%dk, dwSs);
   lpJvmOptions[nOptions - sOptions].optionString = iB[2];
   --sOptions;
   }
  
  
  

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



DO NOT REPLY [Bug 28291] New: - ContextClassLoader may load Log impl from wrong context in JDK 1.4

2004-04-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=28291.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

ContextClassLoader may load Log impl from wrong context in JDK 1.4

   Summary: ContextClassLoader may load Log impl from wrong context
in JDK 1.4
   Product: Commons
   Version: 1.0.3
  Platform: All
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Logging
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The static method org.apache.commons.logging.LogFactory#getContextClassLoader 
will return the ClassLoader for the currently executing thread 
Thread.currentThread().  If this ClassLoader is different from the ClassLoader 
which loaded org.apache.commons.logging.Log, the implementing class cannot be 
cast to Log.

This results in Log.class.isAssignableFrom(logClass) returning false even 
though logClass implements Log.  In turn, this causes 
org.apache.commons.logging.impl.LogFactoryImpl#getLogConstructor() to 
incorrectly throw the exception Class  + logClass +  does not implement Log

The solution is to use the same ClassLoader that was used to load 
org.apache.commons.logging.Log.

On line 463 of LogFactoryImpl.java, replace the line:
ClassLoader threadCL = getContextClassLoader();

with:
ClassLoader threadCL = Log.class.getClassLoader();

The only was I am aware of to reproduce this bug is to write a Jakarta Cactus 
Test Suite and run the test using junit.swingui.TestRunner.main or 
junit.awtui.TestRunner.main.  Because the Thread has a different 
ContextClassLoader, commons-logging will fail to instantiate the Log 
implementation.

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



[Math] - RealMatrix

2004-04-08 Thread Inger, Matthew
Has any thought been given to creating a Matrix interface
which can handle BigInteger and/or BigDecimal?

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



cvs commit: jakarta-commons/math/src/java/org/apache/commons/math/linear RealMatrixImpl.java MatrixIndexException.java InvalidMatrixException.java

2004-04-08 Thread brentworden
brentworden2004/04/08 13:46:01

  Modified:math/src/java/org/apache/commons/math/distribution
BinomialDistributionImpl.java
ExponentialDistributionImpl.java
FDistributionImpl.java
AbstractContinuousDistribution.java
ChiSquaredDistributionImpl.java
DiscreteDistribution.java
AbstractDiscreteDistribution.java
ContinuousDistribution.java
NormalDistributionImpl.java
HypergeometricDistributionImpl.java
TDistributionImpl.java GammaDistributionImpl.java
   math/src/java/org/apache/commons/math
ConvergenceException.java
   math/src/java/org/apache/commons/math/stat
TestStatistic.java TestStatisticImpl.java
   math/src/java/org/apache/commons/math/complex
ComplexFormat.java
   math/src/java/org/apache/commons/math/util MathUtils.java
   math/src/java/org/apache/commons/math/linear
RealMatrixImpl.java MatrixIndexException.java
InvalidMatrixException.java
  Log:
  Added serveral javadoc comments.  Added constructors to the matrix exception classes 
to mimic the existing math exceptions.
  
  Revision  ChangesPath
  1.12  +3 -1  
jakarta-commons/math/src/java/org/apache/commons/math/distribution/BinomialDistributionImpl.java
  
  Index: BinomialDistributionImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/distribution/BinomialDistributionImpl.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- BinomialDistributionImpl.java 21 Feb 2004 21:35:14 -  1.11
  +++ BinomialDistributionImpl.java 8 Apr 2004 20:45:59 -   1.12
  @@ -114,6 +114,8 @@
* For this disbution, X, this method returns P(X le; x).
* @param x the value at which the PDF is evaluated.
* @return PDF for this distribution. 
  + * @exception MathException if the cumulative probability can not be
  + *computed due to convergence or other numerical errors.
*/
   public double cumulativeProbability(int x) throws MathException {
   double ret;
  
  
  
  1.14  +7 -1  
jakarta-commons/math/src/java/org/apache/commons/math/distribution/ExponentialDistributionImpl.java
  
  Index: ExponentialDistributionImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/distribution/ExponentialDistributionImpl.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ExponentialDistributionImpl.java  21 Feb 2004 21:35:14 -  1.13
  +++ ExponentialDistributionImpl.java  8 Apr 2004 20:45:59 -   1.14
  @@ -70,6 +70,8 @@
* 
* @param x the value at which the CDF is evaluated.
* @return CDF for this distribution.
  + * @exception MathException if the cumulative probability can not be
  + *computed due to convergence or other numerical errors.
*/
   public double cumulativeProbability(double x) throws MathException{
   double ret;
  @@ -87,6 +89,8 @@
*
* @param p the desired probability
* @return x, such that P(X lt; x) = codep/code
  + * @exception MathException if the inverse cumulative probability can not be
  + *computed due to convergence or other numerical errors.
*/
   public double inverseCumulativeProbability(double p) throws MathException{
   double ret;
  @@ -107,6 +111,8 @@
* @param x0 the lower bound
* @param x1 the upper bound
* @return the cumulative probability. 
  + * @exception MathException if the cumulative probability can not be
  + *computed due to convergence or other numerical errors.
*/
   public double cumulativeProbability(double x0, double x1) throws MathException{
   return cumulativeProbability(x1) - cumulativeProbability(x0);
  
  
  
  1.15  +3 -1  
jakarta-commons/math/src/java/org/apache/commons/math/distribution/FDistributionImpl.java
  
  Index: FDistributionImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/distribution/FDistributionImpl.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- FDistributionImpl.java21 Feb 2004 21:35:14 -  1.14
  +++ FDistributionImpl.java8 Apr 2004 20:45:59 -   1.15
  @@ -60,6 +60,8 @@
* 
* @param x the 

cvs commit: jakarta-commons/math/src/test/org/apache/commons/math/analysis NewtonSolverTest.java SinFunction.java QuinticFunction.java

2004-04-08 Thread brentworden
brentworden2004/04/08 14:19:17

  Modified:math/src/java/org/apache/commons/math/analysis
UnivariateRealSolverFactoryImpl.java
BisectionSolver.java
UnivariateRealSolverFactory.java
UnivariateRealSolverUtils.java
   math/src/test/org/apache/commons/math/analysis
SinFunction.java QuinticFunction.java
  Added:   math/src/java/org/apache/commons/math/analysis
NewtonSolver.java
   math/src/test/org/apache/commons/math/analysis
NewtonSolverTest.java
  Log:
  Newton's method using the new differentiable interface.

  
  Revision  ChangesPath
  1.11  +14 -3 
jakarta-commons/math/src/java/org/apache/commons/math/analysis/UnivariateRealSolverFactoryImpl.java
  
  Index: UnivariateRealSolverFactoryImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/analysis/UnivariateRealSolverFactoryImpl.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- UnivariateRealSolverFactoryImpl.java  22 Feb 2004 22:01:29 -  1.10
  +++ UnivariateRealSolverFactoryImpl.java  8 Apr 2004 21:19:17 -   1.11
  @@ -17,7 +17,6 @@
   
   import java.io.Serializable;
   
  -
   /**
* A concrete [EMAIL PROTECTED]  UnivariateRealSolverFactory}.  This is the default 
solver factory
* used by commons-math.
  @@ -67,7 +66,19 @@
   public UnivariateRealSolver newBrentSolver(UnivariateRealFunction f) {
   return new BrentSolver(f);
   }
  -
  +
  +/**
  + * Create a new [EMAIL PROTECTED] UnivariateRealSolver} for the given function. 
 The
  + * solver is an implementation of Newton's Method.
  + * @param f the function.
  + * @return the new solver.
  + */
  +public UnivariateRealSolver newNewtonSolver(
  +DifferentiableUnivariateRealFunction f) {
  +
  +return new NewtonSolver(f);
  +}
  +
   /**
* Create a new [EMAIL PROTECTED] UnivariateRealSolver} for the given function. 
 The
* solver is an implementation of the secant method.
  
  
  
  1.13  +3 -13 
jakarta-commons/math/src/java/org/apache/commons/math/analysis/BisectionSolver.java
  
  Index: BisectionSolver.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/analysis/BisectionSolver.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- BisectionSolver.java  20 Feb 2004 06:22:39 -  1.12
  +++ BisectionSolver.java  8 Apr 2004 21:19:17 -   1.13
  @@ -68,7 +68,7 @@
   
   int i = 0;
   while (i  maximalIterationCount) {
  -m = midpoint(min, max);
  +m = UnivariateRealSolverUtils.midpoint(min, max);
   fmin = f.value(min);
   fm = f.value(m);
   
  @@ -82,7 +82,7 @@
   }
   
   if (Math.abs(max - min) = absoluteAccuracy) {
  -m = midpoint(min, max);
  +m = UnivariateRealSolverUtils.midpoint(min, max);
   setResult(m, i);
   return m;
   }
  @@ -90,15 +90,5 @@
   }
   
   throw new MathException(Maximum number of iterations exceeded);
  -}
  -
  -/**
  - * Compute the midpoint of two values.
  - * @param a first value.
  - * @param b second value.
  - * @return the midpoint. 
  - */
  -public static double midpoint(double a, double b) {
  -return (a + b) * .5;
   }
   }
  
  
  
  1.14  +10 -1 
jakarta-commons/math/src/java/org/apache/commons/math/analysis/UnivariateRealSolverFactory.java
  
  Index: UnivariateRealSolverFactory.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/analysis/UnivariateRealSolverFactory.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- UnivariateRealSolverFactory.java  22 Feb 2004 22:01:29 -  1.13
  +++ UnivariateRealSolverFactory.java  8 Apr 2004 21:19:17 -   1.14
  @@ -96,6 +96,15 @@
   
   /**
* Create a new [EMAIL PROTECTED] UnivariateRealSolver} for the given function. 
 The
  + * solver is an implementation of Newton's Method.
  + * @param f the function.
  + * @return the new solver.
  + */
  +public abstract UnivariateRealSolver newNewtonSolver(
  +DifferentiableUnivariateRealFunction f);
  +
  +/**
  + * Create a new [EMAIL PROTECTED] UnivariateRealSolver} for the given function. 
 The
* solver is an implementation of the secant method.
* @param f the 

cvs commit: jakarta-commons-sandbox/mapper/xdocs/images mapper-logo-white.xcf mapper-logo-white.png

2004-04-08 Thread dgraham
dgraham 2004/04/08 15:08:33

  Removed: mapper/xdocs/images mapper-logo-white.xcf
mapper-logo-white.png
  Log:
  Use logo.png instead of other images.  Using logo.png as the name 

  also allows us to use the logo definition from 

  sandbox-build/project.xml.

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



cvs commit: jakarta-commons-sandbox/resources/xdocs/images resources-logo-white.png resources-logo-white.xcf

2004-04-08 Thread dgraham
dgraham 2004/04/08 15:15:01

  Removed: resources/xdocs/images resources-logo-white.png
resources-logo-white.xcf
  Log:
  Use logo.png instead of other images.  Using logo.png as the name 

  also allows us to use the logo definition from 

  sandbox-build/project.xml.

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



cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestHttpConnectionManager.java

2004-04-08 Thread olegk
olegk   2004/04/08 15:25:11

  Modified:httpclient/src/test/org/apache/commons/httpclient
TestHttpConnectionManager.java
  Log:
  Removes references to deprecated methods
  
  Contributed by Oleg Kalnichevski
  
  Revision  ChangesPath
  1.20  +12 -8 
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestHttpConnectionManager.java
  
  Index: TestHttpConnectionManager.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestHttpConnectionManager.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- TestHttpConnectionManager.java28 Mar 2004 21:26:50 -  1.19
  +++ TestHttpConnectionManager.java8 Apr 2004 22:25:11 -   1.20
  @@ -372,8 +372,10 @@
   public void testShutdownAll() {
   
   MultiThreadedHttpConnectionManager connectionManager = new 
MultiThreadedHttpConnectionManager();
  -connectionManager.setMaxConnectionsPerHost(1);
  -connectionManager.setMaxTotalConnections(1);
  +connectionManager.getParams().setIntParameter(
  +HttpConnectionManagerParams.MAX_HOST_CONNECTIONS, 1);
  +connectionManager.getParams().setIntParameter(
  +HttpConnectionManagerParams.MAX_TOTAL_CONNECTIONS, 1);
   
   HostConfiguration host1 = new HostConfiguration();
   host1.setHost(host1, -1, http);
  @@ -416,8 +418,10 @@
   public void testShutdown() {
   
   MultiThreadedHttpConnectionManager connectionManager = new 
MultiThreadedHttpConnectionManager();
  -connectionManager.setMaxConnectionsPerHost(1);
  -connectionManager.setMaxTotalConnections(1);
  +connectionManager.getParams().setIntParameter(
  +HttpConnectionManagerParams.MAX_HOST_CONNECTIONS, 1);
  +connectionManager.getParams().setIntParameter(
  +HttpConnectionManagerParams.MAX_TOTAL_CONNECTIONS, 1);
   
   HostConfiguration host1 = new HostConfiguration();
   host1.setHost(host1, -1, http);
  
  
  

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



[Validator] call for testers.

2004-04-08 Thread Robert Leland
I would like to entice developers to give the Struts Nightly and/or the
commons-validator a try. I am announcing this only on the 'dev' list in the belief 
that since you subscribed to the 'dev' list you are generally more advanced. Also 
since I will be in a crunch for the next few days I can't promise, that I'll be able 
to help out is you hit a snag, so having a adventurous spirit helps.

if you haven't been scared away yet theh congradulations !

If you find the following validator features useful, then help us find
any bugs that may be lurking so that the next release of Struts will
hopefully make the beta or better rating.

The 2 Validator features which would be of the most interest are
  1) Ability to use multiple forms on the same page.
  2) Validation inheritance.
#2 is particularly useful if you have internationalized applications and you don't 
want to duplicate validations. The commons-validator CVS repository has unit tests 
demonstrating its use. Make sure to use the new DTD to use these  new features.

By the way --both-- features were user contributions, and greatly enhanced
the validators usefulness.

Note Struts 1.1 cannot be used with the nightly version of Struts.

The Night build of struts is built with the current Validator.
http://cvs.apache.org/builds/jakarta-struts/nightly/

If you use Validator stand alone:
http://cvs.apache.org/builds/jakarta-commons/nightly/commons-validator/

I would love to know how many people use Validator standalone.

-Rob



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



cvs commit: jakarta-commons/validator/src/share/org/apache/commons/validator GenericValidator.java

2004-04-08 Thread dgraham
dgraham 2004/04/08 15:51:17

  Modified:validator/src/share/org/apache/commons/validator
GenericValidator.java
  Log:
  Removed items deprecated in 1.1.x series.
  
  Revision  ChangesPath
  1.30  +3 -36 
jakarta-commons/validator/src/share/org/apache/commons/validator/GenericValidator.java
  
  Index: GenericValidator.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/GenericValidator.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- GenericValidator.java 21 Feb 2004 17:10:29 -  1.29
  +++ GenericValidator.java 8 Apr 2004 22:51:17 -   1.30
  @@ -32,12 +32,6 @@
   public class GenericValidator implements Serializable {
   
   /**
  - * Delimiter to put around a regular expression following Perl 5 syntax.
  - * @deprecated Use ValidatorUtils.REGEXP_DELIMITER instead.
  - */
  -public final static String REGEXP_DELIM = ValidatorUtil.REGEXP_DELIMITER;
  -
  -/**
* UrlValidator used in wrapper method.
*/
   private static final UrlValidator urlValidator = new UrlValidator();
  @@ -236,26 +230,6 @@
   }
   
   /**
  - * Checks for a valid credit card number.
  - *
  - * @param cardNumber Credit Card Number.
  - * @deprecated This functionality has moved to CreditCardValidator.
  - */
  -protected static boolean validateCreditCardLuhnCheck(String cardNumber) {
  -return (new CreditCardValidator()).luhnCheck(cardNumber);
  -}
  -
  -/**
  - * Checks for a valid credit card number.
  - *
  - * @param cardNumber Credit Card Number.
  - * @deprecated This functionality has move to CreditCardValidator.
  - */
  -protected boolean validateCreditCardPrefixCheck(String cardNumber) {
  -return (new CreditCardValidator()).isValidPrefix(cardNumber);
  -}
  -
  -/**
* pChecks if a field has a valid e-mail address./p
*
* @param value The value validation is being performed on.
  @@ -295,11 +269,4 @@
   return (value.length() = min);
   }
   
  -/**
  - * Adds a '/' on either side of the regular expression.
  - * @deprecated use ValidatorUtils.getDelimitedRegExp() instead.
  - */
  -protected static String getDelimittedRegexp(String regexp) {
  -return ValidatorUtil.getDelimitedRegExp(regexp);
  -}
   }
  
  
  

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



cvs commit: jakarta-commons/validator/src/share/org/apache/commons/validator ValidatorUtil.java

2004-04-08 Thread dgraham
dgraham 2004/04/08 15:52:02

  Removed: validator/src/share/org/apache/commons/validator
ValidatorUtil.java
  Log:
  Removed deprecated ValidatorUtil class.

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



cvs commit: jakarta-commons/validator/src/share/org/apache/commons/validator Arg.java ValidatorResources.java ValidatorResults.java ValidatorResult.java Validator.java

2004-04-08 Thread dgraham
dgraham 2004/04/08 16:05:39

  Modified:validator/src/share/org/apache/commons/validator Arg.java
ValidatorResources.java ValidatorResults.java
ValidatorResult.java Validator.java
  Log:
  Removed items deprecated in 1.1.x series.
  
  Revision  ChangesPath
  1.18  +3 -12 
jakarta-commons/validator/src/share/org/apache/commons/validator/Arg.java
  
  Index: Arg.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Arg.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Arg.java  21 Feb 2004 17:10:29 -  1.17
  +++ Arg.java  8 Apr 2004 23:05:39 -   1.18
  @@ -117,15 +117,6 @@
   }
   
   /**
  - * Gets whether or not the key is a resource.
  - * @return Returns true if key is a resource.
  - * @deprecated Use isResource() instead.
  - */
  -public boolean getResource() {
  -return this.isResource();
  -}
  -
  -/**
* Tests whether or not the key is a resource key or literal value.
* @return codetrue/code if key is a resource key.
*/
  
  
  
  1.32  +8 -96 
jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorResources.java
  
  Index: ValidatorResources.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorResources.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- ValidatorResources.java   4 Apr 2004 13:53:25 -   1.31
  +++ ValidatorResources.java   8 Apr 2004 23:05:39 -   1.32
  @@ -71,9 +71,8 @@
   
   /**
* Logger.
  - * @deprecated Subclasses should use their own logging instance.
  -  */
  -protected static Log log = LogFactory.getLog(ValidatorResources.class);
  + */
  +private static final Log log = LogFactory.getLog(ValidatorResources.class);
   
   /**
* codeFastHashMap/code of codeFormSet/codes stored under
  @@ -161,16 +160,6 @@
* Add a codeFormSet/code to this codeValidatorResources/code
* object.  It will be associated with the codeLocale/code of the
* codeFormSet/code.
  - * @deprecated Use addFormSet() instead.
  - */
  -public void put(FormSet fs) {
  -this.addFormSet(fs);
  -}
  -
  -/**
  - * Add a codeFormSet/code to this codeValidatorResources/code
  - * object.  It will be associated with the codeLocale/code of the
  - * codeFormSet/code.
* @since Validator 1.1
*/
   public void addFormSet(FormSet fs) {
  @@ -192,32 +181,6 @@
   
   /**
* Add a global constant to the resource.
  - * @deprecated Use addConstant(String, String) instead.
  - */
  -public void addConstant(Constant c) {
  -this.addConstantParam(c.getName(), c.getValue());
  -}
  -
  -/**
  - * Add a global constant to the resource.
  - * @deprecated Use addConstant(String, String) instead.
  - */
  -public void addConstantParam(String name, String value) {
  -if (name != null
  - name.length()  0
  - value != null
  - value.length()  0) {
  -
  -if (log.isDebugEnabled()) {
  -log.debug(Adding Global Constant:  + name + , + value);
  -}
  -
  -this.hConstants.put(name, value);
  -}
  -}
  -
  -/**
  - * Add a global constant to the resource.
*/
   public void addConstant(String name, String value) {
   if (log.isDebugEnabled()) {
  @@ -283,23 +246,6 @@
   }
   
   /**
  - * pGets a codeForm/code based on the name of the form and the 
codeLocale/code that
  - * most closely matches the codeLocale/code passed in.  The order of 
codeLocale/code
  - * matching is:/p
  - * ol
  - *lilanguage + country + variant/li
  - *lilanguage + country/li
  - *lilanguage/li
  - *lidefault locale/li
  - * /ol
  - * @deprecated Use getForm() instead.
  - */
  -public Form get(Locale locale, Object formKey) {
  -String key = (formKey == null) ? null : formKey.toString();
  -return this.getForm(locale, key);
  -}
  -
  -/**
* pGets a codeForm/code based on the name of the form and the
* codeLocale/code that most closely matches the codeLocale/code
* passed in.  The order of codeLocale/code matching is:/p
  @@ -329,28 +275,6 @@
*lilanguage/li
*lidefault locale/li
* /ol
  - * @deprecated Use getForm() instead.
  - */
  -public Form get(
  -String language,
  -String country,
  -String variant,
  -Object formKey) {
  -
  

cvs commit: jakarta-commons-sandbox/chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader ClientContext.java MailReaderBase.java

2004-04-08 Thread husted
husted  2004/04/08 16:19:06

  Removed: chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader
ClientContext.java MailReaderBase.java
  Log:
  Remove development cruft

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



cvs commit: jakarta-commons/validator/src/test/org/apache/commons/validator validator-extension.xml validator-multipletest.xml

2004-04-08 Thread dgraham
dgraham 2004/04/08 16:19:31

  Modified:validator/src/test/org/apache/commons/validator
validator-extension.xml validator-multipletest.xml
  Log:
  Replaced arg0 with arg.
  
  Revision  ChangesPath
  1.2   +3 -3  
jakarta-commons/validator/src/test/org/apache/commons/validator/validator-extension.xml
  
  Index: validator-extension.xml
  ===
  RCS file: 
/home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/validator-extension.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- validator-extension.xml   4 Apr 2004 13:53:25 -   1.1
  +++ validator-extension.xml   8 Apr 2004 23:19:31 -   1.2
  @@ -15,7 +15,7 @@
 form name=nameForm extends=baseForm
field property=lastName
  depends=required
  - arg0 key=nameForm.lastname.displayname/
  + arg key=nameForm.lastname.displayname/
/field
 /form
   
  @@ -25,13 +25,13 @@
   field property=lastName depends=/
   !--override rule with different message--
   field property=firstName depends=required
  -arg0 key=nameForm.lastname.displayname/
  +arg key=nameForm.lastname.displayname/
   /field
   /form
   
   form name=baseForm
   field property=firstName depends=required
  -arg0 key=nameForm.firstname.displayname/
  +arg key=nameForm.firstname.displayname/
   /field
   /form
   
  
  
  
  1.6   +1 -1  
jakarta-commons/validator/src/test/org/apache/commons/validator/validator-multipletest.xml
  
  Index: validator-multipletest.xml
  ===
  RCS file: 
/home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/validator-multipletest.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- validator-multipletest.xml17 Jan 2004 19:46:16 -  1.5
  +++ validator-multipletest.xml8 Apr 2004 23:19:31 -   1.6
  @@ -29,7 +29,7 @@
arg key=nameForm.firstname.displayname/
/field
field property=middleName depends=positive
  - arg0 key=nameForm.middlename.displayname/ 
  + arg key=nameForm.middlename.displayname/ 
/field
field property=lastName depends=required,int
arg key=nameForm.lastname.displayname/
  
  
  

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



cvs commit: jakarta-commons-sandbox/chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/struts ActionHelper.java ActionHelperBase.java CommandAction.java ContextAction.java

2004-04-08 Thread husted
husted  2004/04/08 16:19:59

  Removed: 
chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/struts
ActionHelper.java ActionHelperBase.java
CommandAction.java ContextAction.java
  Log:
  Remove development cruft

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



cvs commit: jakarta-commons/validator/src/share/org/apache/commons/validator digester-rules.xml

2004-04-08 Thread dgraham
dgraham 2004/04/08 16:20:52

  Modified:validator/conf/share validator_1_2_0.dtd
   validator/src/share/org/apache/commons/validator
digester-rules.xml
  Log:
  Removed deprecated arg0-3 elements.
  
  Revision  ChangesPath
  1.5   +1 -95 jakarta-commons/validator/conf/share/validator_1_2_0.dtd
  
  Index: validator_1_2_0.dtd
  ===
  RCS file: /home/cvs/jakarta-commons/validator/conf/share/validator_1_2_0.dtd,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- validator_1_2_0.dtd   6 Apr 2004 22:19:58 -   1.4
  +++ validator_1_2_0.dtd   8 Apr 2004 23:20:52 -   1.5
  @@ -191,100 +191,6 @@
   !ATTLIST arg resource CDATA #IMPLIED
   !ATTLIST arg position CDATA #IMPLIED
   
  -
  -
  -!--
  -
  - DEPRECATED Use arg position=0/ instead.
  -
  - The arg0 element defines the first replacement value to use with the
  - message template for this validator or this field.
  - The arg0 element accepts these attributes.
  -
  -  nameThe name of the validator corresponding to this msg.
  -
  -  key The key that will return the message template from a
  -  resource bundle.
  -
  -  resourceIf set to false, the key is taken to be a literal
  -  value rather than a bundle key.
  -  [true]
  ---
  -!ELEMENT arg0 EMPTY
  -!ATTLIST arg0 name CDATA #IMPLIED
  -!ATTLIST arg0 key CDATA #IMPLIED
  -!ATTLIST arg0 resource CDATA #IMPLIED
  -
  -
  -!--
  -
  - DEPRECATED Use arg position=1/ instead.
  -
  - The arg1 element defines the second replacement value to use with the
  - message template for this validator or this field.
  - The arg1 element accepts these attributes.
  -
  -  nameThe name of the validator corresponding to this msg.
  -
  -  key The key that will return the message template from a
  -  resource bundle.
  -
  -  resourceIf set to false, the key is taken to be a literal
  -  value rather than a bundle key.
  -  [true]
  ---
  -!ELEMENT arg1 EMPTY
  -!ATTLIST arg1 name CDATA #IMPLIED
  -!ATTLIST arg1 key CDATA #IMPLIED
  -!ATTLIST arg1 resource CDATA #IMPLIED
  -
  -
  -!--
  -
  - DEPRECATED Use arg position=2/ instead.
  -
  - The arg2 element defines the third replacement value to use with the
  - message template for this validator or this field.
  - The arg2 element accepts these attributes.
  -
  -  nameThe name of the validator corresponding to this msg.
  -
  -  key The key that will return the message template from a
  -  resource bundle.
  -
  -  resourceIf set to false, the key is taken to be a literal
  -  value rather than a bundle key.
  -  [true]
  ---
  -!ELEMENT arg2 EMPTY
  -!ATTLIST arg2 name CDATA #IMPLIED
  -!ATTLIST arg2 key CDATA #IMPLIED
  -!ATTLIST arg2 resource CDATA #IMPLIED
  -
  -
  -!--
  -
  - DEPRECATED Use arg position=3/ instead.
  -
  - The arg3 element defines the fourth replacement value to use with the
  - message template for this validator or this field.
  - The arg0 element accepts these attributes.
  -
  -  nameThe name of the validator corresponding to this msg.
  -
  -  key The key that will return the message template from a
  -  resource bundle.
  -
  -  resourceIf set to false, the key is taken to be a literal
  -  value rather than a bundle key.
  -  [true]
  ---
  -!ELEMENT arg3 EMPTY
  -!ATTLIST arg3 name CDATA #IMPLIED
  -!ATTLIST arg3 key CDATA #IMPLIED
  -!ATTLIST arg3 resource CDATA #IMPLIED
  -
  -
   !--
The var element can set parameters that a field may need to pass to
one of its validators, such as the minimum and maximum values in a
  
  
  
  1.5   +1 -23 
jakarta-commons/validator/src/share/org/apache/commons/validator/digester-rules.xml
  
  Index: digester-rules.xml
  ===
  RCS file: 
/home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/digester-rules.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- digester-rules.xml28 May 2003 04:14:32 -  1.4
  +++ digester-rules.xml8 Apr 2004 23:20:52 -   1.5
  @@ -70,28 +70,6 @@
set-properties-rule/
set-next-rule methodname=addArg 
paramtype=org.apache.commons.validator.Arg /
/pattern
  - 
  - !-- The arg0, etc. elements are deprecated.  We can 
remove these definitions after 1.1 --
  - 

cvs commit: jakarta-commons-sandbox/chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/struts LogonAction.java

2004-04-08 Thread husted
husted  2004/04/08 16:21:02

  Added:   
chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/struts
LogonAction.java
  Log:
  Add LogonAction to postcheck state
  
  Revision  ChangesPath
  1.1  
jakarta-commons-sandbox/chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/struts/LogonAction.java
  
  Index: LogonAction.java
  ===
  package org.apache.commons.chain.mailreader.struts;
  
  import org.apache.struts.action.*;
  import org.apache.struts.webapp.example.Constants;
  
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  
  /**
   * Run LogonCommand and confirm success.
   */
  public class LogonAction extends MailReaderAction {
  
  protected ActionForward checkState(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response) throws Exception {
  
  Object user = request.getSession().getAttribute(Constants.USER_KEY);
  if (user==null) {
  ActionMessages errors = new ActionMessages();
  errors.add(
 ActionMessages.GLOBAL_MESSAGE,
 new ActionMessage(error.password.mismatch));
  saveErrors(request,errors);
  return findInput(mapping);
  }
  
  return null;
  
  }
  
  
  
  }
  
  
  

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



cvs commit: jakarta-commons-sandbox/chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/struts MailReaderAction.java

2004-04-08 Thread husted
husted  2004/04/08 16:21:22

  Modified:
chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/struts
MailReaderAction.java
  Log:
  Javadoc, refactorings
  
  Revision  ChangesPath
  1.4   +48 -9 
jakarta-commons-sandbox/chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/struts/MailReaderAction.java
  
  Index: MailReaderAction.java
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/struts/MailReaderAction.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MailReaderAction.java 1 Apr 2004 03:37:20 -   1.3
  +++ MailReaderAction.java 8 Apr 2004 23:21:22 -   1.4
  @@ -23,9 +23,7 @@
   import org.apache.commons.chain.Command;
   import org.apache.commons.chain.Catalog;
   import org.apache.commons.chain.impl.ContextBase;
  -import org.apache.commons.chain.mailreader.ClientContext;
   import org.apache.commons.chain.mailreader.MailReader;
  -import org.apache.commons.chain.mailreader.MailReaderBase;
   import org.apache.commons.beanutils.BeanUtils;
   import org.apache.struts.webapp.example.Constants;
   import org.apache.struts.webapp.example.User;
  @@ -40,7 +38,7 @@
   
   /**
* pProcess Commands using a [EMAIL PROTECTED] 
org.apache.commons.chain.mailreader.MailReader}
  - * [EMAIL PROTECTED] ClientContext}./p
  + * [EMAIL PROTECTED] Context}./p
*/
   public class MailReaderAction extends Action {
   
  @@ -76,7 +74,7 @@
   Context input = getInput(form);
   UserDatabase database = (UserDatabase)
   
request.getSession().getServletContext().getAttribute(Constants.DATABASE_KEY);
  -return new MailReaderBase(locale, input, database);
  +return new MailReader(locale, input, database);
   
   }
   
  @@ -141,6 +139,23 @@
   
   }
   
  +
  +/**
  + * p
  + * Validate state, setting messages and returning ActionForward
  + * if appropriate.
  + * /p
  + */
  +protected ActionForward checkState(ActionMapping mapping,
  +ActionForm form,
  +HttpServletRequest request,
  +HttpServletResponse response) throws Exception {
  +
  +// override to provide functionality
  +return null;
  +
  +}
  +
   /**
* p
* Operations to perform prior to executing business command.
  @@ -157,19 +172,43 @@
   
   // TODO: Expose any output
   // TODO: Expose any status messages,
  -// TODO: Expose any error messages and find input
  +
  +ActionForward location = checkState(mapping,form,request,response);
  +if (null!=location) return location;
   
   return null;
   
   }
   
   /**
  + * p
  + * Token representing a nominal outcome [success].
  + * /p
  + */
  +protected static String SUCCESS = success;
  +
  +
  +/**
* pConvenience method to return nominal location./p
* @param mapping Our ActionMapping
* @return ActionForward named success or null
*/
   protected ActionForward findSuccess(ActionMapping mapping) {
  -return mapping.findForward(success);
  +return mapping.findForward(SUCCESS);
  +}
  +
  +
  +/**
  + * p
  + * Convenience method to return the Input forward.
  + * Assumes the InputForward option and input property is set.
  + * Otherwise, returns codenull/code.
  + * /p
  + * @param mapping Our ActionMapping
  + * @return a forward named success or null.
  + */
  +protected ActionForward findInput(ActionMapping mapping) {
  +return mapping.getInputForward();
   }
   
   
  
  
  

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



cvs commit: jakarta-commons/validator/src/share/org/apache/commons/validator Field.java Form.java FormSet.java

2004-04-08 Thread dgraham
dgraham 2004/04/08 16:22:03

  Modified:validator/src/share/org/apache/commons/validator Field.java
Form.java FormSet.java
  Log:
  Removed items deprecated in 1.1.x series.
  
  Revision  ChangesPath
  1.32  +5 -176
jakarta-commons/validator/src/share/org/apache/commons/validator/Field.java
  
  Index: Field.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Field.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- Field.java21 Feb 2004 17:10:29 -  1.31
  +++ Field.java8 Apr 2004 23:22:03 -   1.32
  @@ -54,13 +54,6 @@
   org.apache.commons.validator.Field.DEFAULT;
   
   /**
  - * This is the value that will be used as a key if the codeArg/code
  - * name field has no value.
  - * @deprecated
  - */
  -public static final String ARG_DEFAULT = DEFAULT_ARG;
  -
  -/**
* This indicates an indexed property is being referenced.
*/
   public static final String TOKEN_INDEXED = [];
  @@ -84,11 +77,6 @@
   protected int fieldOrder = 0;
   
   /**
  - * @deprecated This is no longer used.
  - */
  -protected FastHashMap hDependencies = new FastHashMap();
  -
  -/**
* Internal representation of this.depends String as a List.  This List 
* gets updated whenever setDepends() gets called.  This List is 
* synchronized so a call to setDepends() (which clears the List) won't 
  @@ -109,26 +97,6 @@
   protected Map[] args = new Map[0];
   
   /**
  - * @deprecated This variable is no longer used, use args instead.
  - */
  -protected FastHashMap hArg0 = new FastHashMap();
  -
  -/**
  - * @deprecated This variable is no longer used, use args instead.
  - */
  -protected FastHashMap hArg1 = new FastHashMap();
  -
  -/**
  - * @deprecated This variable is no longer used, use args instead.
  - */
  -protected FastHashMap hArg2 = new FastHashMap();
  -
  -/**
  - * @deprecated This variable is no longer used, use args instead.
  - */
  -protected FastHashMap hArg3 = new FastHashMap();
  -
  -/**
* Gets the page value that the Field is associated with for
* validation.
*/
  @@ -339,111 +307,6 @@
   }
   
   /**
  - * Add a codeArg/code to the arg0 list.
  - * @deprecated Use addArg(Arg) instead.
  - */
  -public void addArg0(Arg arg) {
  -arg.setPosition(0);
  -this.addArg(arg);
  -}
  -
  -/**
  - * Gets the default arg0 codeArg/code object.
  - * @deprecated Use getArg(0) instead.
  - */
  -public Arg getArg0() {
  -return this.getArg(0);
  -}
  -
  -/**
  - * Gets the arg0 codeArg/code object based on the key passed in.  If 
  - * the key finds a codenull/code value then the default value will 
  - * be retrieved.
  - * @deprecated Use getArg(String, 0) instead.
  - */
  -public Arg getArg0(String key) {
  -return this.getArg(key, 0);
  -}
  -
  -/**
  - * Add a codeArg/code to the arg1 list.
  - * @deprecated Use addArg(Arg) instead.
  - */
  -public void addArg1(Arg arg) {
  -arg.setPosition(1);
  -this.addArg(arg);
  -}
  -
  -/**
  - * Gets the default arg1 codeArg/code object.
  - * @deprecated Use getArg(1) instead.
  - */
  -public Arg getArg1() {
  -return this.getArg(1);
  -}
  -
  -/**
  - * Gets the arg1 codeArg/code object based on the key passed in.  If the key
  - * finds a codenull/code value then the default value will try to be 
retrieved.
  - * @deprecated Use getArg(String, 1) instead.
  - */
  -public Arg getArg1(String key) {
  -return this.getArg(key, 1);
  -}
  -
  -/**
  - * Add a codeArg/code to the arg2 list.
  - * @deprecated Use addArg(Arg) instead.
  - */
  -public void addArg2(Arg arg) {
  -arg.setPosition(2);
  -this.addArg(arg);
  -}
  -
  -/**
  - * Gets the default arg2 codeArg/code object.
  - * @deprecated Use getArg(2) instead.
  - */
  -public Arg getArg2() {
  -return this.getArg(2);
  -}
  -
  -/**
  - * Gets the arg2 codeArg/code object based on the key passed in.  If the key
  - * finds a codenull/code value then the default value will try to be 
retrieved.
  - * @deprecated Use getArg(String, 2) instead.
  - */
  -public Arg getArg2(String key) {
  -return this.getArg(key, 2);
  -}
  -
  -/**
  - * Add a codeArg/code to the arg3 list.
  - * @deprecated Use addArg(Arg) instead.
  - */
  -public void addArg3(Arg arg) {
  -arg.setPosition(3);
  -this.addArg(arg);
  -}
  -
  -/**
  - * 

cvs commit: jakarta-commons-sandbox/chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader MailReader.java

2004-04-08 Thread husted
husted  2004/04/08 16:23:47

  Modified:chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader
MailReader.java
  Log:
  Javadoc, refactorings
  
  Revision  ChangesPath
  1.3   +82 -22
jakarta-commons-sandbox/chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/MailReader.java
  
  Index: MailReader.java
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/MailReader.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MailReader.java   29 Mar 2004 02:34:19 -  1.2
  +++ MailReader.java   8 Apr 2004 23:23:47 -   1.3
  @@ -19,57 +19,117 @@
*/
   package org.apache.commons.chain.mailreader;
   
  -import org.apache.struts.webapp.example.UserDatabase;
   import org.apache.struts.webapp.example.User;
  +import org.apache.struts.webapp.example.UserDatabase;
  +import org.apache.commons.chain.Context;
  +import org.apache.commons.chain.impl.ContextBase;
  +
  +import java.util.Locale;
   
   
   /**
  - * Application interface for MailReader Commands.
  + * Context for MailReader Commands.
*/
  -public interface MailReader extends ClientContext {
  +public class MailReader extends ContextBase {
   
   /**
* Property name for the country field of a Locale.
*/
  -static String PN_COUNTRY = country;
  +public static String PN_COUNTRY = country;
   
   /**
* Property name for the language field of a Locale.
*/
  -static String PN_LANGUAGE = language;
  +public static String PN_LANGUAGE = language;
   
   /**
* Property name for username.
*/
  -static String PN_USERNAME = username;
  +public static String PN_USERNAME = username;
   
   /**
* Property name for password.
*/
  -static String PN_PASSWORD = password;
  +public static String PN_PASSWORD = password;
  +
  +/**
  + * pDefault constructor./p
  + */
  +public MailReader() {
  +super();
  +}
  +
  +/**
  + * pConvenience constructor to create and populate instance./p
  + * @param locale
  + * @param input
  + */
  +public MailReader(Locale locale, Context input, UserDatabase database) {
  +super();
  +this.locale = locale;
  +this.input = input;
  +this.database = database;
  +}
   
   /**
  - * pReturn user database or null./p
  - * @return user database or null.
  + * pField for Locale property./p
*/
  -public UserDatabase getDatabase();
  +private Locale locale;
  +
  +// See ContextContext interface for JavaDoc
  +public Locale getLocale() {
  +return locale;
  +}
  +
  +// See ContextContext interface for JavaDoc
  +public void setLocale(Locale locale) {
  +this.locale = locale;
  +}
   
   /**
  - * pAssign user database./p
  - * @param database The new database instance
  + * pField for Input property./p
*/
  -public void setDatabase(UserDatabase database);
  +private Context input;
  +
  +// See ContextContext interface for JavaDoc
  +public Context getInput() {
  +return input;
  +}
  +
  +// See ContextContext interface for JavaDoc
  +public void setInput(Context input) {
  +this.input = input;
  +}
   
   /**
  - * pReturn current user, if any/p
  - * @return
  + * pField for database property./p
*/
  -public User getUser();
  +private UserDatabase database;
  +
  +// See MailReader interface for JavaDoc
  +public UserDatabase getDatabase() {
  +return database;
  +}
  +
  +// See MailReader interface for JavaDoc
  +public void setDatabase(UserDatabase database) {
  +this.database = database;
  +}
   
   /**
  - * pAssign current user./p
  - * @param user The new user
  + * pField for user property./p
*/
  -public void setUser(User user);
  +private User user;
  +
  +// See MailReader interface for JavaDoc
  +public User getUser() {
  +return user;
  +}
  +
  +// See MailReader interface for JavaDoc
  +public void setUser(User user) {
  +this.user = user;
  +}
  +
   
   }
  
  
  

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



cvs commit: jakarta-commons-sandbox/chain/apps/mailreader/src/resources/message MessageResources.properties MessageResources_ja.properties MessageResources_ru.properties

2004-04-08 Thread husted
husted  2004/04/08 16:24:48

  Modified:chain/apps/mailreader/src/resources/message
MessageResources.properties
MessageResources_ja.properties
MessageResources_ru.properties
  Log:
  Refactor entry keys
  
  Revision  ChangesPath
  1.2   +4 -4  
jakarta-commons-sandbox/chain/apps/mailreader/src/resources/message/MessageResources.properties
  
  Index: MessageResources.properties
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/chain/apps/mailreader/src/resources/message/MessageResources.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MessageResources.properties   25 Mar 2004 12:41:14 -  1.1
  +++ MessageResources.properties   8 Apr 2004 23:24:48 -   1.2
  @@ -45,10 +45,10 @@
   linkUser.io=I/O Error: {0}
   linkUser.noUser=No user under attribute {0}
   logon.title=MailReader Demonstration Application - Logon
  -mainMenu.heading=Main Menu Options for 
  -mainMenu.logoff=Log off MailReader Demonstration Application
  -mainMenu.registration=Edit your user registration profile
  -mainMenu.title=MailReader Demonstration Application - Main Menu
  +menu.heading=Main Menu Options for
  +menu.logoff=Log off MailReader Demonstration Application
  +menu.registration=Edit your user registration profile
  +menu.title=MailReader Demonstration Application - Main Menu
   option.imap=IMAP Protocol
   option.pop3=POP3 Protocol
   prompt.autoConnect=Auto Connect
  
  
  
  1.2   +4 -4  
jakarta-commons-sandbox/chain/apps/mailreader/src/resources/message/MessageResources_ja.properties
  
  Index: MessageResources_ja.properties
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/chain/apps/mailreader/src/resources/message/MessageResources_ja.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MessageResources_ja.properties25 Mar 2004 12:41:14 -  1.1
  +++ MessageResources_ja.properties8 Apr 2004 23:24:48 -   1.2
  @@ -45,10 +45,10 @@
   linkUser.io=I/O\u30a8\u30e9\u30fc: {0}
   linkUser.noUser=\u5c5e\u6027 {0} 
\u306b\u30e6\u30fc\u30b6\u60c5\u5831\u304c\u5b58\u5728\u3057\u307e\u305b\u3093
   logon.title=MailReader\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 
- \u30ed\u30b0\u30aa\u30f3
  -mainMenu.heading=\u30e1\u30a4\u30f3\u30e1\u30cb\u30e5\u30fc
  -mainMenu.logoff=MailReader 
\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30ed\u30b0\u30aa\u30d5
  -mainMenu.registration=\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306e\u7de8\u96c6
  
-mainMenu.title=MailReader\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 
- \u30e1\u30a4\u30f3\u30e1\u30cb\u30e5\u30fc
  +menu.heading=\u30e1\u30a4\u30f3\u30e1\u30cb\u30e5\u30fc
  +menu.logoff=MailReader 
\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30ed\u30b0\u30aa\u30d5
  +menu.registration=\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306e\u7de8\u96c6
  +menu.title=MailReader\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 - 
\u30e1\u30a4\u30f3\u30e1\u30cb\u30e5\u30fc
   option.imap=IMAP \u30d7\u30ed\u30c8\u30b3\u30eb
   option.pop3=POP3 \u30d7\u30ed\u30c8\u30b3\u30eb
   prompt.autoConnect=\u81ea\u52d5\u63a5\u7d9a
  
  
  
  1.2   +9 -9  
jakarta-commons-sandbox/chain/apps/mailreader/src/resources/message/MessageResources_ru.properties
  
  Index: MessageResources_ru.properties
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/chain/apps/mailreader/src/resources/message/MessageResources_ru.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MessageResources_ru.properties25 Mar 2004 12:41:14 -  1.1
  +++ MessageResources_ru.properties8 Apr 2004 23:24:48 -   1.2
  @@ -35,20 +35,20 @@
   heading.user=\u0418\u043c\u044f
   heading.type=\u0422\u0438\u043f \u0441\u0435\u0440\u0432\u0435\u0440\u0430
   heading.action=\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435
  
-index.heading=\u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435
 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 
'\u0427\u0442\u0435\u043d\u0438\u0435 \u043f\u043e\u0447\u0442\u044b'
  -index.logon=\u0412\u043e\u0439\u0442\u0438 \u043a\u0430\u043a 
\u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439
 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c
  
-index.registration=\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f
  
-index.title=\u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435
 

cvs commit: jakarta-commons-sandbox/chain/apps/mailreader/src/test/org/apache/commons/mailreader ChangeLocaleTest.java LogonUserTest.java

2004-04-08 Thread husted
husted  2004/04/08 16:26:07

  Modified:chain/apps/mailreader/src/test/org/apache/commons/mailreader
ChangeLocaleTest.java LogonUserTest.java
  Log:
  Optimize imports
  
  Revision  ChangesPath
  1.3   +8 -10 
jakarta-commons-sandbox/chain/apps/mailreader/src/test/org/apache/commons/mailreader/ChangeLocaleTest.java
  
  Index: ChangeLocaleTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/chain/apps/mailreader/src/test/org/apache/commons/mailreader/ChangeLocaleTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ChangeLocaleTest.java 29 Mar 2004 02:34:19 -  1.2
  +++ ChangeLocaleTest.java 8 Apr 2004 23:26:07 -   1.3
  @@ -23,7 +23,6 @@
   import org.apache.commons.chain.Command;
   import org.apache.commons.chain.Context;
   import org.apache.commons.chain.mailreader.MailReader;
  -import org.apache.commons.chain.mailreader.MailReaderBase;
   import org.apache.commons.chain.mailreader.commands.LocaleChange;
   import org.apache.commons.chain.impl.ContextBase;
   
  @@ -47,19 +46,18 @@
   Locale expected = Locale.CANADA_FRENCH;
   
   Context input = new ContextBase();
  -input.put(MailReader.PN_COUNTRY,CA);
  -input.put(MailReader.PN_LANGUAGE,FR);
  +input.put(MailReader.PN_COUNTRY, CA);
  +input.put(MailReader.PN_LANGUAGE, FR);
   
  -MailReader context = new MailReaderBase(original,input,null);
  +MailReader context = new MailReader(original, input, null);
   
   try {
   command.execute(context);
  -}
  -catch(Exception e) {
  +} catch (Exception e) {
   fail(e.getMessage());
   }
   
  -assertEquals(Unexpected Locale,expected,context.getLocale());
  +assertEquals(Unexpected Locale, expected, context.getLocale());
   
   }
   
  
  
  
  1.3   +19 -23
jakarta-commons-sandbox/chain/apps/mailreader/src/test/org/apache/commons/mailreader/LogonUserTest.java
  
  Index: LogonUserTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/chain/apps/mailreader/src/test/org/apache/commons/mailreader/LogonUserTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LogonUserTest.java29 Mar 2004 02:34:20 -  1.2
  +++ LogonUserTest.java8 Apr 2004 23:26:07 -   1.3
  @@ -24,7 +24,6 @@
   import org.apache.commons.chain.Command;
   import org.apache.commons.chain.Context;
   import org.apache.commons.chain.mailreader.MailReader;
  -import org.apache.commons.chain.mailreader.MailReaderBase;
   import org.apache.commons.chain.mailreader.commands.LogonUser;
   import org.apache.commons.chain.impl.ContextBase;
   import org.apache.struts.webapp.example.User;
  @@ -58,61 +57,58 @@
   public void testJohnQ() {
   
   Context input = new ContextBase();
  -input.put(MailReader.PN_USERNAME,USER);
  -input.put(MailReader.PN_PASSWORD,PASS);
  +input.put(MailReader.PN_USERNAME, USER);
  +input.put(MailReader.PN_PASSWORD, PASS);
   
  -MailReader context = new MailReaderBase(locale,input,database);
  +MailReader context = new MailReader(locale, input, database);
   
   try {
   command.execute(context);
  -}
  -catch(Exception e) {
  +} catch (Exception e) {
   fail(e.getMessage());
   }
   
   User user = context.getUser();
  -assertNotNull(Where's waldo?,user);
  -assertEquals(Who am I?,John Q. User,user.getFullName());
  +assertNotNull(Where's waldo?, user);
  +assertEquals(Who am I?, John Q. User, user.getFullName());
   
   }
   
   public void testInvalidPassword() {
   
   Context input = new ContextBase();
  -input.put(MailReader.PN_USERNAME,USER);
  -input.put(MailReader.PN_PASSWORD,SezMe);
  +input.put(MailReader.PN_USERNAME, USER);
  +input.put(MailReader.PN_PASSWORD, SezMe);
   
  -MailReader context = new MailReaderBase(locale,input,database);
  +MailReader context = new MailReader(locale, input, database);
   
   try {
   command.execute(context);
  -}
  -catch(Exception e) {
  +} catch (Exception e) {
   fail(e.getMessage());
   }
   
   User user = context.getUser();
  -assertNull(Who's watching the store,user);
  +assertNull(Who's watching the store, user);
   
   }
   
   public void testInvalidUsername() {
   
   Context input = new ContextBase();
  -input.put(MailReader.PN_USERNAME,zaphod);
  -input.put(MailReader.PN_PASSWORD,PASS);
  +input.put(MailReader.PN_USERNAME, zaphod);
  +

cvs commit: jakarta-commons-sandbox/chain/apps/mailreader/src/webapp/WEB-INF/struts-config welcome.xml

2004-04-08 Thread husted
husted  2004/04/08 16:28:32

  Modified:chain/apps/mailreader/src/webapp/WEB-INF/struts-config
welcome.xml
  Log:
  Add Menu mapping
  
  Revision  ChangesPath
  1.2   +1 -0  
jakarta-commons-sandbox/chain/apps/mailreader/src/webapp/WEB-INF/struts-config/welcome.xml
  
  Index: welcome.xml
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/chain/apps/mailreader/src/webapp/WEB-INF/struts-config/welcome.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- welcome.xml   25 Mar 2004 12:37:58 -  1.1
  +++ welcome.xml   8 Apr 2004 23:28:32 -   1.2
  @@ -21,6 +21,7 @@
   
   action-mappings
   action path=/Welcome forward=/welcome.jsp /
  +action path=/Menu forward=/menu.jsp /
   /action-mappings
   
   /struts-config
  
  
  

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



cvs commit: jakarta-commons/validator/src/share/org/apache/commons/validator CreditCardValidator.java ValidatorAction.java Constant.java

2004-04-08 Thread dgraham
dgraham 2004/04/08 16:29:31

  Modified:validator/src/share/org/apache/commons/validator
CreditCardValidator.java ValidatorAction.java
  Removed: validator/src/share/org/apache/commons/validator
Constant.java
  Log:
  Removed items deprecated in 1.1.x series.
  
  Revision  ChangesPath
  1.17  +3 -20 
jakarta-commons/validator/src/share/org/apache/commons/validator/CreditCardValidator.java
  
  Index: CreditCardValidator.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/CreditCardValidator.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- CreditCardValidator.java  21 Feb 2004 17:10:29 -  1.16
  +++ CreditCardValidator.java  8 Apr 2004 23:29:31 -   1.17
  @@ -182,23 +182,6 @@
   
   return (sum == 0) ? false : (sum % 10 == 0);
   }
  -
  -/**
  - * Checks for a valid credit card number.
  - * @param card Credit Card Number.
  - * @deprecated This will be removed in a future release.
  - */
  -protected boolean isValidPrefix(String card) {
  -
  -if (card.length()  13) {
  -return false;
  -}
  -
  -return new Visa().matches(card)
  -|| new Amex().matches(card)
  -|| new Mastercard().matches(card)
  -|| new Discover().matches(card);
  -}
   
   /**
* CreditCardType implementations define how validation is performed
  
  
  
  1.21  +3 -46 
jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorAction.java
  
  Index: ValidatorAction.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorAction.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- ValidatorAction.java  21 Feb 2004 17:10:29 -  1.20
  +++ ValidatorAction.java  8 Apr 2004 23:29:31 -   1.21
  @@ -28,7 +28,6 @@
   import java.lang.reflect.Method;
   import java.lang.reflect.Modifier;
   import java.util.ArrayList;
  -import java.util.Collection;
   import java.util.Collections;
   import java.util.List;
   import java.util.Map;
  @@ -226,14 +225,6 @@
   }
   
   /**
  - * Gets the method parameters for the method as an unmodifiable List.
  - * @deprecated This will be removed after Validator 1.1.2
  - */
  -public List getMethodParamsList() {
  -return Collections.unmodifiableList(this.methodParameterList);
  -}
  -
  -/**
* Gets the dependencies of the validator action as a comma separated list 
* of validator names.
*/
  @@ -346,22 +337,6 @@
   }
   
   /**
  - * Gets an instance based on the validator action's classname.
  - * @deprecated This will be removed after Validator 1.1.2
  - */
  -public Object getClassnameInstance() {
  -return instance;
  -}
  -
  -/**
  - * Sets an instance based on the validator action's classname.
  - * @deprecated This will be removed after Validator 1.1.2
  - */
  -public void setClassnameInstance(Object instance) {
  -this.instance = instance;
  -}
  -
  -/**
* Initialize based on set.
*/
   protected void init() {
  @@ -492,28 +467,10 @@
   }
   
   /**
  - * Creates a codeFastHashMap/code for the isDependency method
  - * based on depends.
  - * @deprecated This functionality has been moved to other methods.  It's no 
  - * longer required to call this method to initialize this object.
  - */
  -public synchronized void process(Map globalConstants) {
  -// do nothing
  -}
  -
  -/**
* Checks whether or not the value passed in is in the depends field.
*/
   public boolean isDependency(String validatorName) {
   return this.dependencyList.contains(validatorName);
  -}
  -
  -/**
  - * Gets the dependencies as a codeCollection/code.
  - * @deprecated Use getDependencyList() instead.
  - */
  -public Collection getDependencies() {
  -return this.getDependencyList();
   }
   
   /**
  
  
  

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



cvs commit: jakarta-commons-sandbox/chain/apps/mailreader/src/webapp/WEB-INF/struts-config logon.xml

2004-04-08 Thread husted
husted  2004/04/08 16:29:32

  Modified:chain/apps/mailreader/src/webapp/WEB-INF/struts-config
logon.xml
  Log:
  Expand Logon action
  
  Revision  ChangesPath
  1.2   +20 -3 
jakarta-commons-sandbox/chain/apps/mailreader/src/webapp/WEB-INF/struts-config/logon.xml
  
  Index: logon.xml
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/chain/apps/mailreader/src/webapp/WEB-INF/struts-config/logon.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- logon.xml 25 Mar 2004 12:37:58 -  1.1
  +++ logon.xml 8 Apr 2004 23:29:32 -   1.2
  @@ -15,7 +15,7 @@
   form-beans
   
   form-bean
  -name=Logon
  +name=LogonUser
   type=org.apache.struts.validator.DynaValidatorForm
  form-property name=username type=java.lang.String/
  form-property name=password type=java.lang.String/
  @@ -28,8 +28,25 @@
   global-forwards/
   
   action-mappings
  -action path=/LogonForm forward=/missing.jsp /
  -/action-mappings
   
  +action path=/LogonForm
  +name=LogonUser
  +validate=false
  +scope=request
  +forward=/logon.jsp /
  +
  +action path=/LogonUser
  +name=LogonUser
  +validate=true
  +scope=request
  +input=input
  +type=org.apache.commons.chain.mailreader.struts.LogonAction
  +forward name=input path=/LogonForm.do /
  +forward name=success path=/Menu.do /
  +/action
  +
  +action path=/Logoff forward=/missing.jsp /
  +
  +/action-mappings
   
   /struts-config
  
  
  

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



cvs commit: jakarta-commons-sandbox/chain/apps/mailreader/src/webapp/WEB-INF/tld app.tld

2004-04-08 Thread husted
husted  2004/04/08 16:31:54

  Modified:chain/apps/mailreader/src/webapp/WEB-INF/tld app.tld
  Log:
  Simplify checklogin tag
  
  Revision  ChangesPath
  1.2   +5 -172
jakarta-commons-sandbox/chain/apps/mailreader/src/webapp/WEB-INF/tld/app.tld
  
  Index: app.tld
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/chain/apps/mailreader/src/webapp/WEB-INF/tld/app.tld,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- app.tld   25 Mar 2004 12:37:36 -  1.1
  +++ app.tld   8 Apr 2004 23:31:54 -   1.2
  @@ -1,194 +1,27 @@
   ?xml version=1.0 encoding=ISO-8859-1 ?
   
   !DOCTYPE taglib
  -
 PUBLIC -//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN
  -
 http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd;
   
  -
  -
   taglib
  -
  -
  -
 tlibversion1.0/tlibversion
  -
 jspversion1.1/jspversion
  -
 shortnameApplication Tag Library/shortname
  -
  -  urihttp://jakarta.apache.org/taglibs/struts-example-1.0/uri
  -
  +  urihttp://struts.apache.org/taglibs/struts-mailreader-1.2.1/uri
 info
  -
   This tag library contains functionality specific to the Struts
  -
  -Example Application.
  -
  +MailReader Application.
 /info
  -
  -
  -
  -
  -
 tag
  -
   namecheckLogon/name
  -
  -tagclassorg.apache.struts.webapp.example.CheckLogonTag/tagclass
  -
  +tagclassorg.apache.commons.chain.mailreader.CheckLogonTag/tagclass
   bodycontentempty/bodycontent
  -
   info
  -
 Validate that there is a currently logged on user, by checking for
  -
  -  the existence of a session-scope bean under the specified name.
  -
  -  If there is no such bean, forward control to the specified page,
  -
  -  which will typically be a logon form.
  -
  -
  -
  -  name - Name of the session-scope bean to check for [user]
  -
  -
  -
  -  page - Context-relative path to the logon page [/logon.jsp]
  -
  -/info
  -
  -attribute
  -
  -  namename/name
  -
  -  requiredfalse/required
  -
  -  rtexprvaluetrue/rtexprvalue
  -
  -/attribute
  -
  -attribute
  -
  -  namepage/name
  -
  -  requiredfalse/required
  -
  -  rtexprvaluetrue/rtexprvalue
  -
  -/attribute
  -
  -  /tag
  -
  -
  -
  -
  -
  -  tag
  -
  -namelinkSubscription/name
  -
  -tagclassorg.apache.struts.webapp.example.LinkSubscriptionTag/tagclass
  -
  -info
  -
  -  Generate a URL-encoded hyperlink to the a URL made up of the
  -
  -  specified base value, plus optional query parameters that
  -
  -  select the specified Subscription object.
  -
  -
  -
  -  name - Name of the attribute containing the specified
  -
  - Subscription.  [subscription]
  -
  -
  -
  -  page - Context-relative URL of the generated link
  -
  +  the existence of a certain session-scope bean.
  +  If there is no such bean, forward control to the logon form.
   /info
  -
  -attribute
  -
  -  namename/name
  -
  -  requiredfalse/required
  -
  -  rtexprvaluetrue/rtexprvalue
  -
  -/attribute
  -
  -attribute
  -
  -  namepage/name
  -
  -  requiredtrue/required
  -
  -  rtexprvaluetrue/rtexprvalue
  -
  -/attribute
  -
 /tag
  -
  -
  -
  -
  -
  -  tag
  -
  -namelinkUser/name
  -
  -tagclassorg.apache.struts.webapp.example.LinkUserTag/tagclass
  -
  -info
  -
  -  Generate a URL-encoded hyperlink to the a URL made up of the
  -
  -  specified base value, plus optional query parameters that
  -
  -  select the specified User object.
  -
  -
  -
  -  name - Name of the attribute containing the specified user.
  -
  - [user]
  -
  -
  -
  -  href - Context-relative URL of the generated link
  -
  -/info
  -
  -attribute
  -
  -  namename/name
  -
  -  requiredfalse/required
  -
  -  rtexprvaluetrue/rtexprvalue
  -
  -/attribute
  -
  -attribute
  -
  -  namepage/name
  -
  -  requiredtrue/required
  -
  -  rtexprvaluetrue/rtexprvalue
  -
  -/attribute
  -
  -  /tag
  -
  -
  -
  -
  -
   /taglib
   
  
  
  

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



cvs commit: jakarta-commons-sandbox/chain/apps/mailreader/src/webapp/WEB-INF/struts-config default-validation.xml logon-validation.xml register.xml validator-rules.xml default.xml

2004-04-08 Thread husted
husted  2004/04/08 16:32:34

  Modified:chain/apps/mailreader/src/webapp/WEB-INF/struts-config
default.xml
  Added:   chain/apps/mailreader/src/webapp/WEB-INF/struts-config
default-validation.xml logon-validation.xml
register.xml validator-rules.xml
  Removed: chain/apps/mailreader/src/webapp/WEB-INF validation.xml
validator-rules.xml
  Log:
  Move validation config under struts-config, convert to finely-grained
  
  Revision  ChangesPath
  1.2   +3 -2  
jakarta-commons-sandbox/chain/apps/mailreader/src/webapp/WEB-INF/struts-config/default.xml
  
  Index: default.xml
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/chain/apps/mailreader/src/webapp/WEB-INF/struts-config/default.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- default.xml   25 Mar 2004 12:37:58 -  1.1
  +++ default.xml   8 Apr 2004 23:32:34 -   1.2
  @@ -42,8 +42,9 @@
   
 plug-in className=org.apache.struts.validator.ValidatorPlugIn
   set-property property=pathnames
  - value=/WEB-INF/validator-rules.xml,
  -/WEB-INF/validation.xml/
  + value=/WEB-INF/struts-config/validator-rules.xml,
  +/WEB-INF/struts-config/default-validation.xml,
  +/WEB-INF/struts-config/logon-validation.xml/
 /plug-in
   
 plug-in className=org.apache.struts.plugins.DigestingPlugIn
  
  
  
  1.1  
jakarta-commons-sandbox/chain/apps/mailreader/src/webapp/WEB-INF/struts-config/default-validation.xml
  
  Index: default-validation.xml
  ===
  ?xml version=1.0 encoding=ISO-8859-1 ?
  
  !DOCTYPE form-validation PUBLIC
-//Apache Software Foundation//DTD Commons Validator Rules Configuration 
1.1//EN
http://jakarta.apache.org/commons/dtds/validator_1_1.dtd;
  
  !--
  Validation Rules for the Struts Example Web Application
  
  $Id: default-validation.xml,v 1.1 2004/04/08 23:32:34 husted Exp $
  --
  
  form-validation
  
  
  !-- == Default Language Form Definitions = --
  formset
  
  form name=RegisterUser
  
  field property=fromAddress
  depends=required,email
  arg0   key=prompt.fromAddress/
  /field
  
  field property=fullName
  depends=required
arg0 key=prompt.fullName/
  /field
  
  field property=replyToAddress
  depends=email
  arg0   key=prompt.replyToAddress/
  /field
  
  field property=username
  depends=required
arg0 key=prompt.username/
  /field
  
  /form
  
  
  /formset
  
  
  /form-validation
  
  
  
  1.1  
jakarta-commons-sandbox/chain/apps/mailreader/src/webapp/WEB-INF/struts-config/logon-validation.xml
  
  Index: logon-validation.xml
  ===
  ?xml version=1.0 encoding=ISO-8859-1 ?
  
  !DOCTYPE form-validation PUBLIC
-//Apache Software Foundation//DTD Commons Validator Rules Configuration 
1.1//EN
http://jakarta.apache.org/commons/dtds/validator_1_1.dtd;
  
  form-validation
  formset
  form name=LogonUser
  
  field property=username
  depends=required
  arg0   key=prompt.username/
  /field
  
  field property=password
  depends=required, minlength,maxlength
  arg0   key=prompt.password/
  arg1   key=${var:minlength} name=minlength
 resource=false/
  arg2   key=${var:maxlength} name=maxlength
 resource=false/
  var
  var-namemaxlength/var-name
  var-value16/var-value
  /var
  var
  var-nameminlength/var-name
  var-value3/var-value
  /var
  /field
  
  /form
  /formset
  /form-validation
  
  
  
  1.1  
jakarta-commons-sandbox/chain/apps/mailreader/src/webapp/WEB-INF/struts-config/register.xml
  
  Index: register.xml
  ===
  ?xml version=1.0 encoding=ISO-8859-1 ?
  !DOCTYPE struts-config PUBLIC
-//Apache Software Foundation//DTD Struts Configuration 1.2//EN
http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd;
  struts-config
  display-name![CDATA[
  Mailreader 
]]
   

cvs commit: jakarta-commons-sandbox/chain/apps/mailreader/src/resources/chain catalog.xml

2004-04-08 Thread husted
husted  2004/04/08 16:33:33

  Modified:chain/apps/mailreader/src/resources/chain catalog.xml
  Log:
  Add LogonUser Command
  
  Revision  ChangesPath
  1.3   +3 -0  
jakarta-commons-sandbox/chain/apps/mailreader/src/resources/chain/catalog.xml
  
  Index: catalog.xml
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/chain/apps/mailreader/src/resources/chain/catalog.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- catalog.xml   29 Mar 2004 00:53:28 -  1.2
  +++ catalog.xml   8 Apr 2004 23:33:33 -   1.3
  @@ -6,4 +6,7 @@
   command
   name=LocaleChange
   className=org.apache.commons.chain.mailreader.commands.LocaleChange /
  +command
  +name=LogonUser
  +className=org.apache.commons.chain.mailreader.commands.LogonUser /
   /chains
  
  
  

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



cvs commit: jakarta-commons/validator/xdocs tasks.xml

2004-04-08 Thread dgraham
dgraham 2004/04/08 16:40:54

  Modified:validator/xdocs tasks.xml
  Log:
  Removed completed tasks.
  
  Revision  ChangesPath
  1.12  +1 -15 jakarta-commons/validator/xdocs/tasks.xml
  
  Index: tasks.xml
  ===
  RCS file: /home/cvs/jakarta-commons/validator/xdocs/tasks.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- tasks.xml 28 Mar 2004 19:32:40 -  1.11
  +++ tasks.xml 8 Apr 2004 23:40:54 -   1.12
  @@ -27,15 +27,6 @@
   Validator.  Contributions are welcome! 
 /p
   
  -subsection name=High priority 
  -  ul
  - li
  - Remove functionality deprecated in 1.1.0 release in 1.2.0 
release.
  - /li
  -   /ul
  -/subsection
  -
  -subsection name=Medium priority 
 ul
   li
   Integrate the creation of javascript javadocs into the maven build. 
What will need to happen
  @@ -92,12 +83,7 @@
conditions.
/li
 /ul
  -/subsection
  -
  -subsection name=Low priority 
  -  ul
  -   /ul
  -/subsection
  +
   /section
   /body
   /document
  
  
  

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



cvs commit: jakarta-commons-sandbox/chain/apps/mailreader/xdocs - New directory

2004-04-08 Thread husted
husted  2004/04/08 16:41:01

  jakarta-commons-sandbox/chain/apps/mailreader/xdocs - New directory

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



cvs commit: jakarta-commons/validator/src/share/org/apache/commons/validator GenericTypeValidator.java

2004-04-08 Thread dgraham
dgraham 2004/04/08 17:16:39

  Modified:validator/src/share/org/apache/commons/validator
GenericTypeValidator.java
  Log:
  javadoc changes only.
  
  Revision  ChangesPath
  1.14  +4 -6  
jakarta-commons/validator/src/share/org/apache/commons/validator/GenericTypeValidator.java
  
  Index: GenericTypeValidator.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/GenericTypeValidator.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- GenericTypeValidator.java 21 Feb 2004 17:10:29 -  1.13
  +++ GenericTypeValidator.java 9 Apr 2004 00:16:39 -   1.14
  @@ -35,9 +35,7 @@
* correctly typed class based on the validation performed.
*/
   public class GenericTypeValidator implements Serializable {
  -/*
  -* Logger.
  -*/
  +   
  private static Log log = LogFactory.getLog(GenericTypeValidator.class);
   
   /**
  
  
  

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



cvs commit: jakarta-commons-sandbox/chain/apps/mailreader/src/webapp/WEB-INF/struts-config default.xml

2004-04-08 Thread husted
husted  2004/04/08 17:39:04

  Modified:chain/apps/mailreader/src/webapp/WEB-INF/struts-config
default.xml
  Log:
  Add entry for RegisterAdd mapping
  
  Revision  ChangesPath
  1.3   +1 -0  
jakarta-commons-sandbox/chain/apps/mailreader/src/webapp/WEB-INF/struts-config/default.xml
  
  Index: default.xml
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/chain/apps/mailreader/src/webapp/WEB-INF/struts-config/default.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- default.xml   8 Apr 2004 23:32:34 -   1.2
  +++ default.xml   9 Apr 2004 00:39:04 -   1.3
  @@ -21,6 +21,7 @@
   
   action-mappings
   action path=/RegisterForm forward=/missing.jsp /
  +action path=/RegisterAdd forward=/missing.jsp /
   action path=/Tour forward=/missing.jsp /
   /action-mappings
   
  
  
  

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



Re: [digester] @author and @version

2004-04-08 Thread Craig McClanahan
matthew.hawthorne wrote:

Simon Kitching wrote:

What benefit is there in having this info in the source?
I can't currently see any:
 * Developers can just use cvs status.
 * End users just care that the file came from version 2.1.
 * Maybe it is useful info when working with source snapshots,but 
that isn't very common.

What am I missing?


I think it's a convenience to be able to see when the last change was 
made, and who made it, in the source file -- instead of doing  'cvs 
status'.  But that's about it.

I like having the $Id$ string somewhere at the top of each file, 
because I often download the sources onto my laptop, and can't execute 
cvs status from an airplane.

However, with the recent craze over @author tags, maybe we shouldn't 
even be using $Id$ anymore, since it contains the committer's username.

The committer's username isn't going to be hidden even without $Id$, 
because cvs log will show it.  But that's a totally separate thing 
from what @author is/was about.

Craig

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


Re: [all] Shared build causes issues in releases

2004-04-08 Thread Craig McClanahan
Martin Cooper wrote:

[snip]
The src/share variant originally came from Struts, and thus from the
earliest components that existed here in Commons. BeanUtils, Collections,
Digester, Resources, and Validator all lived their lives as part of Struts
before coming to Commons. (Actually, src/share probably came from
somewhere else before Struts, but Craig would be the person to answer that
one. ;)
 

IIRC, I just copied what Tomcat was already doing (src/share) when I set 
up the Struts repository.

I have no problems with different commons packages using different names 
under src ... it takes about 30 seconds to adapt.

--
Martin Cooper
 

Craig

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


[Jelly] A contribution: I added these methods to JellyContext

2004-04-08 Thread Jaime Garza
...as I am using jelly as part of an XML cache, in which I don't have a
File, URL, or URI.  It would be nice if these methods can be reviewed
and checked in.  Of course I am not a commiter, so I need to hand these
over by mail (is there any other way?)  I checked out the source this
morning.

ISSUE: I did ChildContext with a URL of '/' as no parent URL can be
given
ISSUE: Very brute force method (copy/paste design pattern), but I'll
leave the elegance to the owner
ISSUE: I am not showing the new imports (SAX Input source)

Here they go...

/**
 * Attempts to parse the script from the given input stream using
the
 * [EMAIL PROTECTED] #getResource} method then returns the compiled script.
 */
public Script compileScript(InputStream in) throws JellyException {
XMLParser parser = getXMLParser();
parser.setContext(this);
Script script = null;
try {
script = parser.parse(in);
} catch (IOException e) {
throw new JellyException(Could not parse Jelly script,e);
} catch (SAXException e) {
throw new JellyException(Could not parse Jelly script,e);
}

return script.compile();
}

/**
 * Attempts to parse the script from the given input source using
the
 * [EMAIL PROTECTED] #getResource} method then returns the compiled script.
 */
public Script compileScript(InputSource in) throws JellyException {
XMLParser parser = getXMLParser();
parser.setContext(this);
Script script = null;
try {
script = parser.parse(in);
} catch (IOException e) {
throw new JellyException(Could not parse Jelly script,e);
} catch (SAXException e) {
throw new JellyException(Could not parse Jelly script,e);
}

return script.compile();
}

/**
 * Parses the script from the given input stream then compiles it
and runs it.
 *
 * @return the new child context that was used to run the script
 */
public JellyContext runScript(InputStream in, XMLOutput output)
throws JellyException {
return runScript(in, output, JellyContext.DEFAULT_EXPORT,
JellyContext.DEFAULT_INHERIT);
}

/**
 * Parses the script from the given input source then compiles it
and runs it.
 *
 * @return the new child context that was used to run the script
 */
public JellyContext runScript(InputSource in, XMLOutput output)
throws JellyException {
return runScript(in, output, JellyContext.DEFAULT_EXPORT,
JellyContext.DEFAULT_INHERIT);
}

/**
 * Parses the script from the given file then compiles it and runs
it.
 *
 * @return the new child context that was used to run the script
 */
public JellyContext runScript(InputStream in, XMLOutput output,
  boolean export, boolean inherit) throws
JellyException {
Script script = compileScript(in);

URL newJellyContextURL = null;
try {
newJellyContextURL = new URL(/);
} catch (MalformedURLException e) {
throw new JellyException(e.toString());
}

JellyContext newJellyContext = newJellyContext();
newJellyContext.setRootURL( newJellyContextURL );
newJellyContext.setCurrentURL( newJellyContextURL );
newJellyContext.setExport( export );
newJellyContext.setInherit( inherit );

if ( inherit ) {
// use the same variable scopes
newJellyContext.variables = this.variables;
}

if (log.isDebugEnabled() ) {
log.debug( About to run script from input stream);
log.debug( root context URL:  + newJellyContext.rootURL );
log.debug( current context URL:  +
newJellyContext.currentURL );
}

script.run(newJellyContext, output);

return newJellyContext;
}

/**
 * Parses the script from the given input source then compiles it
and runs it.
 *
 * @return the new child context that was used to run the script
 */
public JellyContext runScript(InputSource in, XMLOutput output,
  boolean export, boolean inherit) throws
JellyException {
Script script = compileScript(in);

URL newJellyContextURL = null;
try {
newJellyContextURL = new URL(/);
} catch (MalformedURLException e) {
throw new JellyException(e.toString());
}

JellyContext newJellyContext = newJellyContext();
newJellyContext.setRootURL( newJellyContextURL );
newJellyContext.setCurrentURL( newJellyContextURL );
newJellyContext.setExport( export );
newJellyContext.setInherit( inherit );

if ( inherit ) {
// use the same variable scopes
newJellyContext.variables = this.variables;
}

if (log.isDebugEnabled() ) {
log.debug( About 

RE: [math] ArrayUtils.isAscending, isDescending

2004-04-08 Thread Brent Worden
 -Original Message-
 From: Phil Steitz [mailto:[EMAIL PROTECTED]
 Sent: Friday, April 02, 2004 9:15 PM
 To: Jakarta Commons Developers List
 Subject: Re: [lang] ArrayUtils.isAscending, isDescending

 Any ideas where this should go in [math]?  The application is in testing
 that the knot points passed to SplineInterpolator.interpolate(-,-) and to
 PolynomialSplineFunction constructor form a partition.  Sorting to fix
 would be a bad idea, since you would have to parallel sort the y
 values or
 polynomial function arrays, resp.

 Phil


I have no problem with it going into MathUtils.  Or we could create our own
ArrayUtils that supplements the one found in [lang].

Brent Worden
http://www.brent.worden.org


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



Re: [Math] - RealMatrix

2004-04-08 Thread Phil Steitz
Inger, Matthew wrote:
Has any thought been given to creating a Matrix interface
which can handle BigInteger and/or BigDecimal?
Yes. BigInteger would be a little funny, since Integers aren't a field ;-) 
but BigDecimal might make sense, as would Complex.  There are (at least) 
two ways to go, which we can explore post 1.0:

1) Create an abstract Matrix interface with entries being abstact field 
elements.  See the approach in, e.g. JADE 
http://jade.dautelle.com/api/com/dautelle/math/Matrix.html.  This is 
really walking down the abstract algebra framework path.

2) Create BigDecimalMatrix, ComplexMatrix with interfaces similar to 
RealMatrix, leveraging the special properties of the field elements and 
their representations.

My inclination would be to KISS and go with 2), with practical 
applications / use cases driving decisions on what gets implemented; 
though I see the value of the abstract approach as well.

Unless we think that the current design of RealMatrix is overly limiting, 
I would prefer to hold off on this discussion until post 1.0, though.

Phil

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




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


Re: question about performance

2004-04-08 Thread Oleg Kalnichevski
Gil,
(1) First and foremost DO reuse HttpClient instances when using
multi-threaded connection manager. HttpClient class is thread-safe. In
fact there are no known problems with having just one instance of
HttpClient per application. Using a new instance of HttpClient for
processing each request totally defeats all the performance
optimizations we have built into HttpClient

(2) Use multi-threaded connection manager in case you do not

(3) Disable stale connection check

(4) Do not use connect timeout which causes a controller thread to be
spawned per connection attempt

Oleg

On Thu, 2004-04-08 at 21:02, Alvarez, Gil wrote:
 We recently ported our url-hitting code from using java.net.* code to
 httpclient code. We use it in a high-volume environment (20 machines are
 hitting an external 3rd party to retrieve images).
 
  
 
 
 
 After the port, we saw a significant increase in cycles used by the
 machines, about 2-3 times (ie, the load on the boxes increased from
 using up 20% of the cpu, to about 50%-60% of the cpu.
 
  
 
 For each request, we instantiate an HttpClient object, and a GetMethod
 object, and shut things down afterwards.
 
  
 
 In order to reduce the use of cycles, what is the recommended approach?
 
  
 
 Thank you.
 


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



Re: question about performance

2004-04-08 Thread Sam Berlin
Regarding point 4, it might be worthwhile to use reflection on newer 
JVMs so that the controller thread isn't necessary.  An example of this 
is:

//a) Conceptually, this code does the following:
//  SocketAddress addr=new InetSocketAddress(host, 
port);
//  Socket ret=new Socket();
//  ret.connect(addr, timeout);
//  return ret;
//   Unfortunately that causes compile errors on older 
versions
//   of Java.  Worse, it may cause runtime errors if class 
loading
//   is not done lazily.  (See chapter 12.3.4 of the Java 
Language
//   Specification.)  So we use reflection.
 		Class _socketClass = Class.forName(java.net.Socket);
			Class _socketAddressClass = Class.forName(java.net.SocketAddress);
 		Class _connectMethod = _socketClass.getMethod(connect,
new Class[] { _socketAddressClass, Integer.TYPE });
			Class socketAddress =
Class.forName(java.net.InetSocketAddress);
			Class _inetAddressConstructor =
socketAddress.getConstructor(new Class[] {
	String.class, Integer.TYPE
});
try {
Socket ret = (Socket)_socketClass.newInstance();

Object addr = _inetAddressConstructor.newInstance(
new Object[] { host, new Integer(port) });
_connectMethod.invoke(ret,
new Object[] { addr, new Integer(timeout) });
return ret;
} catch (InvocationTargetException e) {
Throwable e2 = e.getTargetException();
throw (IOException)e2;
} catch(InstantiationException e) {
} catch(IllegalAccessException e) {
}
Thanks,
 Sam
On Thursday, April 8, 2004, at 03:22  PM, Oleg Kalnichevski wrote:

Gil,
(1) First and foremost DO reuse HttpClient instances when using
multi-threaded connection manager. HttpClient class is thread-safe. In
fact there are no known problems with having just one instance of
HttpClient per application. Using a new instance of HttpClient for
processing each request totally defeats all the performance
optimizations we have built into HttpClient
(2) Use multi-threaded connection manager in case you do not

(3) Disable stale connection check

(4) Do not use connect timeout which causes a controller thread to be
spawned per connection attempt
Oleg

On Thu, 2004-04-08 at 21:02, Alvarez, Gil wrote:
We recently ported our url-hitting code from using java.net.* code to
httpclient code. We use it in a high-volume environment (20 machines 
are
hitting an external 3rd party to retrieve images).





After the port, we saw a significant increase in cycles used by the
machines, about 2-3 times (ie, the load on the boxes increased from
using up 20% of the cpu, to about 50%-60% of the cpu.


For each request, we instantiate an HttpClient object, and a GetMethod
object, and shut things down afterwards.


In order to reduce the use of cycles, what is the recommended 
approach?



Thank you.



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




DO NOT REPLY [Bug 28296] New: - [API Doc] Compile performance optimization guide

2004-04-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=28296.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

[API Doc] Compile performance optimization guide

   Summary: [API Doc] Compile performance optimization guide
   Product: Commons
   Version: 1.2 Final
  Platform: Other
   URL: http://marc.theaimsgroup.com/?t=10814511522r=1w=2
OS/Version: Other
Status: NEW
  Severity: Enhancement
  Priority: Other
 Component: HttpClient
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Performance optimization guide is long overdue and badly needed. The more people
start using HttpClient in all sorts of creative ways the more we are going to
need it.

Oleg

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



DO NOT REPLY [Bug 28296] - [API Doc] Compile performance optimization guide

2004-04-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=28296.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

[API Doc] Compile performance optimization guide

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Target Milestone|--- |2.1 Final

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



RE: question about performance

2004-04-08 Thread Oleg Kalnichevski
Gil,
HttpClient#getHost / HttpClient#getPort return the DEFAULT host and port
used when only relative request path is given

HttpClient agent = new HttpClient();
GetMethod get1 = new GetMethod(/relative/whatever.html);
// default host configuration applies
GetMethod get2 = new
GetMethod(http://www.whatever.com/absolute/whatever.html;);

Oleg



On Thu, 2004-04-08 at 22:01, Alvarez, Gil wrote:
 Ok, I considered reusing HttpClient, but when I saw methods such as
 HttpClient.getHost() and getPort(), they implied that at the very least
 it's not a thread safe class to use. If i have multiple threads
 executing within one HttpClient object at the same time, and I call
 HttpClient.getHost(), what's going to happen?
 
 -Original Message-
 From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, April 08, 2004 12:23 PM
 To: Commons HttpClient Project
 Subject: Re: question about performance
 
 Gil,
 (1) First and foremost DO reuse HttpClient instances when using
 multi-threaded connection manager. HttpClient class is thread-safe. In
 fact there are no known problems with having just one instance of
 HttpClient per application. Using a new instance of HttpClient for
 processing each request totally defeats all the performance
 optimizations we have built into HttpClient
 
 (2) Use multi-threaded connection manager in case you do not
 
 (3) Disable stale connection check
 
 (4) Do not use connect timeout which causes a controller thread to be
 spawned per connection attempt
 
 Oleg
 
 On Thu, 2004-04-08 at 21:02, Alvarez, Gil wrote:
  We recently ported our url-hitting code from using java.net.* code to
  httpclient code. We use it in a high-volume environment (20 machines
 are
  hitting an external 3rd party to retrieve images).
  
   
  
  
  
  After the port, we saw a significant increase in cycles used by the
  machines, about 2-3 times (ie, the load on the boxes increased from
  using up 20% of the cpu, to about 50%-60% of the cpu.
  
   
  
  For each request, we instantiate an HttpClient object, and a GetMethod
  object, and shut things down afterwards.
  
   
  
  In order to reduce the use of cycles, what is the recommended
 approach?
  
   
  
  Thank you.
  
 
 
 -
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



DO NOT REPLY [Bug 28302] New: - [PATCH] Wirelog corrections

2004-04-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=28302.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

[PATCH] Wirelog corrections

   Summary: [PATCH] Wirelog corrections
   Product: Commons
   Version: 2.0 Final
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Minor
  Priority: Other
 Component: HttpClient
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


This patch 

* fixes the problem reported by Geir H. Pettersen geir at cellus.no. See
http://marc.theaimsgroup.com/?t=10807235534r=1w=2 for details

* increases the priority of HTTP request/status line  HTTP headers output from
DEBUG to INFO. Quite often request/response content generate excessive amount of
output in the wirelog and produce no valuable debug information of what so ever.
By setting wirelog verbosity to INFO one can turn off the logging of 
request/response content.

I believe the patch should be applied to both CVS HEAD and 2.0 branch. Please
let me know if you agree

Oleg

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



DO NOT REPLY [Bug 28302] - [PATCH] Wirelog corrections

2004-04-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=28302.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

[PATCH] Wirelog corrections

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Target Milestone|--- |2.0 Final

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



DO NOT REPLY [Bug 28302] - [PATCH] Wirelog corrections

2004-04-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=28302.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

[PATCH] Wirelog corrections





--- Additional Comments From [EMAIL PROTECTED]  2004-04-08 21:58 ---
Created an attachment (id=11194)
Patch against CVS HEAD

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



DO NOT REPLY [Bug 28303] - [PATCH] HttpClient#getHost HttpClient#getPort methods are misleading

2004-04-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=28303.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

[PATCH] HttpClient#getHost  HttpClient#getPort methods are misleading

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Target Milestone|--- |2.0 Final

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



DO NOT REPLY [Bug 28303] - [PATCH] HttpClient#getHost HttpClient#getPort methods are misleading

2004-04-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=28303.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

[PATCH] HttpClient#getHost  HttpClient#getPort methods are misleading





--- Additional Comments From [EMAIL PROTECTED]  2004-04-08 22:14 ---
Created an attachment (id=11195)
Patch against CVS HEAD

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



DO NOT REPLY [Bug 28303] - [PATCH] HttpClient#getHost HttpClient#getPort methods are misleading

2004-04-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=28303.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

[PATCH] HttpClient#getHost  HttpClient#getPort methods are misleading





--- Additional Comments From [EMAIL PROTECTED]  2004-04-08 23:25 ---
Agreed.  This one is good to go for both 2.0 and HEAD.

Mike

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



DO NOT REPLY [Bug 25372] - auto close idle connections

2004-04-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=25372.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

auto close idle connections

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |ASSIGNED



--- Additional Comments From [EMAIL PROTECTED]  2004-04-09 00:36 ---
Finally I found a little time to take a look at the patch. Somehow I can't help
thinking that coupling IdleConnectionHandler with HttpConnection is not not
ideal. What if one sets a ridiculously high idle timeout value? Connections
would be piling up in the IdleConnectionHandler unnecessarily.

I would rather see IdleConnectionHandler monitor connections of just one
connection manager, and would rather have the IdleConnectionHandler stay alive
as long as the connection manager itself stays alive. I understand your
intention was to have only one dedicated thread watching over all active
connections in order to conserve resources. I personally would rather prefer a
little less resource efficient but slightly more elegant solution. Besides, do
not we encourage people to have just one HttpClient instance with just one
connection manager per application, do we?

Or maybe I just desperately need some sleep. Let me know if my rumbling makes
any sense at all. If it does not I'll try to give the problem another look
tomorrow morning (I mean this morning)

Oleg

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



DO NOT REPLY [Bug 28302] - [PATCH] Wirelog corrections

2004-04-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=28302.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

[PATCH] Wirelog corrections





--- Additional Comments From [EMAIL PROTECTED]  2004-04-09 01:50 ---
I think Geir's fix is good and should be applied to both 2.0 and HEAD.  I am a little 
more wary about 
changing the headers to info though.  This will end up producing a lot of unnecessary 
output I think.  
My suggestion would be to move content and headers to two new logs 
httpclient.wire.headers and 
httpclient.wire.content for example.  This will maintain current behavior and will 
also allow for more 
fine grained control.

Mike

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



DO NOT REPLY [Bug 25372] - auto close idle connections

2004-04-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=25372.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

auto close idle connections





--- Additional Comments From [EMAIL PROTECTED]  2004-04-09 03:05 ---
 Somehow I can't help thinking that coupling IdleConnectionHandler with 
 HttpConnection is not not
 ideal. What if one sets a ridiculously high idle timeout value? Connections
 would be piling up in the IdleConnectionHandler unnecessarily.

Someone could certainly set an unwise timeout value, but that is true for many 
HttpClient settings.  We 
should ensure that the default value is good, and then rely on people to not shooting 
themselves in the 
foot.

I don't see the danger of having connections pile up.  It may be somewhat unelegant, 
but it at least 
ensures that connections are eventually cleaned up.  The current alternative is to 
just let the 
connections get GCed.  This method does not guarantee that the sockets are closed.

As far as coupling IdleConnectionHandler with HttpConnection, I'm not sure how else to 
do it.  What 
would you suggest? 

 I would rather see IdleConnectionHandler monitor connections of just one
 connection manager, and would rather have the IdleConnectionHandler stay alive
 as long as the connection manager itself stays alive. I understand your
 intention was to have only one dedicated thread watching over all active
 connections in order to conserve resources. I personally would rather prefer a
 little less resource efficient but slightly more elegant solution. Besides, do
 not we encourage people to have just one HttpClient instance with just one
 connection manager per application, do we?

One IdleConnectionHandler per connection manager can be done with the current system.  
Since the 
idle handler is just a param, a different one can be used per connection manager.  I 
agree that having 
just one idle handler for all connection managers may not be good, I also think the 
reverse is no better.  
My intention was to have a sane default behavior that supports customization.

Mike

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