[Jakarta-commons Wiki] Trivial Update of "MathFaq" by aeriform

2006-11-02 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-commons Wiki" 
for change notification.

The following page has been changed by aeriform:
http://wiki.apache.org/jakarta-commons/MathFaq

The comment on the change is:
fix'd speliing erorrs

--
  Follow the directions under "contributing" in the 
[[http://jakarta.apache.org/commons/math/developers.html Commons Math 
Developers Guide]]. Feedback and contributions from all interested parties are 
welcome. Extensive Java or mathematical knowledge is not required to 
participate (though some knowledge of one or the other is certainly helpful ;-)
  
  === 1. Are instances of 
org.apache.commons.math.stat.descriptive.DescriptiveStatisticsImpl thread-safe? 
===
- No, they are not.  By design, we chose not to introduce thread semantics into 
the classes. This allows the library to be used in environments were thread 
management by the application is to be avoided.  The same is true of many other 
classes in commons-math, including the solvers in the analysis package.
+ No, they are not.  By design, we chose not to introduce thread semantics into 
the classes. This allows the library to be used in environments where thread 
management by the application is to be avoided.  The same is true of many other 
classes in commons-math, including the solvers in the analysis package.
  
  === 2. Can code derived from "Numerical Recipes" routines be included in 
commons-math? ===
  Algorithms implemented in "Numerical Recipes" are 
