DO NOT REPLY [Bug 37359] - [PATCH] SharedPoolDataSource - close() method closes pool instance only when pool available (initialized)

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

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





--- Additional Comments From [EMAIL PROTECTED]  2006-12-13 23:44 ---
Jakarta Commons has moved its issue management from Bugzilla to JIRA.

This issue is now tracked at
https://issues.apache.org/jira/browse/DBCP-39

Please make any comments you might have there.

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

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



[jira] Created: (VALIDATOR-217) org.apache.commons.validator.ValidatorResults should contain a method which will tell whether all the validators are true

2006-12-13 Thread raj (JIRA)
org.apache.commons.validator.ValidatorResults should contain a method which 
will tell whether all the validators are true
-

 Key: VALIDATOR-217
 URL: http://issues.apache.org/jira/browse/VALIDATOR-217
 Project: Commons Validator
  Issue Type: Improvement
  Components: Framework
 Environment: All
Reporter: raj
Priority: Critical


The org.apache.commons.validator.ValidatorResults does not contain any method 
which gives me a consolidated result. As a developer i am interested in knowing 
whether all the validations are true. Only if there is any failure i will go 
through the individual ValidatorResult. But ValidatorResults doesnt provide me 
such a method. Because of this each time i run the Validator.validate method i 
get a ValidatorResults and i need to parse through each ValidatorResult in 
ValidatorResults to know whether the validation is successful.

If there is a method in ValidatorResults which will give me a consolidated 
result probably a boolean true then i need not parse the ValidatorResults for 
each field and check whether it is validated.

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



DO NOT REPLY [Bug 37359] - [PATCH] SharedPoolDataSource - close() method closes pool instance only when pool available (initialized)

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

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





--- Additional Comments From [EMAIL PROTECTED]  2006-12-13 21:53 ---
Hi,

Could you please tell me, on which build/jar this fix is being included. I am 
not seeing this fix any of your releaser notes and the same issue is existing 
in the "torque-3.3-RC1.jar"

Thanks
Meenakshi.
[EMAIL PROTECTED]

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

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



FileUpload runs out of memory unnecessairly when FileCleaner Can't Keep up

2006-12-13 Thread Keenan Ross
Commons FileUpload uses the FileCleaner class from Commons IO to ensure 
that all temporary files are deleted when the corresponding Java object 
goes out of scope. FileCleaner works well in most situations, but can 
lead to OutOfMemoryExceptions in long running active programs. For 
example, in the situation where we have a web server with 50 threads 
uploading files, the low priority single cleaning thread doesn't get 
enough CPU time to empty its queue. Thus the queue holding the list of 
files to be deleted grows until memory is exhausted. This is even more 
ironic in our environment because we are careful to delete all the 
temporary files, so the FileCleaner never finds anything that needs 
deleting anyway on its long queue.


We have seen up to 300,000 objects on the FileCleaner queue, each of 
which references a large amount of memory, including a couple of IO 
buffers, keeping it from being garbage collected. One possible solution 
is to minimize the size of the marker object put on the ReferenceQueue, 
perhaps just the file name instead of the whole DiskFileItem, but that 
only postpones the problem since the queue may still not get enough time 
to empty.


Another potential solution is to remove the file from the FileCleaner 
queue when it is explicitly deleted, but I don't see any mechanism in 
the underlying ReferenceQueue to remove arbitrary items.


So the approach we took was to subclass DiskFileItem with an alternative 
implementation that 1) does not enqueue the DiskFileItem with the 
FileCleaner and 2) has a empty finalize method (to speed up garbage 
collection). We called that class UnmanagedDeleteDiskFileItem to 
indicate that the user must explicitly clean up the temporary file 
(typically with finally blocks). We also coded an alternative 
DiskFileItemFactory whose constructor took a boolean indicating whether 
the returned items were to be implicitly or explicitly managed, choosing 
either the old or new DiskFileItem implementation respectively.


I'd like to ask the FileUpload maintainers to consider these options:
1) Adopt a strategy like the one we use to allow the coder to ask the 
factory for either managed or unmanaged DiskFileItems, both of which are 
supplied by the FileUpload package. I have attached our 
DiskFileItemFactory and UnmanagedDeleteDiskFileItem to use as a starting 
point of this enhancement.
2) Make DiskFileItem more supportive of subclassing, by adding a 
protected getTempFileName method which the subclass can call. This would 
allow users to cleanly subclass DiskFileItem. Currently, our 
UnmanagedDeleteDiskFileItem implementation has to duplicate some of the 
code from DiskFileItem because too much was marked private.

--keenan

package edu.mit.broad.trace.util;

import java.io.File;

import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.disk.DiskFileItem;

/**
 * A FileItemFactory that allows the creator to decide whether the
 * FileItems that are constucted will automatically delete their
 * underlying files or not.
 * 
 * @author keenan
 *
 */
