Re: [configuration][all] Support for OS environment variables

2007-07-23 Thread Mark Fortner

Isn't this already handled by System.getenv?

On 7/23/07, Wade Chandler <[EMAIL PROTECTED]> wrote:


Personally, I think this type thing comes in very
handy in different situations. It would even be handy
in daemon and launcher. Look how many times scripts
have to be written for every OS to get different
things like JAVA_HOME and ANT_HOME or similar into an
application. It has been deprecated for a long time,
but I doubt it will ever be removed. It seems to be
quite needed in situations.

Wade

--- Oliver Heger <[EMAIL PROTECTED]> wrote:

> Hi all,
>
> for [configuration] we have a feature request for
> supporting environment
> variables [1]. I searched the archives and found
> that this topic has
> been discussed before [2].
>
> I was wondering whether situation has changed since
> then. My personal
> opinion is expressed in the Jira ticket in [1]. What
> do others think?
>
> Please note that the ticket contains an attachment
> with a simple
> implementation for accessing environment variables.
>
> Thanks
> Oliver
>
> [1]
>
http://issues.apache.org/jira/browse/CONFIGURATION-284
> [2]
>
http://thread.gmane.org/gmane.comp.jakarta.commons.devel/33239/focus=33325
>
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>


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




Re: [configuration][all] Support for OS environment variables

2007-07-23 Thread Wade Chandler
Personally, I think this type thing comes in very
handy in different situations. It would even be handy
in daemon and launcher. Look how many times scripts
have to be written for every OS to get different
things like JAVA_HOME and ANT_HOME or similar into an
application. It has been deprecated for a long time,
but I doubt it will ever be removed. It seems to be
quite needed in situations.

Wade

--- Oliver Heger <[EMAIL PROTECTED]> wrote:

> Hi all,
> 
> for [configuration] we have a feature request for
> supporting environment 
> variables [1]. I searched the archives and found
> that this topic has 
> been discussed before [2].
> 
> I was wondering whether situation has changed since
> then. My personal 
> opinion is expressed in the Jira ticket in [1]. What
> do others think?
> 
> Please note that the ticket contains an attachment
> with a simple 
> implementation for accessing environment variables.
> 
> Thanks
> Oliver
> 
> [1]
>
http://issues.apache.org/jira/browse/CONFIGURATION-284
> [2] 
>
http://thread.gmane.org/gmane.comp.jakarta.commons.devel/33239/focus=33325
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


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



Re: Moderator volunteer?

2007-07-23 Thread Brett Porter

swapped :)

On 24/07/07, Phil Steitz <[EMAIL PROTECTED]> wrote:

I will do this.

Phil

On 7/23/07, Henri Yandell <[EMAIL PROTECTED]> wrote:
> Is there anyone who could volunteer to moderate the list?
>
> I'm looking to share the load and get off of commons-dev moderating :)
>
> Hen
>
> -
> 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]





--
Brett Porter
Blog: http://www.devzuz.org/blogs/bporter/

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



Re: Moderator volunteer?

2007-07-23 Thread Phil Steitz

I will do this.

Phil

On 7/23/07, Henri Yandell <[EMAIL PROTECTED]> wrote:

Is there anyone who could volunteer to moderate the list?

I'm looking to share the load and get off of commons-dev moderating :)

Hen

-
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: r558845 - in /jakarta/commons/proper/dbcp/trunk/src: java/org/apache/commons/dbcp/BasicDataSource.java test/org/apache/commons/dbcp/TestBasicDataSource.java

2007-07-23 Thread dain
Author: dain
Date: Mon Jul 23 12:48:39 2007
New Revision: 558845

URL: http://svn.apache.org/viewvc?view=rev&rev=558845
Log:
DBCP-150 added setter for connectionProperties in BasicDataSource

Modified:

jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java

jakarta/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestBasicDataSource.java

Modified: 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java?view=diff&rev=558845&r1=558844&r2=558845
==
--- 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java
 (original)
+++ 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java
 Mon Jul 23 12:48:39 2007
@@ -1093,6 +1093,40 @@
 }
 
 /**
+ * Sets the connection properties passed to driver.connect(...). 
+ *
+ * Format of the string must be [propertyName=property;]*
+ *
+ * NOTE - The "user" and "password" properties will be added
+ * explicitly, so they do not need to be included here.
+ *
+ * @param connectionProperties the connection properties used to
+ * create new connections
+ */
+public void setConnectionProperties(String connectionProperties) {
+if (connectionProperties == null) throw new 
NullPointerException("connectionProperties is null");
+
+String[] entries = connectionProperties.split(";");
+Properties properties = new Properties();
+for (int i = 0; i < entries.length; i++) {
+String entry = entries[i];
+if (entry.length() > 0) {
+int index = entry.indexOf('=');
+if (index > 0) {
+String name = entry.substring(0, index);
+String value = entry.substring(index + 1);
+properties.setProperty(name, value);
+} else {
+// no value is empty string which is how 
java.util.Properties works
+properties.setProperty(entry, "");
+}
+}
+}
+this.connectionProperties = properties;
+this.restartNeeded = true;
+}
+
+/**
  * Close and release all connections that are currently stored in the
  * connection pool associated with our data source.
  *

Modified: 
jakarta/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestBasicDataSource.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestBasicDataSource.java?view=diff&rev=558845&r1=558844&r2=558845
==
--- 
jakarta/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestBasicDataSource.java
 (original)
+++ 
jakarta/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestBasicDataSource.java
 Mon Jul 23 12:48:39 2007
@@ -67,6 +67,57 @@
 ds.close();
 ds = null;
 }
+
+public void testSetProperties() throws Exception {
+// normal
+ds.setConnectionProperties("name1=value1;name2=value2;name3=value3");
+assertEquals(3, ds.connectionProperties.size());
+assertEquals("value1", ds.connectionProperties.getProperty("name1"));
+assertEquals("value2", ds.connectionProperties.getProperty("name2"));
+assertEquals("value3", ds.connectionProperties.getProperty("name3"));
+
+// make sure all properties are replaced
+ds.setConnectionProperties("name1=value1;name2=value2");
+assertEquals(2, ds.connectionProperties.size());
+assertEquals("value1", ds.connectionProperties.getProperty("name1"));
+assertEquals("value2", ds.connectionProperties.getProperty("name2"));
+assertFalse(ds.connectionProperties.containsKey("name3"));
+
+// no value is empty string
+ds.setConnectionProperties("name1=value1;name2");
+assertEquals(2, ds.connectionProperties.size());
+assertEquals("value1", ds.connectionProperties.getProperty("name1"));
+assertEquals("", ds.connectionProperties.getProperty("name2"));
+
+// no value (with equals) is empty string
+ds.setConnectionProperties("name1=value1;name2=");
+assertEquals(2, ds.connectionProperties.size());
+assertEquals("value1", ds.connectionProperties.getProperty("name1"));
+assertEquals("", ds.connectionProperties.getProperty("name2"));
+
+// single value
+ds.setConnectionProperties("name1=value1");
+assertEquals(1, ds.connectionProperties.size());
+assertEquals("value1", ds.connectionProperties.getProperty("name1"));
+
+// single value with trailing ;
+ds.setConnectionProperties("name1=value1;");
+   

svn commit: r558846 - in /jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp: PoolableConnectionFactory.java datasources/CPDSConnectionFactory.java datasources/KeyedCPDSConnectionFacto

2007-07-23 Thread dain
Author: dain
Date: Mon Jul 23 12:53:27 2007
New Revision: 558846

URL: http://svn.apache.org/viewvc?view=rev&rev=558846
Log:
DBCP-225 throw an IllegalStateException if connection factory returns a null 
connection.  This avoids creating DelegatingConnections with a null delegate.

Modified:

jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java

jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/CPDSConnectionFactory.java

jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/KeyedCPDSConnectionFactory.java

Modified: 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java?view=diff&rev=558846&r1=558845&r2=558846
==
--- 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java
 (original)
+++ 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java
 Mon Jul 23 12:53:27 2007
@@ -292,6 +292,9 @@
 
 synchronized public Object makeObject() throws Exception {
 Connection conn = _connFactory.createConnection();
+if (conn == null) {
+throw new IllegalStateException("Connection factory returned null 
from createConnection");
+}
 if(null != _stmtPoolFactory) {
 KeyedObjectPool stmtpool = _stmtPoolFactory.createPool();
 conn = new PoolingConnection(conn,stmtpool);

Modified: 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/CPDSConnectionFactory.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/CPDSConnectionFactory.java?view=diff&rev=558846&r1=558845&r2=558846
==
--- 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/CPDSConnectionFactory.java
 (original)
+++ 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/CPDSConnectionFactory.java
 Mon Jul 23 12:53:27 2007
@@ -175,6 +175,11 @@
 } else {
 pc = _cpds.getPooledConnection(_username, _password);
 }
+
+if (pc == null) {
+throw new IllegalStateException("Connection pool data source 
returned null from getPooledConnection");
+}
+
 // should we add this object as a listener or the pool.
 // consider the validateObject method in decision
 pc.addConnectionEventListener(this);

Modified: 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/KeyedCPDSConnectionFactory.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/KeyedCPDSConnectionFactory.java?view=diff&rev=558846&r1=558845&r2=558846
==
--- 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/KeyedCPDSConnectionFactory.java
 (original)
+++ 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/KeyedCPDSConnectionFactory.java
 Mon Jul 23 12:53:27 2007
@@ -159,6 +159,11 @@
 } else {
 pc = _cpds.getPooledConnection(username, password);
 }
+
+if (pc == null) {
+throw new IllegalStateException("Connection pool data source 
returned null from getPooledConnection");
+}
+
 // should we add this object as a listener or the pool.
 // consider the validateObject method in decision
 pc.addConnectionEventListener(this);



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



svn commit: r558850 - in /jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources: PerUserPoolDataSource.java SharedPoolDataSource.java

2007-07-23 Thread dain
Author: dain
Date: Mon Jul 23 13:02:19 2007
New Revision: 558850

URL: http://svn.apache.org/viewvc?view=rev&rev=558850
Log:
DBCP-207 only set auto-commit and read-only if the new value would be different 
from the current value

Modified:

jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/PerUserPoolDataSource.java

jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/SharedPoolDataSource.java

Modified: 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/PerUserPoolDataSource.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/PerUserPoolDataSource.java?view=diff&rev=558850&r1=558849&r2=558850
==
--- 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/PerUserPoolDataSource.java
 (original)
+++ 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/PerUserPoolDataSource.java
 Mon Jul 23 13:02:19 2007
@@ -415,11 +415,17 @@
 }
 }
 
-con.setAutoCommit(defaultAutoCommit);
+if (con.getAutoCommit() != defaultAutoCommit) {
+con.setAutoCommit(defaultAutoCommit);
+}
+
 if (defaultTransactionIsolation != UNKNOWN_TRANSACTIONISOLATION) {
 con.setTransactionIsolation(defaultTransactionIsolation);
 }
-con.setReadOnly(defaultReadOnly);
+
+if (con.isReadOnly() != defaultReadOnly) {
+con.setReadOnly(defaultReadOnly);
+}
 }
 
 /**

Modified: 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/SharedPoolDataSource.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/SharedPoolDataSource.java?view=diff&rev=558850&r1=558849&r2=558850
==
--- 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/SharedPoolDataSource.java
 (original)
+++ 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/SharedPoolDataSource.java
 Mon Jul 23 13:02:19 2007
@@ -222,14 +222,21 @@
isRollbackAfterValidation());
 }
 
-protected void setupDefaults(Connection con, String username)
-throws SQLException {
-con.setAutoCommit(isDefaultAutoCommit());
+protected void setupDefaults(Connection con, String username) throws 
SQLException {
+boolean defaultAutoCommit = isDefaultAutoCommit();
+if (con.getAutoCommit() != defaultAutoCommit) {
+con.setAutoCommit(defaultAutoCommit);
+}
+
 int defaultTransactionIsolation = getDefaultTransactionIsolation();
 if (defaultTransactionIsolation != UNKNOWN_TRANSACTIONISOLATION) {
 con.setTransactionIsolation(defaultTransactionIsolation);
 }
-con.setReadOnly(isDefaultReadOnly());
+
+boolean defaultReadOnly = isDefaultReadOnly();
+if (con.isReadOnly() != defaultReadOnly) {
+con.setReadOnly(defaultReadOnly);
+}
 }
 
 /**



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



svn commit: r558884 - in /jakarta/commons/proper/dbcp/trunk: ./ src/java/org/apache/commons/dbcp/ src/java/org/apache/commons/dbcp/managed/ src/test/org/apache/commons/dbcp/ src/test/org/apache/common

2007-07-23 Thread dain
Author: dain
Date: Mon Jul 23 15:28:37 2007
New Revision: 558884

URL: http://svn.apache.org/viewvc?view=rev&rev=558884
Log:
DBCP-221 Changed BasicDataSource.close() to permanently mark the data source as 
closed.  At close all idle connections are destroyed and the method returns.  
As existing active connections are closed, they are destroyed.

Added:

jakarta/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/managed/TestBasicManagedDataSource.java
Modified:
jakarta/commons/proper/dbcp/trunk/pom.xml
jakarta/commons/proper/dbcp/trunk/project.xml

jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java

jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnection.java

jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/managed/ManagedConnection.java

jakarta/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestAll.java

jakarta/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestBasicDataSource.java

Modified: jakarta/commons/proper/dbcp/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/dbcp/trunk/pom.xml?view=diff&rev=558884&r1=558883&r2=558884
==
--- jakarta/commons/proper/dbcp/trunk/pom.xml (original)
+++ jakarta/commons/proper/dbcp/trunk/pom.xml Mon Jul 23 15:28:37 2007
@@ -236,6 +236,7 @@
 
org/apache/commons/dbcp/datasources/TestPerUserPoolDataSource.java
 
org/apache/commons/dbcp/datasources/TestSharedPoolDataSource.java
 
+
org/apache/commons/dbcp/managed/TestBasicManagedDataSource.java
 
org/apache/commons/dbcp/managed/TestManagedDataSource.java
 
org/apache/commons/dbcp/managed/TestManagedDataSourceInTx.java
   

Modified: jakarta/commons/proper/dbcp/trunk/project.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/dbcp/trunk/project.xml?view=diff&rev=558884&r1=558883&r2=558884
==
--- jakarta/commons/proper/dbcp/trunk/project.xml (original)
+++ jakarta/commons/proper/dbcp/trunk/project.xml Mon Jul 23 15:28:37 2007
@@ -354,6 +354,10 @@
 org/apache/commons/dbcp/datasources/TestFactory.java
 
org/apache/commons/dbcp/datasources/TestPerUserPoolDataSource.java
 
org/apache/commons/dbcp/datasources/TestSharedPoolDataSource.java
+
+
org/apache/commons/dbcp/managed/TestBasicManagedDataSource.java
+
org/apache/commons/dbcp/managed/TestManagedDataSource.java
+
org/apache/commons/dbcp/managed/TestManagedDataSourceInTx.java
   
   
 

Modified: 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java?view=diff&rev=558884&r1=558883&r2=558884
==
--- 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java
 (original)
+++ 
jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java
 Mon Jul 23 15:28:37 2007
@@ -1093,7 +1093,7 @@
 }
 
 /**
- * Sets the connection properties passed to driver.connect(...). 
+ * Sets the connection properties passed to driver.connect(...).
  *
  * Format of the string must be [propertyName=property;]*
  *
@@ -1126,13 +1126,18 @@
 this.restartNeeded = true;
 }
 
+protected boolean closed;
+
 /**
  * Close and release all connections that are currently stored in the
- * connection pool associated with our data source.
+ * connection pool associated with our data source.  All open (active)
+ * connection remain open until closed.  Once the data source has
+ * been closed, no more connections can be obtained.
  *
  * @throws SQLException if a database error occurs
  */
 public synchronized void close() throws SQLException {
+closed = true;
 GenericObjectPool oldpool = connectionPool;
 connectionPool = null;
 dataSource = null;
@@ -1149,6 +1154,13 @@
 }
 }
 
+/**
+ * If true, this data source is closed and no more connections can be 
retrieved from this datasource.
+ * @return true, if the data source is closed; false otherwise
+ */
+public synchronized boolean isClosed() {
+return closed;
+}
 
 // -- Protected Methods
 