[http://www.numerical-recipes.com/infotop.html#distinfo licensed under terms] 
that are incompatible with the Apache license.  As such, commons-math can not 
contain any code derived from these routines.  The precedent we have 
established is to not allow any code developed using NR as a source and instead 
find alternate citations for the algorithms detailed in NR.

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



[Jakarta-commons Wiki] Update of "LocalSpellingWords" by aeriform

2006-11-02 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-commons Wiki" 
for change notification.

The following page has been changed by aeriform:
http://wiki.apache.org/jakarta-commons/LocalSpellingWords

--
  be best developers Direct documentation have how in list on or passed 
somewhere suggestion the this to user would
  
  correction
+ 
+ Algorithms algorithms all allow allows alternate analysis and any application 
Are are as As asked avoided By by Can can certainly chose citations classes 
code Commons commons contain contributing contributions derived Descriptive 
descriptive design detailed developed directions environments established 
Extensive Feedback find Follow for frequently from get Guide helpful 
implemented included including incompatible instances instead interested into 
introduce involved is Java knowledge library license licensed management many 
Math math mathematical No not numerical Numerical of one other package 
participate parties precedent questions recipes Recipes required routines safe 
same semantics solvers some source space Statistics such terms that these they 
though thread true under used using we welcome where with

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



[jira] Commented: (MATH-157) Add support for SVD.

2006-11-02 Thread Tyler Ward (JIRA)
[ 
http://issues.apache.org/jira/browse/MATH-157?page=comments#action_12446796 ] 

Tyler Ward commented on MATH-157:
-


Not bad. Looks like everything is in the right place, modulo a transpose or two 
perhaps, but looks good. The eigenvector reduction is really the heart of this 
algorithm. Your QR iteration will work (I think), but it's really inefficient. 
The trick is to do two different reductions. The first should reduce to 
tridiagonal form (this can be done with only 2(N-2) matrix multiplications, 
rather than the 200 or so you're using), and then use the givens rotations to 
reduce tridiagonal to diagonal. Should take about 5N rotations, but each is 
only about 10N operations or so (rather than N-cubed for a regular matrix 
multiply). 

Congrats. 






> Add support for SVD.
> 
>
> Key: MATH-157
> URL: http://issues.apache.org/jira/browse/MATH-157
> Project: Commons Math
>  Issue Type: New Feature
>Reporter: Tyler Ward
> Attachments: svd.tar.gz, svd2.tar.gz
>
>
> SVD is probably the most important feature in any linear algebra package, 
> though also one of the more difficult. 
> In general, SVD is needed because very often real systems end up being 
> singular (which can be handled by QR), or nearly singular (which can't). A 
> good example is a nonlinear root finder. Often the jacobian will be nearly 
> singular, but it is VERY rare for it to be exactly singular. Consequently, LU 
> or QR produces really bad results, because they are dominated by rounding 
> error. What is needed is a way to throw out the insignificant parts of the 
> solution, and take what improvements we can get. That is what SVD provides. 
> The colt SVD algorithm has a serious infinite loop bug, caused primarily by 
> Double.NaN in the inputs, but also by underflow and overflow, which really 
> can't be prevented. 
> If worried about patents and such, SVD can be derrived from first principals 
> very easily with the acceptance of two postulates.
> 1) That an SVD always exists.
> 2) That Jacobi reduction works. 
> Both are very basic results from linear algebra, available in nearly any text 
> book. Once that's accepted, then the rest of the algorithm falls into place 
> in a very simple manner. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



RE: is there a context sensitive properties configuration class available?

2006-11-02 Thread Kenneth Xu
I use commons Configuration. One config file for each environment and use
composite configuration to include a common one. System property to define
which environment config to pick up.
 
-Original Message-
From: Zhang, Alex [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 02, 2006 5:10 PM
To: Jakarta Commons Developers List
Subject: RE: is there a context sensitive properties configuration class
available?

Yes, I know I can archive that using system property.
But here my goal is to have just one property file which I can commit
into CVS, I can build my web app from CVS, deploy it, and only need to
config the run time context, one variable, to pick up the correct
properties.
The purpose is to minimize the configuration changes from build to
deploy. 
Does this make sense to anybody?

Thank you,
Alex X Zhang

-Original Message-
From: Oliver Heger [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 02, 2006 4:37 PM
To: Jakarta Commons Developers List
Subject: Re: is there a context sensitive properties configuration class
available?

Zhang, Alex wrote:
> Hi all,
> 
>  
> 
> I am looking for a properties configuration class that is context
> sensitive, which means the value of a property depends on the context.
> 
>  
> 
> For example, I have a website that uses different databases on dev,
> stage and production environments, but all use the same user name and
> password, so my properties file should look like this:
> 
>  
> 
> DB_URL (DEV)=jdbc:mysql://10.0.0.1
> 
> DB_URL (STAGE)=jdbc:mysql://10.0.0.2
> 
> DB_ URL(PRO)=jdbc:mysql://10.0.0.3
> 
>  
> 
> DB_USER=joe_user
> 
> DB_PASSWD=abc123
> 
>  
> 
> It may be named something differently. But can anyone tell me if there
> is any class like this? 
> 
>  
There is no such thing as a context sensitive configuration, but maybe 
you can achieve the desired result using interpolation (i.e. variable 
substitution) and/or system properties. For instance you could define a 
system property for the database URL. Then you could load your 
configuration file using a ConfigurationFactory that also includes a 
SystemConfiguration (which gives you access to all defined system 
properties). While the user name and password are directly defined in 
the configuration file, the URL would be obtained from the system 
properties. Would this be an option?

Please have a look at the user guide for more details.

HTH
Oliver

-
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]



svn commit: r470607 - in /jakarta/commons/proper/email/trunk: project.properties project.xml

2006-11-02 Thread bayard
Author: bayard
Date: Thu Nov  2 16:03:24 2006
New Revision: 470607

URL: http://svn.apache.org/viewvc?view=rev&rev=470607
Log:
I've deployed a SNAPSHOT of dumbster to the people.apache.org/repo m1 snapshot 
repo. Works happily on OS X. Will look into Wister

Modified:
jakarta/commons/proper/email/trunk/project.properties
jakarta/commons/proper/email/trunk/project.xml

Modified: jakarta/commons/proper/email/trunk/project.properties
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/email/trunk/project.properties?view=diff&rev=470607&r1=470606&r2=470607
==
--- jakarta/commons/proper/email/trunk/project.properties (original)
+++ jakarta/commons/proper/email/trunk/project.properties Thu Nov  2 16:03:24 
2006
@@ -22,7 +22,7 @@
 # Version: $Id$
 #
 # #
-maven.repo.remote=http://www.ibiblio.org/maven/,http://www.apache.org/dist/java-repository/
+maven.repo.remote=http://www.ibiblio.org/maven/,http://people.apache.org/repo/m1-snapshot-repository/
 maven.remote.group=apcvs
 
 maven.repo.list=commons-unreleased

Modified: jakarta/commons/proper/email/trunk/project.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/email/trunk/project.xml?view=diff&rev=470607&r1=470606&r2=470607
==
--- jakarta/commons/proper/email/trunk/project.xml (original)
+++ jakarta/commons/proper/email/trunk/project.xml Thu Nov  2 16:03:24 2006
@@ -209,7 +209,7 @@
 
 dumbster
 dumbster
-1.6
+SNAPSHOT
 http://quintanasoft.com/dumbster/
 
   test



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



[jira] Commented: (MATH-157) Add support for SVD.

2006-11-02 Thread Remi Arntzen (JIRA)
[ 
http://issues.apache.org/jira/browse/MATH-157?page=comments#action_12446759 ] 

Remi Arntzen commented on MATH-157:
---

now I see your comments... sigh

> Add support for SVD.
> 
>
> Key: MATH-157
> URL: http://issues.apache.org/jira/browse/MATH-157
> Project: Commons Math
>  Issue Type: New Feature
>Reporter: Tyler Ward
> Attachments: svd.tar.gz, svd2.tar.gz
>
>
> SVD is probably the most important feature in any linear algebra package, 
> though also one of the more difficult. 
> In general, SVD is needed because very often real systems end up being 
> singular (which can be handled by QR), or nearly singular (which can't). A 
> good example is a nonlinear root finder. Often the jacobian will be nearly 
> singular, but it is VERY rare for it to be exactly singular. Consequently, LU 
> or QR produces really bad results, because they are dominated by rounding 
> error. What is needed is a way to throw out the insignificant parts of the 
> solution, and take what improvements we can get. That is what SVD provides. 
> The colt SVD algorithm has a serious infinite loop bug, caused primarily by 
> Double.NaN in the inputs, but also by underflow and overflow, which really 
> can't be prevented. 
> If worried about patents and such, SVD can be derrived from first principals 
> very easily with the acceptance of two postulates.
> 1) That an SVD always exists.
> 2) That Jacobi reduction works. 
> Both are very basic results from linear algebra, available in nearly any text 
> book. Once that's accepted, then the rest of the algorithm falls into place 
> in a very simple manner. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Updated: (MATH-157) Add support for SVD.

2006-11-02 Thread Remi Arntzen (JIRA)
 [ http://issues.apache.org/jira/browse/MATH-157?page=all ]

Remi Arntzen updated MATH-157:
--

Attachment: svd2.tar.gz

Now it works perfectly (At least according to how I think it should work).  
However it is not to your specifications, e.g. I do the eigenvector calculation 
on the larger of U and V and then use the property M*v_i=q_i*u_i and 
M^T*u_i=q_i*v_i.  While I continue to learn more about the properties of the 
SVD I will refine it as I go along, but right now I have to get ready for 
school.

> Add support for SVD.
> 
>
> Key: MATH-157
> URL: http://issues.apache.org/jira/browse/MATH-157
> Project: Commons Math
>  Issue Type: New Feature
>Reporter: Tyler Ward
> Attachments: svd.tar.gz, svd2.tar.gz
>
>
> SVD is probably the most important feature in any linear algebra package, 
> though also one of the more difficult. 
> In general, SVD is needed because very often real systems end up being 
> singular (which can be handled by QR), or nearly singular (which can't). A 
> good example is a nonlinear root finder. Often the jacobian will be nearly 
> singular, but it is VERY rare for it to be exactly singular. Consequently, LU 
> or QR produces really bad results, because they are dominated by rounding 
> error. What is needed is a way to throw out the insignificant parts of the 
> solution, and take what improvements we can get. That is what SVD provides. 
> The colt SVD algorithm has a serious infinite loop bug, caused primarily by 
> Double.NaN in the inputs, but also by underflow and overflow, which really 
> can't be prevented. 
> If worried about patents and such, SVD can be derrived from first principals 
> very easily with the acceptance of two postulates.
> 1) That an SVD always exists.
> 2) That Jacobi reduction works. 
> Both are very basic results from linear algebra, available in nearly any text 
> book. Once that's accepted, then the rest of the algorithm falls into place 
> in a very simple manner. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



RE: is there a context sensitive properties configuration class available?

2006-11-02 Thread Zhang, Alex
Yes, I know I can archive that using system property.
But here my goal is to have just one property file which I can commit
into CVS, I can build my web app from CVS, deploy it, and only need to
config the run time context, one variable, to pick up the correct
properties.
The purpose is to minimize the configuration changes from build to
deploy. 
Does this make sense to anybody?

Thank you,
Alex X Zhang

-Original Message-
From: Oliver Heger [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 02, 2006 4:37 PM
To: Jakarta Commons Developers List
Subject: Re: is there a context sensitive properties configuration class
available?

Zhang, Alex wrote:
> Hi all,
> 
>  
> 
> I am looking for a properties configuration class that is context
> sensitive, which means the value of a property depends on the context.
> 
>  
> 
> For example, I have a website that uses different databases on dev,
> stage and production environments, but all use the same user name and
> password, so my properties file should look like this:
> 
>  
> 
> DB_URL (DEV)=jdbc:mysql://10.0.0.1
> 
> DB_URL (STAGE)=jdbc:mysql://10.0.0.2
> 
> DB_ URL(PRO)=jdbc:mysql://10.0.0.3
> 
>  
> 
> DB_USER=joe_user
> 
> DB_PASSWD=abc123
> 
>  
> 
> It may be named something differently. But can anyone tell me if there
> is any class like this? 
> 
>  
There is no such thing as a context sensitive configuration, but maybe 
you can achieve the desired result using interpolation (i.e. variable 
substitution) and/or system properties. For instance you could define a 
system property for the database URL. Then you could load your 
configuration file using a ConfigurationFactory that also includes a 
SystemConfiguration (which gives you access to all defined system 
properties). While the user name and password are directly defined in 
the configuration file, the URL would be obtained from the system 
properties. Would this be an option?

Please have a look at the user guide for more details.

HTH
Oliver

-
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]



[jira] Commented: (BEANUTILS-255) ConvertUtilsBean does not support converts to a java.util.Date

2006-11-02 Thread Niall Pemberton (JIRA)
[ 
http://issues.apache.org/jira/browse/BEANUTILS-255?page=comments#action_12446739
 ] 

Niall Pemberton commented on BEANUTILS-255:
---

The version I have can be configured either to use a specified Locale or an 
array of patterns. You're right though that it won't cope with different 
Locales - but thats the purpose of the Locale converters. If someone wants 
Locale specific conversion they should use that. Also in my mind something is 
better than nothing and if someone wants nothing they can always "deregister" 
the date converter anyway.

> ConvertUtilsBean does not support converts to a java.util.Date
> --
>
> Key: BEANUTILS-255
> URL: http://issues.apache.org/jira/browse/BEANUTILS-255
> Project: Commons BeanUtils
>  Issue Type: Bug
>Reporter: Henri Yandell
> Fix For: 1.8.0
>
>
> It's impossible to convert a String to a java.util.Date (see commons-user 
> mail thread 'Digester and using of java.util.Date').

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



Re: is there a context sensitive properties configuration class available?

2006-11-02 Thread Oliver Heger

Zhang, Alex wrote:

Hi all,

 


I am looking for a properties configuration class that is context
sensitive, which means the value of a property depends on the context.

 


For example, I have a website that uses different databases on dev,
stage and production environments, but all use the same user name and
password, so my properties file should look like this:

 


DB_URL (DEV)=jdbc:mysql://10.0.0.1

DB_URL (STAGE)=jdbc:mysql://10.0.0.2

DB_ URL(PRO)=jdbc:mysql://10.0.0.3

 


DB_USER=joe_user

DB_PASSWD=abc123

 


It may be named something differently. But can anyone tell me if there
is any class like this? 

 
There is no such thing as a context sensitive configuration, but maybe 
you can achieve the desired result using interpolation (i.e. variable 
substitution) and/or system properties. For instance you could define a 
system property for the database URL. Then you could load your 
configuration file using a ConfigurationFactory that also includes a 
SystemConfiguration (which gives you access to all defined system 
properties). While the user name and password are directly defined in 
the configuration file, the URL would be obtained from the system 
properties. Would this be an option?


Please have a look at the user guide for more details.

HTH
Oliver

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



[jira] Commented: (BEANUTILS-255) ConvertUtilsBean does not support converts to a java.util.Date

2006-11-02 Thread Henri Yandell (JIRA)
[ 
http://issues.apache.org/jira/browse/BEANUTILS-255?page=comments#action_12446730
 ] 

Henri Yandell commented on BEANUTILS-255:
-

>From David Sillis on the user list 

"Having worked with BeanUtils before, I seem to recall that the main reason 
there isn't a java.util.Date converter is that unlike java.sql.Date, it doesn't 
have a favored String format that is guaranteed to convert correctly."

So that would be the reason why my last comment is wrong.

> ConvertUtilsBean does not support converts to a java.util.Date
> --
>
> Key: BEANUTILS-255
> URL: http://issues.apache.org/jira/browse/BEANUTILS-255
> Project: Commons BeanUtils
>  Issue Type: Bug
>Reporter: Henri Yandell
> Fix For: 1.8.0
>
>
> It's impossible to convert a String to a java.util.Date (see commons-user 
> mail thread 'Digester and using of java.util.Date').

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Resolved: (CONFIGURATION-229) config : load for a configuration node is called before parsing is complete : attributes ignored

2006-11-02 Thread Oliver Heger (JIRA)
 [ http://issues.apache.org/jira/browse/CONFIGURATION-229?page=all ]

Oliver Heger resolved CONFIGURATION-229.


Fix Version/s: Nightly Builds
   Resolution: Fixed

A fix was committed that causes the load() method to be invoked after 
initialization of all specified properties is completed. This should solve this 
problem. Please double-check.

Thanks!

> config : load for a configuration node is called before parsing is complete : 
> attributes ignored
> 
>
> Key: CONFIGURATION-229
> URL: http://issues.apache.org/jira/browse/CONFIGURATION-229
> Project: Commons Configuration
>  Issue Type: Bug
>Affects Versions: 1.3 Final
>Reporter: Andre Doherty
> Assigned To: Oliver Heger
>Priority: Minor
> Fix For: Nightly Builds
>
>
> Hi there
> i have noticed the following issue which appears to be a bug. (Tested on 1.3 
> however the version doesn't appear above)
> createObject from FileConfigurationFactory(DigesterConfigurationFactory) set 
> fileName and fires load of properties : 
> public Object createObject(Attributes attributes) throws Exception
> {
> FileConfiguration conf = createConfiguration(attributes);
> conf.setBasePath(getBasePath());
> conf.setFileName(attributes.getValue(ATTR_FILENAME));
> try
> {
> log.info("Trying to load configuration " + 
> conf.getFileName());
> conf.load();
> }
> However digester invokes createObject when the object is instancied and 
> before setting any attributes. 
> All other attributes beside fileName and basePath are not read in time and 
> therefore are ignored during load.
> I guess load should be called when node initialization is complete, possibly 
> using a proper digester rule. 
> Regards,
> andré

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Commented: (BEANUTILS-255) ConvertUtilsBean does not support converts to a java.util.Date

2006-11-02 Thread Henri Yandell (JIRA)
[ 
http://issues.apache.org/jira/browse/BEANUTILS-255?page=comments#action_12446727
 ] 

Henri Yandell commented on BEANUTILS-255:
-

We already have java.sql.Date, Time and Timestamp converters that do that:

return (Date.valueOf(value.toString()));

So that's something we're already facing.

> ConvertUtilsBean does not support converts to a java.util.Date
> --
>
> Key: BEANUTILS-255
> URL: http://issues.apache.org/jira/browse/BEANUTILS-255
> Project: Commons BeanUtils
>  Issue Type: Bug
>Reporter: Henri Yandell
> Fix For: 1.8.0
>
>
> It's impossible to convert a String to a java.util.Date (see commons-user 
> mail thread 'Digester and using of java.util.Date').

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



svn commit: r470528 - in /jakarta/commons/proper/configuration/trunk: conf/ src/java/org/apache/commons/configuration/ src/test/org/apache/commons/configuration/ xdocs/

2006-11-02 Thread oheger
Author: oheger
Date: Thu Nov  2 13:22:49 2006
New Revision: 470528

URL: http://svn.apache.org/viewvc?view=rev&rev=470528
Log:
Changed the creation of file-based configurations in ConfigurationFactory so 
that the load() method is called only after all specified properties have been 
initialized; fix for CONFIGURATION-229

Added:

jakarta/commons/proper/configuration/trunk/conf/testDigesterConfigurationWithProps.xml
   (with props)
Modified:

jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/ConfigurationFactory.java

jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestConfigurationFactory.java
jakarta/commons/proper/configuration/trunk/xdocs/changes.xml

Added: 
jakarta/commons/proper/configuration/trunk/conf/testDigesterConfigurationWithProps.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/conf/testDigesterConfigurationWithProps.xml?view=auto&rev=470528
==
--- 
jakarta/commons/proper/configuration/trunk/conf/testDigesterConfigurationWithProps.xml
 (added)
+++ 
jakarta/commons/proper/configuration/trunk/conf/testDigesterConfigurationWithProps.xml
 Thu Nov  2 13:22:49 2006
@@ -0,0 +1,5 @@
+
+
+
+  
+

Propchange: 
jakarta/commons/proper/configuration/trunk/conf/testDigesterConfigurationWithProps.xml
--
svn:eol-style = native

Propchange: 
jakarta/commons/proper/configuration/trunk/conf/testDigesterConfigurationWithProps.xml
--
svn:keywords = Date Author Id Revision HeadURL

Propchange: 
jakarta/commons/proper/configuration/trunk/conf/testDigesterConfigurationWithProps.xml
--
svn:mime-type = text/xml

Modified: 
jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/ConfigurationFactory.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/ConfigurationFactory.java?view=diff&rev=470528&r1=470527&r2=470528
==
--- 
jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/ConfigurationFactory.java
 (original)
+++ 
jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/ConfigurationFactory.java
 Thu Nov  2 13:22:49 2006
@@ -29,6 +29,7 @@
 import org.apache.commons.configuration.plist.PropertyListConfiguration;
 import org.apache.commons.configuration.plist.XMLPropertyListConfiguration;
 import org.apache.commons.digester.AbstractObjectCreationFactory;
+import org.apache.commons.digester.CallMethodRule;
 import org.apache.commons.digester.Digester;
 import org.apache.commons.digester.ObjectCreationFactory;
 import org.apache.commons.digester.Substitutor;
@@ -70,6 +71,9 @@
 /** Constant for the fileName attribute.*/
 private static final String ATTR_FILENAME = "fileName";
 
+/** Constant for the load method.*/
+private static final String METH_LOAD = "load";
+
 /** Constant for the default base path (points to actual directory).*/
 private static final String DEF_BASE_PATH = ".";
 
@@ -295,28 +299,28 @@
 digester,
 matchString + "properties",
 new PropertiesConfigurationFactory(),
-null,
+METH_LOAD,
 additional);
 
 setupDigesterInstance(
 digester,
 matchString + "plist",
 new PropertyListConfigurationFactory(),
-null,
+METH_LOAD,
 additional);
 
 setupDigesterInstance(
 digester,
 matchString + "xml",
 new FileConfigurationFactory(XMLConfiguration.class),
-null,
+METH_LOAD,
 additional);
 
 setupDigesterInstance(
 digester,
 matchString + "hierarchicalXml",
 new FileConfigurationFactory(XMLConfiguration.class),
-null,
+METH_LOAD,
 additional);
 
 setupDigesterInstance(
@@ -362,7 +366,7 @@
 
 if (method != null)
 {
-digester.addCallMethod(matchString, method);
+digester.addRule(matchString, new CallOptionalMethodRule(method));
 }
 
 digester.addSetNext(matchString, "addConfiguration", 
Configuration.class.getName());
@@ -516,24 +520,6 @@
 {
 FileConfiguration conf = createConfiguration(attributes);
 conf.setBasePath(getBasePath());
-conf.setFileName(attributes.getValue(ATTR_FILENAME));
-try
-{
-log.info("Trying to load configuration " + conf.getFileName());
-con

is there a context sensitive properties configuration class available?

2006-11-02 Thread Zhang, Alex
Hi all,

 

I am looking for a properties configuration class that is context
sensitive, which means the value of a property depends on the context.

 

For example, I have a website that uses different databases on dev,
stage and production environments, but all use the same user name and
password, so my properties file should look like this:

 

DB_URL (DEV)=jdbc:mysql://10.0.0.1

DB_URL (STAGE)=jdbc:mysql://10.0.0.2

DB_ URL(PRO)=jdbc:mysql://10.0.0.3

 

DB_USER=joe_user

DB_PASSWD=abc123

 

It may be named something differently. But can anyone tell me if there
is any class like this? 

 

Thank you.

 

Alex Zhang

 



svn commit: r470520 - in /jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net: SocketClient.java ftp/FTP.java ftp/FTPClient.java ftp/parser/VMSVersioningFTPEntryPar

2006-11-02 Thread rwinston
Author: rwinston
Date: Thu Nov  2 13:02:43 2006
New Revision: 470520

URL: http://svn.apache.org/viewvc?view=rev&rev=470520
Log:
* Add _socket_.isConnected() and null check 
* Add some generification 

Modified:

jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/SocketClient.java

jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTP.java

jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTPClient.java

jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/parser/VMSVersioningFTPEntryParser.java

jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/nntp/SimpleNNTPHeader.java

Modified: 
jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/SocketClient.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/SocketClient.java?view=diff&rev=470520&r1=470519&r2=470520
==
--- 
jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/SocketClient.java
 (original)
+++ 
jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/SocketClient.java
 Thu Nov  2 13:02:43 2006
@@ -68,11 +68,6 @@
 /** The socket used for the connection. */
 protected Socket _socket_;
 
-/**
- * A status variable indicating if the client's socket is currently open.
- */
-protected boolean _isConnected_;
-
 /** The default port the client should connect to. */
 protected int _defaultPort_;
 
@@ -101,7 +96,6 @@
 _output_ = null;
 _timeout_ = 0;
 _defaultPort_ = 0;
-_isConnected_ = false;
 _socketFactory_ = __DEFAULT_SOCKET_FACTORY;
 _serverSocketFactory_ = __DEFAULT_SERVER_SOCKET_FACTORY;
 }
@@ -128,7 +122,6 @@
 _socket_.setSoTimeout(_timeout_);
 _input_ = _socket_.getInputStream();
 _output_ = _socket_.getOutputStream();
-_isConnected_ = true;
 }
 
 
@@ -279,7 +272,6 @@
 if (_socket_ != null) _socket_ = null;
 _input_ = null;
 _output_ = null;
-_isConnected_ = false;
 }
 
 
@@ -291,7 +283,10 @@
  */
 public boolean isConnected()
 {
-return _isConnected_;
+if (_socket_ == null)
+   return false;
+
+   return _socket_.isConnected();
 }
 
 

Modified: 
jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTP.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTP.java?view=diff&rev=470520&r1=470519&r2=470520
==
--- 
jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTP.java
 (original)
+++ 
jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTP.java
 Thu Nov  2 13:02:43 2006
@@ -22,8 +22,8 @@
 import java.net.InetAddress;
 import java.net.Socket;
 import java.net.SocketException;
-import java.util.Enumeration;
-import java.util.Vector;
+import java.util.ArrayList;
+import java.util.Arrays;
 
 import org.apache.commons.net.MalformedServerReplyException;
 import org.apache.commons.net.ProtocolCommandListener;
@@ -214,7 +214,7 @@
 private StringBuilder __commandBuffer = new StringBuilder();
 
 protected int _replyCode;
-protected Vector _replyLines;
+protected ArrayList _replyLines;
 protected boolean _newReplyString;
 protected String _replyString;
 protected String _controlEncoding;
@@ -252,7 +252,7 @@
 {
 super();
 setDefaultPort(DEFAULT_PORT);
-_replyLines = new Vector();
+_replyLines = new ArrayList();
 _newReplyString = false;
 _replyString = null;
 _commandSupport_ = new ProtocolCommandSupport(this);
@@ -264,7 +264,7 @@
 int length;
 
 _newReplyString = true;
-_replyLines.setSize(0);
+//_replyLines. setSize(0);
 
 String line = _controlInput_.readLine();
 
@@ -290,7 +290,7 @@
 "Could not parse response code.\nServer Reply: " + line);
 }
 
-_replyLines.addElement(line);
+_replyLines.add(line);
 
 // Get extra lines if message continues.
 if (length > 3 && line.charAt(3) == '-')
@@ -303,7 +303,7 @@
 throw new FTPConnectionClosedException(
 "Connection closed without indication.");
 
-_replyLines.addElement(line);
+_replyLines.add(line);
 
 // The length() check handles problems that could arise from 
readLine()
 // returnin

[jira] Commented: (BEANUTILS-255) ConvertUtilsBean does not support converts to a java.util.Date

2006-11-02 Thread Simon Kitching (JIRA)
[ 
http://issues.apache.org/jira/browse/BEANUTILS-255?page=comments#action_12446722
 ] 

Simon Kitching commented on BEANUTILS-255:
--

I'm not sure this is a good idea.

Presumably this converter would use the "system locale" to determine how to 
parse the input strings. This means that 
  01/02/2006
will generate 01 Feb 2006 when run on a server in Europe, and 02 Jan 2006 when 
run on a server in the USA.

That's not the kind of behaviour I would like to see a library default to.

> ConvertUtilsBean does not support converts to a java.util.Date
> --
>
> Key: BEANUTILS-255
> URL: http://issues.apache.org/jira/browse/BEANUTILS-255
> Project: Commons BeanUtils
>  Issue Type: Bug
>Reporter: Henri Yandell
> Fix For: 1.8.0
>
>
> It's impossible to convert a String to a java.util.Date (see commons-user 
> mail thread 'Digester and using of java.util.Date').

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