public class DiskFileItemFactory extends
org.apache.commons.fileupload.disk.DiskFileItemFactory {

private boolean managedDelete;

/**
 * Constructor that allows the specification of whether the
 * factory will create FileItems that manage their deletes or not.
 * @param managedDelete true if the file should be deleted when the
 * FileItem is garbage collected, false if the programmer is
 * explicitly responsible for the deletes.
 */
public DiskFileItemFactory(boolean managedDelete) {
this.managedDelete = managedDelete;
}

/**
 * Constructor that allows the specification of whether the
 * factory will create FileItems that manage their deletes or not,
 * along with the size threshhold and the repository location.
 * @param managedDelete true if the file should be deleted when the
 * FileItem is garbage collected, false if the programmer is
 * explicitly responsible for the deletes.
 * @param sizeThreshold The threshold, in bytes, below which items will 
be
 *  retained in memory and above which they will be
 *  stored as a file.
 * @param repositoryThe data repository, which is the directory in
 *  which files will be created, should the item size
 *  exceed the threshold.
 */
public DiskFileItemFactory(boolean managedDelete, int sizeThreshold, 
File repository) {
super(sizeThreshold, repository);
this.managedDelete = managedDelete;
}

public FileItem createItem(
String fieldName,
String contentType,
boolean isFormField,
String fileName
) {

if (managedDelete) {

Re: [javaflow] small mistake on website

2006-12-13 Thread Rahul Akolkar

On 12/13/06, Henri Yandell <[EMAIL PROTECTED]> wrote:

Fixed. Thanks Chris.




OTOH, if the original authors agree, might be worthwhile changing the
ant task source to match the (earlier) documentation, since "destdir",
IMO, is a better choice than "dstdir" (being in sandbox helps here).

-Rahul



Hen

On 12/13/06, Christian <[EMAIL PROTECTED]> wrote:
> Hi,
> seems like my first message didn't get through, so this is the 2nd try.
>
> On the http://jakarta.apache.org/commons/sandbox/javaflow/
> antTask.html page is a little mistake. It should be "dstdir" and not
> "destdir" in order to work.
>
> best regards
> Chris
>


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



[VOTE] Release Commons SCXML 0.6

2006-12-13 Thread Rahul Akolkar

Having made a couple of (IMO, minor) changes, I've cut RC2. Towards that as 0.6:

http://people.apache.org/~rahul/commons/scxml-0.6/rc2/


[ ] +1  I support this release
[ ] +0
[ ] -0
[ ] -1  I do not support this release because...


Vote closes no sooner than Saturday, Dec 16th.

TIA for your time,
-Rahul

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



svn commit: r486871 - /jakarta/commons/proper/scxml/tags/SCXML_0_6_RC2/

2006-12-13 Thread rahul
Author: rahul
Date: Wed Dec 13 14:31:31 2006
New Revision: 486871

URL: http://svn.apache.org/viewvc?view=rev&rev=486871
Log:
Tag Commons SCXML 0.6 RC2

Added:
jakarta/commons/proper/scxml/tags/SCXML_0_6_RC2/
  - copied from r486870, jakarta/commons/proper/scxml/trunk/


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



svn commit: r486867 - /jakarta/commons/proper/scxml/trunk/project.xml

2006-12-13 Thread rahul
Author: rahul
Date: Wed Dec 13 14:25:34 2006
New Revision: 486867

URL: http://svn.apache.org/viewvc?view=rev&rev=486867
Log:
Lets have a clean pom -
 * The pom.artifactId thing is nice and generic, but, oh well
 * Unused reports

Modified:
jakarta/commons/proper/scxml/trunk/project.xml

Modified: jakarta/commons/proper/scxml/trunk/project.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/scxml/trunk/project.xml?view=diff&rev=486867&r1=486866&r2=486867
==
--- jakarta/commons/proper/scxml/trunk/project.xml (original)
+++ jakarta/commons/proper/scxml/trunk/project.xml Wed Dec 13 14:25:34 2006
@@ -27,8 +27,8 @@
   A Java Implementation of a State Chart XML Engine
 
   /images/scxml-logo-white.png
-  http://jakarta.apache.org/commons/${pom.artifactId.substring(8)}/
-  org.apache.commons.${pom.artifactId.substring(8)}
+  http://jakarta.apache.org/commons/scxml/
+  org.apache.commons.scxml
 
   
 The Apache Software Foundation
@@ -44,14 +44,14 @@
   
 
   people.apache.org
-  
/www/jakarta.apache.org/commons/${pom.artifactId.substring(8)}/
+  /www/jakarta.apache.org/commons/scxml/
   http://issues.apache.org/jira/
-  
/www/jakarta.apache.org/builds/jakarta-commons/${pom.artifactId.substring(8)}/
 
+  
/www/jakarta.apache.org/builds/jakarta-commons/scxml/
 
 
   
-
scm:svn:http://svn.apache.org/repos/asf/jakarta/commons/proper/${pom.artifactId.substring(8)}/trunk
-
scm:svn:https://svn.apache.org/repos/asf/jakarta/commons/proper/${pom.artifactId.substring(8)}/trunk
-
http://svn.apache.org/viewvc/jakarta/commons/proper/${pom.artifactId.substring(8)}/trunk
+
scm:svn:http://svn.apache.org/repos/asf/jakarta/commons/proper/scxml/trunk
+
scm:svn:https://svn.apache.org/repos/asf/jakarta/commons/proper/scxml/trunk
+http://svn.apache.org/viewvc/jakarta/commons/proper/scxml/trunk
   
 
   
@@ -273,20 +273,14 @@
   
 
   
- 
  maven-changes-plugin
  maven-checkstyle-plugin
  maven-cobertura-plugin
- 
  maven-faq-plugin
- 
  maven-javadoc-plugin
  maven-junit-report-plugin
  maven-jxr-plugin
  maven-license-plugin
- 
- 
- 
   
   
 



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



svn commit: r486866 - /jakarta/commons/proper/scxml/trunk/xdocs/index.xml

2006-12-13 Thread rahul
Author: rahul
Date: Wed Dec 13 14:22:42 2006
New Revision: 486866

URL: http://svn.apache.org/viewvc?view=rev&rev=486866
Log:
Link to release notes from download section as well.

Modified:
jakarta/commons/proper/scxml/trunk/xdocs/index.xml

Modified: jakarta/commons/proper/scxml/trunk/xdocs/index.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/scxml/trunk/xdocs/index.xml?view=diff&rev=486866&r1=486865&r2=486866
==
--- jakarta/commons/proper/scxml/trunk/xdocs/index.xml (original)
+++ jakarta/commons/proper/scxml/trunk/xdocs/index.xml Wed Dec 13 14:22:42 2006
@@ -74,8 +74,10 @@
 
  
   
-  The latest release is v0.6. -
-  http://jakarta.apache.org/site/downloads/downloads_commons-scxml.cgi";>Download
 now!
+  The latest release is v0.6. Read
+  http://svn.apache.org/viewvc/jakarta/commons/proper/scxml/tags/SCXML_0_6/RELEASE-NOTES.txt?view=markup";>v0.6
+  release notes before upgrading.
+  http://jakarta.apache.org/site/downloads/downloads_commons-scxml.cgi";>Download
 v0.6!
   
   
   The first release was v0.5. The initial release version number was chosen



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



svn commit: r486862 - in /jakarta/commons/proper/scxml/trunk: RELEASE-NOTES.txt xdocs/changes.xml

2006-12-13 Thread rahul
Author: rahul
Date: Wed Dec 13 14:17:26 2006
New Revision: 486862

URL: http://svn.apache.org/viewvc?view=rev&rev=486862
Log:
Today's changes.

Modified:
jakarta/commons/proper/scxml/trunk/RELEASE-NOTES.txt
jakarta/commons/proper/scxml/trunk/xdocs/changes.xml

Modified: jakarta/commons/proper/scxml/trunk/RELEASE-NOTES.txt
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/scxml/trunk/RELEASE-NOTES.txt?view=diff&rev=486862&r1=486861&r2=486862
==
--- jakarta/commons/proper/scxml/trunk/RELEASE-NOTES.txt (original)
+++ jakarta/commons/proper/scxml/trunk/RELEASE-NOTES.txt Wed Dec 13 14:17:26 
2006
@@ -38,11 +38,17 @@
 
 http://www.w3.org/2005/07/scxml
 
+ o See bug fixes section for semantic incompatibilities introduced due
+   to bugs fixed from v0.5
+
 NEW FEATURES:
 
  o The entire Commons SCXML object model as well as the SCXMLExecutor
-   instances are now serializable. This is particularly useful in
-   web environments for session persistence and clustering.
+   instances are now serializable, as long as the user specified content
+   in all state contexts is also serializable. This is particularly
+   useful in web environments for session persistence and clustering.
+   If  elements are used; the DOM Level 2 implementation in use
+   must also be serializable.
 
  o There is improved support for XML namespaces in SCXML documents.
Custom actions may be defined in user-specified namespaces.
@@ -61,14 +67,18 @@
 All deprecations introduced in this version are scheduled for removal in
 v1.0 of the library.
 
- o [org.apache.commons.scxml.io.SCXMLDigester] The custom digester rules
-   in this class are deprecated. They should not have been part of the
-   public API to begin with.
+ o [org.apache.commons.scxml.Builtin] The data() and dataNode() methods
+   that take two arguments are deprecated. They are replaced by their
+   three argument namespace-aware counterparts.
 
  o [org.apache.commons.scxml.ErrorReporter] All String constants in this
class have been deprecated. Use constants with the same names in
org.apache.commons.scxml.semantics.ErrorConstants instead.
 
+ o [org.apache.commons.scxml.io.SCXMLDigester] The custom digester rules
+   in this class are deprecated. They should not have been part of the
+   public API to begin with.
+
  o [org.apache.commons.scxml.model.Invoke] The method getParams()
returning a java.util.Map has been deprecated. Use the method
params() returning a java.util.List instead. See Javadocs for details.
@@ -76,7 +86,10 @@
 BUG FIXES:
 
  o [SCXML-21] Delay is not processed for  element with default
-   "targettype".
+   targettype ("scxml").
+
+ o [SCXML-16] target and targettype attributes of  element should
+   be evaluated as expressions.
 
  o [SCXML-14] Allow target of a transition to be omitted.
 

Modified: jakarta/commons/proper/scxml/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/scxml/trunk/xdocs/changes.xml?view=diff&rev=486862&r1=486861&r2=486862
==
--- jakarta/commons/proper/scxml/trunk/xdocs/changes.xml (original)
+++ jakarta/commons/proper/scxml/trunk/xdocs/changes.xml Wed Dec 13 14:17:26 
2006
@@ -36,6 +36,16 @@
 
 
+  
+   [12-12-2006] target and targettype attributes of  element
+   are now evaluated as expressions.
+  
+
+  
+   [12-12-2006] Set tests to warn, but not fail, if the DOM L2
+   implementation in use is not serializable.
+  
+
   
[12-07-2006] Update Commons Logging to version 1.1.
   



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



svn commit: r486858 - /jakarta/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java

2006-12-13 Thread rahul
Author: rahul
Date: Wed Dec 13 14:11:14 2006
New Revision: 486858

URL: http://svn.apache.org/viewvc?view=rev&rev=486858
Log:
Logging improvements.

Modified:

jakarta/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java

Modified: 
jakarta/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java?view=diff&rev=486858&r1=486857&r2=486858
==
--- 
jakarta/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java
 (original)
+++ 
jakarta/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java
 Wed Dec 13 14:11:14 2006
@@ -323,13 +323,20 @@
 if (SCXMLHelper.isStringEmpty(targetValue)) {
 // TODO: Remove both short-circuit passes in v1.0
 if (wait == 0L) {
+if (appLog.isDebugEnabled()) {
+appLog.debug(": Enqueued event '" + event
++ "' with no delay");
+}
 derivedEvents.add(new TriggerEvent(event,
 TriggerEvent.SIGNAL_EVENT));
 return;
 }
 } else {
 // We know of no other
-appLog.warn(": Unavailable target - " + target);
+if (appLog.isWarnEnabled()) {
+appLog.warn(": Unavailable target - "
++ targetValue);
+}
 derivedEvents.add(new TriggerEvent(
 EVENT_ERR_SEND_TARGETUNAVAILABLE,
 TriggerEvent.ERROR_EVENT));
@@ -338,6 +345,12 @@
 }
 }
 ctx.setLocal(getNamespacesKey(), null);
+if (appLog.isDebugEnabled()) {
+appLog.debug(": Dispatching event '" + event
++ "' to target '" + targetValue + "' of target type '"
++ targettypeValue + "' with suggested delay of " + wait
++ "ms");
+}
 // Else, let the EventDispatcher take care of it
 evtDispatcher.send(sendid, targetValue, targettypeValue, event,
 params, hintsValue, wait, externalNodes);



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



svn commit: r486855 - in /jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml: SCXMLExecutorTest.java io/SCXMLDigesterTest.java prefix-01.xml

2006-12-13 Thread rahul
Author: rahul
Date: Wed Dec 13 14:03:46 2006
New Revision: 486855

URL: http://svn.apache.org/viewvc?view=rev&rev=486855
Log:
Couple more test cases, for simple document having SCXML elements with prefixes.

Added:

jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/prefix-01.xml
   (with props)
Modified:

jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLExecutorTest.java

jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/io/SCXMLDigesterTest.java

Modified: 
jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLExecutorTest.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLExecutorTest.java?view=diff&rev=486855&r1=486854&r2=486855
==
--- 
jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLExecutorTest.java
 (original)
+++ 
jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLExecutorTest.java
 Wed Dec 13 14:03:46 2006
@@ -47,7 +47,7 @@
 
 // Test data
 private URL microwave01jsp, microwave02jsp, microwave01jexl,
-microwave02jexl, transitions01, transitions02, send02;
+microwave02jexl, transitions01, transitions02, prefix01, send01, 
send02;
 private SCXMLExecutor exec;
 
 /**
@@ -66,6 +66,10 @@
 getResource("org/apache/commons/scxml/transitions-01.xml");
 transitions02 = this.getClass().getClassLoader().
 getResource("org/apache/commons/scxml/transitions-02.xml");
+prefix01 = this.getClass().getClassLoader().
+getResource("org/apache/commons/scxml/prefix-01.xml");
+send01 = this.getClass().getClassLoader().
+getResource("org/apache/commons/scxml/send-01.xml");
 send02 = this.getClass().getClassLoader().
 getResource("org/apache/commons/scxml/send-02.xml");
 }
@@ -75,7 +79,7 @@
  */
 public void tearDown() {
 microwave01jsp = microwave02jsp = microwave01jexl = microwave02jexl =
-transitions01 = transitions02 = send02 = null;
+transitions01 = transitions02 = prefix01 = send01 = send02 = null;
 }
 
 /**
@@ -107,6 +111,19 @@
 checkMicrowave02Sample();
 }
 
+public void testSCXMLExecutorPrefix01Sample() {
+exec = SCXMLTestHelper.getExecutor(prefix01);
+assertNotNull(exec);
+Set currentStates = exec.getCurrentStatus().getStates();
+assertEquals(1, currentStates.size());
+assertEquals("ten", ((State)currentStates.iterator().
+next()).getId());
+currentStates = SCXMLTestHelper.fireEvent(exec, "ten.done");
+assertEquals(1, currentStates.size());
+assertEquals("twenty", ((State)currentStates.iterator().
+next()).getId());
+}
+
 public void testSCXMLExecutorTransitions01Sample() {
 exec = SCXMLTestHelper.getExecutor(transitions01);
 assertNotNull(exec);
@@ -148,7 +165,24 @@
 }
 }
 
-public void testSendTargettypeSCXMLSample() {
+public void testSend01Sample() {
+exec = SCXMLTestHelper.getExecutor(send01);
+assertNotNull(exec);
+try {
+Set currentStates = exec.getCurrentStatus().getStates();
+assertEquals(1, currentStates.size());
+assertEquals("ten", ((State)currentStates.iterator().
+next()).getId());
+currentStates = SCXMLTestHelper.fireEvent(exec, "ten.done");
+assertEquals(1, currentStates.size());
+assertEquals("twenty", ((State)currentStates.iterator().
+next()).getId());
+} catch (Exception e) {
+fail(e.getMessage());
+}
+}
+
+public void testSend02TargettypeSCXMLSample() {
 exec = SCXMLTestHelper.getExecutor(send02);
 assertNotNull(exec);
 try {

Modified: 
jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/io/SCXMLDigesterTest.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/io/SCXMLDigesterTest.java?view=diff&rev=486855&r1=486854&r2=486855
==
--- 
jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/io/SCXMLDigesterTest.java
 (original)
+++ 
jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/io/SCXMLDigesterTest.java
 Wed Dec 13 14:03:46 2006
@@ -48,7 +48,7 @@
 }
 
 // Test data
-private URL microwave01, microwave02, transitions01, send01;
+private URL microwave01, microwave02, transitions01, send01, prefix01;
 private SCXML scxml;
 private String scxmlAsString;
 
@@ -64,13 +64,15 @@
 getResource("org/apache/commons/scxml/transitions-01.xml");
 send0

svn commit: r486851 - /jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java

2006-12-13 Thread rahul
Author: rahul
Date: Wed Dec 13 13:58:12 2006
New Revision: 486851

URL: http://svn.apache.org/viewvc?view=rev&rev=486851
Log:
Warn, but do not fail tests, if the DOM L2 implementation is not serializable.

Modified:

jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java

Modified: 
jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java?view=diff&rev=486851&r1=486850&r2=486851
==
--- 
jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java
 (original)
+++ 
jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java
 Wed Dec 13 13:58:12 2006
@@ -20,6 +20,7 @@
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import java.io.NotSerializableException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.net.URL;
@@ -242,6 +243,11 @@
 new ObjectInputStream(new FileInputStream(filename));
 roundtrip = (SCXML) in.readObject();
 in.close();
+} catch (NotSerializableException nse) {
+//  nodes failed serialization
+System.err.println("SERIALIZATION ERROR: The DOM implementation"
++ " in use is not serializable");
+return scxml;
 } catch(IOException ex) {
 ex.printStackTrace();
 } catch(ClassNotFoundException ex) {
@@ -267,6 +273,12 @@
 new ObjectInputStream(new FileInputStream(filename));
 roundtrip = (SCXMLExecutor) in.readObject();
 in.close();
+} catch (NotSerializableException nse) {
+//  nodes failed serialization, test cases do not add
+// other non-serializable context data
+System.err.println("SERIALIZATION ERROR: The DOM implementation"
++ " in use is not serializable");
+return exec;
 } catch(IOException ex) {
 ex.printStackTrace();
 } catch(ClassNotFoundException ex) {



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



[jira] Resolved: (SCXML-16) The 'target' of a cannot be a data element name

2006-12-13 Thread Rahul Akolkar (JIRA)
 [ http://issues.apache.org/jira/browse/SCXML-16?page=all ]

Rahul Akolkar resolved SCXML-16.


Fix Version/s: 0.6
   (was: 1.0)
   Resolution: Fixed

Thanks for the patch, I've clarified that target and targettype should be 
expressions. Fixed in trunk.



> The 'target' of a  cannot be a data element name
> --
>
> Key: SCXML-16
> URL: http://issues.apache.org/jira/browse/SCXML-16
> Project: Commons SCXML
>  Issue Type: Bug
> Environment: Windows, JDK 1.4.2
>Reporter: Sitthichai Rernglertpricha
> Assigned To: Rahul Akolkar
>Priority: Minor
> Fix For: 0.6
>
> Attachments: patch-send.txt
>
>
> Based on the SCXML specification, the 'target' attribute of a  element 
> can be "expression returning a unique identifier of the event target".
> The specification also shows an example that reads the target from a data 
> element within .
> The current SCXML runtime treats target as a literal string and does not 
> "evaluate" it.
> The attached patch file shows a way to "evalulate" the target before calling 
> the EventDispatcher#send method, and support specifying the target by a data 
> element. Enclosing target within single-quote will prevent evaluation.

-- 
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: r486849 - in /jakarta/commons/proper/scxml/trunk/src: main/java/org/apache/commons/scxml/model/ test/java/org/apache/commons/scxml/ test/java/org/apache/commons/scxml/env/jexl/

2006-12-13 Thread rahul
Author: rahul
Date: Wed Dec 13 13:49:37 2006
New Revision: 486849

URL: http://svn.apache.org/viewvc?view=rev&rev=486849
Log:
Evaluate target and targettype attributes of  as expressions. Thanks to 
Sitthichai Rernglertpricha.
SCXML-16

Modified:

jakarta/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java

jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/wizard-02.xml

jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/send-01.xml

jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/send-02.xml

Modified: 
jakarta/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java?view=diff&rev=486849&r1=486848&r2=486849
==
--- 
jakarta/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java
 (original)
+++ 
jakarta/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java
 Wed Dec 13 13:49:37 2006
@@ -116,7 +116,6 @@
 public Send() {
 super();
 this.externalNodes = new ArrayList();
-this.targettype = TARGETTYPE_SCXML;
 }
 
 /**
@@ -275,10 +274,33 @@
 Context ctx = scInstance.getContext(parentState);
 ctx.setLocal(getNamespacesKey(), getNamespaces());
 Evaluator eval = scInstance.getEvaluator();
+// Most attributes of  are expressions so need to be
+// evaluated before the EventDispatcher callback
 Object hintsValue = null;
 if (!SCXMLHelper.isStringEmpty(hints)) {
 hintsValue = eval.eval(ctx, hints);
 }
+String targetValue = target;
+if (!SCXMLHelper.isStringEmpty(target)) {
+targetValue = (String) eval.eval(ctx, target);
+if (SCXMLHelper.isStringEmpty(targetValue)
+&& appLog.isWarnEnabled()) {
+appLog.warn(": target expression \"" + target
++ "\" evaluated to null or empty String");
+}
+}
+String targettypeValue = targettype;
+if (!SCXMLHelper.isStringEmpty(targettype)) {
+targettypeValue = (String) eval.eval(ctx, targettype);
+if (SCXMLHelper.isStringEmpty(targettypeValue)
+&& appLog.isWarnEnabled()) {
+appLog.warn(": targettype expression \"" + targettype
++ "\" evaluated to null or empty String");
+}
+} else {
+// must default to 'scxml' when unspecified
+targettypeValue = TARGETTYPE_SCXML;
+}
 Map params = null;
 if (!SCXMLHelper.isStringEmpty(namelist)) {
 StringTokenizer tkn = new StringTokenizer(namelist);
@@ -296,9 +318,9 @@
 }
 long wait = parseDelay(appLog);
 // Lets see if we should handle it ourselves
-if (SCXMLHelper.isStringEmpty(targettype)
-|| targettype.trim().equalsIgnoreCase(TARGETTYPE_SCXML)) {
-if (SCXMLHelper.isStringEmpty(target)) {
+if (targettypeValue != null
+  && targettypeValue.trim().equalsIgnoreCase(TARGETTYPE_SCXML)) {
+if (SCXMLHelper.isStringEmpty(targetValue)) {
 // TODO: Remove both short-circuit passes in v1.0
 if (wait == 0L) {
 derivedEvents.add(new TriggerEvent(event,
@@ -317,8 +339,8 @@
 }
 ctx.setLocal(getNamespacesKey(), null);
 // Else, let the EventDispatcher take care of it
-evtDispatcher.send(sendid, target, targettype, event, params,
-hintsValue, wait, externalNodes);
+evtDispatcher.send(sendid, targetValue, targettypeValue, event,
+params, hintsValue, wait, externalNodes);
 }
 
 /**

Modified: 
jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/wizard-02.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/wizard-02.xml?view=diff&rev=486849&r1=486848&r2=486849
==
--- 
jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/wizard-02.xml
 (original)
+++ 
jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/wizard-02.xml
 Wed Dec 13 13:49:37 2006
@@ -38,7 +38,7 @@
   EventDispatcher implementation. See
   testWizard02Sample() in WizardsTest
   (org.apache.commons.scxml test package) -->
- 
+ 



@@ -47,7 +47,7 @@
  

  
- 
+ 

   

Re: [javaflow] small mistake on website

2006-12-13 Thread Henri Yandell

Fixed. Thanks Chris.

Hen

On 12/13/06, Christian <[EMAIL PROTECTED]> wrote:

Hi,
seems like my first message didn't get through, so this is the 2nd try.

On the http://jakarta.apache.org/commons/sandbox/javaflow/
antTask.html page is a little mistake. It should be "dstdir" and not
"destdir" in order to work.

best regards
Chris

-
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: r486828 - /jakarta/commons/sandbox/javaflow/trunk/xdocs/antTask.xml

2006-12-13 Thread bayard
Author: bayard
Date: Wed Dec 13 12:34:24 2006
New Revision: 486828

URL: http://svn.apache.org/viewvc?view=rev&rev=486828
Log:
Fixing typo in docs

Modified:
jakarta/commons/sandbox/javaflow/trunk/xdocs/antTask.xml

Modified: jakarta/commons/sandbox/javaflow/trunk/xdocs/antTask.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/javaflow/trunk/xdocs/antTask.xml?view=diff&rev=486828&r1=486827&r2=486828
==
--- jakarta/commons/sandbox/javaflow/trunk/xdocs/antTask.xml (original)
+++ jakarta/commons/sandbox/javaflow/trunk/xdocs/antTask.xml Wed Dec 13 
12:34:24 2006
@@ -39,20 +39,20 @@
   yes
 
 
-  destdir
+  dstdir
   directory to which the instrumented class files will be 
placed. This can be the same directory as the source directory.
   yes
 
   
 
 
-  When srcdir==destdir, class files are touched only when they are not 
yet instrumented.
+  When srcdir==dstdir, class files are touched only when they are not 
yet instrumented.
 
   
 
 
 



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



DO NOT REPLY [Bug 32441] - [dbcp] SQLException When PoolablePreparedStatement Already Closed

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

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





--- Additional Comments From [EMAIL PROTECTED]  2006-12-13 11:59 ---
Jakarta Commons has moved its issue management from Bugzilla to JIRA.

This issue is now tracked at
https://issues.apache.org/jira/browse/DBCP-23

Please make any comments you might have there.

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

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



DO NOT REPLY [Bug 32441] - [dbcp] SQLException When PoolablePreparedStatement Already Closed

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

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





--- Additional Comments From [EMAIL PROTECTED]  2006-12-13 11:40 ---
This may perhaps qualify as a separate bug but here goes anyway:

This has much bigger impact (than I've seen indicated so far) when used with
mysql connector 5.0.4 (and perhaps other versions), and commons-pool 1.3 .  
Mysql Connection's have the annoying ability to close themselves (specifically
when there is a communication breakdown with the server and they are not in High
Availability mode).  

Since the isClosed method checks both the local flag AND the underlying
connection's, it returns true, meaning that the mentioned code in close() throws
instead of returning the object to the pool!!!   This quickly starves the object
pool and causes the developer a lot of grief.

I am currently patching DBCP for internal use, replacing the isClosed() method
with a simple:

public boolean isClosed() throws SQLException {
return _closed;
}

While I acknowledge that the check of the wrapped connections' closed state may
be useful for something else, it is not compatible with the current close()
method - the two unmatched strategies cause a disastrous situation.

As for how to reproduce this behavior (if desired), the application I own is a
very high throughput multithreaded server running on high powered boxes which
writes medium sized chunks (20K) of data to MySQL using 50 threads concurrently,
some of the writing is done via stored procedures.  Generally the "mysql
self-closing" behavior occurs only when mysql server is overwhelmed, or if I
slow it down intentionally by doing a dump, etc.  I've also seen this problem
happen when mysql server crashes naturally or via "kill -9", or when disk is 
full.

References:

com.mysql.jdbc.Connection:Line 3200:

if ((sqlState != null) &&
sqlState.equals(SQLError.SQL_STATE_COMMUNICATION_LINK_FAILURE)) 
  cleanup(sqlE);

(Cleanup method sets it to closed)

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

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



[jira] Resolved: (NET-143) FTPClient.listFiles(String pathname) returns no entry on RH AS 4

2006-12-13 Thread Daniel Savarese (JIRA)
 [ http://issues.apache.org/jira/browse/NET-143?page=all ]

Daniel Savarese resolved NET-143.
-

Resolution: Invalid

> FTPClient.listFiles(String pathname) returns no entry on RH AS 4
> 
>
> Key: NET-143
> URL: http://issues.apache.org/jira/browse/NET-143
> Project: Commons Net
>  Issue Type: Bug
>Affects Versions: 1.4 Final
> Environment: RedHat AS 4
>Reporter: Felix Wong
>
> The following code snippet works fine on RedHat AS 3 ftp server.  However, it 
> only works on the top level of a RedHat AS 4 ftp server (e.g. 
> ftp://myftpserver) but not on any subdirectory.  
> ftpClient.listFiles(url.getPath()) return an empty array on any subdirectory 
> (e.g. ftp://myftpserver/abc).
>   URL url = new URL(urlString);
>   FTPClient ftpClient = new FTPClient();
> FTPFile[] ftpFiles;
>   
>   ftpClient.connect(url.getHost());
>   ftpClient.login(username, password);
>   int rc = ftpClient.getReplyCode();
>   if (!FTPReply.isPositiveCompletion(rc)) {
>   throw new Exception(ftpClient.getReplyString());
>   }
>   ftpFiles = ftpClient.listFiles(url.getPath());

-- 
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: (NET-143) FTPClient.listFiles(String pathname) returns no entry on RH AS 4

2006-12-13 Thread Daniel Savarese (JIRA)
[ 
http://issues.apache.org/jira/browse/NET-143?page=comments#action_12458232 ] 

Daniel Savarese commented on NET-143:
-

The issue you describe is not a bug and is not related to Commons Net. It is an 
FTP server configuration issue if you want an absolute path like /abc to be 
interpreted relative to some other directory. If you want to use relative 
paths, change directories first.

> FTPClient.listFiles(String pathname) returns no entry on RH AS 4
> 
>
> Key: NET-143
> URL: http://issues.apache.org/jira/browse/NET-143
> Project: Commons Net
>  Issue Type: Bug
>Affects Versions: 1.4 Final
> Environment: RedHat AS 4
>Reporter: Felix Wong
>
> The following code snippet works fine on RedHat AS 3 ftp server.  However, it 
> only works on the top level of a RedHat AS 4 ftp server (e.g. 
> ftp://myftpserver) but not on any subdirectory.  
> ftpClient.listFiles(url.getPath()) return an empty array on any subdirectory 
> (e.g. ftp://myftpserver/abc).
>   URL url = new URL(urlString);
>   FTPClient ftpClient = new FTPClient();
> FTPFile[] ftpFiles;
>   
>   ftpClient.connect(url.getHost());
>   ftpClient.login(username, password);
>   int rc = ftpClient.getReplyCode();
>   if (!FTPReply.isPositiveCompletion(rc)) {
>   throw new Exception(ftpClient.getReplyString());
>   }
>   ftpFiles = ftpClient.listFiles(url.getPath());

-- 
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: (VALIDATOR-191) Remove the dependency on Jakarta ORO (move to JDK 1.4 regular expression support)

2006-12-13 Thread Niall Pemberton (JIRA)
 [ http://issues.apache.org/jira/browse/VALIDATOR-191?page=all ]

Niall Pemberton updated VALIDATOR-191:
--

Summary: Remove the dependency on Jakarta ORO (move to JDK 1.4 regular 
expression support)  (was: ISBNValidator has dependency to 
org.apache.oro.text.perl.Perl5Util)

I'm changing the title of this issue to be more general since there are a 
number of validation routines using Jakarta ORO.

I have moved and re-written ISBNValidator to the new routines package and the 
dependency on Jakarta ORO has now gone - see issue# VALIDATOR-188 for details 
about the new version
   http://svn.apache.org/viewvc?view=rev&revision=486765

Now just need to do URL, Email and "mask" validators :-)

> Remove the dependency on Jakarta ORO (move to JDK 1.4 regular expression 
> support)
> -
>
> Key: VALIDATOR-191
> URL: http://issues.apache.org/jira/browse/VALIDATOR-191
> Project: Commons Validator
>  Issue Type: Improvement
>  Components: Routines
>Affects Versions: 1.3.0 Release, 1.2.0 Release, 1.3.1 Release
>Reporter: Matthias Weßendorf
>Priority: Minor
> Fix For: 1.4
>
> Attachments: isbn_validator.patch
>
>
> Hey,
> since Java 1.4 supports RegExpr. itself is it possible to remove the 
> "org.apache.oro.text.perl.Perl5Util"
> from ISBNValidator?
> The org.apache.oro.** dependency is also there for the regExp validator.
> Any ideas on that?
> Or is this a "no no", since a Java 1.4 dep. is not suitable.
> Thanks,
> Matthias

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



[javaflow] small mistake on website

2006-12-13 Thread Christian

Hi,
seems like my first message didn't get through, so this is the 2nd try.

On the http://jakarta.apache.org/commons/sandbox/javaflow/
antTask.html page is a little mistake. It should be "dstdir" and not
"destdir" in order to work.

best regards
Chris

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



[jira] Resolved: (VALIDATOR-188) Extend ISBN validator to support smooth transition to ISBN-13 / EAN-13 standard

2006-12-13 Thread Niall Pemberton (JIRA)
 [ http://issues.apache.org/jira/browse/VALIDATOR-188?page=all ]

Niall Pemberton resolved VALIDATOR-188.
---

Resolution: Fixed
  Assignee: Niall Pemberton

Gabriel,

First of all thanks for raising this issue (I wasn't aware of the ISBN-13 
change until you brought it up) and for taking the time to supply patches.

Sorry I didn't answer your points about targeting this for Validator 1.4 - must 
have slipped past my radar. Now Java 6 has been released[1] I believe it is 
Sun's intention to stop support for JDK 1.3 so IMO I don't believe it will be 
such a big issue for most people to have a minimum JDK 1.4 dependency. I have 
consulted on moving Validator's minimum JDK dependency[2] and I believe a year 
on from the poll I did JDK 1.3 usage will be much lower than the 25% it was 
then and will accelerate now JDK 1.3 is "end of life".

ISBNValidator[3] has now been completly re-written with the check digit 
calculation factored out into separate routines [4] and (re-)using the new 
CodeValidator[5]. Although I didn't directly apply your patches - I did use 
your work in the re-write and appreciate you submitting the code in the first 
place.

Thanks

Niall

[1] http://www.theserverside.com/news/thread.tss?thread_id=43434
[2] http://tinyurl.com/udvrj
[3] 
http://svn.apache.org/viewvc/jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/routines/ISBNValidator.java
[4] 
http://jakarta.apache.org/commons/validator/apidocs/org/apache/commons/validator/routines/checkdigit/package-summary.html
[5] 
http://svn.apache.org/viewvc/jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/routines/CodeValidator.java

> Extend ISBN validator to support smooth transition to ISBN-13 / EAN-13 
> standard
> ---
>
> Key: VALIDATOR-188
> URL: http://issues.apache.org/jira/browse/VALIDATOR-188
> Project: Commons Validator
>  Issue Type: Improvement
>  Components: Routines
>Affects Versions: 1.2.0 Release
>Reporter: Gabriel Belingueres
> Assigned To: Niall Pemberton
> Fix For: 1.4
>
> Attachments: ISBNValidator.java, ISBNValidatorTest.java
>
>
> Hi,
> I just revised the ISBNValidator to support ISBN-13 / EAN-13 standards, which 
> will begin its use on 2007 (see 
> http://www.isbn.org/standards/home/isbn/transition.asp for more information).
> To support a smooth transition, I changed the isValid(String) method so that 
> it can validate all ISBN-10, ISBN-13 and EAN-13 codes. In addition, I created 
> methods for validating only ISBN-10, only EAN-13, or ISBN-13 / EAN-13 codes.  
> This way, anyone could have support for
> the new standard by just changing the .jar file.
> Please note that I've changed a few method names, and you may want to check 
> the code style to match the existing one (however I tried to follow it 
> whenever I could).
> Regards,
> Gabriel Belingueres

-- 
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: (VALIDATOR-194) ISBNValidator Test. separated testXXX methods

2006-12-13 Thread Niall Pemberton (JIRA)
 [ http://issues.apache.org/jira/browse/VALIDATOR-194?page=all ]

Niall Pemberton resolved VALIDATOR-194.
---

Fix Version/s: (was: 1.4)
   Resolution: Won't Fix

Thanks for the pacth but I've re-written the test case as part of the move to 
the new routines package, so closing this as WONT FIX

http://svn.apache.org/viewvc?view=rev&revision=486765

> ISBNValidator Test. separated testXXX methods
> -
>
> Key: VALIDATOR-194
> URL: http://issues.apache.org/jira/browse/VALIDATOR-194
> Project: Commons Validator
>  Issue Type: Improvement
>  Components: Routines
>Affects Versions: Nightly Builds
>Reporter: Matthias Weßendorf
>Priority: Minor
> Attachments: testISBN.patch
>
>
> now the clazz has two test methods
> isInvalid
> isValid

-- 
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: r486765 - in /jakarta/commons/proper/validator/trunk: src/share/org/apache/commons/validator/ src/share/org/apache/commons/validator/routines/ src/test/org/apache/commons/validator/routine

2006-12-13 Thread niallp
Author: niallp
Date: Wed Dec 13 09:35:23 2006
New Revision: 486765

URL: http://svn.apache.org/viewvc?view=rev&rev=486765
Log:
Re-write of the ISBNValidator using the new CodeValidator and CheckDigit 
routines. Removes the dependency on Jakarta ORO and now caters for the new 
ISBN-13 format. Existing ISBNValidator is now deprecated.
Fixes VALIDATOR-188 and VALIDATOR-191

Modified:

jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/ISBNValidator.java

jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/routines/ISBNValidator.java

jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/routines/package.html

jakarta/commons/proper/validator/trunk/src/test/org/apache/commons/validator/routines/ISBNValidatorTest.java

jakarta/commons/proper/validator/trunk/src/test/org/apache/commons/validator/routines/RoutinesTestSuite.java
jakarta/commons/proper/validator/trunk/xdocs/changes.xml

Modified: 
jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/ISBNValidator.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/ISBNValidator.java?view=diff&rev=486765&r1=486764&r2=486765
==
--- 
jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/ISBNValidator.java
 (original)
+++ 
jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/ISBNValidator.java
 Wed Dec 13 09:35:23 2006
@@ -24,25 +24,15 @@
  * http://www.isbn.org/standards/home/isbn/international/html/usm4.htm";>
  * algorithm
  *
+ * NOTE: This has been replaced by the new
+ *  [EMAIL PROTECTED] org.apache.commons.validator.routines.ISBNValidator}.
+ *
  * @version $Revision$ $Date$
  * @since Validator 1.2.0
+ * @deprecated Use the new ISBNValidator in the routines package
  */
 public class ISBNValidator {
 
-private static final String SEP = "(\\-|\\s)";
-private static final String GROUP = "(\\d{1,5})";
-private static final String PUBLISHER = "(\\d{1,7})";
-private static final String TITLE = "(\\d{1,6})";
-private static final String CHECK = "([0-9X])";
-
-/**
- * ISBN consists of 4 groups of numbers separated by either dashes (-)
- * or spaces.  The first group is 1-5 characters, second 1-7, third 1-6,
- * and fourth is 1 digit or an X.
- */
-private static final String ISBN_PATTERN =
-"/^" + GROUP + SEP + PUBLISHER + SEP + TITLE + SEP + CHECK + "$/";
-
 /**
  * Default Constructor.
  */
@@ -61,73 +51,7 @@
  * @return true if the string is a valid ISBN code.
  */
 public boolean isValid(String isbn) {
-if (isbn == null || isbn.length() < 10 || isbn.length() > 13) {
-return false;
-}
-
-if (isFormatted(isbn) && !isValidPattern(isbn)) {
-return false;
-}
-
-isbn = clean(isbn);
-if (isbn.length() != 10) {
-return false;
-}
-
-return (sum(isbn) % 11) == 0;
-}
-
-/**
- * Returns the sum of the weighted ISBN characters.
- */
-private int sum(String isbn) {
-int total = 0;
-for (int i = 0; i < 9; i++) {
-int weight = 10 - i;
-total += (weight * toInt(isbn.charAt(i)));
-}
-total += toInt(isbn.charAt(9)); // add check digit
-return total;
-}
-
-/**
- * Removes all non-digit characters except for 'X' which is a valid ISBN
- * character. 
- */
-private String clean(String isbn) {
-StringBuffer buf = new StringBuffer(10);
-
-for (int i = 0; i < isbn.length(); i++) {
-char digit = isbn.charAt(i);
-if (Character.isDigit(digit) || (digit == 'X')) {
-buf.append(digit);
-}
-}
-
-return buf.toString();
-}
-
-/**
- * Returns the numeric value represented by the character.  If the 
- * character is not a digit but an 'X', 10 is returned.
- */
-private int toInt(char ch) {
-return (ch == 'X') ? 10 : Character.getNumericValue(ch);
-}
-
-/**
- * Returns true if the ISBN contains one of the separator characters space
- * or dash.
- */
-private boolean isFormatted(String isbn) {
-return ((isbn.indexOf('-') != -1) || (isbn.indexOf(' ') != -1));
-}
-
-/**
- * Returns true if the ISBN is formatted properly.
- */
-private boolean isValidPattern(String isbn) {
-return new Perl5Util().match(ISBN_PATTERN, isbn);
+return 
org.apache.commons.validator.routines.ISBNValidator.getInstance().isValidISBN10(isbn);
 }
 
 }

Modified: 
jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/routines/ISBNValidator.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/validator/trunk/s

svn commit: r486742 - /jakarta/commons/proper/validator/trunk/src/test/org/apache/commons/validator/routines/ISBNValidatorTest.java

2006-12-13 Thread niallp
Author: niallp
Date: Wed Dec 13 09:04:25 2006
New Revision: 486742

URL: http://svn.apache.org/viewvc?view=rev&rev=486742
Log:
VALIDATOR-197 - copy ISBNValidator to the new routines package

Added:

jakarta/commons/proper/validator/trunk/src/test/org/apache/commons/validator/routines/ISBNValidatorTest.java
  - copied, changed from r486740, 
jakarta/commons/proper/validator/trunk/src/test/org/apache/commons/validator/ISBNValidatorTest.java

Copied: 
jakarta/commons/proper/validator/trunk/src/test/org/apache/commons/validator/routines/ISBNValidatorTest.java
 (from r486740, 
jakarta/commons/proper/validator/trunk/src/test/org/apache/commons/validator/ISBNValidatorTest.java)
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/validator/trunk/src/test/org/apache/commons/validator/routines/ISBNValidatorTest.java?view=diff&rev=486742&p1=jakarta/commons/proper/validator/trunk/src/test/org/apache/commons/validator/ISBNValidatorTest.java&r1=486740&p2=jakarta/commons/proper/validator/trunk/src/test/org/apache/commons/validator/routines/ISBNValidatorTest.java&r2=486742
==
--- 
jakarta/commons/proper/validator/trunk/src/test/org/apache/commons/validator/ISBNValidatorTest.java
 (original)
+++ 
jakarta/commons/proper/validator/trunk/src/test/org/apache/commons/validator/routines/ISBNValidatorTest.java
 Wed Dec 13 09:04:25 2006
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.validator;
+package org.apache.commons.validator.routines;
 
 import junit.framework.TestCase;
 



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



svn commit: r486740 - /jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/routines/ISBNValidator.java

2006-12-13 Thread niallp
Author: niallp
Date: Wed Dec 13 09:02:53 2006
New Revision: 486740

URL: http://svn.apache.org/viewvc?view=rev&rev=486740
Log:
VALIDATOR-197 - copy ISBNValidator to the new routines package

Added:

jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/routines/ISBNValidator.java
  - copied, changed from r486233, 
jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/ISBNValidator.java

Copied: 
jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/routines/ISBNValidator.java
 (from r486233, 
jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/ISBNValidator.java)
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/routines/ISBNValidator.java?view=diff&rev=486740&p1=jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/ISBNValidator.java&r1=486233&p2=jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/routines/ISBNValidator.java&r2=486740
==
--- 
jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/ISBNValidator.java
 (original)
+++ 
jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/routines/ISBNValidator.java
 Wed Dec 13 09:02:53 2006
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.validator;
+package org.apache.commons.validator.routines;
 
 import org.apache.oro.text.perl.Perl5Util;
 



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



[jira] Commented: (FILEUPLOAD-122) Filename may contain a full path

2006-12-13 Thread Henri Yandell (JIRA)
[ 
http://issues.apache.org/jira/browse/FILEUPLOAD-122?page=comments#action_12458179
 ] 

Henri Yandell commented on FILEUPLOAD-122:
--

Gotta watch the licensing on COS' multiparser too.

> Filename may contain a full path
> 
>
> Key: FILEUPLOAD-122
> URL: http://issues.apache.org/jira/browse/FILEUPLOAD-122
> Project: Commons FileUpload
>  Issue Type: Bug
>Affects Versions: 1.1.1
>Reporter: Sebastian Beigel
>Priority: Blocker
>
> The filename extracted from the content disposition may contain a full path 
> (i.e. as submitted by the Internet Explorer for example).
> It's is important to check for this and strip the path information 
> accordingly as the upload fails if you use FileItem#getName() to build your 
> destination path.
> I patched the abstract class FileUploadBase#getFileName(...) with a few lines 
> of code inspired by COS' MultiPartParser :)
> Starting on line 447 (after fileName = fileName.trim(); )
> // The filename may contain a full path.  Cut to just 
> the filename.
> int slash = Math.max(fileName.lastIndexOf('/'), 
> fileName.lastIndexOf('\\')); // check for Unix AND Win separator
> if (slash > -1) {
>   fileName = fileName.substring(slash + 1);  // past 
> last slash
> }

-- 
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: r486696 - in /jakarta/commons/proper/fileupload/trunk: project.properties project.xml

2006-12-13 Thread rahul
Author: rahul
Date: Wed Dec 13 07:50:10 2006
New Revision: 486696

URL: http://svn.apache.org/viewvc?view=rev&rev=486696
Log:
fileupload now builds locally for me, should take care of the [nightly build] 
nag.

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

Modified: jakarta/commons/proper/fileupload/trunk/project.properties
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/fileupload/trunk/project.properties?view=diff&rev=486696&r1=486695&r2=486696
==
--- jakarta/commons/proper/fileupload/trunk/project.properties (original)
+++ jakarta/commons/proper/fileupload/trunk/project.properties Wed Dec 13 
07:50:10 2006
@@ -17,7 +17,10 @@
 # P R O J E C T  P R O P E R T I E S
 # ---
 
-maven.repo.remote=http://repo1.maven.org/maven
+#
+# Remove the ASF snapshot repository when IO 1.3 is released
+#
+maven.repo.remote=http://repo1.maven.org/maven,http://people.apache.org/repo/m1-snapshot-repository
 
 maven.changelog.factory=org.apache.maven.svnlib.SvnChangeLogFactory
 

Modified: jakarta/commons/proper/fileupload/trunk/project.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/fileupload/trunk/project.xml?view=diff&rev=486696&r1=486695&r2=486696
==
--- jakarta/commons/proper/fileupload/trunk/project.xml (original)
+++ jakarta/commons/proper/fileupload/trunk/project.xml Wed Dec 13 07:50:10 2006
@@ -169,7 +169,8 @@
 
   commons-io
   commons-io
-  1.3-SNAPSHOT
+  
+  SNAPSHOT
   http://jakarta.apache.org/commons/io/
 
 



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



[jira] Created: (FILEUPLOAD-122) Filename may contain a full path

2006-12-13 Thread Sebastian Beigel (JIRA)
Filename may contain a full path


 Key: FILEUPLOAD-122
 URL: http://issues.apache.org/jira/browse/FILEUPLOAD-122
 Project: Commons FileUpload
  Issue Type: Bug
Affects Versions: 1.1.1
Reporter: Sebastian Beigel
Priority: Blocker


The filename extracted from the content disposition may contain a full path 
(i.e. as submitted by the Internet Explorer for example).

It's is important to check for this and strip the path information accordingly 
as the upload fails if you use FileItem#getName() to build your destination 
path.

I patched the abstract class FileUploadBase#getFileName(...) with a few lines 
of code inspired by COS' MultiPartParser :)

Starting on line 447 (after fileName = fileName.trim(); )

// The filename may contain a full path.  Cut to just 
the filename.
int slash = Math.max(fileName.lastIndexOf('/'), 
fileName.lastIndexOf('\\')); // check for Unix AND Win separator
if (slash > -1) {
  fileName = fileName.substring(slash + 1);  // past 
last slash
}



-- 
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: r486665 - in /jakarta/commons/proper/httpclient/trunk: release_notes.txt src/java/org/apache/commons/httpclient/methods/FileRequestEntity.java

2006-12-13 Thread olegk
Author: olegk
Date: Wed Dec 13 06:19:07 2006
New Revision: 486665

URL: http://svn.apache.org/viewvc?view=rev&rev=486665
Log:
Fix for [HTTPCLIENT-612]: FileRequestEntity in SVN does not close input file

Contributed by Sebastian Bazley
Reviewed by Oleg Kalnichevski

Modified:
jakarta/commons/proper/httpclient/trunk/release_notes.txt

jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/FileRequestEntity.java

Modified: jakarta/commons/proper/httpclient/trunk/release_notes.txt
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/release_notes.txt?view=diff&rev=486665&r1=486664&r2=486665
==
--- jakarta/commons/proper/httpclient/trunk/release_notes.txt (original)
+++ jakarta/commons/proper/httpclient/trunk/release_notes.txt Wed Dec 13 
06:19:07 2006
@@ -1,5 +1,8 @@
 Changes since Release 3.1 Beta 1:
 
+* [HTTPCLIENT-612] - FileRequestEntity now always closes the input file.
+   Contributed by Sebastian Bazley 
+
 * [HTTPCLIENT-616] - HttpMethodDirector.executeWithRetry method fixed to close 
the 
underlying connection if a RuntimeException is thrown
Contributed by Jason Bird

Modified: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/FileRequestEntity.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/FileRequestEntity.java?view=diff&rev=486665&r1=486664&r2=486665
==
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/FileRequestEntity.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/FileRequestEntity.java
 Wed Dec 13 06:19:07 2006
@@ -71,9 +71,13 @@
 byte[] tmp = new byte[4096];
 int i = 0;
 InputStream instream = new FileInputStream(this.file);
-while ((i = instream.read(tmp)) >= 0) {
-out.write(tmp, 0, i);
-}
+try {
+while ((i = instream.read(tmp)) >= 0) {
+out.write(tmp, 0, i);
+}
+} finally {
+instream.close();
+}
 }
 
 }



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