@@ -1167,6 +1179,9 @@
  */
 protected synchronized DataSource createDataSource()
 throws SQLException {
+if (closed) {
+throw new SQLException("Data source is closed");
+}
 
 // Return the pool if we have already created it
 if (dataSource != null)

[jira] Updated: (DBCP-191) [dbcp] does not compile under the latest unreleased jdk 1.6 / JDBC 4.0

2007-07-23 Thread Michael Heuer (JIRA)

 [ 
https://issues.apache.org/jira/browse/DBCP-191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Heuer updated DBCP-191:
---

Attachment: patch.txt

patch against nightly for 23 July 2007, or in other words

$ svn co --revision '{2007-07-23}' ...
...
$ svn diff . > patch.txt

> [dbcp] does not compile under the latest unreleased jdk 1.6 / JDBC 4.0
> --
>
> Key: DBCP-191
> URL: https://issues.apache.org/jira/browse/DBCP-191
> Project: Commons Dbcp
>  Issue Type: Improvement
> Environment: $ java -version
> java version "1.6.0-rc"
> Java(TM) SE Runtime Environment (build 1.6.0-rc-b87)
> Java HotSpot(TM) Client VM (build 1.6.0-rc-b87, mixed mode, sharing)
> $ java -version
> java version "1.6.0-rc"
> Java(TM) SE Runtime Environment (build 1.6.0-rc-b89)
> Java HotSpot(TM) Client VM (build 1.6.0-rc-b89, mixed mode, sharing)
>Reporter: Michael Heuer
>Priority: Minor
> Fix For: 1.3
>
> Attachments: patch.txt
>
>
> Just a heads up, [dbcp] does not compile under the latest unreleased jdk 1.6 
> / JDBC 4.0, even with maven.compile.source and maven.compile.target 
> properties set to something appropriate.
> $ maven java:compile
>  __  __
> |  \/  |__ _Apache__ ___
> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
> |_|  |_\__,_|\_/\___|_||_|  v. 1.0.2
> java:prepare-filesystem:
> [mkdir] Created dir: working/commons-dbcp/target/classes
> java:compile:
> [echo] Compiling to working/commons-dbcp/target/classes
> [echo]
> ==
>   NOTE: Targetting JVM 1.6, classes
>   will not run on earlier JVMs
> ==
> [javac] Compiling 39 source files to working/commons-dbcp/target/classes
> working/commons-dbcp/src/java/org/apache/commons/dbcp/BasicDataSource.java:43:
>  org.apache.commons.dbcp.BasicDataSource is not abstract and does not 
> override abstract method 
> createQueryObject(java.lang.Class,javax.sql.DataSource) in 
> javax.sql.DataSource
> public class BasicDataSource implements DataSource {
>^
> working/commons-dbcp/src/java/org/apache/commons/dbcp/cpdsadapter/ConnectionImpl.java:
>  40: org.apache.commons.dbcp.cpdsadapter.ConnectionImpl is not abstract and 
> does not override abstract method 
> createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection
> class ConnectionImpl implements Connection {
> ^
> working/commons-dbcp/src/java/org/apache/commons/dbcp/cpdsadapter/PooledConnectionImpl.java:42:
>  org.apache.commons.dbcp.cpdsadapter.PooledConnectionImpl is not abstract and 
> does not override abstract method 
> removeStatementEventListener(javax.sql.StatementEventListener) in 
> javax.sql.PooledConnection
> class PooledConnectionImpl
> ^
> working/commons-dbcp/src/java/org/apache/commons/dbcp/DelegatingConnection.java:50:
>  org.apache.commons.dbcp.DelegatingConnection is not abstract and does not 
> override abstract method createStruct(java.lang.String,java.lang.Object[]) in 
> java.sql.Connection
> public class DelegatingConnection extends AbandonedTrace
>^
> working/commons-dbcp/src/java/org/apache/commons/dbcp/cpdsadapter/DriverAdapterCPDS.java:85:
>  org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS is not abstract and 
> does not override abstract method getQueryObjectGenerator() in 
> javax.sql.CommonDataSource
> public class DriverAdapterCPDS
>^
> working/commons-dbcp/src/java/org/apache/commons/dbcp/DelegatingStatement.java:45:
>  org.apache.commons.dbcp.DelegatingStatement is not abstract and does not 
> override abstract method isPoolable() in java.sql.Statement
> public class DelegatingStatement extends AbandonedTrace implements Statement {
>^
> working/commons-dbcp/src/java/org/apache/commons/dbcp/DelegatingStatement.java:130:
>  isClosed() in org.apache.commons.dbcp.DelegatingStatement cannot implement 
> isClosed() in java.sql.Statement; attempting to assign weaker access 
> privileges; was public
> protected boolean isClosed() {
>   ^
> working/commons-dbcp/src/java/org/apache/commons/dbcp/DelegatingPreparedStatement.java:49:
>  org.apache.commons.dbcp.DelegatingPreparedStatement is not abstract and does 
> not override abstract method setCharacterStream(int,java.io.Reader,long) in 
> java.sql.PreparedStatement
> public class DelegatingPreparedStatement extends DelegatingStatement
>^
> working/commons-dbcp/src/java/org/apache/commons/dbcp/PoolablePreparedStatement.java:40:
>  org.apache.commons.dbcp.PoolablePreparedStatement is not abstract and does 
> not override abstract method setCharacterStream(int,java.io.Reader,long) in 
> java.sql.PreparedStatement
> public class PoolablePreparedStatement extends DelegatingPreparedStatement 
> implements Prepa

[jira] Commented: (DBCP-191) [dbcp] does not compile under the latest unreleased jdk 1.6 / JDBC 4.0

2007-07-23 Thread Michael Heuer (JIRA)

[ 
https://issues.apache.org/jira/browse/DBCP-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514825
 ] 

Michael Heuer commented on DBCP-191:


Attached is a patch that allows commons-dbcp and its tests to compile under 
maven with jdk 1.6/JDBC 4.0.

A couple of potential gotchas:

 - boolean isClosed() is now a public method on DelegatingStatement, was 
protected

 - several JDBC interfaces now implement java.sql.Wrapper, which contains 
generics language features


and to-dos:

 - questionable implemention of boolean Wrapper.isWrapperFor(Class iface) 
and  T Wrapper.unwrap(Class iface) in some classes (e.g. BasicDataSource 
has a dataSource but is it considered a wrapper?)

 - conditional compilation for /* JDBC_4_ANT_KEY... */ tags via the ant build

 - create a separate svn branch?

> [dbcp] does not compile under the latest unreleased jdk 1.6 / JDBC 4.0
> --
>
> Key: DBCP-191
> URL: https://issues.apache.org/jira/browse/DBCP-191
> Project: Commons Dbcp
>  Issue Type: Improvement
> Environment: $ java -version
> java version "1.6.0-rc"
> Java(TM) SE Runtime Environment (build 1.6.0-rc-b87)
> Java HotSpot(TM) Client VM (build 1.6.0-rc-b87, mixed mode, sharing)
> $ java -version
> java version "1.6.0-rc"
> Java(TM) SE Runtime Environment (build 1.6.0-rc-b89)
> Java HotSpot(TM) Client VM (build 1.6.0-rc-b89, mixed mode, sharing)
>Reporter: Michael Heuer
>Priority: Minor
> Fix For: 1.3
>
>
> Just a heads up, [dbcp] does not compile under the latest unreleased jdk 1.6 
> / JDBC 4.0, even with maven.compile.source and maven.compile.target 
> properties set to something appropriate.
> $ maven java:compile
>  __  __
> |  \/  |__ _Apache__ ___
> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
> |_|  |_\__,_|\_/\___|_||_|  v. 1.0.2
> java:prepare-filesystem:
> [mkdir] Created dir: working/commons-dbcp/target/classes
> java:compile:
> [echo] Compiling to working/commons-dbcp/target/classes
> [echo]
> ==
>   NOTE: Targetting JVM 1.6, classes
>   will not run on earlier JVMs
> ==
> [javac] Compiling 39 source files to working/commons-dbcp/target/classes
> working/commons-dbcp/src/java/org/apache/commons/dbcp/BasicDataSource.java:43:
>  org.apache.commons.dbcp.BasicDataSource is not abstract and does not 
> override abstract method 
> createQueryObject(java.lang.Class,javax.sql.DataSource) in 
> javax.sql.DataSource
> public class BasicDataSource implements DataSource {
>^
> working/commons-dbcp/src/java/org/apache/commons/dbcp/cpdsadapter/ConnectionImpl.java:
>  40: org.apache.commons.dbcp.cpdsadapter.ConnectionImpl is not abstract and 
> does not override abstract method 
> createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection
> class ConnectionImpl implements Connection {
> ^
> working/commons-dbcp/src/java/org/apache/commons/dbcp/cpdsadapter/PooledConnectionImpl.java:42:
>  org.apache.commons.dbcp.cpdsadapter.PooledConnectionImpl is not abstract and 
> does not override abstract method 
> removeStatementEventListener(javax.sql.StatementEventListener) in 
> javax.sql.PooledConnection
> class PooledConnectionImpl
> ^
> working/commons-dbcp/src/java/org/apache/commons/dbcp/DelegatingConnection.java:50:
>  org.apache.commons.dbcp.DelegatingConnection is not abstract and does not 
> override abstract method createStruct(java.lang.String,java.lang.Object[]) in 
> java.sql.Connection
> public class DelegatingConnection extends AbandonedTrace
>^
> working/commons-dbcp/src/java/org/apache/commons/dbcp/cpdsadapter/DriverAdapterCPDS.java:85:
>  org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS is not abstract and 
> does not override abstract method getQueryObjectGenerator() in 
> javax.sql.CommonDataSource
> public class DriverAdapterCPDS
>^
> working/commons-dbcp/src/java/org/apache/commons/dbcp/DelegatingStatement.java:45:
>  org.apache.commons.dbcp.DelegatingStatement is not abstract and does not 
> override abstract method isPoolable() in java.sql.Statement
> public class DelegatingStatement extends AbandonedTrace implements Statement {
>^
> working/commons-dbcp/src/java/org/apache/commons/dbcp/DelegatingStatement.java:130:
>  isClosed() in org.apache.commons.dbcp.DelegatingStatement cannot implement 
> isClosed() in java.sql.Statement; attempting to assign weaker access 
> privileges; was public
> protected boolean isClosed() {
>   ^
> working/commons-dbcp/src/java/org/apache/commons/dbcp/DelegatingPreparedStatement.java:49:
>  org.apache.commons.dbcp.DelegatingPreparedStatement is not abstract and does 
> not override abstract method setCharacterStream(int,java.io.Reader,l

[DBCP] Remove SQLNestedException

2007-07-23 Thread Dain Sundstrom
DBCP-143 talks about problem with propagation of SQLNestedException  
to clients and the comment suggests a conversion to normal Java  
nested exception when we switch to Java 1.4.  Since we made the leap,  
I did a bit of refactoring to remove this exception class.  Basically  
I replace:


  new SQLNestedException(msg, e);

with:

  (SQLException) new SQLException(msg).initCause(e);

I attached this at a patch to 143 as I'm not 100% sure we want to go  
this direction.


So, should we drop SQLNestedException?

-dain

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



[jira] Updated: (DBCP-143) [dbcp] SQLNestedException thrown by server causes client ClassNotFoundException.

2007-07-23 Thread Dain Sundstrom (JIRA)

 [ 
https://issues.apache.org/jira/browse/DBCP-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dain Sundstrom updated DBCP-143:


Attachment: DBCP-143.patch

This patch replaces:

   new SQLNestedException(msg, e);

with:

  (SQLException) new SQLException(msg).initCause(e);



> [dbcp] SQLNestedException thrown by server causes client 
> ClassNotFoundException.
> 
>
> Key: DBCP-143
> URL: https://issues.apache.org/jira/browse/DBCP-143
> Project: Commons Dbcp
>  Issue Type: Bug
> Environment: Operating System: other
> Platform: Other
>Reporter: Andreas Krüger
> Fix For: 1.3
>
> Attachments: DBCP-143.patch
>
>
> This is a GUI client / application server / database server application.
> On the GUI client side, we see java.lang.ClassNotFoundException:
> org.apache.commons.dbcp.SQLNestedException.
> This happens when the database server is down, DBCP cannot connect to the
> database, and throws a org.apache.commons.dbcp.SQLNestedException.
> Our application server code sends the java.sql.SQLException it sees to the
> client via RMI.
> However, on the client, we have not provided commons-dbcp.jar.
> And I don't think we should - DBCP is server code.
> But, when the client does not have SQLNestedException's class file, the 
> attempt
> to de-serialize it results in the ClassNotFoundException we've been seeing.
> Even old http://java.sun.com/j2se/1.3/docs/api/java/sql/SQLException.html has
> the facilities that SQLNestedExcepion offers: It is able to chain another
> SQLException to itself. So while SQLNestedException clearly causes problems, I
> don't understand what DBCP gains from it.
> What would we loose if it were scratched?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Created: (DBCP-235) accessToUnderlyingConnectionAllowed flag in ManagedConnection breaks equals, hashCode and toString

2007-07-23 Thread Dain Sundstrom (JIRA)
accessToUnderlyingConnectionAllowed  flag in ManagedConnection breaks equals, 
hashCode and toString
---

 Key: DBCP-235
 URL: https://issues.apache.org/jira/browse/DBCP-235
 Project: Commons Dbcp
  Issue Type: Bug
Reporter: Dain Sundstrom
 Fix For: 1.3


The accessToUnderlyingConnectionAllowed property ManageConnection disables the 
getInnerMostDelegate method used by DelegatingConnection equals, hashCode, and 
toString.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



svn commit: r558885 - /jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVPrinter.java

2007-07-23 Thread mbenson
Author: mbenson
Date: Mon Jul 23 15:32:42 2007
New Revision: 558885

URL: http://svn.apache.org/viewvc?view=rev&rev=558885
Log:
use strategy encapsulator in printer rather than assuming double-quote

Modified:

jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVPrinter.java

Modified: 
jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVPrinter.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVPrinter.java?view=diff&rev=558885&r1=558884&r2=558885
==
--- 
jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVPrinter.java
 (original)
+++ 
jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVPrinter.java
 Mon Jul 23 15:32:42 2007
@@ -250,7 +250,7 @@
* @param value needs to be escaped and quoted
* @return the value, escaped and quoted
*/
-  private static String escapeAndQuote(String value) {
+  private String escapeAndQuote(String value) {
 // the initial count is for the preceding and trailing quotes
 int count = 2;
 for (int i = 0; i < value.length(); i++) {
@@ -266,13 +266,15 @@
   }
 }
 StringBuffer sb = new StringBuffer(value.length() + count);
-sb.append('"');
+sb.append(strategy.getEncapsulator());
 for (int i = 0; i < value.length(); i++) {
   char c = value.charAt(i);
+
+  if (c == strategy.getEncapsulator()) {
+sb.append('\\').append(c);
+continue;
+  }
   switch (c) {
-case '\"' :
-  sb.append("\\\"");
-  break;
 case '\n' :
   sb.append("\\n");
   break;
@@ -286,7 +288,7 @@
   sb.append(c);
   }
 }
-sb.append('"');
+sb.append(strategy.getEncapsulator());
 return sb.toString();
   }
 



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



Re: [DBCP] close issues

2007-07-23 Thread Dain Sundstrom

On Jul 21, 2007, at 12:35 PM, Phil Steitz wrote:


Its not quite that bad now; but the returning orphans do not get
closed on return.  What happens now is that the GOP throws
IllegalStateException when you try to return an object (or perform any
other operation) on a closed pool.  We could include a patch in pool
1.3.1 to passivate and destroy a returning orphan before throwing the
IllegalStateException, taking a baby step toward better lifeclycle
management.  Since the pool does not hold references to these orphans
once its closed, I am not sure how big a problem this is in general;
though certainly for dbcp, the underlying physical connections do not
get closed right away in this case.


I implemented the IllegalStateException idea.  Now when close is  
called on BasicDataSource, it is marked as close and no new  
connections will be created (you get a SQLException).  As before the  
idle connections are immedately destroyed and the close method  
returns.  As the active connections are closed, they are destroyed.


-dain

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



[jira] Resolved: (DBCP-221) How to close the connection pool without shutting down the JVM while there are connections being used?

2007-07-23 Thread Dain Sundstrom (JIRA)

 [ 
https://issues.apache.org/jira/browse/DBCP-221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dain Sundstrom resolved DBCP-221.
-

Resolution: Fixed
  Assignee: Dain Sundstrom

BasicDataSource.close() now permanently marks the data source as closed.  No 
new connections can be obtained from a closed data source.  At close all idle 
connections are destroyed and the method returns.  As existing active 
connections are closed, they are destroyed.

> How to close the connection pool without shutting down the JVM while there 
> are connections being used?
> --
>
> Key: DBCP-221
> URL: https://issues.apache.org/jira/browse/DBCP-221
> Project: Commons Dbcp
>  Issue Type: Bug
>Affects Versions: 1.2.2
>Reporter: Bill Liu
>Assignee: Dain Sundstrom
> Fix For: 1.3
>
>
> Suppose there are several connections being used now by different servlets. 
> calling the basicDataSource,close() does not have any impact on the 
> connection pool. I expect that after these servlet return the connections the 
> pool should be shut down immediately. I also expect that any more requests to 
> borrow connections from the pool should not be fulfilled. However, my 
> experiment does not seem to support my expectations. Calling 
> basicDataSource.close() seems to be ignored while there are connections being 
> used.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



svn commit: r558883 - /jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVParser.java

2007-07-23 Thread mbenson
Author: mbenson
Date: Mon Jul 23 15:25:10 2007
New Revision: 558883

URL: http://svn.apache.org/viewvc?view=rev&rev=558883
Log:
fix eol detection

Modified:

jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVParser.java

Modified: 
jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVParser.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVParser.java?view=diff&rev=558883&r1=558882&r2=558883
==
--- 
jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVParser.java
 (original)
+++ 
jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVParser.java
 Mon Jul 23 15:25:10 2007
@@ -459,6 +459,7 @@
 // assert c == delimiter;
 c = in.read();
 while (!tkn.isReady) {
+  boolean skipRead = false;
   if (c == strategy.getEncapsulator() || c == '\\') {
 // check lookahead
 if (in.lookAhead() == strategy.getEncapsulator()) {
@@ -483,26 +484,26 @@
 } else {
   // token finish mark (encapsulator) reached: ignore whitespace till 
delimiter
   while (!tkn.isReady) {
-int n = in.lookAhead();
-if (n == strategy.getDelimiter()) {
+c = in.read();
+if (c == strategy.getDelimiter()) {
   tkn.type = TT_TOKEN;
   tkn.isReady = true;
-} else if (isEndOfFile(n)) {
+} else if (isEndOfFile(c)) {
   tkn.type = TT_EOF;
   tkn.isReady = true;
-} else if (isEndOfLine(n)) {
+} else if (isEndOfLine(c)) {
   // ok eo token reached
   tkn.type = TT_EORECORD;
   tkn.isReady = true;
-} else if (!isWhitespace(n)) {
-  // error invalid char between token and next delimiter
-  throw new IOException(
-"(line " + getLineNumber() 
-+ ") invalid char between encapsualted token end delimiter"
-  );
-}
-c = in.read();
+} else if (!isWhitespace(c)) {
+// error invalid char between token and next delimiter
+throw new IOException(
+  "(line " + getLineNumber() 
+  + ") invalid char between encapsulated token end delimiter"
+);
+  }
   }
+  skipRead = true;
 }
   } else if (isEndOfFile(c)) {
 // error condition (end of file before end of token)
@@ -515,8 +516,8 @@
 tkn.content.append((char) c);
   }
   // get the next char
-  if (!tkn.isReady) {
-c = in.read();  
+  if (!tkn.isReady && !skipRead) {
+c = in.read();
   }
 }
 return tkn;



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



svn commit: r558882 - /jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/ExtendedBufferedReader.java

2007-07-23 Thread mbenson
Author: mbenson
Date: Mon Jul 23 15:22:45 2007
New Revision: 558882

URL: http://svn.apache.org/viewvc?view=rev&rev=558882
Log:
wording

Modified:

jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/ExtendedBufferedReader.java

Modified: 
jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/ExtendedBufferedReader.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/ExtendedBufferedReader.java?view=diff&rev=558882&r1=558881&r2=558882
==
--- 
jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/ExtendedBufferedReader.java
 (original)
+++ 
jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/ExtendedBufferedReader.java
 Mon Jul 23 15:22:45 2007
@@ -26,7 +26,7 @@
  * A special reader decorater which supports more
  * sophisticated access to the underlying reader object.
  * 
- * In especialy the reader supports a look-ahead option,
+ * In particular the reader supports a look-ahead option,
  * which allows you to see the next char returned by
  * next().
  * Furthermore the skip-method supports skipping until



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



Moderator volunteer?

2007-07-23 Thread Henri Yandell

Is there anyone who could volunteer to moderate the list?

I'm looking to share the load and get off of commons-dev moderating :)

Hen

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



Re: [configuration][all] Support for OS environment variables

2007-07-23 Thread Jörg Schaible

Hi Oliver,

Oliver Heger wrote:

> Hi all,
> 
> for [configuration] we have a feature request for supporting environment
> variables [1]. I searched the archives and found that this topic has
> been discussed before [2].
> 
> I was wondering whether situation has changed since then. My personal
> opinion is expressed in the Jira ticket in [1]. What do others think?
> 
> Please note that the ticket contains an attachment with a simple
> implementation for accessing environment variables.
> 
> Thanks
> Oliver
> 
> [1] http://issues.apache.org/jira/browse/CONFIGURATION-284
> [2]
> http://thread.gmane.org/gmane.comp.jakarta.commons.devel/33239/focus=33325

Well, the deprecation of System.getenv() has been removed with JDK 5
again ...

- Jörg




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



[jira] Resolved: (JXPATH-97) Incomplete handling of undefined namespaces

2007-07-23 Thread Matt Benson (JIRA)

 [ 
https://issues.apache.org/jira/browse/JXPATH-97?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Benson resolved JXPATH-97.
---

Resolution: Fixed

elements handled.

> Incomplete handling of undefined namespaces
> ---
>
> Key: JXPATH-97
> URL: https://issues.apache.org/jira/browse/JXPATH-97
> Project: Commons JXPath
>  Issue Type: Bug
>Affects Versions: Nightly Builds, 1.2 Final
>Reporter: Sergey Vladimirov
> Fix For: 1.3
>
> Attachments: NamespacesTest.java, patch.txt
>
>
> Mcduffey, Joe <[EMAIL PROTECTED]>
> Can someone tell me how to register namespaces so that attributes with 
> namespaces does not cause the exception
> org.apache.common.ri.model.dom.DOMNodePointer.createAttribute
> unknown namespace prefix: xsi
> For example the following
> 
>   MY VALUE
> 
> Would result in the following exception:
> org.apache.common.ri.model.dom.DOMNodePointer.createAttribute
> unknown namespace prefix: A
> FYI: In this example there was a namespace decaration in the file and I also 
> manually called the
> registerNamespace(A,"/http...");
> registerNamespace(B,"/http...");
> There was no problem encountered for elements. Only attributes. Can someone 
> help? Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



Re: [DBCP] DBCP-44 Deadlock

2007-07-23 Thread Phil Steitz

On 7/23/07, Dain Sundstrom <[EMAIL PROTECTED]> wrote:

On Jul 20, 2007, at 5:26 PM, Phil Steitz wrote:

> On 7/20/07, Dain Sundstrom <[EMAIL PROTECTED]> wrote:
>> On Jul 20, 2007, at 11:26 AM, Dain Sundstrom wrote:
>>
>> > On Jul 19, 2007, at 11:19 PM, Phil Steitz wrote:
>> >
>> >> I would love to have a fix for DBCP-44; but that could wait on
>> pool
>> >> 1.4 if necessary (and Ipersonally see no way to fix it just within
>> >> dbcp.  It would be great if I was wrong on that).
>> >
>> > I think the makeObject method is over synchronized.  Actually, the
>> > class doesn't look it's synchronized properly at all.  I'll take a
>> > shot at fixing this.
>>
>> I attached a patch that fixes the synchronization in
>> PoolableConnectionFactory, but the deadlock still persists.  The
>> problem is GenericObjectPool.borrowObject() is synchronized so when
>> it needs to makeObject that method is called while the synchronized
>> block is held.  I think this would take major surgery to make
>> GenericObjectPool not perform this way.
>
> Thats what I feared.  Thanks for looking in any case.

Should I commit the patch that removes the excessive synchronization
from PoolableConnectionFactory.  It won't fix this problem but may
alleviate some other ones.



+1 to committing the patch.

Phil

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



svn commit: r558866 - in /jakarta/commons/proper/jxpath/trunk/src: java/org/apache/commons/jxpath/ri/model/dom/ java/org/apache/commons/jxpath/ri/model/jdom/ test/org/apache/commons/jxpath/ test/org/a

2007-07-23 Thread mbenson
Author: mbenson
Date: Mon Jul 23 14:32:41 2007
New Revision: 558866

URL: http://svn.apache.org/viewvc?view=rev&rev=558866
Log:
[JXPATH-97] implement prefix matching for undeclared XML namespaces

Added:

jakarta/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ExternalNS.xml
   (with props)

jakarta/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ri/model/ExternalXMLNamespaceTest.java
   (with props)
Modified:

jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dom/DOMNodePointer.java

jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java

jakarta/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/JXPathTestSuite.java

Modified: 
jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dom/DOMNodePointer.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dom/DOMNodePointer.java?view=diff&rev=558866&r1=558865&r2=558866
==
--- 
jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dom/DOMNodePointer.java
 (original)
+++ 
jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dom/DOMNodePointer.java
 Mon Jul 23 14:32:41 2007
@@ -101,12 +101,12 @@
 if (wildcard && testPrefix == null) {
 return true;
 }
-
 if (wildcard
 || testName.getName()
 .equals(DOMNodePointer.getLocalName(node))) {
 String nodeNS = DOMNodePointer.getNamespaceURI(node);
-return equalStrings(namespaceURI, nodeNS);
+return equalStrings(namespaceURI, nodeNS) || nodeNS == null
+&& equalStrings(testPrefix, getPrefix(node));
 }
 return false;
 }

Modified: 
jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java?view=diff&rev=558866&r1=558865&r2=558866
==
--- 
jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java
 (original)
+++ 
jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java
 Mon Jul 23 14:32:41 2007
@@ -363,12 +363,12 @@
 if (wildcard && testPrefix == null) {
 return true;
 }
-
 if (wildcard
 || testName.getName()
 .equals(JDOMNodePointer.getLocalName(node))) {
 String nodeNS = JDOMNodePointer.getNamespaceURI(node);
-return equalStrings(namespaceURI, nodeNS);
+return equalStrings(namespaceURI, nodeNS) || nodeNS == null
+&& equalStrings(testPrefix, getPrefix(node));
 }
 return false;
 }

Added: 
jakarta/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ExternalNS.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ExternalNS.xml?view=auto&rev=558866
==
--- 
jakarta/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ExternalNS.xml
 (added)
+++ 
jakarta/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ExternalNS.xml
 Mon Jul 23 14:32:41 2007
@@ -0,0 +1,20 @@
+
+
+
+  MY VALUE
+

Propchange: 
jakarta/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ExternalNS.xml
--
svn:eol-style = native

Modified: 
jakarta/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/JXPathTestSuite.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/JXPathTestSuite.java?view=diff&rev=558866&r1=558865&r2=558866
==
--- 
jakarta/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/JXPathTestSuite.java
 (original)
+++ 
jakarta/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/JXPathTestSuite.java
 Mon Jul 23 14:32:41 2007
@@ -29,7 +29,9 @@
 import org.apache.commons.jxpath.ri.compiler.CoreOperationTest;
 import org.apache.commons.jxpath.ri.compiler.ExtensionFunctionTest;
 import org.apache.commons.jxpath.ri.compiler.VariableTest;
+import org.apache.commons.jxpath.ri.model.ExternalXMLNamespaceTest;
 import org.apache.commons.jxpath.ri.model.MixedModelTest;
+import org.apache.commons.jxpath.ri.model.XMLPreserveSpaceTest;
 import org.apache

[jira] Reopened: (DBCP-212) PoolingDataSource closes physical connections

2007-07-23 Thread Marcos Sanz (JIRA)

 [ 
https://issues.apache.org/jira/browse/DBCP-212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcos Sanz reopened DBCP-212:
--


Not really fixed. As Phil wrote: "until pool is improved somehow to be more 
intelligent about destroying idle objects, dbcp is prone to this behavior".
I'd like to keep this open so as not to forget this. The question remains: Has 
PoolableConnectionFactory.makeObject() necessarily be synchronized?

> PoolingDataSource closes physical connections
> -
>
> Key: DBCP-212
> URL: https://issues.apache.org/jira/browse/DBCP-212
> Project: Commons Dbcp
>  Issue Type: Bug
>Affects Versions: 1.2.2
> Environment: Windows XP, Java 1.5.0_06-b05, Sybase ASE 12.5.4, 
> jConnect 6.0.5 EBF 13862, Commons Pool 1.3
>Reporter: Marcos Sanz
> Fix For: 1.3
>
> Attachments: DBCPtester.java, DBCPtester.java, output.txt
>
>
> By executing the attached program and monitoring the process id of the 
> physical connections at the database server, it is possible to demonstrate 
> that the connections are being actually physically closed and reopened by the 
> application at a very high rate.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



svn commit: r558859 - in /jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction: ManageableResourceManager.java memory/BasicTxMap.java memory/OptimisticTxMa

2007-07-23 Thread ozeigermann
Author: ozeigermann
Date: Mon Jul 23 13:55:13 2007
New Revision: 558859

URL: http://svn.apache.org/viewvc?view=rev&rev=558859
Log:
Minor cleanup

Modified:

jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/ManageableResourceManager.java

jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/memory/BasicTxMap.java

jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/memory/OptimisticTxMap.java

jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/memory/PessimisticTxMap.java

Modified: 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/ManageableResourceManager.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/ManageableResourceManager.java?view=diff&rev=558859&r1=558858&r2=558859
==
--- 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/ManageableResourceManager.java
 (original)
+++ 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/ManageableResourceManager.java
 Mon Jul 23 13:55:13 2007
@@ -18,10 +18,11 @@
 
 import org.apache.commons.transaction.locking.LockManager;
 
-
 public interface ManageableResourceManager extends 
TransactionalResourceManager {
 void setRollbackOnly();
+
 boolean commitCanFail();
+
 /**
  * Checks whether this transaction has been marked to allow a rollback as
  * the only valid outcome. This can be set my method
@@ -36,11 +37,8 @@
  */
 public boolean isTransactionMarkedForRollback();
 
-
 public boolean isReadOnlyTransaction();
-
-public void joinTransaction(LockManager lm);
 
-
+public void joinTransaction(LockManager lm);
 
 }

Modified: 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/memory/BasicTxMap.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/memory/BasicTxMap.java?view=diff&rev=558859&r1=558858&r2=558859
==
--- 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/memory/BasicTxMap.java
 (original)
+++ 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/memory/BasicTxMap.java
 Mon Jul 23 13:55:13 2007
@@ -26,9 +26,7 @@
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.commons.transaction.AbstractTransactionalResourceManager;
-import org.apache.commons.transaction.TransactionalResourceManager;
 import 
org.apache.commons.transaction.AbstractTransactionalResourceManager.AbstractTxContext;
-import org.apache.commons.transaction.locking.LockManager;
 
 /**
  * Wrapper that adds transactional control to all kinds of maps that implement

Modified: 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/memory/OptimisticTxMap.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/memory/OptimisticTxMap.java?view=diff&rev=558859&r1=558858&r2=558859
==
--- 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/memory/OptimisticTxMap.java
 (original)
+++ 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/memory/OptimisticTxMap.java
 Mon Jul 23 13:55:13 2007
@@ -25,9 +25,7 @@
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
-import org.apache.commons.transaction.TransactionalResourceManager;
 import org.apache.commons.transaction.locking.LockException;
-import org.apache.commons.transaction.locking.LockManager;
 
 /**
  * Wrapper that adds transactional control to all kinds of maps that implement

Modified: 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/memory/PessimisticTxMap.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/memory/PessimisticTxMap.java?view=diff&rev=558859&r1=558858&r2=558859
==
--- 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/memory/PessimisticTxMap.java
 (original)
+++ 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/memory/Pe

svn commit: r558858 - /jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/util/FileHelper.java

2007-07-23 Thread ozeigermann
Author: ozeigermann
Date: Mon Jul 23 13:54:49 2007
New Revision: 558858

URL: http://svn.apache.org/viewvc?view=rev&rev=558858
Log:
Removed all unused methods

Modified:

jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/util/FileHelper.java

Modified: 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/util/FileHelper.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/util/FileHelper.java?view=diff&rev=558858&r1=558857&r2=558858
==
--- 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/util/FileHelper.java
 (original)
+++ 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/util/FileHelper.java
 Mon Jul 23 13:54:49 2007
@@ -16,12 +16,12 @@
  */
 package org.apache.commons.transaction.util;
 
+import java.io.BufferedInputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.OutputStream;
 import java.nio.channels.FileChannel;
 
 /**
@@ -30,131 +30,17 @@
  * @version $Id: FileHelper.java 493628 2007-01-07 01:42:48Z joerg $
  */
 public final class FileHelper {
-
-private static int BUF_SIZE = 5;
-
-private static byte[] BUF = new byte[BUF_SIZE];
-
-/**
- * Deletes a file specified by a path.
- * 
- * @param path
- *path of file to be deleted
- * @return true if file has been deleted, false
- * otherwise
- */
-public static boolean deleteFile(String path) {
-File file = new File(path);
-return file.delete();
-}
-
-/**
- * Checks if a file specified by a path exits.
- * 
- * @param path
- *path of file to be checked
- * @return true if file exists, false
- * otherwise
- */
-public static boolean fileExists(String path) {
-File file = new File(path);
-return file.exists();
-}
-
-/**
- * Creates a file specified by a path. All necessary directories will be
- * created.
- * 
- * @param path
- *path of file to be created
- * @return true if file has been created, false
- * if the file already exists
- * @throws IOException
- * If an I/O error occurred
- */
-public static boolean createFile(String path) throws IOException {
-File file = new File(path);
-if (file.isDirectory()) {
-return file.mkdirs();
-} else {
-File dir = file.getParentFile();
-// do not check if this worked, as it may also return false, when
-// all neccessary dirs are present
-dir.mkdirs();
-return file.createNewFile();
-}
-}
-
-/**
- * Removes a file. If the specified file is a directory all contained files
- * will be removed recursively as well.
- * 
- * @param toRemove
- *file to be removed
- */
-public static void removeRec(File toRemove) {
-if (toRemove.isDirectory()) {
-File fileList[] = toRemove.listFiles();
-for (int a = 0; a < fileList.length; a++) {
-removeRec(fileList[a]);
-}
-}
-toRemove.delete();
-}
-
-/**
- * Moves one directory or file to another. Existing files will be replaced.
- * 
- * @param source
- *file to move from
- * @param target
- *file to move to
- * @throws IOException
- * if an I/O error occurs (may result in partially done work)
- */
-public static void moveRec(File source, File target) throws IOException {
-byte[] sharedBuffer = new byte[BUF_SIZE];
-moveRec(source, target, sharedBuffer);
-}
-
-static void moveRec(File source, File target, byte[] sharedBuffer) throws 
IOException {
-if (source.isDirectory()) {
-if (!target.exists()) {
-target.mkdirs();
-}
-if (target.isDirectory()) {
-
-File[] files = source.listFiles();
-for (int i = 0; i < files.length; i++) {
-File file = files[i];
-File targetFile = new File(target, file.getName());
-if (file.isFile()) {
-if (targetFile.exists()) {
-targetFile.delete();
-}
-if (!file.renameTo(targetFile)) {
-copy(file, targetFile, sharedBuffer);
-file.delete();
-}
-} else {
-   

svn commit: r558857 - /jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/file/

2007-07-23 Thread ozeigermann
Author: ozeigermann
Date: Mon Jul 23 13:54:15 2007
New Revision: 558857

URL: http://svn.apache.org/viewvc?view=rev&rev=558857
Log:
First step to (yet non-working) pessimistic tx file manager having undo log

Added:

jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/file/FileResourceManager.java

jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/file/FileResourceUndoManager.java

jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/file/MemoryUndoManager.java
Removed:

jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/file/DefaultPathManager.java

jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/file/PathManager.java
Modified:

jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/file/TxFileResourceManager.java

Added: 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/file/FileResourceManager.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/file/FileResourceManager.java?view=auto&rev=558857
==
--- 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/file/FileResourceManager.java
 (added)
+++ 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/file/FileResourceManager.java
 Mon Jul 23 13:54:15 2007
@@ -0,0 +1,204 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.transaction.file;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.commons.transaction.resource.ResourceException;
+import org.apache.commons.transaction.resource.ResourceManager;
+import org.apache.commons.transaction.resource.StreamableResource;
+import org.apache.commons.transaction.util.FileHelper;
+
+public class FileResourceManager implements 
ResourceManager {
+
+private Log logger = LogFactory.getLog(getClass());
+
+protected String rootPath;
+
+public FileResourceManager(String rootPath) {
+this.rootPath = rootPath;
+}
+
+public StreamableResource getResource(String path) throws 
ResourceException {
+return new FileResource(path);
+}
+
+public String getRootPath() {
+return rootPath;
+}
+
+protected static class FileResource implements StreamableResource {
+
+protected File file;
+
+public FileResource(String path) {
+this.file = new File(path);
+}
+
+public FileResource(File file) {
+this.file = file;
+}
+
+public void createAsDirectory() throws ResourceException {
+if (!file.mkdirs()) {
+throw new ResourceException("Could not create directory");
+}
+
+}
+
+public void createAsFile() throws ResourceException {
+try {
+if (!file.createNewFile()) {
+throw new ResourceException("Could not create file");
+}
+} catch (IOException e) {
+throw new ResourceException(e);
+}
+}
+
+public void delete() throws ResourceException {
+if (!file.delete())
+throw new ResourceException("Could not create file");
+
+}
+
+public boolean exists() {
+return file.exists();
+}
+
+public List getChildren() throws ResourceException 
{
+List result = new 
ArrayList();
+File[] files = file.listFiles();
+for (File file : files) {
+result.add(new FileResource(file));
+

Re: [DBCP] JIRA workflow?

2007-07-23 Thread Henri Yandell

On 7/23/07, Dain Sundstrom <[EMAIL PROTECTED]> wrote:

When issues are complete, do you close or resolve them?  I have been
closing them, but just noticed that may are resolved.


I close em.


Also, should I create a DBCP 1.4 and move the issues (like max time
limit for pooled objects) we aren't going to get to for 1.3 over.


+1.

Hen

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



[jira] Commented: (JXPATH-97) Incomplete handling of undefined namespaces

2007-07-23 Thread Sergey Vladimirov (JIRA)

[ 
https://issues.apache.org/jira/browse/JXPATH-97?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514774
 ] 

Sergey Vladimirov commented on JXPATH-97:
-

Matt,

sorry for the bad patch. But one of the main point is change in DOMNodePointer:

@@ -102,9 +107,12 @@
 return true;
 }
 
-if (wildcard
-|| testName.getName()
-.equals(DOMNodePointer.getLocalName(node))) {
+// the same as for attribute ( DOMAttributeIterator::testAttr() )
+if (equalStrings(nodePrefix, testPrefix)) {
+return true;
+}
+
+if (wildcard || testName.getName().equals(nodeLocalName)) {
 String nodeNS = DOMNodePointer.getNamespaceURI(node);
 return equalStrings(namespaceURI, nodeNS);
 }


> Incomplete handling of undefined namespaces
> ---
>
> Key: JXPATH-97
> URL: https://issues.apache.org/jira/browse/JXPATH-97
> Project: Commons JXPath
>  Issue Type: Bug
>Affects Versions: Nightly Builds, 1.2 Final
>Reporter: Sergey Vladimirov
> Fix For: 1.3
>
> Attachments: NamespacesTest.java, patch.txt
>
>
> Mcduffey, Joe <[EMAIL PROTECTED]>
> Can someone tell me how to register namespaces so that attributes with 
> namespaces does not cause the exception
> org.apache.common.ri.model.dom.DOMNodePointer.createAttribute
> unknown namespace prefix: xsi
> For example the following
> 
>   MY VALUE
> 
> Would result in the following exception:
> org.apache.common.ri.model.dom.DOMNodePointer.createAttribute
> unknown namespace prefix: A
> FYI: In this example there was a namespace decaration in the file and I also 
> manually called the
> registerNamespace(A,"/http...");
> registerNamespace(B,"/http...");
> There was no problem encountered for elements. Only attributes. Can someone 
> help? Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



Re: [DBCP] DBCP-44 Deadlock

2007-07-23 Thread Dain Sundstrom

On Jul 20, 2007, at 5:26 PM, Phil Steitz wrote:


On 7/20/07, Dain Sundstrom <[EMAIL PROTECTED]> wrote:

On Jul 20, 2007, at 11:26 AM, Dain Sundstrom wrote:

> On Jul 19, 2007, at 11:19 PM, Phil Steitz wrote:
>
>> I would love to have a fix for DBCP-44; but that could wait on  
pool

>> 1.4 if necessary (and Ipersonally see no way to fix it just within
>> dbcp.  It would be great if I was wrong on that).
>
> I think the makeObject method is over synchronized.  Actually, the
> class doesn't look it's synchronized properly at all.  I'll take a
> shot at fixing this.

I attached a patch that fixes the synchronization in
PoolableConnectionFactory, but the deadlock still persists.  The
problem is GenericObjectPool.borrowObject() is synchronized so when
it needs to makeObject that method is called while the synchronized
block is held.  I think this would take major surgery to make
GenericObjectPool not perform this way.


Thats what I feared.  Thanks for looking in any case.


Should I commit the patch that removes the excessive synchronization  
from PoolableConnectionFactory.  It won't fix this problem but may  
alleviate some other ones.


-dain

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



[configuration][all] Support for OS environment variables

2007-07-23 Thread Oliver Heger

Hi all,

for [configuration] we have a feature request for supporting environment 
variables [1]. I searched the archives and found that this topic has 
been discussed before [2].


I was wondering whether situation has changed since then. My personal 
opinion is expressed in the Jira ticket in [1]. What do others think?


Please note that the ticket contains an attachment with a simple 
implementation for accessing environment variables.


Thanks
Oliver

[1] http://issues.apache.org/jira/browse/CONFIGURATION-284
[2] 
http://thread.gmane.org/gmane.comp.jakarta.commons.devel/33239/focus=33325


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



[jira] Resolved: (DBCP-207) DBCP 1.2.1 incompatible with Informix (driver doesn't support setReadOnly(...))

2007-07-23 Thread Dain Sundstrom (JIRA)

 [ 
https://issues.apache.org/jira/browse/DBCP-207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dain Sundstrom resolved DBCP-207.
-

Resolution: Fixed

Committed a fix for this specific problem, and created a JIRA for converting 
all default values to non-primitive types.  This way only configured default 
values will be set.

Sending
src/java/org/apache/commons/dbcp/datasources/PerUserPoolDataSource.java
Sending
src/java/org/apache/commons/dbcp/datasources/SharedPoolDataSource.java
Transmitting file data ..
Committed revision 558850.


> DBCP 1.2.1 incompatible with Informix (driver doesn't support 
> setReadOnly(...))
> ---
>
> Key: DBCP-207
> URL: https://issues.apache.org/jira/browse/DBCP-207
> Project: Commons Dbcp
>  Issue Type: Bug
>Affects Versions: 1.2.1
> Environment: using the pooling driver component with an informix 
> driver
>Reporter: Kimberly Baer
>Assignee: Dain Sundstrom
> Fix For: 1.3
>
> Attachments: DBCP-207.patch
>
>
> I recieved an error using commons-dbcp-1.2.1.jar and ifxjdbc.jar for my 
> informix driver: 
> org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool 
> exhausted 
> at org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:183) 
> at java.sql.DriverManager.getConnection(DriverManager.java:539) 
> at java.sql.DriverManager.getConnection(DriverManager.java:211) 
> at ConnectionPoolingTest.main(ConnectionPoolingTest.java:105) 
> Caused by: java.util.NoSuchElementException: Could not create a validated 
> object, cause: Read only mode not supported 
> at 
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:806)
>  
> at org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:175) 
> I will look into the comment provided by Dirk in bug ID DBCP-127 (version 
> 1.1), but it appears this bug still has an impact in the 1.2.1 version. If 
> anyone has any other suggestions, they would be greatly appreciated. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Commented: (TRANSACTION-9) [transaction] Add full file management capabilities to the FileResourceManager

2007-07-23 Thread Oliver Zeigermann (JIRA)

[ 
https://issues.apache.org/jira/browse/TRANSACTION-9?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514764
 ] 

Oliver Zeigermann commented on TRANSACTION-9:
-

I think implementing both strategies would be a good idea. I will try to come 
forward with a prototypical proposal for (1) to validate the interfaces. I will 
add a non transactional implementation for our resource manager. 

Peter, maybe you would be willing to adapt your solution to the new 2.0 core 
and give feedback to it as you go along? Would be cool :)

> [transaction] Add full file management capabilities to the FileResourceManager
> --
>
> Key: TRANSACTION-9
> URL: https://issues.apache.org/jira/browse/TRANSACTION-9
> Project: Commons Transaction
>  Issue Type: Improvement
> Environment: Operating System: All
> Platform: All
>Reporter: Peter Fassev
>Assignee: Oliver Zeigermann
>Priority: Minor
> Fix For: 2.0
>
> Attachments: filemanager.zip
>
>
> Hi,
> As stated in the doc the FileResourceManager is:
> "A resource manager for streamable objects stored in a file system"
> I agree, that this is a resource manager, but it could be easily extended, to 
> support a full file management system. It will be very helpful to have 
> additional methods like renameResource(), getResourceSize(), 
> getResourceTime(), 
> setResourceTime() etc. This are common file operations, which should be 
> managed 
> by the FileResourceManager.
> Further it will be very helpful to have (real) support for resource 
> collections 
> (folders). It will be necessary to distinguish between single resources 
> (files) 
> and collections (folders). 
> Together, this features will enable a transactional access to any file based 
> resources - for instance a document repository.
> Are there plans for such extensions and if not, will they actually fit in the 
> goals of the transaction library?
> If not, please open the underlying structure, like the inner class 
> TransactionContext, in order to add extensions the file management. For 
> instance, it will be good to have a separate factory method, which creates 
> the 
> context.
> If you are interested in this proposal, I am ready to contribute to this 
> project. I consider myself as an experienced java developer and I will be 
> glad 
> to help you. 
> Best regards
> Peter Fassev

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Reopened: (JXPATH-97) Incomplete handling of undefined namespaces

2007-07-23 Thread Matt Benson (JIRA)

 [ 
https://issues.apache.org/jira/browse/JXPATH-97?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Benson reopened JXPATH-97:
---


reopening... elements still don't work apparently for prefixes that are _only_ 
declared externally?

> Incomplete handling of undefined namespaces
> ---
>
> Key: JXPATH-97
> URL: https://issues.apache.org/jira/browse/JXPATH-97
> Project: Commons JXPath
>  Issue Type: Bug
>Affects Versions: Nightly Builds, 1.2 Final
>Reporter: Sergey Vladimirov
> Fix For: 1.3
>
> Attachments: NamespacesTest.java, patch.txt
>
>
> Mcduffey, Joe <[EMAIL PROTECTED]>
> Can someone tell me how to register namespaces so that attributes with 
> namespaces does not cause the exception
> org.apache.common.ri.model.dom.DOMNodePointer.createAttribute
> unknown namespace prefix: xsi
> For example the following
> 
>   MY VALUE
> 
> Would result in the following exception:
> org.apache.common.ri.model.dom.DOMNodePointer.createAttribute
> unknown namespace prefix: A
> FYI: In this example there was a namespace decaration in the file and I also 
> manually called the
> registerNamespace(A,"/http...");
> registerNamespace(B,"/http...");
> There was no problem encountered for elements. Only attributes. Can someone 
> help? Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Created: (DBCP-234) Only set *configured* default values for Connection

2007-07-23 Thread Dain Sundstrom (JIRA)
Only set *configured* default values for Connection
---

 Key: DBCP-234
 URL: https://issues.apache.org/jira/browse/DBCP-234
 Project: Commons Dbcp
  Issue Type: Improvement
Reporter: Dain Sundstrom
 Fix For: 1.3


All default values for connections (auto-commit, read-only, transaction 
isolation, etc) should be non-primitive types, so it can be determined if they 
were configured by the user.  Only default values configured by the user should 
be set on connections.  This will help to avoid problems where drivers don't 
support the invocation of methods like setReadOnly and lets driver default 
values pass through to the user.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Resolved: (DBCP-225) getConnection / borrowObject fails with NullPointerException

2007-07-23 Thread Dain Sundstrom (JIRA)

 [ 
https://issues.apache.org/jira/browse/DBCP-225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dain Sundstrom resolved DBCP-225.
-

Resolution: Fixed

Sendingsrc/java/org/apache/commons/dbcp/PoolableConnectionFactory.java
Sending
src/java/org/apache/commons/dbcp/datasources/CPDSConnectionFactory.java
Sending
src/java/org/apache/commons/dbcp/datasources/KeyedCPDSConnectionFactory.java
Transmitting file data ...
Committed revision 558846.


> getConnection / borrowObject fails with NullPointerException
> 
>
> Key: DBCP-225
> URL: https://issues.apache.org/jira/browse/DBCP-225
> Project: Commons Dbcp
>  Issue Type: Bug
>Affects Versions: 1.2.1, 1.2.2
> Environment: Solaris 10, Oracle 10g RAC
>Reporter: Alexei Samonov
>Assignee: Dain Sundstrom
> Fix For: 1.3
>
> Attachments: DBCP-225.patch
>
>
> We use dbcp PoolingDataSource in Solaris/Oracle 10g RAC environment and our 
> getConnection calls fail sporadically with the following stack trace (1.2.1)
> Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a 
> connection, pool exhausted
> at 
> org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:103)
> at 
> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
> ... more
> Caused by: java.util.NoSuchElementException: Could not create a validated 
> object, cause: null
> at 
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:806)
> at 
> org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
> ... 24 more
> This is definitely not a "pool exhausted" situation, it is just being 
> reported as pool exhausted. Since NoSuchElementException that you use does 
> not allow cause, only Exception message (null) is being printed. With some 
> debugging I was able to recover the root exception:
> java.lang.NullPointerException
> at 
> org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:268)
> at 
> org.apache.commons.dbcp.PoolableConnectionFactory.activateObject(PoolableConnectionFactory.java:368)
> at 
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:786)
> at 
> org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
> at 
> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
> ...
> Looks like it is trying to borrow/validate DelegatingConnection which 
> delegate is null.
> Hoping to resolve the issue we upgraded to 1.2.2 but it did not help. Here is 
> is an exception stack trace from 1.2.2:
> org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool 
> error Could not create a validated object, cause: null
> at 
> org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104)
> at 
> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
> ... more
> Caused by: java.util.NoSuchElementException: Could not create a validated 
> object, cause: null
> at 
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:871)
> at 
> org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
> ... 28 more
> We use the following dbcp properties:
> autoCommit="false"
> readOnly="false"
> maxActive="200"
> maxIdle="20"
> minIdle="10"
> minEvictableIdleIime="30"
> maxWait="200"
> accessToUnderlyingConnectionAllowed="true"
> validationQuery="SELECT 1 FROM DUAL"
> ConnectionCachingEnabled="true"
> FastConnectionFailoverEnabled="true"
> I could not find the existing reported dbcp/object pool bug but I see similar 
>  reports on the web, for example 
> http://forum.java.sun.com/thread.jspa?threadID=713200&messageID=4124915

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Resolved: (DBCP-150) [dbcp] BasicDataSource : setter for connectionProperties

2007-07-23 Thread Dain Sundstrom (JIRA)

 [ 
https://issues.apache.org/jira/browse/DBCP-150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dain Sundstrom resolved DBCP-150.
-

Resolution: Fixed

Sendingsrc/java/org/apache/commons/dbcp/BasicDataSource.java
Sendingsrc/test/org/apache/commons/dbcp/TestBasicDataSource.java
Transmitting file data ..
Committed revision 558845.


> [dbcp] BasicDataSource : setter for connectionProperties
> 
>
> Key: DBCP-150
> URL: https://issues.apache.org/jira/browse/DBCP-150
> Project: Commons Dbcp
>  Issue Type: Improvement
>Affects Versions: 1.2
> Environment: Operating System: All
> Platform: All
>Reporter: Maarten Bosteels
>Assignee: Dain Sundstrom
>Priority: Minor
> Fix For: 1.3
>
> Attachments: DBCP-150.patch
>
>
> Adding a javabean-style setter for connectionProperties would certainly ease 
> the
> configuration of a BasicDataSource within a Dependency Injection framework (eg
> Spring).
> see: http://article.gmane.org/gmane.comp.java.springframework.user/6501/
> Thanks,
> Maarten

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Resolved: (FILEUPLOAD-141) Remove FileItems if FileUploadBase.parseRequest() fails

2007-07-23 Thread Jochen Wiedmann (JIRA)

 [ 
https://issues.apache.org/jira/browse/FILEUPLOAD-141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jochen Wiedmann resolved FILEUPLOAD-141.


Resolution: Won't Fix

You are free to overwrite the FileItemFactory to return an instance of 
DiskFileItem, which overrides the method getTempFile() in that sense.

Apart from that, changing the current code in your sense would most possibly be 
the cause of a lot of compatibility problems without gaining too much. I am 
unaware of any actual FileUpload installation that considers hanging files a 
real issue. This might be the case in your particular application, but then I 
believe it's fine that you tune the code to meet your special requirements.


> Remove FileItems if FileUploadBase.parseRequest() fails
> ---
>
> Key: FILEUPLOAD-141
> URL: https://issues.apache.org/jira/browse/FILEUPLOAD-141
> Project: Commons FileUpload
>  Issue Type: Improvement
>Affects Versions: 1.2
> Environment: commons-fileupload is used for parsing 
> multipart/form-data POST requests in servlets.
> OS: Linux
>Reporter: Marcus Klein
>
> If the method FileUploadBase.parseRequest() throws a FileUploadException, the 
> already parsed FileItem objects are not accessible and removed by the garbage 
> collector. Now expect a fileupload that fills the servers hard disc with 
> FileItems until no space is left on the device. The method parseRequest() 
> throws a FileUploadException and there are several FileItem objects that 
> still exist in the device because the garbage collector does not run and 
> removes them. This causes failing fileuploads until the garbage collector 
> runs and removes the lost FileItem objects. I suggest calling 
> FileItem.delete() on all FileItem objects created in the method 
> FileUploadBase.parseRequest() if the method is left with a 
> FileUploadException.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Resolved: (JXPATH-97) Incomplete handling of undefined namespaces

2007-07-23 Thread Matt Benson (JIRA)

 [ 
https://issues.apache.org/jira/browse/JXPATH-97?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Benson resolved JXPATH-97.
---

Resolution: Fixed

This should work in trunk.  Thanks all!

> Incomplete handling of undefined namespaces
> ---
>
> Key: JXPATH-97
> URL: https://issues.apache.org/jira/browse/JXPATH-97
> Project: Commons JXPath
>  Issue Type: Bug
>Affects Versions: Nightly Builds, 1.2 Final
>Reporter: Sergey Vladimirov
> Fix For: 1.3
>
> Attachments: NamespacesTest.java, patch.txt
>
>
> Mcduffey, Joe <[EMAIL PROTECTED]>
> Can someone tell me how to register namespaces so that attributes with 
> namespaces does not cause the exception
> org.apache.common.ri.model.dom.DOMNodePointer.createAttribute
> unknown namespace prefix: xsi
> For example the following
> 
>   MY VALUE
> 
> Would result in the following exception:
> org.apache.common.ri.model.dom.DOMNodePointer.createAttribute
> unknown namespace prefix: A
> FYI: In this example there was a namespace decaration in the file and I also 
> manually called the
> registerNamespace(A,"/http...");
> registerNamespace(B,"/http...");
> There was no problem encountered for elements. Only attributes. Can someone 
> help? Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Updated: (JXPATH-97) Incomplete handling of undefined namespaces

2007-07-23 Thread Matt Benson (JIRA)

 [ 
https://issues.apache.org/jira/browse/JXPATH-97?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Benson updated JXPATH-97:
--

Comment: was deleted

> Incomplete handling of undefined namespaces
> ---
>
> Key: JXPATH-97
> URL: https://issues.apache.org/jira/browse/JXPATH-97
> Project: Commons JXPath
>  Issue Type: Bug
>Affects Versions: Nightly Builds, 1.2 Final
>Reporter: Sergey Vladimirov
> Fix For: 1.3
>
> Attachments: NamespacesTest.java, patch.txt
>
>
> Mcduffey, Joe <[EMAIL PROTECTED]>
> Can someone tell me how to register namespaces so that attributes with 
> namespaces does not cause the exception
> org.apache.common.ri.model.dom.DOMNodePointer.createAttribute
> unknown namespace prefix: xsi
> For example the following
> 
>   MY VALUE
> 
> Would result in the following exception:
> org.apache.common.ri.model.dom.DOMNodePointer.createAttribute
> unknown namespace prefix: A
> FYI: In this example there was a namespace decaration in the file and I also 
> manually called the
> registerNamespace(A,"/http...");
> registerNamespace(B,"/http...");
> There was no problem encountered for elements. Only attributes. Can someone 
> help? Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



svn commit: r558838 - in /jakarta/commons/proper/jxpath/trunk/src: java/org/apache/commons/jxpath/ri/model/dom/ java/org/apache/commons/jxpath/ri/model/jdom/ test/org/apache/commons/jxpath/ri/model/

2007-07-23 Thread mbenson
Author: mbenson
Date: Mon Jul 23 12:27:46 2007
New Revision: 558838

URL: http://svn.apache.org/viewvc?view=rev&rev=558838
Log:
[JXPATH-97] enable externally-registered namespaces on XML attributes

Modified:

jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dom/DOMAttributeIterator.java

jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMAttributeIterator.java

jakarta/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ri/model/XMLModelTestCase.java

Modified: 
jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dom/DOMAttributeIterator.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dom/DOMAttributeIterator.java?view=diff&rev=558838&r1=558837&r2=558838
==
--- 
jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dom/DOMAttributeIterator.java
 (original)
+++ 
jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dom/DOMAttributeIterator.java
 Mon Jul 23 12:27:46 2007
@@ -19,6 +19,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.commons.jxpath.ri.NamespaceResolver;
 import org.apache.commons.jxpath.ri.QName;
 import org.apache.commons.jxpath.ri.model.NodeIterator;
 import org.apache.commons.jxpath.ri.model.NodePointer;
@@ -108,7 +109,9 @@
 String testNS = null;
 
 if (testPrefix != null) {
-testNS = parent.getNamespaceURI(testPrefix);
+NamespaceResolver nsr = parent.getNamespaceResolver();
+testNS = nsr == null ? null : nsr.getNamespaceURI(testPrefix);
+testNS = testNS == null ? parent.getNamespaceURI(testPrefix) : 
testNS;
 }
 
 if (testNS != null) {

Modified: 
jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMAttributeIterator.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMAttributeIterator.java?view=diff&rev=558838&r1=558837&r2=558838
==
--- 
jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMAttributeIterator.java
 (original)
+++ 
jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMAttributeIterator.java
 Mon Jul 23 12:27:46 2007
@@ -20,6 +20,7 @@
 import java.util.Collections;
 import java.util.List;
 
+import org.apache.commons.jxpath.ri.NamespaceResolver;
 import org.apache.commons.jxpath.ri.QName;
 import org.apache.commons.jxpath.ri.model.NodeIterator;
 import org.apache.commons.jxpath.ri.model.NodePointer;
@@ -43,17 +44,26 @@
 if (parent.getNode() instanceof Element) {
 Element element = (Element) parent.getNode();
 String prefix = name.getPrefix();
-Namespace ns;
+Namespace ns = null;
 if (prefix != null) {
 if (prefix.equals("xml")) {
 ns = Namespace.XML_NAMESPACE;
 }
 else {
-ns = element.getNamespace(prefix);
+NamespaceResolver nsr = parent.getNamespaceResolver();
+if (nsr != null) {
+String uri = nsr.getNamespaceURI(prefix);
+if (uri != null) {
+ns = Namespace.getNamespace(prefix, uri);
+}
+}
 if (ns == null) {
-// TBD: no attributes
-attributes = Collections.EMPTY_LIST;
-return;
+ns = element.getNamespace(prefix);
+if (ns == null) {
+// TBD: no attributes
+attributes = Collections.EMPTY_LIST;
+return;
+}
 }
 }
 }

Modified: 
jakarta/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ri/model/XMLModelTestCase.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ri/model/XMLModelTestCase.java?view=diff&rev=558838&r1=558837&r2=558838
==
--- 
jakarta/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ri/model/XMLModelTestCase.java
 (original)
+++ 
jakarta/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ri/model/XMLModelTestCase.java
 Mon Jul 23 12:27:46 2007
@@ -797,6 +797,15 @@
 "count(vendor/product/rate:*)", 
 new Double(2));
 
+assertXPathValue(context,
+"vendor[1]/product[1

[jira] Commented: (TRANSACTION-9) [transaction] Add full file management capabilities to the FileResourceManager

2007-07-23 Thread Peter Fassev (JIRA)

[ 
https://issues.apache.org/jira/browse/TRANSACTION-9?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514744
 ] 

Peter Fassev commented on TRANSACTION-9:


Thinking about it, there is not so match difference between the two scenarios:

1) Work with the original files, which means creating undo copies - deleting 
all undo files after commit
2) Work on the copies only, which means creating copies and working on them - 
deleting the original files and moving/renaming the modified copies on commit

During the both scenarios we should make copies before each change, which I 
think is the longest operation. Deleting and moving files are actually a very 
fast. During the commit operation in the second scenario we also have a 
uncomplete state of the original files.

The only advantage of scenario 1) is that on commit only the copies have to be 
removed. BUT, some system may use distributed transactions (i.e. 
synchronization with a DB-transaction), which means we have to think about 
tryCommint, and rollback after tryCommit if the distribute transaction fails. 
In such scenario, it is not acceptable, that the rollback fails.

The question is, why a rollback in scenario 1 can fail (which is the same for 
commit in scenario 2)? As far as I can see, this could happen:

a) If there is not enough free space on the disk and if we are moving files, 
this could happen only if the working temp directory is not on the same disk or 
when the repository spans more than one disk. 
b) If an external process (for instance a backup) is accessing the files 
directly. That's why direct access should be somehow synchronized in both 
scenarios.

If somebody is using distributed transactions, may be the scenario 2 has an 
advantige. When the file transaction is committed as the last one in the queue. 
If the DB-Transaction fails, we have to delete only the copies, the rollback 
can not fail.

So I think it depends on the application and on the usage of the file 
transactions. How about implementing both scenarios? For instance my 
implementation (which is attached here) is using the second scenario, where the 
actual file management actions are separated from the transaction facade. The 
actions are very simple. I think it will be very easy to implement the scenario 
1) in the same way under a different TransactionContext interface and let the 
user decide, which one he wants to use.

> [transaction] Add full file management capabilities to the FileResourceManager
> --
>
> Key: TRANSACTION-9
> URL: https://issues.apache.org/jira/browse/TRANSACTION-9
> Project: Commons Transaction
>  Issue Type: Improvement
> Environment: Operating System: All
> Platform: All
>Reporter: Peter Fassev
>Assignee: Oliver Zeigermann
>Priority: Minor
> Fix For: 2.0
>
> Attachments: filemanager.zip
>
>
> Hi,
> As stated in the doc the FileResourceManager is:
> "A resource manager for streamable objects stored in a file system"
> I agree, that this is a resource manager, but it could be easily extended, to 
> support a full file management system. It will be very helpful to have 
> additional methods like renameResource(), getResourceSize(), 
> getResourceTime(), 
> setResourceTime() etc. This are common file operations, which should be 
> managed 
> by the FileResourceManager.
> Further it will be very helpful to have (real) support for resource 
> collections 
> (folders). It will be necessary to distinguish between single resources 
> (files) 
> and collections (folders). 
> Together, this features will enable a transactional access to any file based 
> resources - for instance a document repository.
> Are there plans for such extensions and if not, will they actually fit in the 
> goals of the transaction library?
> If not, please open the underlying structure, like the inner class 
> TransactionContext, in order to add extensions the file management. For 
> instance, it will be good to have a separate factory method, which creates 
> the 
> context.
> If you are interested in this proposal, I am ready to contribute to this 
> project. I consider myself as an experienced java developer and I will be 
> glad 
> to help you. 
> Best regards
> Peter Fassev

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



Re: [DBCP] JIRA workflow?

2007-07-23 Thread Antonio Petrelli

2007/7/23, Dain Sundstrom <[EMAIL PROTECTED]>:

When issues are complete, do you close or resolve them?  I have been
closing them, but just noticed that may are resolved.


In Tiles, we resolve the issues when the fix is done. We close them
when a release gained a positive vote.

Antonio

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



svn commit: r558836 - in /jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/resource: ResourceException.java ResourceManager.java StreamableResource.jav

2007-07-23 Thread ozeigermann
Author: ozeigermann
Date: Mon Jul 23 12:17:55 2007
New Revision: 558836

URL: http://svn.apache.org/viewvc?view=rev&rev=558836
Log:
Cleaning of resource interfaces after first practical experience with an 
implementation:
- Some methods had weird return types: removed
- Foreign Exceptions replaced in favor of ResourceException

Added:

jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/resource/ResourceException.java
Modified:

jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/resource/ResourceManager.java

jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/resource/StreamableResource.java

Added: 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/resource/ResourceException.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/resource/ResourceException.java?view=auto&rev=558836
==
--- 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/resource/ResourceException.java
 (added)
+++ 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/resource/ResourceException.java
 Mon Jul 23 12:17:55 2007
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.transaction.resource;
+
+public class ResourceException extends Exception {
+
+/**
+ * 
+ */
+private static final long serialVersionUID = 7650329971392401844L;
+
+public ResourceException(String message, Throwable cause) {
+super(message, cause);
+}
+
+public ResourceException(Throwable cause) {
+super(cause);
+}
+public ResourceException(String message) {
+super(message);
+}
+
+}

Modified: 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/resource/ResourceManager.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/resource/ResourceManager.java?view=diff&rev=558836&r1=558835&r2=558836
==
--- 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/resource/ResourceManager.java
 (original)
+++ 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/resource/ResourceManager.java
 Mon Jul 23 12:17:55 2007
@@ -16,16 +16,14 @@
  */
 package org.apache.commons.transaction.resource;
 
-import java.io.IOException;
-
-import org.apache.commons.transaction.locking.LockException;
 
 public interface ResourceManager {
-R getResource(String path) throws IOException, LockException;
-
-String getRootPath() throws IOException, LockException;
+R getResource(String path) throws ResourceException;
 
+String getRootPath();
+/*
 void addInterceptor(ResourceInterceptor interceptor);
 
 void removeInterceptor(ResourceInterceptor interceptor);
+*/
 }

Modified: 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/resource/StreamableResource.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/resource/StreamableResource.java?view=diff&rev=558836&r1=558835&r2=558836
==
--- 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/resource/StreamableResource.java
 (original)
+++ 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/resource/StreamableResource.java
 Mon Jul 23 12:17:55 2007
@@ -16,46 +16,43 @@
  */
 package org.apache.commons.transaction.resource;
 
-import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.util.Collection;
-
-

[jira] Resolved: (DBCP-217) Closing of underlaying connection instead of the PoolGuardConnectionWrapper

2007-07-23 Thread Dain Sundstrom (JIRA)

 [ 
https://issues.apache.org/jira/browse/DBCP-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dain Sundstrom resolved DBCP-217.
-

Resolution: Fixed

Fixed as part of DBCP-11.

> Closing of underlaying connection instead of the PoolGuardConnectionWrapper
> ---
>
> Key: DBCP-217
> URL: https://issues.apache.org/jira/browse/DBCP-217
> Project: Commons Dbcp
>  Issue Type: Bug
>Affects Versions: 1.2.2
>Reporter: Sebastian Mancke
> Fix For: 1.3
>
> Attachments: connectionCloseFix.patch
>
>
> Is state:
> If I obtain the Connection of a Statement (stmt.getConnection()), created 
> with dbcp,
> the returned Object is the underlaying pooled connection. 
> Closing this connection multiple times may close the connection of another 
> process.
> It should be:
> The Wrapper over the connection PoolGuardConnectionWrapper should be returned 
> instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[DBCP] JIRA workflow?

2007-07-23 Thread Dain Sundstrom
When issues are complete, do you close or resolve them?  I have been  
closing them, but just noticed that may are resolved.


Also, should I create a DBCP 1.4 and move the issues (like max time  
limit for pooled objects) we aren't going to get to for 1.3 over.


-dain

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



[jira] Closed: (DBCP-155) [dbcp] allow to set >= 6 parameters to do non-global SSL

2007-07-23 Thread Dain Sundstrom (JIRA)

 [ 
https://issues.apache.org/jira/browse/DBCP-155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dain Sundstrom closed DBCP-155.
---

Resolution: Won't Fix

> [dbcp] allow to set >= 6 parameters to do non-global SSL
> 
>
> Key: DBCP-155
> URL: https://issues.apache.org/jira/browse/DBCP-155
> Project: Commons Dbcp
>  Issue Type: Improvement
> Environment: Operating System: All
> Platform: Other
>Reporter: Ralf Hauser
>Priority: Minor
> Fix For: 1.3
>
>
> to work with http://dev.mysql.com/doc/refman/5.1/en/cj-using-ssl.html,
> it should be possible to call DriverManager.getConnection() with properties
> to replace the below 4:
> -Djavax.net.ssl.keyStore=path_to_keystore_file
> -Djavax.net.ssl.keyStorePassword=*
> -Djavax.net.ssl.trustStore=path_to_truststore_file
> -Djavax.net.ssl.trustStorePassword=* 
> futhermore, adding a property
> - "useSSL" and
> - "requireSSL"
> would also help.
> plus the socketFactory-Class I asked for before (COM-2747)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Closed: (DBCP-152) [DBCP] add a socketFactory attribute to BasicDataSource (to allow SSL "thread"-safe)

2007-07-23 Thread Dain Sundstrom (JIRA)

 [ 
https://issues.apache.org/jira/browse/DBCP-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dain Sundstrom closed DBCP-152.
---

Resolution: Won't Fix

> [DBCP] add a socketFactory attribute to BasicDataSource (to allow SSL 
> "thread"-safe)
> 
>
> Key: DBCP-152
> URL: https://issues.apache.org/jira/browse/DBCP-152
> Project: Commons Dbcp
>  Issue Type: Improvement
>Affects Versions: 1.2
> Environment: Operating System: All
> Platform: Other
>Reporter: Ralf Hauser
>Priority: Minor
> Fix For: 1.3
>
>
> An app that accesses 2 datasources at two different places with different
> security policies via SSL (different set of permitted ciphers) currently is 
> out
> of luck (http://lists.mysql.com/java/8689).
> The basic datasource should be enhanced with 
>  
>   String socketFactory = "";
> and the corresponding getter and setter method, etc.
> org.apache.commons.dbcp.DriverConnectionFactory.createConnection() could then
> hand-over this full className via its Properties argument to enable different
> SSL policies per datasource (so, since the application programmer doesn't have
> the thread under her control, I guess it should rather be called 
> "dataSource-safe").
> The jdbc driver implementation can then use this to take the appropriate 
> socket
> factory when creating a connection.
> See also http://lists.mysql.com/java/8695

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Closed: (DBCP-97) setAutoCommit(true) when returning connection to the pool

2007-07-23 Thread Dain Sundstrom (JIRA)

 [ 
https://issues.apache.org/jira/browse/DBCP-97?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dain Sundstrom closed DBCP-97.
--

Resolution: Fixed

Fixed some time ago.

> setAutoCommit(true) when returning connection to the pool
> -
>
> Key: DBCP-97
> URL: https://issues.apache.org/jira/browse/DBCP-97
> Project: Commons Dbcp
>  Issue Type: Bug
>Affects Versions: Nightly Builds
> Environment: Operating System: All
> Platform: All
>Reporter: Dirk Verbeeck
> Fix For: 1.3
>
>
> From the Struts user list: [OT] RE: Stackoverflow after DB inactivity 
> (MySQL reconnect problem)
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg70196.html
> Giving a hint to the database driver that you don't need long running
> transactions makes sense. 
> setAutoCommit(true) should be added to 
> PoolableConnectionFactory.passivateObject

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Closed: (DBCP-212) PoolingDataSource closes physical connections

2007-07-23 Thread Dain Sundstrom (JIRA)

 [ 
https://issues.apache.org/jira/browse/DBCP-212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dain Sundstrom closed DBCP-212.
---

Resolution: Fixed

Fixed some time ago.

> PoolingDataSource closes physical connections
> -
>
> Key: DBCP-212
> URL: https://issues.apache.org/jira/browse/DBCP-212
> Project: Commons Dbcp
>  Issue Type: Bug
>Affects Versions: 1.2.2
> Environment: Windows XP, Java 1.5.0_06-b05, Sybase ASE 12.5.4, 
> jConnect 6.0.5 EBF 13862, Commons Pool 1.3
>Reporter: Marcos Sanz
> Fix For: 1.3
>
> Attachments: DBCPtester.java, DBCPtester.java, output.txt
>
>
> By executing the attached program and monitoring the process id of the 
> physical connections at the database server, it is possible to demonstrate 
> that the connections are being actually physically closed and reopened by the 
> application at a very high rate.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Closed: (DBCP-102) [dbcp] setReadOnly & setAutoCommit called too many times

2007-07-23 Thread Dain Sundstrom (JIRA)

 [ 
https://issues.apache.org/jira/browse/DBCP-102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dain Sundstrom closed DBCP-102.
---

Resolution: Fixed

Fixed some time ago.

> [dbcp] setReadOnly & setAutoCommit called too many times
> 
>
> Key: DBCP-102
> URL: https://issues.apache.org/jira/browse/DBCP-102
> Project: Commons Dbcp
>  Issue Type: Bug
>Affects Versions: 1.2
> Environment: Operating System: other
> Platform: Sun
>Reporter: AC
> Fix For: 1.3
>
>
> In order to gain some processor time for my application that uses Hibernate, 
> I 
> looked with optimizeIt where it spends time. It seems that for a request on 
> the 
> database (Oracle 9) around 25% (!!?) is spent on getting the connection from 
> the DBCP pool, and this not only the first time!. The methods that provoke 
> this 
> loss of time are connection.setReadOnly and connection.setAutoCommit called 
> inside the method PoolableConnectionFactory.activateObject. Looking to the 
> stack, these calls translate to communication with the Oracle server. 
> The obvious thing to do is to check if read only and autocommit flags are 
> already set to the expected values. (Of course, Oracle could 've done this 
> too, 
> but I hope you'll have a faster response :) )
> Thank you very much for you help.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Closed: (DBCP-194) BasicDataSource.setLogWriter should not do createDataSource

2007-07-23 Thread Dain Sundstrom (JIRA)

 [ 
https://issues.apache.org/jira/browse/DBCP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dain Sundstrom closed DBCP-194.
---

Resolution: Fixed

Fixed some time ago.

> BasicDataSource.setLogWriter should not do createDataSource
> ---
>
> Key: DBCP-194
> URL: https://issues.apache.org/jira/browse/DBCP-194
> Project: Commons Dbcp
>  Issue Type: Bug
>Affects Versions: 1.2
>Reporter: Kees de Kooter
> Fix For: 1.3
>
> Attachments: AbandonedObjectPool.patch
>
>
> The code for setLogWriter is:
> public void setLogWriter(PrintWriter logWriter) throws SQLException {
> createDataSource().setLogWriter(logWriter);
> this.logWriter = logWriter;
> }
> This means that before a custom log writer is set a datasource is created. 
> Any logging happening while creating the datasource is directed to stdout / 
> stderr.
> I think the purpose of setting a log writer is to prevent this, at least that 
> is what I am trying to achieve.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Commented: (TRANSACTION-9) [transaction] Add full file management capabilities to the FileResourceManager

2007-07-23 Thread Oliver Zeigermann (JIRA)

[ 
https://issues.apache.org/jira/browse/TRANSACTION-9?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514700
 ] 

Oliver Zeigermann commented on TRANSACTION-9:
-

Apart from the interface we need to define for the resource manager I was 
thinking of the transactional strategy. 

Currently I am favor of one that actually performs all operations and keeps an 
undo log. Changes are protected from concurrent read using read/write locks.

Pros:
- Fail fast in case the destination files can not be modified for whatever 
reasion
- You do not get into trouble with too long file names in temporary folders
- Implementation should be pretty simple
- Commit can not fail on destination folder (as it is no-op for that)

Cons:
- Direct access to the destination folders sees the changes immedeately
- Rollback might actually fail

What do you think?

> [transaction] Add full file management capabilities to the FileResourceManager
> --
>
> Key: TRANSACTION-9
> URL: https://issues.apache.org/jira/browse/TRANSACTION-9
> Project: Commons Transaction
>  Issue Type: Improvement
> Environment: Operating System: All
> Platform: All
>Reporter: Peter Fassev
>Assignee: Oliver Zeigermann
>Priority: Minor
> Fix For: 2.0
>
> Attachments: filemanager.zip
>
>
> Hi,
> As stated in the doc the FileResourceManager is:
> "A resource manager for streamable objects stored in a file system"
> I agree, that this is a resource manager, but it could be easily extended, to 
> support a full file management system. It will be very helpful to have 
> additional methods like renameResource(), getResourceSize(), 
> getResourceTime(), 
> setResourceTime() etc. This are common file operations, which should be 
> managed 
> by the FileResourceManager.
> Further it will be very helpful to have (real) support for resource 
> collections 
> (folders). It will be necessary to distinguish between single resources 
> (files) 
> and collections (folders). 
> Together, this features will enable a transactional access to any file based 
> resources - for instance a document repository.
> Are there plans for such extensions and if not, will they actually fit in the 
> goals of the transaction library?
> If not, please open the underlying structure, like the inner class 
> TransactionContext, in order to add extensions the file management. For 
> instance, it will be good to have a separate factory method, which creates 
> the 
> context.
> If you are interested in this proposal, I am ready to contribute to this 
> project. I consider myself as an experienced java developer and I will be 
> glad 
> to help you. 
> Best regards
> Peter Fassev

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



svn commit: r558810 - in /jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking: LockException.java RWLockManager.java

2007-07-23 Thread ozeigermann
Author: ozeigermann
Date: Mon Jul 23 10:40:10 2007
New Revision: 558810

URL: http://svn.apache.org/viewvc?view=rev&rev=558810
Log:
Added first version of lock manager that supports deadlock detection. 
This has not been properly tested and still misses reasonable thread-safety 
protection.

Modified:

jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/LockException.java

jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/RWLockManager.java

Modified: 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/LockException.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/LockException.java?view=diff&rev=558810&r1=558809&r2=558810
==
--- 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/LockException.java
 (original)
+++ 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/LockException.java
 Mon Jul 23 10:40:10 2007
@@ -43,7 +43,7 @@
 /**
  * Locking request canceled because of deadlock.
  */
-DEADLOCK_VICTIM,
+WOULD_DEADLOCK,
 
 /**
  * A conflict between two optimistic transactions occured.

Modified: 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/RWLockManager.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/RWLockManager.java?view=diff&rev=558810&r1=558809&r2=558810
==
--- 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/RWLockManager.java
 (original)
+++ 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/RWLockManager.java
 Mon Jul 23 10:40:10 2007
@@ -16,10 +16,13 @@
  */
 package org.apache.commons.transaction.locking;
 
+import java.util.ArrayList;
+import java.util.Collection;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArraySet;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReadWriteLock;
@@ -31,45 +34,15 @@
 
 protected ConcurrentHashMap, ReadWriteLock> locks = new 
ConcurrentHashMap, ReadWriteLock>();
 
-protected Map> locksForThreads = new 
ConcurrentHashMap>();
+protected Map> locksForThreads = new 
ConcurrentHashMap>();
 
-protected Map> threadsForLocks = new 
ConcurrentHashMap>();
+protected ConcurrentHashMap> threadsForLocks = new 
ConcurrentHashMap>();
 
 protected Map effectiveGlobalTimeouts = new 
ConcurrentHashMap();
 
-// TODO
-public Iterable orderLocks() {
-Set locks = locksForThreads.get(Thread.currentThread());
-if (locks == null) {
-throw new IllegalStateException("lock() can only be called after 
startWork()");
-}
-
-return null;
-
-}
-
 @Override
 public void endWork() {
-Set locks = locksForThreads.get(Thread.currentThread());
-// graceful reaction...
-if (locks == null) {
-return;
-}
-for (Lock lock : locks) {
-lock.unlock();
-
-// FIXME: We need to do this atomically
-Set threadsForThisLock = threadsForLocks.get(lock);
-if (threadsForThisLock != null) {
-threadsForThisLock.remove(Thread.currentThread());
-if (threadsForThisLock.isEmpty()) {
-threadsForLocks.remove(lock);
-locks.remove(lock);
-}
-}
-}
-
-locksForThreads.remove(Thread.currentThread());
+release(Thread.currentThread());
 }
 
 @Override
@@ -77,7 +50,7 @@
 if (isWorking()) {
 throw new IllegalStateException("work has already been started");
 }
-locksForThreads.put(Thread.currentThread(), new HashSet());
+locksForThreads.put(Thread.currentThread(), new 
CopyOnWriteArraySet());
 
 long timeoutMSecs = unit.toMillis(timeout);
 long now = System.currentTimeMillis();
@@ -91,8 +64,8 @@
 
 }
 
-protected long computeRemainingTime() {
-long timeout = effectiveGlobalTimeouts.get(Thread.currentThread());
+protected long computeRemainingTime(Thread thread) {
+long timeout = effectiveGlobalTimeouts.get(thread);
 long now = System.currentTimeMillis();
 long remaining = timeout - now;

[jira] Commented: (JXPATH-97) Incomplete handling of undefined namespaces

2007-07-23 Thread Matt Benson (JIRA)

[ 
https://issues.apache.org/jira/browse/JXPATH-97?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514680
 ] 

Matt Benson commented on JXPATH-97:
---

Sergey, could you resubmit your patch without all those formatting changes?  It 
makes it difficult to see where the "meat" of the change is.

Thanks,
Matt

> Incomplete handling of undefined namespaces
> ---
>
> Key: JXPATH-97
> URL: https://issues.apache.org/jira/browse/JXPATH-97
> Project: Commons JXPath
>  Issue Type: Bug
>Affects Versions: Nightly Builds, 1.2 Final
>Reporter: Sergey Vladimirov
> Fix For: 1.3
>
> Attachments: NamespacesTest.java, patch.txt
>
>
> Mcduffey, Joe <[EMAIL PROTECTED]>
> Can someone tell me how to register namespaces so that attributes with 
> namespaces does not cause the exception
> org.apache.common.ri.model.dom.DOMNodePointer.createAttribute
> unknown namespace prefix: xsi
> For example the following
> 
>   MY VALUE
> 
> Would result in the following exception:
> org.apache.common.ri.model.dom.DOMNodePointer.createAttribute
> unknown namespace prefix: A
> FYI: In this example there was a namespace decaration in the file and I also 
> manually called the
> registerNamespace(A,"/http...");
> registerNamespace(B,"/http...");
> There was no problem encountered for elements. Only attributes. Can someone 
> help? Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



svn commit: r558765 - in /jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking: LockManager.java RWLockManager.java

2007-07-23 Thread ozeigermann
Author: ozeigermann
Date: Mon Jul 23 08:00:02 2007
New Revision: 558765

URL: http://svn.apache.org/viewvc?view=rev&rev=558765
Log:
Added tryLock and better internal lock management

Modified:

jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/LockManager.java

jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/RWLockManager.java

Modified: 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/LockManager.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/LockManager.java?view=diff&rev=558765&r1=558764&r2=558765
==
--- 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/LockManager.java
 (original)
+++ 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/LockManager.java
 Mon Jul 23 08:00:02 2007
@@ -53,5 +53,6 @@
  *resource for on which this block of work shall be done
  */
 public void lock(M managedResource, K key, boolean exclusive) throws 
LockException;
+public boolean tryLock(M managedResource, K key, boolean exclusive);
 
 }

Modified: 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/RWLockManager.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/RWLockManager.java?view=diff&rev=558765&r1=558764&r2=558765
==
--- 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/RWLockManager.java
 (original)
+++ 
jakarta/commons/proper/transaction/branches/TRANSACTION_2/src/java/org/apache/commons/transaction/locking/RWLockManager.java
 Mon Jul 23 08:00:02 2007
@@ -31,40 +31,32 @@
 
 protected ConcurrentHashMap, ReadWriteLock> locks = new 
ConcurrentHashMap, ReadWriteLock>();
 
-protected Map> locksForThreads = new 
ConcurrentHashMap>();
+protected Map> locksForThreads = new 
ConcurrentHashMap>();
 
 protected Map> threadsForLocks = new 
ConcurrentHashMap>();
 
 protected Map effectiveGlobalTimeouts = new 
ConcurrentHashMap();
 
 // TODO
-public static Iterable orderLocks() {
-return null;
+public Iterable orderLocks() {
+Set locks = locksForThreads.get(Thread.currentThread());
+if (locks == null) {
+throw new IllegalStateException("lock() can only be called after 
startWork()");
+}
 
-}
+return null;
 
-// TODO
-public void lockAll(Iterable locks) {
 }
 
 @Override
 public void endWork() {
-Set locks = locksForThreads.get(Thread.currentThread());
+Set locks = locksForThreads.get(Thread.currentThread());
 // graceful reaction...
 if (locks == null) {
 return;
 }
-for (ReadWriteLock lock : locks) {
-try {
-lock.readLock().unlock();
-} catch (IllegalMonitorStateException imse) {
-// we do not care
-}
-try {
-lock.writeLock().unlock();
-} catch (IllegalMonitorStateException imse) {
-// we do not care
-}
+for (Lock lock : locks) {
+lock.unlock();
 
 // FIXME: We need to do this atomically
 Set threadsForThisLock = threadsForLocks.get(lock);
@@ -85,7 +77,7 @@
 if (isWorking()) {
 throw new IllegalStateException("work has already been started");
 }
-locksForThreads.put(Thread.currentThread(), new 
HashSet());
+locksForThreads.put(Thread.currentThread(), new HashSet());
 
 long timeoutMSecs = unit.toMillis(timeout);
 long now = System.currentTimeMillis();
@@ -149,37 +141,53 @@
 }
 
 @Override
+public boolean isWorking() {
+return locksForThreads.get(Thread.currentThread()) != null;
+}
+
+@Override
 public void lock(M managedResource, K key, boolean exclusive) throws 
LockException {
 long remainingTime = computeRemainingTime();
 if (remainingTime < 0) {
 throw new LockException(LockException.Code.TIMED_OUT);
 }
+boolean locked = tryLockInternal(managedResource, key, exclusive, 
remainingTime,
+TimeUnit.MILLISECONDS);
+if (!locked) {
+throw new LockException(Code.TIMED_OUT, key);
+}
+}
 
-KeyEntry entry = new KeyEntry(key, managedResource);
+@Override
+public boolean tryLock(M managedResource, K key, boolean exclusive) {
+re

Re: [logging] Running tests on earlier JVMs

2007-07-23 Thread simon
On Mon, 2007-07-23 at 02:30 +0200, Dennis Lundberg wrote:
> Dennis Lundberg wrote:
> > My plan is to create a 1.1.1 release with Maven 2. However, Maven 2 runs 
> > on a 1.4 JVM so we can't be 100% sure that the tests really pass on a 
> > 1.2 JVM. The idea is that the RM will run a separate Ant script that 
> > uses the binaries that M2 created (both main and test jars) and run it 
> > on an earlier JVM, for verification.

Sounds good to me. I was initally thinking that Maven could use "run in
external jvm" to execute tests under 1.2/1.3 JVMs, but an Ant script
also sounds ok to me.

> >> JCL source will not compile for me on a 1.2.2 JVM (IIRC some 1.2 JVM had
> >> compilers bugs)
> > 
> > Compiler bugs are of no concern to me at the moment. As explained above 
> > the goal is to build with Maven 2 on a 1.4 JVM. 

+1

> However, I'm seeing 
> > runtime bugs in the JVM, which is disturbing.
> 
> OK, I turned to old friend Google with the JIT error messages. After 
> some digging it turns out that Ant doesn't like to run on an old JVM 
> with the JIT turned on, so it has to be turned off. I've added 
> instructions for this in build-testing.xml.

Well spotted :-)

> 
> >> the tests will not compile for me on 1.3.1 JVM: MockSecurityManager uses
> >> Exception.getStackTrace() which was introduced with 1.4
> > 
> > Aah, brilliant! I looked and looked at the two tests that use the damned 
> > thing and couldn't find anything wrong with them. Thanks for the extra 
> > pair of eyes!
> 
> I've excluded the security tests from the Ant testing script, because I 
> couldn't find a way to rewrite the MockSecurityManager so that it could 
> run on earlier JVMs.

Fine with me.

Cheers,

Simon


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



Re: [logging] 1.1.1-SNAPSHOT deployed to the snapshot repository

2007-07-23 Thread simon
On Mon, 2007-07-23 at 02:47 +0200, Dennis Lundberg wrote:
> Hi
> 
> There is now a 1.1.1-SNAPSHOT of commons-logging in the Apache snapshot 
> repository:
> http://people.apache.org/repo/m2-snapshot-repository/commons-logging/commons-logging/1.1.1-SNAPSHOT/
> 
> Please have a look at it.
> 
> We still need to figure out how to get the api and adapter jars to be 
> deployed as well.
> 

Thanks a lot for getting this moving Dennis. This release is long
overdue.

This issue is not critical but probably should probably be addressed
while we're working on this. I'll have a look at it right now (just
requires better diagnostics output):
  https://issues.apache.org/jira/browse/LOGGING-114


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



[jira] Created: (FILEUPLOAD-141) Remove FileItems if FileUploadBase.parseRequest() fails

2007-07-23 Thread Marcus Klein (JIRA)
Remove FileItems if FileUploadBase.parseRequest() fails
---

 Key: FILEUPLOAD-141
 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-141
 Project: Commons FileUpload
  Issue Type: Improvement
Affects Versions: 1.2
 Environment: commons-fileupload is used for parsing 
multipart/form-data POST requests in servlets.
OS: Linux
Reporter: Marcus Klein


If the method FileUploadBase.parseRequest() throws a FileUploadException, the 
already parsed FileItem objects are not accessible and removed by the garbage 
collector. Now expect a fileupload that fills the servers hard disc with 
FileItems until no space is left on the device. The method parseRequest() 
throws a FileUploadException and there are several FileItem objects that still 
exist in the device because the garbage collector does not run and removes 
them. This causes failing fileuploads until the garbage collector runs and 
removes the lost FileItem objects. I suggest calling FileItem.delete() on all 
FileItem objects created in the method FileUploadBase.parseRequest() if the 
method is left with a FileUploadException.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



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

2007-07-23 Thread commons-jelly-tags-jaxme 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-jaxme has an issue affecting its community 
integration.
This issue affects 1 projects,
 and has been outstanding for 8 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-jaxme :  Commons Jelly


Full details are available at:

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

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Sole output [commons-jelly-tags-jaxme-23072007.jar] identifier set to 
project name
 -DEBUG- Dependency on packaged-jaxme exists, no need to add for property 
maven.jar.jaxme.
 -DEBUG- Dependency on packaged-jaxme exists, no need to add for property 
maven.jar.jaxme-js.
 -DEBUG- Dependency on packaged-jaxme exists, no need to add for property 
maven.jar.jaxme-xs.
 -DEBUG- Dependency on packaged-jaxme exists, no need to add for property 
maven.jar.jaxme-api.
 -DEBUG- Dependency on xml-xerces exists, no need to add for property 
maven.jar.xerces.
 -DEBUG- (Gump generated) Maven Properties in: 
/srv/gump/public/workspace/commons-jelly/jelly-tags/jaxme/build.properties
 -INFO- Failed with reason build failed
 -DEBUG- Maven POM in: 
/srv/gump/public/workspace/commons-jelly/jelly-tags/jaxme/project.xml
 -DEBUG- Maven project properties in: 
/srv/gump/public/workspace/commons-jelly/jelly-tags/jaxme/project.properties
 -INFO- Project Reports in: 
/srv/gump/public/workspace/commons-jelly/jelly-tags/jaxme/target/test-reports
 -INFO- Failed to extract fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-jaxme/gump_work/build_commons-jelly_commons-jelly-tags-jaxme.html
Work Name: build_commons-jelly_commons-jelly-tags-jaxme (Type: Build)
Work ended in a state of : Failed
Elapsed: 9 secs
Command Line: maven --offline jar 
[Working Directory: /srv/gump/public/workspace/commons-jelly/jelly-tags/jaxme]
CLASSPATH: 
/usr/lib/jvm/java-1.5.0-sun/lib/tools.jar:/srv/gump/public/workspace/jakarta-commons/beanutils/dist/commons-beanutils-23072007.jar:/srv/gump/public/workspace/jakarta-commons/collections/build/commons-collections-23072007.jar:/srv/gump/public/workspace/commons-jelly/target/commons-jelly-23072007.jar:/srv/gump/public/workspace/commons-jelly/jelly-tags/junit/target/commons-jelly-tags-junit-23072007.jar:/srv/gump/public/workspace/commons-jelly/jelly-tags/xml/target/commons-jelly-tags-xml-23072007.jar:/srv/gump/public/workspace/commons-jelly/jelly-tags/xmlunit/target/commons-jelly-tags-xmlunit-23072007.jar:/srv/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-23072007.jar:/srv/gump/public/workspace/jakarta-commons/logging/target/commons-logging-23072007.jar:/srv/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-23072007.jar:/srv/gump/public/workspace/dom4j/build/dom4j.jar:/srv/gump/public/workspace/jaxen/target/jaxen-23072007.jar:/srv/gump/packages/ws-jaxme-0.5/lib/jaxme2-0.5.jar:/srv/gump/packages/ws-jaxme-0.5/lib/jaxmeapi-0.5.jar:/srv/gump/packages/ws-jaxme-0.5/lib/jaxmejs-0.5.jar:/srv/gump/packages/ws-jaxme-0.5/lib/jaxmexs-0.5.jar:/srv/gump/public/workspace/xml-commons/java/external/build/xml-apis-ext.jar:/srv/gump/public/workspace/xmlunit/build/lib/xmlunit-23072007.jar
-
[javac] symbol  : variable super
[javac] location: class 
org.apache.ws.jaxme.examples.misc.address.impl.AddressTypeHandler
[javac]   super.characters(pChars, pOffset, pLen);
[javac]   ^
[javac] 
/srv/gump/public/workspace/commons-jelly/jelly-tags/jaxme/src/test/org/apache/ws/jaxme/examples/misc/address/impl/AddressTypeHandler.java:305:
 cannot find symbol
[javac] symbol  : variable super
[javac] location: class 
org.apache.ws.jaxme.examples.misc.address.impl.AddressTypeHandler
[javac] super.init(pData);
[javac] ^
[javac] 
/srv/gump/public/workspace/commons-jelly/jelly-tags/jaxme/src/test/org/apache/ws/jaxme/examples/misc/address/impl/AddressTypeHandler.java:315:
 cannot find symbol
[javac] symbol  : method getData()
[javac] location: class 
org.apache.ws.jaxme.examples.misc.address.impl.AddressTypeHandler
[javac] __handler_Name.init(getData());
[javac] ^
[javac] 
/srv/gump/public/workspace/commons-jelly/jelly-tags/jaxme/src/test/org/apache/ws/jaxme/examples/misc/address/impl/AddressHandler.java:22:
 cannot find symbol
[javac] symbol  : method getData()
[javac] location: class 
org.apache.ws.jaxme.examples.misc.address.impl.AddressHandler
[j

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

2007-07-23 Thread commons-jelly-tags-jaxme 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-jaxme has an issue affecting its community 
integration.
This issue affects 1 projects,
 and has been outstanding for 8 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-jaxme :  Commons Jelly


Full details are available at:

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

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Sole output [commons-jelly-tags-jaxme-23072007.jar] identifier set to 
project name
 -DEBUG- Dependency on packaged-jaxme exists, no need to add for property 
maven.jar.jaxme.
 -DEBUG- Dependency on packaged-jaxme exists, no need to add for property 
maven.jar.jaxme-js.
 -DEBUG- Dependency on packaged-jaxme exists, no need to add for property 
maven.jar.jaxme-xs.
 -DEBUG- Dependency on packaged-jaxme exists, no need to add for property 
maven.jar.jaxme-api.
 -DEBUG- Dependency on xml-xerces exists, no need to add for property 
maven.jar.xerces.
 -DEBUG- (Gump generated) Maven Properties in: 
/srv/gump/public/workspace/commons-jelly/jelly-tags/jaxme/build.properties
 -INFO- Failed with reason build failed
 -DEBUG- Maven POM in: 
/srv/gump/public/workspace/commons-jelly/jelly-tags/jaxme/project.xml
 -DEBUG- Maven project properties in: 
/srv/gump/public/workspace/commons-jelly/jelly-tags/jaxme/project.properties
 -INFO- Project Reports in: 
/srv/gump/public/workspace/commons-jelly/jelly-tags/jaxme/target/test-reports
 -INFO- Failed to extract fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-jaxme/gump_work/build_commons-jelly_commons-jelly-tags-jaxme.html
Work Name: build_commons-jelly_commons-jelly-tags-jaxme (Type: Build)
Work ended in a state of : Failed
Elapsed: 9 secs
Command Line: maven --offline jar 
[Working Directory: /srv/gump/public/workspace/commons-jelly/jelly-tags/jaxme]
CLASSPATH: 
/usr/lib/jvm/java-1.5.0-sun/lib/tools.jar:/srv/gump/public/workspace/jakarta-commons/beanutils/dist/commons-beanutils-23072007.jar:/srv/gump/public/workspace/jakarta-commons/collections/build/commons-collections-23072007.jar:/srv/gump/public/workspace/commons-jelly/target/commons-jelly-23072007.jar:/srv/gump/public/workspace/commons-jelly/jelly-tags/junit/target/commons-jelly-tags-junit-23072007.jar:/srv/gump/public/workspace/commons-jelly/jelly-tags/xml/target/commons-jelly-tags-xml-23072007.jar:/srv/gump/public/workspace/commons-jelly/jelly-tags/xmlunit/target/commons-jelly-tags-xmlunit-23072007.jar:/srv/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-23072007.jar:/srv/gump/public/workspace/jakarta-commons/logging/target/commons-logging-23072007.jar:/srv/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-23072007.jar:/srv/gump/public/workspace/dom4j/build/dom4j.jar:/srv/gump/public/workspace/jaxen/target/jaxen-23072007.jar:/srv/gump/packages/ws-jaxme-0.5/lib/jaxme2-0.5.jar:/srv/gump/packages/ws-jaxme-0.5/lib/jaxmeapi-0.5.jar:/srv/gump/packages/ws-jaxme-0.5/lib/jaxmejs-0.5.jar:/srv/gump/packages/ws-jaxme-0.5/lib/jaxmexs-0.5.jar:/srv/gump/public/workspace/xml-commons/java/external/build/xml-apis-ext.jar:/srv/gump/public/workspace/xmlunit/build/lib/xmlunit-23072007.jar
-
[javac] symbol  : variable super
[javac] location: class 
org.apache.ws.jaxme.examples.misc.address.impl.AddressTypeHandler
[javac]   super.characters(pChars, pOffset, pLen);
[javac]   ^
[javac] 
/srv/gump/public/workspace/commons-jelly/jelly-tags/jaxme/src/test/org/apache/ws/jaxme/examples/misc/address/impl/AddressTypeHandler.java:305:
 cannot find symbol
[javac] symbol  : variable super
[javac] location: class 
org.apache.ws.jaxme.examples.misc.address.impl.AddressTypeHandler
[javac] super.init(pData);
[javac] ^
[javac] 
/srv/gump/public/workspace/commons-jelly/jelly-tags/jaxme/src/test/org/apache/ws/jaxme/examples/misc/address/impl/AddressTypeHandler.java:315:
 cannot find symbol
[javac] symbol  : method getData()
[javac] location: class 
org.apache.ws.jaxme.examples.misc.address.impl.AddressTypeHandler
[javac] __handler_Name.init(getData());
[javac] ^
[javac] 
/srv/gump/public/workspace/commons-jelly/jelly-tags/jaxme/src/test/org/apache/ws/jaxme/examples/misc/address/impl/AddressHandler.java:22:
 cannot find symbol
[javac] symbol  : method getData()
[javac] location: class 
org.apache.ws.jaxme.examples.misc.address.impl.AddressHandler
[j

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

2007-07-23 Thread commons-jelly-tags-util 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-util has an issue affecting its community 
integration.
This issue affects 9 projects,
 and has been outstanding for 8 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-ant :  Commons Jelly
- commons-jelly-tags-fmt :  Commons Jelly
- commons-jelly-tags-fmt-test :  Commons Jelly
- commons-jelly-tags-html :  Commons Jelly
- commons-jelly-tags-jsl :  Commons Jelly
- commons-jelly-tags-jsl-test :  Commons Jelly
- commons-jelly-tags-util :  Commons Jelly
- maven :  Project Management Tools
- maven-bootstrap :  Project Management Tools


Full details are available at:

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

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Sole output [commons-jelly-tags-util-23072007.jar] identifier set to 
project name
 -DEBUG- Dependency on xml-xerces exists, no need to add for property 
maven.jar.xerces.
 -DEBUG- (Gump generated) Maven Properties in: 
/srv/gump/public/workspace/commons-jelly/jelly-tags/util/build.properties
 -INFO- Failed with reason build failed
 -DEBUG- Maven POM in: 
/srv/gump/public/workspace/commons-jelly/jelly-tags/util/project.xml
 -DEBUG- Maven project properties in: 
/srv/gump/public/workspace/commons-jelly/jelly-tags/util/project.properties
 -INFO- Project Reports in: 
/srv/gump/public/workspace/commons-jelly/jelly-tags/util/target/test-reports
 -WARNING- No directory 
[/srv/gump/public/workspace/commons-jelly/jelly-tags/util/target/test-reports]
 -INFO- Failed to extract fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-util/gump_work/build_commons-jelly_commons-jelly-tags-util.html
Work Name: build_commons-jelly_commons-jelly-tags-util (Type: Build)
Work ended in a state of : Failed
Elapsed: 2 secs
Command Line: maven --offline jar 
[Working Directory: /srv/gump/public/workspace/commons-jelly/jelly-tags/util]
CLASSPATH: 
/usr/lib/jvm/java-1.5.0-sun/lib/tools.jar:/srv/gump/public/workspace/jakarta-commons/beanutils/dist/commons-beanutils-23072007.jar:/srv/gump/public/workspace/jakarta-commons/collections/build/commons-collections-23072007.jar:/srv/gump/public/workspace/commons-jelly/target/commons-jelly-23072007.jar:/srv/gump/public/workspace/commons-jelly/jelly-tags/junit/target/commons-jelly-tags-junit-23072007.jar:/srv/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-23072007.jar:/srv/gump/public/workspace/jakarta-commons/lang/commons-lang-23072007.jar:/srv/gump/public/workspace/jakarta-commons/logging/target/commons-logging-23072007.jar:/srv/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-23072007.jar:/srv/gump/public/workspace/dom4j/build/dom4j.jar:/srv/gump/public/workspace/jaxen/target/jaxen-23072007.jar:/srv/gump/public/workspace/xml-commons/java/external/build/xml-apis-ext.jar
-
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0.2

The build cannot continue because of the following unsatisfied dependency:

commons-beanutils-bean-collections-1.7.0.jar (try downloading from 
http://jakarta.apache.org/commons/beanutils/)

Total time: 2 seconds
Finished at: Mon Jul 23 01:44:53 GMT-08:00 2007

-

To subscribe to this information via syndicated feeds:
- RSS: 
http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-util/rss.xml
- Atom: 
http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-util/atom.xml

== Gump Tracking Only ===
Produced by Gump version 2.3.
Gump Run 0523072007, vmgump:vmgump-public:0523072007
Gump E-mail Identifier (unique within run) #44.

--
Apache Gump
http://gump.apache.org/ [Instance: vmgump]

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



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

2007-07-23 Thread commons-jelly-tags-util 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-util has an issue affecting its community 
integration.
This issue affects 9 projects,
 and has been outstanding for 8 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-ant :  Commons Jelly
- commons-jelly-tags-fmt :  Commons Jelly
- commons-jelly-tags-fmt-test :  Commons Jelly
- commons-jelly-tags-html :  Commons Jelly
- commons-jelly-tags-jsl :  Commons Jelly
- commons-jelly-tags-jsl-test :  Commons Jelly
- commons-jelly-tags-util :  Commons Jelly
- maven :  Project Management Tools
- maven-bootstrap :  Project Management Tools


Full details are available at:

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

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Sole output [commons-jelly-tags-util-23072007.jar] identifier set to 
project name
 -DEBUG- Dependency on xml-xerces exists, no need to add for property 
maven.jar.xerces.
 -DEBUG- (Gump generated) Maven Properties in: 
/srv/gump/public/workspace/commons-jelly/jelly-tags/util/build.properties
 -INFO- Failed with reason build failed
 -DEBUG- Maven POM in: 
/srv/gump/public/workspace/commons-jelly/jelly-tags/util/project.xml
 -DEBUG- Maven project properties in: 
/srv/gump/public/workspace/commons-jelly/jelly-tags/util/project.properties
 -INFO- Project Reports in: 
/srv/gump/public/workspace/commons-jelly/jelly-tags/util/target/test-reports
 -WARNING- No directory 
[/srv/gump/public/workspace/commons-jelly/jelly-tags/util/target/test-reports]
 -INFO- Failed to extract fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-util/gump_work/build_commons-jelly_commons-jelly-tags-util.html
Work Name: build_commons-jelly_commons-jelly-tags-util (Type: Build)
Work ended in a state of : Failed
Elapsed: 2 secs
Command Line: maven --offline jar 
[Working Directory: /srv/gump/public/workspace/commons-jelly/jelly-tags/util]
CLASSPATH: 
/usr/lib/jvm/java-1.5.0-sun/lib/tools.jar:/srv/gump/public/workspace/jakarta-commons/beanutils/dist/commons-beanutils-23072007.jar:/srv/gump/public/workspace/jakarta-commons/collections/build/commons-collections-23072007.jar:/srv/gump/public/workspace/commons-jelly/target/commons-jelly-23072007.jar:/srv/gump/public/workspace/commons-jelly/jelly-tags/junit/target/commons-jelly-tags-junit-23072007.jar:/srv/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-23072007.jar:/srv/gump/public/workspace/jakarta-commons/lang/commons-lang-23072007.jar:/srv/gump/public/workspace/jakarta-commons/logging/target/commons-logging-23072007.jar:/srv/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-23072007.jar:/srv/gump/public/workspace/dom4j/build/dom4j.jar:/srv/gump/public/workspace/jaxen/target/jaxen-23072007.jar:/srv/gump/public/workspace/xml-commons/java/external/build/xml-apis-ext.jar
-
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0.2

The build cannot continue because of the following unsatisfied dependency:

commons-beanutils-bean-collections-1.7.0.jar (try downloading from 
http://jakarta.apache.org/commons/beanutils/)

Total time: 2 seconds
Finished at: Mon Jul 23 01:44:53 GMT-08:00 2007

-

To subscribe to this information via syndicated feeds:
- RSS: 
http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-util/rss.xml
- Atom: 
http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-util/atom.xml

== Gump Tracking Only ===
Produced by Gump version 2.3.
Gump Run 0523072007, vmgump:vmgump-public:0523072007
Gump E-mail Identifier (unique within run) #44.

--
Apache Gump
http://gump.apache.org/ [Instance: vmgump]

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



[EMAIL PROTECTED]: Project commons-id (in module jakarta-commons-sandbox) failed

2007-07-23 Thread Adam Jack
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-id has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 15 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- commons-id :  Commons Identifier Package


Full details are available at:

http://vmgump.apache.org/gump/public/jakarta-commons-sandbox/commons-id/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Sole output [commons-id-23072007.jar] identifier set to project name
 -DEBUG- (Gump generated) Maven Properties in: 
/srv/gump/public/workspace/jakarta-commons-sandbox/id/build.properties
 -INFO- Failed with reason build failed
 -DEBUG- Maven POM in: 
/srv/gump/public/workspace/jakarta-commons-sandbox/id/project.xml
 -DEBUG- Maven project properties in: 
/srv/gump/public/workspace/jakarta-commons-sandbox/id/project.properties
 -INFO- Failed to extract fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/jakarta-commons-sandbox/commons-id/gump_work/build_jakarta-commons-sandbox_commons-id.html
Work Name: build_jakarta-commons-sandbox_commons-id (Type: Build)
Work ended in a state of : Failed
Elapsed: 2 secs
Command Line: maven --offline jar 
[Working Directory: /srv/gump/public/workspace/jakarta-commons-sandbox/id]
CLASSPATH: 
/usr/lib/jvm/java-1.5.0-sun/lib/tools.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-trax.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/jakarta-commons/discovery/dist/commons-discovery.jar:/srv/gump/public/workspace/jakarta-commons/logging/target/commons-logging-23072007.jar:/srv/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-23072007.jar:/srv/gump/public/workspace/junit/dist/junit-23072007.jar:/srv/gump/packages/maven-cobertura-plugin/maven-cobertura-plugin-1.1.jar:/srv/gump/packages/maven-xdoc-plugin/maven-xdoc-plugin-1.9.2.jar
-
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0.2

The build cannot continue because of the following unsatisfied dependencies:

dom4j-1.4.jar
commons-jelly-1.0-RC1.jar
commons-jelly-tags-jsl-1.0.jar
commons-jelly-tags-log-1.0.jar
commons-jelly-tags-velocity-1.0.jar
commons-jelly-tags-xml-1.1.jar (try downloading from 
http://jakarta.apache.org/commons/jelly/libs/xml/)
maven-1.0.2.jar
maven-model-3.0.0.jar
velocity-1.4.jar
commons-jelly-tags-fmt-1.0.jar

Total time: 2 seconds
Finished at: Mon Jul 23 01:44:30 GMT-08:00 2007

-

To subscribe to this information via syndicated feeds:
- RSS: 
http://vmgump.apache.org/gump/public/jakarta-commons-sandbox/commons-id/rss.xml
- Atom: 
http://vmgump.apache.org/gump/public/jakarta-commons-sandbox/commons-id/atom.xml

== Gump Tracking Only ===
Produced by Gump version 2.3.
Gump Run 0523072007, vmgump:vmgump-public:0523072007
Gump E-mail Identifier (unique within run) #43.

--
Apache Gump
http://gump.apache.org/ [Instance: vmgump]

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



[EMAIL PROTECTED]: Project commons-id (in module jakarta-commons-sandbox) failed

2007-07-23 Thread Adam Jack
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-id has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 15 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- commons-id :  Commons Identifier Package


Full details are available at:

http://vmgump.apache.org/gump/public/jakarta-commons-sandbox/commons-id/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Sole output [commons-id-23072007.jar] identifier set to project name
 -DEBUG- (Gump generated) Maven Properties in: 
/srv/gump/public/workspace/jakarta-commons-sandbox/id/build.properties
 -INFO- Failed with reason build failed
 -DEBUG- Maven POM in: 
/srv/gump/public/workspace/jakarta-commons-sandbox/id/project.xml
 -DEBUG- Maven project properties in: 
/srv/gump/public/workspace/jakarta-commons-sandbox/id/project.properties
 -INFO- Failed to extract fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/jakarta-commons-sandbox/commons-id/gump_work/build_jakarta-commons-sandbox_commons-id.html
Work Name: build_jakarta-commons-sandbox_commons-id (Type: Build)
Work ended in a state of : Failed
Elapsed: 2 secs
Command Line: maven --offline jar 
[Working Directory: /srv/gump/public/workspace/jakarta-commons-sandbox/id]
CLASSPATH: 
/usr/lib/jvm/java-1.5.0-sun/lib/tools.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-trax.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/jakarta-commons/discovery/dist/commons-discovery.jar:/srv/gump/public/workspace/jakarta-commons/logging/target/commons-logging-23072007.jar:/srv/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-23072007.jar:/srv/gump/public/workspace/junit/dist/junit-23072007.jar:/srv/gump/packages/maven-cobertura-plugin/maven-cobertura-plugin-1.1.jar:/srv/gump/packages/maven-xdoc-plugin/maven-xdoc-plugin-1.9.2.jar
-
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0.2

The build cannot continue because of the following unsatisfied dependencies:

dom4j-1.4.jar
commons-jelly-1.0-RC1.jar
commons-jelly-tags-jsl-1.0.jar
commons-jelly-tags-log-1.0.jar
commons-jelly-tags-velocity-1.0.jar
commons-jelly-tags-xml-1.1.jar (try downloading from 
http://jakarta.apache.org/commons/jelly/libs/xml/)
maven-1.0.2.jar
maven-model-3.0.0.jar
velocity-1.4.jar
commons-jelly-tags-fmt-1.0.jar

Total time: 2 seconds
Finished at: Mon Jul 23 01:44:30 GMT-08:00 2007

-

To subscribe to this information via syndicated feeds:
- RSS: 
http://vmgump.apache.org/gump/public/jakarta-commons-sandbox/commons-id/rss.xml
- Atom: 
http://vmgump.apache.org/gump/public/jakarta-commons-sandbox/commons-id/atom.xml

== Gump Tracking Only ===
Produced by Gump version 2.3.
Gump Run 0523072007, vmgump:vmgump-public:0523072007
Gump E-mail Identifier (unique within run) #43.

--
Apache Gump
http://gump.apache.org/ [Instance: vmgump]

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



[jira] Commented: (CLI-137) Change of behaviour 1.0 -> 1.1

2007-07-23 Thread Brian Egge (JIRA)

[ 
https://issues.apache.org/jira/browse/CLI-137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514577
 ] 

Brian Egge commented on CLI-137:


In 1.1, the hasArg() set the number of expected values to '1'.  Apparently, in 
1.0 it defaulted to unlimited.   You can get the previous behavior by changing 
the code like this:

Option option = OptionBuilder.withLongOpt("flob").hasArgs().create('F');

The output will then look like:
-F 1
-F 3
-F bla
-F  76
-F 54
--blah 1
--blah 3
--blah bla
--blah  76
--blah 54

In 1.1, you can call getOptionValues by either the short name or the long name. 
 Since they are the same option, they return the same values.  

hasArg expects a single value, while hasArgs allows unlimited values.  I think 
this behavior, although different, is what the original API has intended.  

> Change of behaviour 1.0 -> 1.1
> --
>
> Key: CLI-137
> URL: https://issues.apache.org/jira/browse/CLI-137
> Project: Commons CLI
>  Issue Type: Bug
> Environment: Ubuntu 7.04 Feisty Fawn (JDK 1.6.0) + Commons CLI 1.0 
> and 1.1
>Reporter: Russel Winder
>Priority: Blocker
>
> The code:
> {code}
> import org.apache.commons.cli.CommandLine ;
> import org.apache.commons.cli.OptionBuilder ;
> import org.apache.commons.cli.GnuParser ;
> import org.apache.commons.cli.Option ;
> import org.apache.commons.cli.Options ;
> import org.apache.commons.cli.ParseException ;
> public class Trial {
>   private void execute (  final String[] commandLine ) throws ParseException {
> final Options options = new Options ( ) ;
> options.addOption ( OptionBuilder.withLongOpt ( "flob" ).hasArg ( 
> ).create ( 'F' ) ) ;
> final CommandLine line = ( new GnuParser ( ) ).parse ( options , 
> commandLine ) ;
> String[] results =  line.getOptionValues ( 'F' ) ;
> if ( results != null ) { for ( String s : results ) { System.out.println 
> ( "-F " + s ) ; } }
> results =  line.getOptionValues ( "flob" ) ;
> if ( results != null ) { for ( String s : results ) { System.out.println 
> ( "--blah " + s ) ; } }
> String[] theRest = line.getArgs ( ) ;
> for ( String s : theRest ) { System.out.print ( s + " " ) ; }
> System.out.println ( ) ;
>   }
>   public static void main ( final String[] args ) throws ParseException {
> final Trial trial = new Trial ( ) ;
> trial.execute ( new String[] { "-F1" , "-F3" , "-Fbla" , "-F 76" , 
> "--flob" , "54" } ) ;
>   }
> }
> {code}
> when compiled and executed under 1.0 produces:
> trial:
>  [java] -F 1
>  [java] -F 3
>  [java] -F bla
>  [java] -F  76
>  [java] -F 54
>  [java] 
> However, when compiled and executed under 1.1 produces:
> trial:
>  [java] -F 1
>  [java] --blah 1
>  [java] 3 bla  76 54 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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