svn commit: r470480 - /jakarta/commons/proper/httpclient/trunk/src/contrib/org/apache/commons/httpclient/contrib/proxy/PluginProxyUtil.java

2006-11-02 Thread olegk
Author: olegk
Date: Thu Nov  2 11:16:32 2006
New Revision: 470480

URL: http://svn.apache.org/viewvc?view=rev&rev=470480
Log:
Enabled detection of proxy settings in a browser (applet) for JDK 1.5 and 1.6

Contributed by Jiri Kopsa 

Modified:

jakarta/commons/proper/httpclient/trunk/src/contrib/org/apache/commons/httpclient/contrib/proxy/PluginProxyUtil.java

Modified: 
jakarta/commons/proper/httpclient/trunk/src/contrib/org/apache/commons/httpclient/contrib/proxy/PluginProxyUtil.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/contrib/org/apache/commons/httpclient/contrib/proxy/PluginProxyUtil.java?view=diff&rev=470480&r1=470479&r2=470480
==
--- 
jakarta/commons/proper/httpclient/trunk/src/contrib/org/apache/commons/httpclient/contrib/proxy/PluginProxyUtil.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/contrib/org/apache/commons/httpclient/contrib/proxy/PluginProxyUtil.java
 Thu Nov  2 11:16:32 2006