svn commit: r486658 - in /jakarta/commons/proper/httpclient/trunk: release_notes.txt src/java/org/apache/commons/httpclient/HttpMethodDirector.java

2006-12-13 Thread olegk
Author: olegk
Date: Wed Dec 13 06:05:50 2006
New Revision: 486658

URL: http://svn.apache.org/viewvc?view=rev&rev=486658
Log:
Fix for [HTTPCLIENT-616]: HttpMethodDirector.executeWithRetry method fails to 
close the underlying connection if a RuntimeException is thrown

Contributed by Jason Bird
Reviewed by Oleg Kalnichevski

Modified:
jakarta/commons/proper/httpclient/trunk/release_notes.txt

jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java

Modified: jakarta/commons/proper/httpclient/trunk/release_notes.txt
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/release_notes.txt?view=diff&rev=486658&r1=486657&r2=486658
==
--- jakarta/commons/proper/httpclient/trunk/release_notes.txt (original)
+++ jakarta/commons/proper/httpclient/trunk/release_notes.txt Wed Dec 13 
06:05:50 2006
@@ -1,5 +1,9 @@
 Changes since Release 3.1 Beta 1:
 
+* [HTTPCLIENT-616] - HttpMethodDirector.executeWithRetry method fixed to close 
the 
+   underlying connection if a RuntimeException is thrown
+   Contributed by Jason Bird
+
 * [HTTPCLIENT-606] - Added a HTTP method level parameter for URI charset
