Re: [configuration] 1.4 dependency in PropertyListParser.java
My bad sorry, I'll fix this. This might be the opportunity to discuss the JRE requirement for the next releases. What version do we use (1.4 or 5) and when ? I believe it's too early to go directly to Java 5, on the server side JEE 5 is not widely adopted yet (BEA just released WebLogic 10), and on the client side there are still a lot of OS X users that haven't upgraded to Tiger (10.4). I would suggest moving to Java 1.4 for a release in the near future (configuration 1.5 or 1.6) and then jump to Java 5 for the next major release (2.0) involving a deep refactoring of the component. Even with a version requiring Java 5, I think we should still support the latest pre Java 5 version by fixing the major bugs reported. Thus we will not force people to upgrade, there will still be a great version compatible with Java 1.3/1.4 around, and people with Java 5 will enjoy an even better version. Emmanuel Bourg Oliver Heger a écrit : The latest commit [1] introduced a dependency to JDK 1.4: The initCause() method of Exception is not available in JDK 1.3. (I found this because I use to compile with JDK 1.3 by default and got two compile errors.) Oliver [1] r527436 | ebourg | 2007-04-11 11:57:29 +0200 (Mi, 11 Apr 2007) | 1 line Implemented the GNUStep extension for plist files to specify date bjects (CONFIGURATION-261) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r528458 - in /jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist: PropertyListParser.java PropertyListParser.jj
Author: ebourg Date: Fri Apr 13 05:23:22 2007 New Revision: 528458 URL: http://svn.apache.org/viewvc?view=revrev=528458 Log: Fixed the compilation error with Java 1.3 Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListParser.java jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListParser.jj Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListParser.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListParser.java?view=diffrev=528458r1=528457r2=528458 == --- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListParser.java (original) +++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListParser.java Fri Apr 13 05:23:22 2007 @@ -75,7 +75,7 @@ } catch (Exception e) { -throw (ParseException) new ParseException(Unable to parse the byte[]).initCause(e); +throw (ParseException) new ParseException(Unable to parse the byte[] : + e.getMessage()); } } @@ -93,7 +93,7 @@ } catch (Exception e) { -throw (ParseException) new ParseException(Unable to parse the date ' + s + ').initCause(e); +throw (ParseException) new ParseException(Unable to parse the date ' + s + ' : + e.getMessage()); } } Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListParser.jj URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListParser.jj?view=diffrev=528458r1=528457r2=528458 == --- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListParser.jj (original) +++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListParser.jj Fri Apr 13 05:23:22 2007 @@ -98,7 +98,7 @@ } catch (Exception e) { -throw (ParseException) new ParseException(Unable to parse the byte[]).initCause(e); +throw (ParseException) new ParseException(Unable to parse the byte[] : + e.getMessage()); } } @@ -116,7 +116,7 @@ } catch (Exception e) { -throw (ParseException) new ParseException(Unable to parse the date ' + s + ').initCause(e); +throw (ParseException) new ParseException(Unable to parse the date ' + s + ' : + e.getMessage()); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Created: (NET-157) Get hidden files over ftp, using commons-vfs
Get hidden files over ftp, using commons-vfs -- Key: NET-157 URL: https://issues.apache.org/jira/browse/NET-157 Project: Commons Net Issue Type: Wish Affects Versions: 2.0 Environment: jdk1.5.0_07 ; Linux Reporter: Michael Labicki Fix For: 2.0 I was trying to show hidden files by using commons-vfs, but I found no solution to do this by the way. So I have patched the FTPClient - Class in commons-net 2.0. The Default-Constructor sets the __listHiddenFiles property to false. I change the property to true. - __listHiddenFiles = true; - The next necessary change I made, was in the getListArguments method: - protected String getListArguments(String pathname) { if (getListHiddenFiles() pathname != null) { StringBuffer sb = new StringBuffer().append(-a ).append(pathname); pathname = sb.toString(); } else if (getListHiddenFiles()) { pathname = -a ; } return pathname; } - Maybe you can integrate this patch in your next apache.commons.net version? -- 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: (POOL-101) BaseObjectPool does not provide atomicity for closed-Operations
BaseObjectPool does not provide atomicity for closed-Operations --- Key: POOL-101 URL: https://issues.apache.org/jira/browse/POOL-101 Project: Commons Pool Issue Type: Bug Affects Versions: 1.3 Reporter: Marcos Sanz Priority: Minor Though the closed field has been declared volatile in the abstract class BaseObjectPool, atomic operations are not guaranteed. Thus, the code -- 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: (POOL-101) BaseObjectPool does not provide atomicity for closed-Operations
[ https://issues.apache.org/jira/browse/POOL-101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcos Sanz updated POOL-101: - Description: Though the closed field has been declared volatile in the abstract class BaseObjectPool, atomic operations are not guaranteed. Thus, the code public void close() throws Exception { assertOpen(); closed = true; } is broken. I've marked the issue as minor priority, since the semantic consequences are not very far-reaching (in the worst case, the pool can be closed twice), but the error could be potentiated if exploited further. was: Though the closed field has been declared volatile in the abstract class BaseObjectPool, atomic operations are not guaranteed. Thus, the code BaseObjectPool does not provide atomicity for closed-Operations --- Key: POOL-101 URL: https://issues.apache.org/jira/browse/POOL-101 Project: Commons Pool Issue Type: Bug Affects Versions: 1.3 Reporter: Marcos Sanz Priority: Minor Though the closed field has been declared volatile in the abstract class BaseObjectPool, atomic operations are not guaranteed. Thus, the code public void close() throws Exception { assertOpen(); closed = true; } is broken. I've marked the issue as minor priority, since the semantic consequences are not very far-reaching (in the worst case, the pool can be closed twice), but the error could be potentiated if exploited further. -- 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: (DBCP-212) PoolingDataSource closes physical connections
[ https://issues.apache.org/jira/browse/DBCP-212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488664 ] Marcos Sanz commented on DBCP-212: -- Yes, I also have the feeling that DBCP-205 is an aspect of this issue, appearing because of exhaustion of ephimeral ports on the client side due to the masive number of operations on the physical connections. 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] Created: (DBCP-216) Improvement of error recovery in KeyedCPDSConnectionFactory
Improvement of error recovery in KeyedCPDSConnectionFactory --- Key: DBCP-216 URL: https://issues.apache.org/jira/browse/DBCP-216 Project: Commons Dbcp Issue Type: Improvement 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 Attached you'll find a patch that improves the recovery of the class in different error situations. 1. The addition of removeConnectionEventListener() in destroyObject() ensures that the listener is removed, which is not guaranteed to have happened upon call of destroyObject(). We are for sure not interested any more in events, since we are about to destroy. 2. The same addition is made to connectionClosed(). Additionally, we have substituted there the call to destroyObject() with a call to pool.invalidateObject(). This is necessary because otherwise the object is destroyed but not removed from the pool. 3. The same substitution is made in connectionErrorOccurred(), otherwise the object might remain in the pool. -- 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: (DBCP-216) Improvement of error recovery in KeyedCPDSConnectionFactory
[ https://issues.apache.org/jira/browse/DBCP-216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcos Sanz updated DBCP-216: - Attachment: KeyedCPDSConnectionFactory.java.diff Improvement of error recovery in KeyedCPDSConnectionFactory --- Key: DBCP-216 URL: https://issues.apache.org/jira/browse/DBCP-216 Project: Commons Dbcp Issue Type: Improvement 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 Attachments: KeyedCPDSConnectionFactory.java.diff Attached you'll find a patch that improves the recovery of the class in different error situations. 1. The addition of removeConnectionEventListener() in destroyObject() ensures that the listener is removed, which is not guaranteed to have happened upon call of destroyObject(). We are for sure not interested any more in events, since we are about to destroy. 2. The same addition is made to connectionClosed(). Additionally, we have substituted there the call to destroyObject() with a call to pool.invalidateObject(). This is necessary because otherwise the object is destroyed but not removed from the pool. 3. The same substitution is made in connectionErrorOccurred(), otherwise the object might remain in the pool. -- 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: r528563 [2/2] - in /jakarta/commons/proper/configuration/trunk: ./ xdocs/ xdocs/userguide-1.2/ xdocs/userguide/
Added: jakarta/commons/proper/configuration/trunk/xdocs/userguide-1.2/overview.xml URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/xdocs/userguide-1.2/overview.xml?view=autorev=528563 == --- jakarta/commons/proper/configuration/trunk/xdocs/userguide-1.2/overview.xml (added) +++ jakarta/commons/proper/configuration/trunk/xdocs/userguide-1.2/overview.xml Fri Apr 13 10:31:15 2007 @@ -0,0 +1,198 @@ +?xml version=1.0? +!-- + 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. +-- + +document + properties +titleConfiguration Overview/title +author email=[EMAIL PROTECTED]Eric Pugh/author +author email=[EMAIL PROTECTED]Emmanuel Bourg/author + /properties + body + +section name=Using Configuration + p +One of the strength of Commons Configuration is its ability to mix configurations +from heterogeneous sources, this section will introduce you to the different configurations +available and will show you how to combine them. + /p + + subsection name=Configuration Sources + p +Currently there are quite a number of different sources of Configuration objects. But, +by just using a Configuration object versus a specific type like XMLConfiguration or +JNDIConfiguration, you are sheltered from the mechanics of actually retrieving the +configuration values. These various sources include: +ul + li + strongPropertiesConfiguration/strong + Loads configuration values from a properties file. + /li + li + strongXMLConfiguration/strong + Takes values from an XML document. + /li + li + strongPropertyListConfiguration/strong + Loads values from an OpenStep .plist file. XMLPropertyListConfiguration is also + available to read the XML variant used by Mac OSX. + /li + li + strongJNDIConfiguration/strong + Using a key in the JNDI tree, can retrieve values as configuration properties. + /li + li + strongBaseConfiguration/strong + An in-memory method of populating a Configuration object. + /li + li + strongSystemConfiguration/strong + A configuration using the system properties + /li + li + strongConfigurationConverter/strong + Takes a java.util.Properties or an o.a.c.collections.ExtendedProperties + and converts it to a Configuration object. + /li + /ul + + /p + /subsection + + subsection name=Mixing Configuration Sources + p +Often you want to provide a base set of configuration values, but allow the user to easily +override them for their specific environment. Well one way is to hard code the default +values into your code, and have then provide a property file that overrides this. However, +this is a very rigid way of doing things. Instead, with the codeCompositeConfiguration/code +you can provide many different ways of setting up a configuration. You can either do it +manually: + /p + +source +CompositeConfiguration config = new CompositeConfiguration(); +config.addConfiguration(new SystemConfiguration()); +config.addConfiguration(new PropertiesConfiguration(application.properties)); +/source + + por via the codeConfigurationFactory/code class:/p + +source +ConfigurationFactory factory = new ConfigurationFactory(config.xml); +Configuration config = factory.getConfiguration(); +/source + + p +The codeconfig.xml/code file used in the example above is a configuration descriptor, +it specifies the Configuration objects to load. Here is an example of descriptor: + /p + +source![CDATA[ +?xml version=1.0 encoding=ISO-8859-1 ? + +configuration + system/ + properties fileName=application.properties/ +/configuration +]]/source + + p +What this says is that we are loading up all system properties, as well as the properties +
[jira] Commented: (CONFIGURATION-258) JSON configuration
[ https://issues.apache.org/jira/browse/CONFIGURATION-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488762 ] Emmanuel Bourg commented on CONFIGURATION-258: -- The parser should be easy to write with JavaCC, but is JSON really used for configuration files ? I thought it was mainly an object serialization format used for AJAX applications. JSON configuration -- Key: CONFIGURATION-258 URL: https://issues.apache.org/jira/browse/CONFIGURATION-258 Project: Commons Configuration Issue Type: Improvement Affects Versions: 1.3 Environment: « Hide Operating System: All Platform: All Reporter: Antonio López-Cerón Vivo Priority: Minor Fix For: 1.5 JSON is a lightweight data-interchange format {menu: { id: file, value: File, popup: { menuitem: [ {value: New, onclick: CreateNewDoc()}, {value: Open, onclick: OpenDoc()}, {value: Close, onclick: CloseDoc()} ] } }} All references can be located at http://www.json.org/ -- 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: (CONFIGURATION-262) Binary property list format
[ https://issues.apache.org/jira/browse/CONFIGURATION-262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bourg updated CONFIGURATION-262: - Attachment: CFBinaryPList.c Binary plist parser from the Open Darwin project : http://darwinsource.opendarwin.org/10.3/CF-299/Parsing.subproj/CFBinaryPList.c It details the structure of a binary plist file. Binary property list format --- Key: CONFIGURATION-262 URL: https://issues.apache.org/jira/browse/CONFIGURATION-262 Project: Commons Configuration Issue Type: New Feature Reporter: Emmanuel Bourg Fix For: 1.5 Attachments: CFBinaryPList.c With OS X 10.4 Apple introduced a variant of the plist format that is compressed using a binary format. That would be nice to support this format with a BinaryPropertyListConfiguration class. I haven't found the specification of this format. The plutil tool can be used to convert between xml and binary plist files. -- 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: r528676 - in /jakarta/commons/proper/configuration/trunk: src/java/org/apache/commons/configuration/DatabaseConfiguration.java xdocs/changes.xml
Author: ebourg Date: Fri Apr 13 14:30:08 2007 New Revision: 528676 URL: http://svn.apache.org/viewvc?view=revrev=528676 Log: Fixed DatabaseConfiguration to ensure the connection is properly closed Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DatabaseConfiguration.java jakarta/commons/proper/configuration/trunk/xdocs/changes.xml Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DatabaseConfiguration.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DatabaseConfiguration.java?view=diffrev=528676r1=528675r2=528676 == --- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DatabaseConfiguration.java (original) +++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DatabaseConfiguration.java Fri Apr 13 14:30:08 2007 @@ -139,16 +139,15 @@ List results = new ArrayList(); while (rs.next()) { -Object val = rs.getObject(valueColumn); +Object value = rs.getObject(valueColumn); if (isDelimiterParsingDisabled()) { -results.add(val); +results.add(value); } else { // Split value if it containts the list delimiter -CollectionUtils.addAll(results, PropertyConverter -.toIterator(val, getListDelimiter())); +CollectionUtils.addAll(results, PropertyConverter.toIterator(value, getListDelimiter())); } } @@ -163,7 +162,7 @@ } finally { -closeQuietly(conn, pstmt); +close(conn, pstmt); } return result; @@ -218,7 +217,7 @@ finally { // clean up -closeQuietly(conn, pstmt); +close(conn, pstmt); } } @@ -299,7 +298,7 @@ finally { // clean up -closeQuietly(conn, pstmt); +close(conn, pstmt); } return empty; @@ -352,7 +351,7 @@ finally { // clean up -closeQuietly(conn, pstmt); +close(conn, pstmt); } return found; @@ -400,7 +399,7 @@ finally { // clean up -closeQuietly(conn, pstmt); +close(conn, pstmt); } } @@ -443,7 +442,7 @@ finally { // clean up -closeQuietly(conn, pstmt); +close(conn, pstmt); } } @@ -496,7 +495,7 @@ finally { // clean up -closeQuietly(conn, pstmt); +close(conn, pstmt); } return keys.iterator(); @@ -534,7 +533,7 @@ * @param conn The database connection to close * @param stmt The statement to close */ -private void closeQuietly(Connection conn, Statement stmt) +private void close(Connection conn, Statement stmt) { try { @@ -542,6 +541,14 @@ { stmt.close(); } +} +catch (SQLException e) +{ +getLogger().error(An error occured on closing the statement, e); +} + +try +{ if (conn != null) { conn.close(); @@ -549,7 +556,7 @@ } catch (SQLException e) { -getLogger().error(e.getMessage(), e); +getLogger().error(An error occured on closing the connection, e); } } } Modified: jakarta/commons/proper/configuration/trunk/xdocs/changes.xml URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/xdocs/changes.xml?view=diffrev=528676r1=528675r2=528676 == --- jakarta/commons/proper/configuration/trunk/xdocs/changes.xml (original) +++ jakarta/commons/proper/configuration/trunk/xdocs/changes.xml Fri Apr 13 14:30:08 2007 @@ -23,6 +23,10 @@ body release version=1.5-SNAPSHOT date=in SVN description= + action dev=ebourg type=fix issue=CONFIGURATION-180 +Fixed a potential issue in DatabaseConfiguration where an error on +closing a statement would prevent the connection from being closed. + /action action dev=ebourg type=add issue=CONFIGURATION-261 Date objects are now supported in ASCII plist files. /action - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (CONFIGURATION-180) Cache DatabaseConfiguration values for higher performance
[ https://issues.apache.org/jira/browse/CONFIGURATION-180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488794 ] Emmanuel Bourg commented on CONFIGURATION-180: -- I modified DatabaseConfiguration to ensure the connection is always closed. Cache DatabaseConfiguration values for higher performance - Key: CONFIGURATION-180 URL: https://issues.apache.org/jira/browse/CONFIGURATION-180 Project: Commons Configuration Issue Type: Improvement Reporter: Stephen Cooper Priority: Minor Fix For: 1.5 Attachments: dbpreload.txt, Enhancement33553.checkstyle.patch, Enhancement33553.patch The DatabaseConfiguration class queries each property as it gets the request for each property. This is nice for ensuring that you're always up to date, but it doesn't give very good performance in enterprise applications, where the database may not be on the same subnet. What we need is the ability to hit the database once, get all the keys/values and then serve up getString etc. from that cache. I'll be opening a separate enhancement to have a generic Reloading Strategy which could then be applied to this caching DatabaseConfiguration approach. -- 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: (CONFIGURATION-136) Reloading may corrupt the configuration
[ https://issues.apache.org/jira/browse/CONFIGURATION-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488813 ] Emmanuel Bourg commented on CONFIGURATION-136: -- The copy of the store can be avoided by keeping a reference to the previous store and creating a new empty store before loading the file : Map previousStore = store; store = new LinkedMap(); However this will only work for the flat configurations like PropertiesConfiguration and INIConfiguration, the hierarchical configurations like XMLConfiguration don't use the Map in BaseConfiguration to store the properties. Reloading may corrupt the configuration --- Key: CONFIGURATION-136 URL: https://issues.apache.org/jira/browse/CONFIGURATION-136 Project: Commons Configuration Issue Type: Bug Affects Versions: 1.1 Reporter: nicolas de loof Fix For: 1.5 Current reloading process clears current properties and load updated values from resource reader. If an IO error occurs (or invalid format), the configuration gets corrupted and the application becomes unstable. It may be better for hot-reload to put loaded values into a temporary Properties and replace previous values only when reloading is successful. It may also allow to use a 'currentlty-reloading' flag in the synchronized 'reload' block to avoid blocking threads during a reload (they could access safelly the 'old' properties until reload is finished) -- 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: svn commit: r520602 - in /jakarta/commons/proper/transaction/trunk: ./ lib/
Niall Pemberton niall.pemberton at gmail.com writes: Can't remember if I did or not - anyway I've added a download target to the ant build http://svn.apache.org/viewvc?view=revrevision=521856 Hi Niall, missed that one completely up to now. Thanks very much. I'm going to drop the jars from SVN now. Regards, Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r528701 - /jakarta/commons/proper/transaction/trunk/lib/
Author: joerg Date: Fri Apr 13 16:25:30 2007 New Revision: 528701 URL: http://svn.apache.org/viewvc?view=revrev=528701 Log: drop jars, dependencies are now fetched via build target download Removed: jakarta/commons/proper/transaction/trunk/lib/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r528704 - in /jakarta/commons/proper/transaction/trunk: build.properties.sample build.xml
Author: joerg Date: Fri Apr 13 16:37:24 2007 New Revision: 528704 URL: http://svn.apache.org/viewvc?view=revrev=528704 Log: integrate download target into build, expect all dependencies to be in lib.dir Modified: jakarta/commons/proper/transaction/trunk/build.properties.sample jakarta/commons/proper/transaction/trunk/build.xml Modified: jakarta/commons/proper/transaction/trunk/build.properties.sample URL: http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/trunk/build.properties.sample?view=diffrev=528704r1=528703r2=528704 == Binary files - no diff available. Modified: jakarta/commons/proper/transaction/trunk/build.xml URL: http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/trunk/build.xml?view=diffrev=528704r1=528703r2=528704 == --- jakarta/commons/proper/transaction/trunk/build.xml (original) +++ jakarta/commons/proper/transaction/trunk/build.xml Fri Apr 13 16:37:24 2007 @@ -75,15 +75,8 @@ property name=dist.lib value=${dist.dir}/lib/ property name=dist.deploy value=${dist.dir}/deploy/ - property name=jta.jar value=${lib.dir}/geronimo-jta_1.0.1B_spec-1.1.1.jar/ - property name=jca.jar value=${lib.dir}/geronimo-j2ee-connector_1.5_spec-1.1.1.jar/ - property name=servlet.jar value=${lib.dir}/geronimo-servlet_2.4_spec-1.1.1.jar/ - path id=classpath pathelement location=${build.classes} / -pathelement location=${jta.jar}/ -pathelement location=${jca.jar}/ -pathelement location=${servlet.jar}/ fileset dir=${lib.dir}/ /path @@ -102,9 +95,9 @@ equals arg1=${ant.java.version} arg2=1.6/ /or /condition -available property=jta.present classname=javax.transaction.Status classpath=${jta.jar}/ -available property=jca.present classname=javax.resource.cci.Connection classpath=${jca.jar}/ -available property=servlet.present classname=javax.servlet.Servlet classpath=${servlet.jar}/ +available property=jta.present classname=javax.transaction.Status classpathref=classpath/ +available property=jca.present classname=javax.resource.cci.Connection classpathref=classpath/ +available property=servlet.present classname=javax.servlet.Servlet classpathref=classpath/ echo message=+---/ echo message=| Build environment for ${name} ${version}/ echo message=| / @@ -162,6 +155,7 @@ mkdir dir=${build.classes}/ mkdir dir=${build.lib}/ mkdir dir=${build.deploy}/ +mkdir dir=${lib.dir}/ /target !-- @@ -183,7 +177,7 @@ === -- - target name=build depends=prepare,detect description=Compiles the main classes + target name=build depends=prepare,download,detect description=Compiles the main classes javac destdir=${build.classes} source=${compile.source} target=${compile.target} @@ -518,9 +512,7 @@ !-- == Download Dependencies = -- - target name=download - -mkdir dir=${lib.dir}/ + target name=download unless=dependencies.provided echo message=Downloading Commons Codec jar.../ get dest=${lib.dir}/commons-codec-1.2.jar usetimestamp=true ignoreerrors=true - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (CONFIGURATION-249) save to URLs with a protocol other than file:
[ https://issues.apache.org/jira/browse/CONFIGURATION-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488818 ] Emmanuel Bourg commented on CONFIGURATION-249: -- Just curious, why do you want to save to a non file URL ? To write the configuration on a FTP server ? save to URLs with a protocol other than file: --- Key: CONFIGURATION-249 URL: https://issues.apache.org/jira/browse/CONFIGURATION-249 Project: Commons Configuration Issue Type: Improvement Affects Versions: 1.4 Reporter: Anselm Kruis Priority: Minor Fix For: 1.5 Currently, the save(URL) method from AbstractFileConfiguration only supports file: URLs. Why not support writing to URLs too? It is as simple like this java.net.URLConnection connection = url.openConnection(); connection.setDoOutput(true); connection.setDoInput(false); save(connection.getOutputStream()); I could prepare a patch. -- 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: r528707 - in /jakarta/commons/proper/transaction/trunk/src/java1.4/org/apache/commons/transaction: memory/jca/MapXAResource.java util/xa/AbstractTransactionalResource.java
Author: joerg Date: Fri Apr 13 16:46:37 2007 New Revision: 528707 URL: http://svn.apache.org/viewvc?view=revrev=528707 Log: clean up, private fields Modified: jakarta/commons/proper/transaction/trunk/src/java1.4/org/apache/commons/transaction/memory/jca/MapXAResource.java jakarta/commons/proper/transaction/trunk/src/java1.4/org/apache/commons/transaction/util/xa/AbstractTransactionalResource.java Modified: jakarta/commons/proper/transaction/trunk/src/java1.4/org/apache/commons/transaction/memory/jca/MapXAResource.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/trunk/src/java1.4/org/apache/commons/transaction/memory/jca/MapXAResource.java?view=diffrev=528707r1=528706r2=528707 == --- jakarta/commons/proper/transaction/trunk/src/java1.4/org/apache/commons/transaction/memory/jca/MapXAResource.java (original) +++ jakarta/commons/proper/transaction/trunk/src/java1.4/org/apache/commons/transaction/memory/jca/MapXAResource.java Fri Apr 13 16:46:37 2007 @@ -34,13 +34,12 @@ */ public class MapXAResource extends AbstractXAResource { -TransactionalMapWrapper map; -LoggerFacade loggerFacade; +private final TransactionalMapWrapper map; +private LoggerFacade loggerFacade; public MapXAResource(TransactionalMapWrapper map) { -this.map = map; // log important stuff to standard out as long as nothing else is configured -this.loggerFacade = new PrintWriterLogger(new PrintWriter(System.out), WebDAVXAResource, false); +this(map, new PrintWriterLogger(new PrintWriter(System.out), MapXAResource, false)); } public MapXAResource(TransactionalMapWrapper map, LoggerFacade loggerFacade) { @@ -57,7 +56,7 @@ } public boolean isSameRM(XAResource xares) throws XAException { -return (xares != null xares instanceof MapXAResource map.equals(((MapXAResource) xares).map)); +return (xares instanceof MapXAResource this.map.equals(((MapXAResource) xares).map)); } public Xid[] recover(int flag) throws XAException { @@ -65,7 +64,7 @@ } public LoggerFacade getLoggerFacade() { -return loggerFacade; +return this.loggerFacade; } public void setLoggerFacade(LoggerFacade loggerFacade) { @@ -73,11 +72,11 @@ } protected void setLoggerFacade(PrintWriter out) { -loggerFacade = new PrintWriterLogger(out, WebDAVXAResource, true); +this.loggerFacade = new PrintWriterLogger(out, MapXAResource, true); } protected TransactionalResource createTransactionResource(Xid xid) throws Exception { -return new MapTransactionalResource(xid, map, getLoggerFacade()); +return new MapTransactionalResource(xid, this.map); } protected boolean includeBranchInXid() { @@ -86,20 +85,17 @@ protected static class MapTransactionalResource extends AbstractTransactionalResource { -TransactionalMapWrapper map; +private final TransactionalMapWrapper map; private TransactionalMapWrapper.TxContext txContext = null; -LoggerFacade loggerFacade; - -public MapTransactionalResource(Xid xid, TransactionalMapWrapper map, LoggerFacade loggerFacade) { +public MapTransactionalResource(Xid xid, TransactionalMapWrapper map) { super(xid); this.map = map; -this.loggerFacade = loggerFacade; } public void commit() throws XAException { try { -map.commitTransaction(); +this.map.commitTransaction(); } catch (IllegalStateException e) { throw new XAException(e.toString()); } @@ -112,7 +108,7 @@ resume(); try { -map.rollbackTransaction(); +this.map.rollbackTransaction(); } catch (IllegalStateException e) { throw new XAException(e.toString()); } @@ -124,25 +120,25 @@ if (isSuspended()) resume(); -if (map.isTransactionMarkedForRollback()) { +if (this.map.isTransactionMarkedForRollback()) { throw new XAException(XAException.XA_RBROLLBACK); } -return (map.isReadOnly() ? XA_RDONLY : XA_OK); +return (this.map.isReadOnly() ? XA_RDONLY : XA_OK); } public void suspend() throws XAException { if (isSuspended()) { throw new XAException(XAException.XAER_PROTO); } -this.txContext = map.suspendTransaction(); +this.txContext = this.map.suspendTransaction(); } public void resume() throws XAException { if (!isSuspended()) { throw new XAException(XAException.XAER_PROTO); } -
svn commit: r528708 - /jakarta/commons/proper/transaction/trunk/build.properties.sample
Author: joerg Date: Fri Apr 13 16:52:38 2007 New Revision: 528708 URL: http://svn.apache.org/viewvc?view=revrev=528708 Log: properties set (it's a text file actually) Modified: jakarta/commons/proper/transaction/trunk/build.properties.sample (contents, props changed) Modified: jakarta/commons/proper/transaction/trunk/build.properties.sample URL: http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/trunk/build.properties.sample?view=diffrev=528708r1=528707r2=528708 == Binary files - no diff available. Propchange: jakarta/commons/proper/transaction/trunk/build.properties.sample -- svn:eol-style = native Propchange: jakarta/commons/proper/transaction/trunk/build.properties.sample ('svn:mime-type' removed) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]