@@ -107,17 +107,15 @@
 if (result == null) {
 invokeFailover = true;
 }
-} else if (javaVers.startsWith("1.4"))  {
-result = detectProxySettingsJDK14(sampleURL);
+} else if (javaVers.startsWith("1.4") || (javaVers.startsWith("1.5") 
|| javaVers.startsWith("1.6")))  {
+result = detectProxySettingsJDK14_JDK15_JDK16(sampleURL);
 if (result == null) {
 invokeFailover = true;
 }
-} else if (javaVers.startsWith("1.5"))  {
-invokeFailover = true;
 } else {
 if (LOG.isDebugEnabled()) {
 LOG.debug("Sun Plugin reported java version not 1.3.X, " +
-  "1.4.X or 1.5.X - trying failover detection...");
+  "1.4.X, 1.5.X or 1.6.X - trying failover 
detection...");
 }
 invokeFailover = true;
 }
@@ -220,7 +218,7 @@
  * @param sampleURL the URL to check proxy settings for
  * @return ProxyHost the host and port of the proxy that should be used
  */
-private static ProxyHost detectProxySettingsJDK14(URL sampleURL) {
+private static ProxyHost detectProxySettingsJDK14_JDK15_JDK16(URL 
sampleURL) {
 ProxyHost result = null;
 try {
 // Look around for the 1.4.X plugin proxy detection class... 
@@ -232,6 +230,7 @@
 new Class[] {URL.class});
 Object proxyInfoArrayObj = 
 getProxyInfoMethod.invoke(null, new Object[] {sampleURL});
+
 if (proxyInfoArrayObj == null  
 || Array.getLength(proxyInfoArrayObj) == 0) {
 if (LOG.isDebugEnabled()) {
@@ -257,6 +256,7 @@
 result = new ProxyHost(proxyIP, proxyPort);
 }
 } catch (Exception e) { 
+e.printStackTrace();
 LOG.warn("Sun Plugin 1.4.X proxy detection class not found, " +
  "will try failover detection, e:"+e);
 }
@@ -325,4 +325,4 @@
 }
 return result;
 }