Contributed by Oleg Kalnichevski 
 

Modified: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java?view=diff&rev=486658&r1=486657&r2=486658
==
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java
 Wed Dec 13 06:05:50 2006
@@ -453,7 +453,7 @@
 releaseConnection = true;
 throw e;
 } catch (RuntimeException e) {
-if (this.conn.isOpen) {
+if (this.conn.isOpen()) {
 LOG.debug("Closing the connection.");
 this.conn.close();
 }



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



[EMAIL PROTECTED]: Project commons-jelly-tags-jsl-test (in module commons-jelly) failed

2006-12-13 Thread commons-jelly-tags-jsl development
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at [EMAIL PROTECTED]

Project commons-jelly-tags-jsl-test has an issue affecting its community 
integration.
This issue affects 1 projects,
 and has been outstanding for 37 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- commons-jelly-tags-jsl-test :  Commons Jelly


Full details are available at:

http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-jsl-test/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on ant exists, no need to add for property 
maven.jar.ant-optional.
 -DEBUG- Dependency on xml-xerces exists, no need to add for property 
maven.jar.xerces.
 -DEBUG- (Gump generated) Maven Properties in: 
/usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl/build.properties
 -INFO- Failed with reason build failed
 -DEBUG- Maven POM in: 
/usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl/project.xml
 -DEBUG- Maven project properties in: 
/usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl/project.properties
 -INFO- Project Reports in: 
/usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl/target/test-reports



The following work was performed:
http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-jsl-test/gump_work/build_commons-jelly_commons-jelly-tags-jsl-test.html
Work Name: build_commons-jelly_commons-jelly-tags-jsl-test (Type: Build)
Work ended in a state of : Failed
Elapsed: 17 secs
Command Line: maven --offline jar 
[Working Directory: 
/usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl]
CLASSPATH: 
/opt/jdk1.5/lib/tools.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-swing.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-trax.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-junit.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant.jar:/usr/local/gump/public/workspace/jakarta-commons/beanutils/dist/commons-beanutils-core.jar:/usr/local/gump/public/workspace/commons-cli-1.0.x/target/commons-cli-13122006.jar:/usr/local/gump/public/workspace/jakarta-commons/collections/build/commons-collections-13122006.jar:/usr/local/gump/public/workspace/commons-jelly/target/commons-jelly-13122006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/ant/target/commons-jelly-tags-ant-13122006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/junit/target/commons-jelly-tags-junit-13122006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/log/target/commons-jelly-tags-log-13122006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/xml/target/commons-jelly-tags-xml-13122006.jar:/usr/local/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-13122006.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-13122006.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-13122006.jar:/usr/local/gump/public/workspace/dom4j/build/dom4j.jar:/usr/local/gump/public/workspace/jaxen/target/jaxen-13122006.jar
-
[junit] at 
org.apache.commons.jelly.tags.junit.AssertTagSupport.fail(AssertTagSupport.java:64)
[junit] at 
org.apache.commons.jelly.tags.junit.AssertTag.doTag(AssertTag.java:59)
[junit] at 
org.apache.commons.jelly.impl.TagScript.run(TagScript.java:263)
[junit] at 
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:96)
[junit] at 
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:187)
[junit] at 
org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:66)
[junit] at 
org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:113)
[junit] at 
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:96)
[junit] at 
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:187)
[junit] at 
org.apache.commons.jelly.tags.jsl.TemplateTag$1.run(TemplateTag.java:161)
[junit] at org.dom4j.rule.Mode.fireRule(Mode.java:59)
[junit] at org.dom4j.rule.Mode.applyTemplates(Mode.java:80)
[junit] at org.dom4j.rule.RuleManager$1.run(RuleManager.java:171)
[junit] at org.dom4j.rule.Mode.fireRule(Mode.java:59)
[junit] at org.dom4j.rule.Stylesheet.run(Stylesheet.java:102)
[junit] at org.dom4j.rule.Stylesheet.run(Stylesheet.java:91)
[junit] at or

[EMAIL PROTECTED]: Project commons-jelly-tags-jsl-test (in module commons-jelly) failed

2006-12-13 Thread commons-jelly-tags-jsl development
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at [EMAIL PROTECTED]

Project commons-jelly-tags-jsl-test has an issue affecting its community 
integration.
This issue affects 1 projects,
 and has been outstanding for 37 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- commons-jelly-tags-jsl-test :  Commons Jelly


Full details are available at:

http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-jsl-test/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on ant exists, no need to add for property 
maven.jar.ant-optional.
 -DEBUG- Dependency on xml-xerces exists, no need to add for property 
maven.jar.xerces.
 -DEBUG- (Gump generated) Maven Properties in: 
/usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl/build.properties
 -INFO- Failed with reason build failed
 -DEBUG- Maven POM in: 
/usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl/project.xml
 -DEBUG- Maven project properties in: 
/usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl/project.properties
 -INFO- Project Reports in: 
/usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl/target/test-reports



The following work was performed:
http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-jsl-test/gump_work/build_commons-jelly_commons-jelly-tags-jsl-test.html
Work Name: build_commons-jelly_commons-jelly-tags-jsl-test (Type: Build)
Work ended in a state of : Failed
Elapsed: 17 secs
Command Line: maven --offline jar 
[Working Directory: 
/usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl]
CLASSPATH: 
/opt/jdk1.5/lib/tools.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-swing.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-trax.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-junit.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant.jar:/usr/local/gump/public/workspace/jakarta-commons/beanutils/dist/commons-beanutils-core.jar:/usr/local/gump/public/workspace/commons-cli-1.0.x/target/commons-cli-13122006.jar:/usr/local/gump/public/workspace/jakarta-commons/collections/build/commons-collections-13122006.jar:/usr/local/gump/public/workspace/commons-jelly/target/commons-jelly-13122006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/ant/target/commons-jelly-tags-ant-13122006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/junit/target/commons-jelly-tags-junit-13122006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/log/target/commons-jelly-tags-log-13122006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/xml/target/commons-jelly-tags-xml-13122006.jar:/usr/local/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-13122006.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-13122006.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-13122006.jar:/usr/local/gump/public/workspace/dom4j/build/dom4j.jar:/usr/local/gump/public/workspace/jaxen/target/jaxen-13122006.jar
-
[junit] at 
org.apache.commons.jelly.tags.junit.AssertTagSupport.fail(AssertTagSupport.java:64)
[junit] at 
org.apache.commons.jelly.tags.junit.AssertTag.doTag(AssertTag.java:59)
[junit] at 
org.apache.commons.jelly.impl.TagScript.run(TagScript.java:263)
[junit] at 
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:96)
[junit] at 
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:187)
[junit] at 
org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:66)
[junit] at 
org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:113)
[junit] at 
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:96)
[junit] at 
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:187)
[junit] at 
org.apache.commons.jelly.tags.jsl.TemplateTag$1.run(TemplateTag.java:161)
[junit] at org.dom4j.rule.Mode.fireRule(Mode.java:59)
[junit] at org.dom4j.rule.Mode.applyTemplates(Mode.java:80)
[junit] at org.dom4j.rule.RuleManager$1.run(RuleManager.java:171)
[junit] at org.dom4j.rule.Mode.fireRule(Mode.java:59)
[junit] at org.dom4j.rule.Stylesheet.run(Stylesheet.java:102)
[junit] at org.dom4j.rule.Stylesheet.run(Stylesheet.java:91)
[junit] at or