-}
+}
\ No newline at end of file



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



[jira] Resolved: (BEANUTILS-253) Converters per property rather than per type

2006-11-02 Thread Henri Yandell (JIRA)
 [ http://issues.apache.org/jira/browse/BEANUTILS-253?page=all ]

Henri Yandell resolved BEANUTILS-253.
-

Resolution: Duplicate

> Converters per property rather than per type
> 
>
> Key: BEANUTILS-253
> URL: http://issues.apache.org/jira/browse/BEANUTILS-253
> Project: Commons BeanUtils
>  Issue Type: New Feature
>Reporter: Henri Yandell
>
> As part of BEANUTILS-10 I suggested being able to register converters per 
> bean property instead of per Java type. Here's a JIRA issue to suggest it.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Updated: (LANG-291) Null-safe comparison methods for finding most recent / least recent dates.

2006-11-02 Thread David J. M. Karlsen (JIRA)
 [ http://issues.apache.org/jira/browse/LANG-291?page=all ]

David J. M. Karlsen updated LANG-291:
-

Attachment: ObjectUtils-patch-rev470351.txt

PLease delete the DateUtils patch, and use this more general patch with 
max(Comparable, Comparable) an min(Comparable, Comparable) methods in 
ObjectUtils.

A compareTo( Comparable, Comparable ) is left out, as this would violate Java 
protocol, see
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Comparable.html

"Note that null is not an instance of any class, and e.compareTo(null) should 
throw a NullPointerException even though e.equals(null) returns false."


> Null-safe comparison methods for finding most recent / least recent dates.
> --
>
> Key: LANG-291
> URL: http://issues.apache.org/jira/browse/LANG-291
> Project: Commons Lang
>  Issue Type: Improvement
> Environment: N/A
>Reporter: David J. M. Karlsen
> Fix For: 3.0
>
> Attachments: DateUtils-patch-rev468924.txt, 
> ObjectUtils-patch-rev470351.txt
>
>
> /**
>  * 
>  * Null-safe date comparison.
>  * Returnes the most recent date if date1 and date2 is non-null. 
>  * If one of the dates are null, the non-null will be returned.
>  * If both are null, null will be returned.
>  * 
>  * @param date1
>  * @param date2
>  * @return
>  */
> public static Date mostRecent( Date date1, Date date2 )
>  /**
>  * 
>  * Null-safe date comparison.
>  * Returnes the least recent (oldest) date if date1 and date2 is 
> non-null. 
>  * If one of the dates are null, the non-null will be returned.
>  * If both are null, null will be returned.
>  * 
>  * @param date1
>  * @param date2
>  * @return
>  */
> public static Date leastRecent( Date date1, Date date2 )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Commented: (BEANUTILS-255) ConvertUtilsBean does not support converts to a java.util.Date

2006-11-02 Thread Niall Pemberton (JIRA)
[ 
http://issues.apache.org/jira/browse/BEANUTILS-255?page=comments#action_12446551
 ] 

Niall Pemberton commented on BEANUTILS-255:
---

I have a DateConverter and CalendarConverter written - just need to do the test 
cases

> ConvertUtilsBean does not support converts to a java.util.Date
> --
>
> Key: BEANUTILS-255
> URL: http://issues.apache.org/jira/browse/BEANUTILS-255
> Project: Commons BeanUtils
>  Issue Type: Bug
>Reporter: Henri Yandell
> Fix For: 1.8.0
>
>
> It's impossible to convert a String to a java.util.Date (see commons-user 
> mail thread 'Digester and using of java.util.Date').

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Created: (BEANUTILS-256) getIndexedProperty() should javadoc IndexOutOufBoundsException

2006-11-02 Thread Torsten Feig (JIRA)
getIndexedProperty() should javadoc IndexOutOufBoundsException
--

 Key: BEANUTILS-256
 URL: http://issues.apache.org/jira/browse/BEANUTILS-256
 Project: Commons BeanUtils
  Issue Type: Bug
Affects Versions: 1.7.0
Reporter: Torsten Feig
Priority: Trivial


PropertyUtilsBean.getIndexedProperty()'s javadoc declares to throw 
ArrayIndexOutOfBoundsException, which is correct since the code can access an 
array. But it can also access a list and therefor throw an 
IndexOutOufBoundsException, so it should be mentioned in the javadoc as well. 
Since ArrayIndexOutOfBoundsException is a variation of 
IndexOutOufBoundsException with essentially the same meaning, one could limit 
oneself to IndexOutOufBoundsException.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[daemon] Re: Obtaining procrun for Win32

2006-11-02 Thread Henri Yandell

Hi David,

This thread might be of use:
http://mail-archives.apache.org/mod_mbox/jakarta-commons-user/200606.mbox/[EMAIL
 PROTECTED]

Looking at my last year of user archives, I don't see any questions on
daemon being answered and I can see lots of svn commits for it so it's
still active. Ccing the commons-dev list to point this out to the
daemon developers.

Thanks,

Hen

On 11/1/06, David Sills <[EMAIL PROTECTED]> wrote:

Hi there:

I went to look on the commons daemon site for Procrun, and although I
see a page explaining its use, I see nowhere from which to download the
software. The "Native binaries" page has only versions for various UNIX
flavors.

Sorry if I am being dense, but I really like Apache software, and would
like to consider Procrun as a Windows service provider along with some
other options for adoption.

Any advice would be gratefully received.

Thanks!

David Sills

-
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]



[jira] Created: (BEANUTILS-255) ConvertUtilsBean does not support converts to a java.util.Date

2006-11-02 Thread Henri Yandell (JIRA)
ConvertUtilsBean does not support converts to a java.util.Date
--

 Key: BEANUTILS-255
 URL: http://issues.apache.org/jira/browse/BEANUTILS-255
 Project: Commons BeanUtils
  Issue Type: Bug
Reporter: Henri Yandell
 Fix For: 1.8.0


It's impossible to convert a String to a java.util.Date (see commons-user mail 
thread 'Digester and using of java.util.Date').

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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