[nightly build] fileupload failed.

2006-12-13 Thread psteitz
Failed build logs:
http://people.apache.org/~psteitz/commons-nightlies/20061213/fileupload.log

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



Re: 1.3 borrowObject synchronized around the factory methods

2006-12-13 Thread Mat

Hi Sandy,
thanks for the reply.


Moving to the new version, basically, the code has switched from 
fine-grain locks to a "big lock" that conveys almost all the calls 
through the same critical region. This assumes that the time spent into 
the factory API is negligible, which may be the case for certain kind of 
applications but is not the general one.


In example, when you are managing socket resources, creation, validation 
and destruction times are significant when compared with the service 
time taken on pool resource by the application.
In these cases, the big lock jeopardizes the performances, as you can 
spend as much time as in your application just waiting the validation or 
creation process within the factory, which is under the big lock itself.


Even if we remove the validating time, the creation time of the objects 
is time spent in the critical region. This implies that when you have to 
re-populate the entries for any reason, you end up accessing 
sequentially to the pool itself, i.e., only one thread at time is able 
to actually process the application code.


Please take as example this real world case:

   High load server that has to serve 50 parallel requests *assuring 
valid objects*(avg validate time 1000ms) with an slow makeObject(avg 
timeout 2500 ms).
   Asuming an "out of the pool" AVG  request serving time of 2000 ms, 
as not important because out of lock, we will have this behaviours:
   In worst condition, in which we have not valid objects and we 
must to recreate them, (for example whan the beckend is restarted) we 
will have this avarage wait time for resource:

   1^st req:wait time: 2500ms + 1000ms
   2^nd req:   wait time: 1^st req wait time + 2500ms + 1000ms
   n^nd req:   wait time: (SUM from 1 to n-1) req wait time + 
2500ms + 1000ms
*Req avg wait time synchronizing around the factory:* (SUM for i 
from 1 to N(i*3500ms ))/N=(3500ms*(50(50+1)/2))/50=*89,250 seconds*
*Req avg **wait time NOT** synchronizing around the factory:* 
2500ms + 1000ms= *3,5 seconds*


   If we consider the optimal case, considering only the validate time:

*Req avg wait time **synchronizing around the factory: *(SUM for 
i from 1 to N(i*1000ms ))/N=(1000ms*(50(50+1)/2))/50 =*25 seconds*
*Req avg wait time **NOT synchronizing around the factory:* 
1000ms = *1 second*


I hope I didn't make calculation mistakes :-)

In my example above I am not considering also other real world factors, 
as for example occuring of long validate/make objects ... that would 
abate further the performances.


I am not talking about micro-benchmarks but about real world production 
macro-systems behaviour experience when pooling sockets resources.


Thanks Again and Cheers
Mat

Sandy McArthur ha scritto:

On 12/12/06, Mat <[EMAIL PROTECTED]> wrote:

if the borrowobject blocks on the factory
methods there will be an huge performance issue.


Yes, but without it there are thread-safety issues. I agree, it's a
performance issue, but I'm not sure how huge it is except under
micro-benchmarks.



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



[jira] Updated: (VALIDATOR-216) UrlValidator rejects top-level domains (TLDs) with more than 4 characters

2006-12-13 Thread Niall Pemberton (JIRA)
 [ http://issues.apache.org/jira/browse/VALIDATOR-216?page=all ]

Niall Pemberton updated VALIDATOR-216:
--

Fix Version/s: 1.4
 Assignee: Niall Pemberton

My first thought was this had already been fixed - but turned out that was for 
the email validator - VALIDATOR-66. I'm in the process of separating out the 
"framework" aspect of validator from the actual validation "routines":

  
http://jakarta.apache.org/commons/validator/apidocs/org/apache/commons/validator/routines/package-summary.html#package_description

So the plan is to move UrlValidator into the new routines package and at the 
same time take the opportunity to re-factor it. Seems to me that both this 
validator and the EmailValidator could benefit from breaking this down into 
smaller re-usable routines - so for example having a common domain validator 
that Url and Email both (re-) used would be a good idea.

Thanks for reporting this Kenji and for the patch Gabriel - I'll take this 
issue into account when I get round to the refactoring.


> UrlValidator rejects top-level domains (TLDs) with more than 4 characters
> -
>
> Key: VALIDATOR-216
> URL: http://issues.apache.org/jira/browse/VALIDATOR-216
> Project: Commons Validator
>  Issue Type: Bug
>Affects Versions: 1.3.1 Release
>Reporter: Kenji Matsuoka
> Assigned To: Niall Pemberton
>Priority: Minor
> Fix For: 1.4
>
> Attachments: TLDConstants.java
>
>
> org.apache.commons.validator.UrlValidator#isValidAuthority rejects top-level 
> domains (TLDs) with more than four characters.   There are now at least two 
> TLDs with more characters,  .museum and .travel.

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