cvs commit: jakarta-commons/configuration/src/java/org/apache/commons/configuration AbstractConfiguration.java CompositeConfiguration.java Configuration.java
ebourg 2004/06/21 05:37:40 Modified:configuration/src/java/org/apache/commons/configuration AbstractConfiguration.java CompositeConfiguration.java Configuration.java Log: getList revamp - getList(key, null) in AbstractConfiguration now returns null for non existing keys - getList(String) has been removed from CompositeConfiguration - javadoc update in the Configuration interface Revision ChangesPath 1.12 +3 -17 jakarta-commons/configuration/src/java/org/apache/commons/configuration/AbstractConfiguration.java Index: AbstractConfiguration.java === RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/AbstractConfiguration.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- AbstractConfiguration.java16 Jun 2004 18:13:53 - 1.11 +++ AbstractConfiguration.java21 Jun 2004 12:37:40 - 1.12 @@ -1217,27 +1217,14 @@ * Get a List of strings associated with the given configuration key. * * @param key The configuration key. - * * @return The associated List. * * @throws ConversionException is thrown if the key maps to an * object that is not a List. - * - * @throws NoSuchElementException is thrown if the key doesn't - * map to an existing object. */ public List getList(String key) { -List list = getList(key, null); -if (list != null) -{ -return list; -} -else -{ -throw new NoSuchElementException( -'\'' + key + ' doesn't map to an existing object); -} +return getList(key, new ArrayList()); } /** @@ -1245,7 +1232,6 @@ * * @param key The configuration key. * @param defaultValue The default value. - * * @return The associated List. * * @throws ConversionException is thrown if the key maps to an @@ -1271,7 +1257,7 @@ } else if (value == null) { -list = ((defaultValue == null) ? new ArrayList() : defaultValue); +list = defaultValue; } else { 1.14 +14 -24 jakarta-commons/configuration/src/java/org/apache/commons/configuration/CompositeConfiguration.java Index: CompositeConfiguration.java === RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/CompositeConfiguration.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- CompositeConfiguration.java 15 Jun 2004 15:53:58 - 1.13 +++ CompositeConfiguration.java 21 Jun 2004 12:37:40 - 1.14 @@ -262,11 +262,10 @@ * Get a List of strings associated with the given configuration key. * * @param key The configuration key. + * @param defaultValue The default value. * @return The associated List. - * @exception ConversionException is thrown if the key maps to an - * object that is not a List. */ -public List getList(String key) +public List getList(String key, List defaultValue) { List list = new ArrayList(); @@ -282,25 +281,14 @@ } // add all elements from the in memory configuration -list.addAll(inMemoryConfiguration.getList(key, null)); - -return list; -} +list.addAll(inMemoryConfiguration.getList(key)); -/** - * Get a List of strings associated with the given configuration key. - * - * @param key The configuration key. - * @param defaultValue The default value. - * @return The associated List. - * @exception ConversionException is thrown if the key maps to an - * object that is not a List. - */ -public List getList(String key, List defaultValue) -{ -List list = getList(key); +if (list.isEmpty()) +{ +return defaultValue; +} -return list.isEmpty() ? defaultValue : list; +return list; } /** @@ -308,8 +296,9 @@ * * @param key The configuration key. * @return The associated string array if key is found. - * @exception ConversionException is thrown if the key maps to an - * object that is not a String/List of Strings. + * + * @throws ConversionException is thrown if the key maps to an + * object that is not a String/List of Strings. */ public String[] getStringArray(String key) { @@ -326,7 +315,8 @@
Re: [lang] mutables
Jar size isn't important, maintainable code size is why I suggested moving to storing the value in the abstract. Am happy to rollback if that is desired. Hen On Mon, 21 Jun 2004, Stephen Colebourne wrote: I've only now got a chance to review this (holiday ;-). I am less than happy with the current CVS code as it involves storing each subclass as an Object. IMO, the whole point of this package is to create classes that hold each value as a primitive, as per the java lang Number subclasses, and [lang] Range classes. I know that this creates more code in the jar, but that is irrelevant next to the new Integer() or new Byte() etc in the constructor of the CVS code. Creating these additional objects is a memory hog and bad for the gc. I can see no advantage other than jar size for the CVS code, hence would -1 the current CVS. I haven't checked if this was how the classes were originally. If so, can we rollback? Stephen - Original Message - From: Henri Yandell [EMAIL PROTECTED] First thought when looking at the code is that we could simplify things with a protected Number in MutableNumber, and move the intValue etc methods up into MutableNumber. The getValue/ setValue(Object) can go up too, and all that would be left in the mutable subclass is the primitive override and the constructor. Pro: Less code in the subclasses. Con: A protected rather than private variable. More memory is taken up with the mutable part being an Object and not a primitive. Just a thought. Hen On Thu, 10 Jun 2004, matthew.hawthorne wrote: I just made a checkin of some initial code for mutables. I haven't used CVS in a few months now (switched to subversion) so let's hope I didn't screw anything up. I have to admit that I haven't looked at this code for a good time, since around August maybe. So all are welcome to take a look and make improvements. I don't really have a solid use case for these classes anymore, so I'd imagine that others will have a better insight in that regard. The test coverage is pretty good, I think in the 70% range. I remember learning some weird things about the way Java handles primitive number conversions, as I was trying to get the tests to pass. If something looks bizarre give a yell and I'll investigate. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 27747] - [configuration] ClassCastException not thrown by getBoolean()
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=27747. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=27747 [configuration] ClassCastException not thrown by getBoolean() [EMAIL PROTECTED] changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2004-06-21 12:42 --- The getList() implementation in CompositeConfiguration was actually consistent with the one in AbstractConfiguration, I just cleaned the code and updated the javadoc to state clearly that getList never throws an exception but returns an empty list if the key doesn't exist. All our exceptions are consistent now, this bug can be closed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs] final usage
Rami Ojares wrote: Why does vfs use everywhere possible final modifier? Is this some kind of performance optimization or some design issue? Here i find a (IMHO) good summary about the various finals http://renaud.waldura.com/doc/java/final-keyword.shtml There is a performance aspect when using final often - the jvm can aggressive optimize (whatever that means), but IMHO this was not the (only) indention of the original authors. As i see the OO design of VFS they used it as one component. *) final parameters for methods ensures that - within the method - no one changes the reference, this is not relevant for the caller, but as a developer you can be sure the meaning of the parameter wont change. (I hope i could express this with my english ;-) *) final class members ensures also that no methods changes this value - again a great helper for the developer who would like to use the value, he do not have to understand the class in its very last detail. E.g. find a place where this value changes - it isnt changeable. Also this is a great helper for yourself - as you can ensure no other developer (including yourself ;-)) can change this value by mistake and make the whole class stopping from work. *) final classes ensures that no one can derive from them and e.g. pass a faked object to the system (security) I also used final for those aspects before i come to VFS - i found it very usefull. -- Mario - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs] final usage
Mario Ivankovits wrote: There is a performance aspect when using final often - the jvm can aggressive optimize (whatever that means), but IMHO this was not the (only) indention of the original authors. I have yet to see a convincing benchmark proving the performance argument, the last time I checked I wasn't able to notice a difference over 100 method calls on virtual and final methods. Emmanuel Bourg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs] final usage
Emmanuel Bourg wrote: Mario Ivankovits wrote: There is a performance aspect when using final often - the jvm can aggressive optimize (whatever that means), but IMHO this was not the (only) indention of the original authors. I have yet to see a convincing benchmark proving the performance argument, the last time I checked I wasn't able to notice a difference over 100 method calls on virtual and final methods. Using the whatever that means addition i wanted to express that i do not relly think there is a performance gain - and i never used it for this case - e.g. the parameter passing is only a minimum a program-flow does. And maybe the hotspot compiler already inlines some sort of methods if called e.g. in an loop. But using the final keyword of OO design is a good practice. -- Mario - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs] final usage
Mario Ivankovits wrote: But using the final keyword of OO design is a good practice. Certainly when it makes sense, but using it for almost every method parameter is certainly not a good practice. I tend to rely on the unit tests to ensure a parameter hasn't been modified in a way that generates a bug rather than declaring everything final. Emmanuel Bourg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/configuration/src/test/org/apache/commons/configuration TestBaseConfiguration.java
ebourg 2004/06/21 06:49:24 Modified:configuration/src/java/org/apache/commons/configuration AbstractConfiguration.java configuration/src/test/org/apache/commons/configuration TestBaseConfiguration.java Log: renamed the processString(String) method to split(String) Revision ChangesPath 1.13 +13 -13 jakarta-commons/configuration/src/java/org/apache/commons/configuration/AbstractConfiguration.java Index: AbstractConfiguration.java === RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/AbstractConfiguration.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- AbstractConfiguration.java21 Jun 2004 12:37:40 - 1.12 +++ AbstractConfiguration.java21 Jun 2004 13:49:24 - 1.13 @@ -71,14 +71,16 @@ { if (token instanceof String) { -for(Iterator it = processString((String) token).iterator(); it.hasNext();) +Iterator it = split((String) token).iterator(); +while (it.hasNext()) { addPropertyDirect(key, it.next()); } } else if (token instanceof Collection) { -for (Iterator it = ((Collection) token).iterator(); it.hasNext();) +Iterator it = ((Collection) token).iterator(); +while (it.hasNext()) { addProperty(key, it.next()); } @@ -219,18 +221,17 @@ } /** - * Returns a List of Strings built from the supplied - * String. Splits up CSV lists. If no commas are in the - * String, simply returns a List with the String as its - * first element + * Returns a List of Strings built from the supplied String. Splits up CSV + * lists. If no commas are in the String, simply returns a List with the + * String as its first element. * * @param token The String to tokenize * * @return A List of Strings */ -protected List processString(String token) +protected List split(String token) { -List retList = new ArrayList(INITIAL_LIST_SIZE); +List list = new ArrayList(INITIAL_LIST_SIZE); if (token.indexOf(DELIMITER) 0) { @@ -238,13 +239,12 @@ while (tokenizer.hasMoreTokens()) { -String value = tokenizer.nextToken(); -retList.add(value); +list.add(tokenizer.nextToken()); } } else { -retList.add(token); +list.add(token); } // @@ -252,7 +252,7 @@ // we also keep it in the Container. So the // Keys are added to the store in the sequence that // is given in the properties -return retList; +return list; } /** 1.13 +4 -4 jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestBaseConfiguration.java Index: TestBaseConfiguration.java === RCS file: /home/cvs/jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestBaseConfiguration.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- TestBaseConfiguration.java21 Jun 2004 09:51:41 - 1.12 +++ TestBaseConfiguration.java21 Jun 2004 13:49:24 - 1.13 @@ -481,16 +481,16 @@ fail(IllegalStateException should have been thrown for looped property references); } -public void testProcessString() +public void testSplit() { String s1 = abc,xyz; -List tokens = config.processString(s1); +List tokens = config.split(s1); assertEquals(number of tokens in ' + s1 + ', 2, tokens.size()); assertEquals(1st token for ' + s1 + ', abc, tokens.get(0)); assertEquals(2nd token for ' + s1 + ', xyz, tokens.get(1)); String s2 = abc\\,xyz; -tokens = config.processString(s2); +tokens = config.split(s2); assertEquals(number of tokens in ' + s2 + ', 1, tokens.size()); assertEquals(1st token for ' + s2 + ', abc,xyz, tokens.get(0)); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DbUtils] ClassCastException
I'm getting a ClassCastException that I don't understand. I hope someone can help with this, because I'd very much like to be able to use DbUtil on my project! The stack trace: org.apache.commons.dbutils.BasicRowProcessor$CaseInsensitiveHashMap java.lang.ClassCastException: org.apache.commons.dbutils.BasicRowProcessor$CaseInsensitiveHashMap at com.ssmb.recom.aft.access.DbUtil.select(DbUtil.java:143) at com.ssmb.recom.aft.access.DbUtil.selectOneMapTrimmed(DbUtil.java:66) at com.ssmb.recom.aft.datamanager.AftRequests.nextBusinessDate(AftRequests.java:3454) at com.ssmb.recom.aft.datamanager.AftRequests.nextBusinessDateAfter(AftRequests.java:3489) at com.ssmb.recom.aft.datamanager.AftRequests.main(AftRequests.java:2920) The invoking code: java.sql.Date sqlDate = new java.sql.Date( date.getTime() ); String selectTradingDate = select trading_date from trade_days where trading_date = ? and banking_day = 'B'; Object[] params = { sqlDate }; boolean commit = true; Map h = null; try { h = (Map) DbUtil.selectOneMapTrimmed(selectTradingDate, params, commit); } catch (Exception e) { logger.error(No trade date = + date, e); throw new RuntimeException(e.getMessage()); } java.util.Date tradeDate = (java.util.Date) h.get(trading_date); My wrapper code as invoked in the code, above: package com.ssmb.recom.aft.access; import java.sql.*; import java.util.*; import org.apache.commons.dbutils.*; import org.apache.commons.dbutils.handlers.*; import org.apache.commons.dbutils.wrappers.*; import org.apache.commons.beanutils.BeanUtils; import com.ssmb.recom.datamgr.RecomDataSource; public class DbUtil { [...] /** select one row, set param=null to avoid parameter substitution */ public static Object selectOneMapTrimmed(String query, Object[] param, boolean commit) throws Exception { MapHandler h = new MapHandler() { public Object handle (ResultSet rs) throws SQLException { StringTrimmedResultSet wrapped = new StringTrimmedResultSet(rs); rs = ProxyFactory.instance().createResultSet(wrapped); Object returnVal = null; try { returnVal = super.handle(rs); } catch (SQLException e) { System.out.println(e.getMessage()); throw e; } return returnVal; } }; if (param == null) { return select(query, h, commit); } else { return select(query, param, h, commit); } } [...] } The table being queried: table database creatorcreated -- -- -- -- trade_days db2tst08 vimdbat06/20/2000 column type length scale nulls -- -- - - trading_date date 4 0 y trading_daychar 1 0 y trading_dowsmallint 2 0 y banking_daychar 1 0 y Note: When I execute this query using vanilla JDBC, everything works fine. Any help appreciated, jim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[vfs] VfsTask
I have pronlems with VfsTask. First of all I need to instantiate AntLogger in ant tasks so AntLogger needs to be made public. But that is not enough since I need to instantiate it also in DataTypes (FileSet in particular). Also resolveFile needs to be accessed from FileSet DataType. Therefore I would propably need VfsDataType that would be very similar to VfsTask. Which led me to wondering about FileSystemManager. Now ant tasks instantiate the manager if they invoke resolveFile method. And when the build completes the manager is closed. When ant tasks call some components (like toolbox components) that are not related to ant they have to open their own manager. So I was wondering why not just use VFS class to get the manager also in ant tasks? And make the AntLogger public and independent class like this: /** * A commons-logging wrapper for Ant logging. */ public class AntLogger implements Log { private ProjectComponent pc; public AntLogger(ProjectComponent pc) { this.pc = pc; } public void debug(final Object o) { pc.log(String.valueOf(o), Project.MSG_DEBUG); } public void debug(Object o, Throwable throwable) { debug(o); } public void error(Object o) { pc.log(String.valueOf(o), Project.MSG_ERR); } public void error(Object o, Throwable throwable) { error(o); } public void fatal(Object o) { pc.log(String.valueOf(o), Project.MSG_ERR); } public void fatal(Object o, Throwable throwable) { fatal(o); } public void info(Object o) { pc.log(String.valueOf(o), Project.MSG_INFO); } public void info(Object o, Throwable throwable) { info(o); } public void trace(Object o) { } public void trace(Object o, Throwable throwable) { } public void warn(Object o) { pc.log(String.valueOf(o), Project.MSG_WARN); } public void warn(Object o, Throwable throwable) { warn(o); } public boolean isDebugEnabled() { return true; } public boolean isErrorEnabled() { return true; } public boolean isFatalEnabled() { return true; } public boolean isInfoEnabled() { return true; } public boolean isTraceEnabled() { return false; } public boolean isWarnEnabled() { return true; } } Then I can instantiate AntLogger also from DataTypes. And I can resolveFiles from DataTypes by getting a manager. - rami - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29714] New: - [configuration] Alternative delimiter
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29714. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29714 [configuration] Alternative delimiter Summary: [configuration] Alternative delimiter Product: Commons Version: Nightly Builds Platform: All OS/Version: All Status: NEW Severity: Enhancement Priority: Other Component: Configuration AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The properties are split on a default delimiter (the comma character ',') but there is no way to change this delimiter. I'd suggest the addition of two methods setDelimiter(char) and getDelimiter() in AbstractConfiguration to let the user specify an alternative delimiter. We may want to apply a restriction on the allowed delimiters, for example the '=' character is unlikely to be a viable delimiter since it would create a conflict with the key/value delimiter in PropertiesConfigution and in the Properties format of getProperties(String). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 26066] - [configuration] System property interpolation
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=26066. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=26066 [configuration] System property interpolation [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |ASSIGNED Version|1.0 Alpha |unspecified --- Additional Comments From [EMAIL PROTECTED] 2004-06-21 14:21 --- After the 1.0 release I plan to add a SystemConfiguration class and plug it in the ConfigurationFactory as a system/ element. This is a more generic solution than a direct tweak of the interpolation method. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs] VfsTask
What happens if FileSystemManager is not closed and JVM exits. In other words what does close method do? And is it a problem if there are many FileSystemManagers? This can happen when instantiating outside of VFS class. Can there be any problems if Ant task uses one manager instance and some other class that ant task uses, uses some other manager instance? - rami - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs] VfsTask
Rami Ojares schrieb: I have pronlems with VfsTask. First of all I need to instantiate AntLogger in ant tasks so AntLogger needs to be made public. But that is not enough since I need to instantiate it also in DataTypes (FileSet in particular). Also resolveFile needs to be accessed from FileSet DataType. Therefore I would propably need VfsDataType that would be very similar to VfsTask. Which led me to wondering about FileSystemManager. Now ant tasks instantiate the manager if they invoke resolveFile method. And when the build completes the manager is closed. When ant tasks call some components (like toolbox components) that are not related to ant they have to open their own manager. What of your toolbox component do need the filesystemmanager? I looked into them, but they only use the passed fileobjects. So I was wondering why not just use VFS class to get the manager also in ant tasks? I like the idea of the current ant task implementation, they instantiate their own manager in the context of the current ant project. I am not sure if we should use the static way (VFS.getManager()) as this might have bad sideeffects when using ant embedded. If the user use VFS.getManager() too and we close this instance after ant is done, we close this manager (and all open files) too (it is the same manager instance). Also we can not simply use setLogger() on this instance, there might already be another logger set by the user on this instance (in the embedded case) Might it be possible to implement a special ant task - say vfs-manager id=vfs class=StandardFileSystemManager / this allows us to add some configuration options later (e.g. proxy settings, ssh settings) using this task and refer to this instance within the other tasks and maybe from within DataType (FileSet) Maybe a construct like vfs-manager id=vfs class=global / could be possible which will use the VFS.getManager(). And when using ant embedded, the developer could inject the manager instance. Not sure if all this could work, as i havent written an ant task till now. Do you think this could be an option? -- Mario - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs] VfsTask
Rami Ojares wrote: What happens if FileSystemManager is not closed and JVM exits. Nothing special - there is no cleanup handling on jvm exit. In other words what does close method do? close() on the manager release all used resources resolved/used by this manager instance And is it a problem if there are many FileSystemManagers? This can happen when instantiating outside of VFS class. This is no problem. Beside the fact that manager1.resolveFile(abc.txt) returns not the same instance as manager2.resolveFile(abc.txt). Can there be any problems if Ant task uses one manager instance and some other class that ant task uses, uses some other manager instance? No technical problems. However, maybe the vfs-manager could be a clean solution and let the door to the various instantiation mechanism open? -- Mario - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs] VfsTask
What of your toolbox component do need the filesystemmanager? I looked into them, but they only use the passed fileobjects. Yeah, that was more like a what if question :) I like the idea of the current ant task implementation, they instantiate their own manager in the context of the current ant project. ok I am not sure if we should use the static way (VFS.getManager()) as this might have bad sideeffects when using ant embedded. ok If the user use VFS.getManager() too and we close this instance after ant is done, we close this manager (and all open files) too (it is the same manager instance). Also we can not simply use setLogger() on this instance, there might already be another logger set by the user on this instance (in the embedded case) Yep. However I need to get AntLogger in FileSet and I need to resolve files there. So there are 2 options. - Duplicating VfsTask to VfsDataType or - separating AntLogger as shown and making resolveFile method to resolveFile(Project p, String uri) Might it be possible to implement a special ant task - say vfs-manager id=vfs class=StandardFileSystemManager / this allows us to add some configuration options later (e.g. proxy settings, ssh settings) using this task and refer to this instance within the other tasks and maybe from within DataType (FileSet) Maybe a construct like vfs-manager id=vfs class=global / could be possible which will use the VFS.getManager(). And when using ant embedded, the developer could inject the manager instance. Not sure if all this could work, as i havent written an ant task till now. Do you think this could be an option? I don't understand fully but I quess you want a way to configure the manager in ant for different tasks. This could be a DataType. eg. vfs-copy toDir=path vfs-manager proxy=foo replicator=bar/ vfs-fileset dir=path include name=*.b?t/ /vfs-fileset /vfs-copy And then a task could support the datatype and use a filemanager with given configuration. - rami - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29716] New: - [configuration] Disabling string splitting
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29716. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29716 [configuration] Disabling string splitting Summary: [configuration] Disabling string splitting Product: Commons Version: Nightly Builds Platform: All OS/Version: All Status: NEW Severity: Enhancement Priority: Other Component: Configuration AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Currently strings are always considered as comma separated values and splitted into a List when added to a configuration. It is desirable to disable this feature sometimes though, that's why I'd like to suggest the addition of two methods getSplitStrings() and setSplitStrings(boolean) in the AbstractConfiguration class to affect this behaviour. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [general] poms in java-repository
This is great Henri. I never understood why Maven in its default deploy task wouldn't automatically generate or update the POM's as well. I've deployed the poms for every commons jar released in the java-repository that my script could find a tag for in CVS. A bunch still missing, and will change release instructions so that it mentions to put a commons-xx-major.minor.bugfix.pom file into the poms/ directory. Reason for this is that by having the pom for each version there, tools can reflect on them. 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]
DO NOT REPLY [Bug 29717] New: - [configuration] getKeys(String) broken in JNDIConfiguration
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29717. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29717 [configuration] getKeys(String) broken in JNDIConfiguration Summary: [configuration] getKeys(String) broken in JNDIConfiguration Product: Commons Version: Nightly Builds Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Configuration AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The getKeys(String prefix) implementation in JNDIConfiguration seems to be broken, I tried to call this method with a prefix that is not used in the configuration and it didn't return an empty iterator as expected. config.getKeys(foo.bar); returns an Iterator with the foo and bar elements. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29717] - [configuration] getKeys(String) broken in JNDIConfiguration
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29717. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29717 [configuration] getKeys(String) broken in JNDIConfiguration [EMAIL PROTECTED] changed: What|Removed |Added Priority|Other |High - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/configuration/src/test/org/apache/commons/configuration TestJNDIEnvironmentValues.java
ebourg 2004/06/21 08:35:15 Modified:configuration/src/test/org/apache/commons/configuration TestJNDIEnvironmentValues.java Log: Added a test for getKeys(String) Revision ChangesPath 1.6 +15 -10 jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestJNDIEnvironmentValues.java Index: TestJNDIEnvironmentValues.java === RCS file: /home/cvs/jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestJNDIEnvironmentValues.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- TestJNDIEnvironmentValues.java2 Jun 2004 17:18:01 - 1.5 +++ TestJNDIEnvironmentValues.java21 Jun 2004 15:35:15 - 1.6 @@ -1,5 +1,3 @@ -package org.apache.commons.configuration; - /* * Copyright 2002-2004 The Apache Software Foundation. * @@ -16,6 +14,8 @@ * limitations under the License. */ +package org.apache.commons.configuration; + import java.util.Iterator; import java.util.NoSuchElementException; @@ -25,7 +25,8 @@ { private JNDIConfiguration conf = null; -public void setUp() throws Exception{ +public void setUp() throws Exception +{ System.setProperty(java.naming.factory.initial,org.apache.commons.configuration.MockStaticMemoryInitialContextFactory); conf = new JNDIConfiguration(); @@ -78,16 +79,13 @@ assertNull('test.short' property not cleared, conf.getShort(test.short, null)); } -public void testIsEmpty() { +public void testIsEmpty() +{ assertFalse(the configuration shouldn't be empty, conf.isEmpty()); } -/** - * Currently failing in that we don't get back any keys! - * @throws Exception - */ -public void testGetKeys() throws Exception { - +public void testGetKeys() throws Exception +{ boolean found = false; Iterator it = conf.getKeys(); @@ -99,4 +97,11 @@ assertTrue('test.boolean' key not found, found); } + +public void testGetKeysWithPrefix() +{ +Iterator it = conf.getKeys(foo.bar); +assertFalse(no key should be found, it.hasNext()); +} + } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29717] - [configuration] getKeys(String) broken in JNDIConfiguration
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29717. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29717 [configuration] getKeys(String) broken in JNDIConfiguration --- Additional Comments From [EMAIL PROTECTED] 2004-06-21 15:38 --- A test demonstrating this issue has been added to TestJNDIEnvironmentValues. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs] VfsTask
Rami Ojares wrote: I don't understand fully but I quess you want a way to configure the manager in ant for different tasks. This could be a DataType. eg. vfs-copy toDir=path vfs-manager proxy=foo replicator=bar/ vfs-fileset dir=path include name=*.b?t/ /vfs-fileset /vfs-copy I thought about vfs-manager id=default class=StandardFileSystemManager vfs-option but this is to specify and implement later ../ /vfs-manager vfs-manager id=special class=MyHyperVFSFileSystemManager / vfs-copy manager=default toDir=path vfs-fileset dir=path include name=*.b?t/ /vfs-fileset /vfs-copy vfs-copy manager=special toDir=path vfs-fileset dir=pathXX include name=*.b?t/ /vfs-fileset /vfs-copy the manager=default could be the default and thus need not to be specified. If needet, the manager= reference could be added to the vfs-fileset too, but isnt it possible to access the object of the parent element in ant? vfs-fileset runs in the context of vfs-copy - there should be a way to access it. Also the vfs-manager could listen to the project finish an close the manager. -- Mario - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs][all][poll]regular expression library or jdk1.4 as minimum requirement
In message [EMAIL PROTECTED], Mario Ivankovits writes: It looks like Perl and Java are very (very) simmilar. So asking ORO to The Java regex syntax is almost a superset of Perl, which is why I don't see the impact of using a Perl engine for JDK 1.3 and java.util.regex for J2SE 1.4 as being major. The expression Rami gave was straight Perl 5.005. jakarta-oro's Perl5Compiler/Perl5Matcher implements zero-width look-ahead assertions from Perl 5.003 but does not implement the zero-width look-behind assertions from 5.005 and future versions (if you don't ask for it ...). This can be added. The other difference is that in Perl \Q and \E are not part of the regex syntax. They are part of Perl string handling, so we didn't implement them in Perl5Compiler (instead quotmeta() is provided), but support them in the Perl5Util convenience class. This can be moved into Perl5Compiler if desired. There has to be a user driver for these small things to happen. In general, most regular expressions you see in the wild can be simplified and don't require unusual constrcuts. For example, why write \\Q**\\E when \\*\\* will do (you would usually want to use \Q and \E for longer sequences or for dynamically generated strings you want to escape; but quotemeta works equally well)? Why use a negative look-behind assertion in ((?!^)|[^/]) when [^/] will suffice (the negative look-behind assertion is redundant because if there's a character present that's not a slash, then it's not the start of the input)? Of course, you can't always simplify your expressions and I think Rami's point is that you shouldn't be bothered with the finer points and stuff should just work. I think the answer is that as long as you stick to Perl5 syntax (which most people using java.util.regex are unknowingly doing), you'll rarely run into differences; but that oro doesn't implement most of the stuff added after Perl 5.003 for lack of demand (there's not that much stuff). daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [general] poms in java-repository
Apparantly it's caused a bit of a problem for the Maven-2 work, so I'm going to modify the poms slightly. currentVersion will have a version next to it. id will also have groupId/artifactId next to it for both project and dependencies. Shoudln't break for maven 1 or 2, but means they won't be the same as in cvs. Hen On Mon, 21 Jun 2004, Mark R. Diggory wrote: This is great Henri. I never understood why Maven in its default deploy task wouldn't automatically generate or update the POM's as well. I've deployed the poms for every commons jar released in the java-repository that my script could find a tag for in CVS. A bunch still missing, and will change release instructions so that it mentions to put a commons-xx-major.minor.bugfix.pom file into the poms/ directory. Reason for this is that by having the pom for each version there, tools can reflect on them. 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]
Re: [vfs][all][poll]regular expression library or jdk1.4 as minimum requirement
I wrote: want to escape; but quotemeta works equally well)? Why use a negative look-behind assertion in ((?!^)|[^/]) when [^/] will suffice (the negative look-behind assertion is redundant because if there's a character present that's not a slash, then it's not the start of the input)? Of I forgot to add that that's assuming single line mode. daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29720] New: - [configuration] save(OutputStream) for PropertiesConfiguration
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29720. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29720 [configuration] save(OutputStream) for PropertiesConfiguration Summary: [configuration] save(OutputStream) for PropertiesConfiguration Product: Commons Version: Nightly Builds Platform: All OS/Version: All Status: NEW Severity: Enhancement Priority: Other Component: Configuration AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Just like java.util.Properties one should be able to save a PropertiesConfiguration to an OutputStream or to a Writer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29721] New: - [configuration] Saving XML configurations to another file
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29721. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29721 [configuration] Saving XML configurations to another file Summary: [configuration] Saving XML configurations to another file Product: Commons Version: Nightly Builds Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Configuration AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The two XML configurations (DOMConfiguration DOM4JConfiguration) cannot be saved to another file, unlike PropertiesConfiguration they do not provide a save(String filename) method to save the configuration to another file. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/configuration/src/java/org/apache/commons/configuration DOMConfiguration.java
ebourg 2004/06/21 09:47:24 Modified:configuration/src/java/org/apache/commons/configuration DOMConfiguration.java Log: Removed the fully qualified class names and some final keywords Revision ChangesPath 1.5 +39 -40 jakarta-commons/configuration/src/java/org/apache/commons/configuration/DOMConfiguration.java Index: DOMConfiguration.java === RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/DOMConfiguration.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- DOMConfiguration.java 16 Jun 2004 18:13:53 - 1.4 +++ DOMConfiguration.java 21 Jun 2004 16:47:24 - 1.5 @@ -31,6 +31,7 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; @@ -116,7 +117,7 @@ { File file = null; try -{ +{ file = new File(getBasePath(), getFileName()); DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); @@ -159,30 +160,29 @@ * should supply the root element of the document. * @param hierarchy */ -private void initProperties(final Element element, final StringBuffer hierarchy) +private void initProperties(Element element, StringBuffer hierarchy) { -final StringBuffer buffer = new StringBuffer(); -final NodeList list = element.getChildNodes(); +StringBuffer buffer = new StringBuffer(); +NodeList list = element.getChildNodes(); for (int i = 0; i list.getLength(); i++) { -final org.w3c.dom.Node w3cNode = list.item(i); -if(w3cNode instanceof Element) +Node node = list.item(i); +if (node instanceof Element) { -final StringBuffer subhierarchy = -new StringBuffer(hierarchy.toString()); -final Element child = (Element)w3cNode; +StringBuffer subhierarchy = new StringBuffer(hierarchy.toString()); +Element child = (Element) node; subhierarchy.append(child.getTagName()); processAttributes(subhierarchy.toString(), child); initProperties(child, new StringBuffer(subhierarchy.toString()).append('.')); } -else if(w3cNode instanceof CharacterData) +else if (node instanceof CharacterData) { -final CharacterData data = (CharacterData)w3cNode; +CharacterData data = (CharacterData)node; buffer.append(data.getData()); } } -final String text = buffer.toString().trim(); +String text = buffer.toString().trim(); if (text.length() 0 hierarchy.length() 0) { super.addProperty( @@ -199,15 +199,14 @@ private void processAttributes(String hierarchy, Element element) { // Add attributes as x.y{ATTRIB_START_MARKER}att{ATTRIB_END_MARKER} -final NamedNodeMap attributes = element.getAttributes(); +NamedNodeMap attributes = element.getAttributes(); for (int i = 0; i attributes.getLength(); ++i) { -final org.w3c.dom.Node w3cNode = attributes.item(i); -if (w3cNode instanceof Attr) +Node node = attributes.item(i); +if (node instanceof Attr) { -Attr attr = (Attr) w3cNode; -String attrName = -hierarchy + '[' + ATTRIB_MARKER + attr.getName() + ']'; +Attr attr = (Attr) node; +String attrName = hierarchy + '[' + ATTRIB_MARKER + attr.getName() + ']'; super.addProperty(attrName, attr.getValue()); } } @@ -264,13 +263,13 @@ } Element child = null; -final NodeList list = element.getChildNodes(); +NodeList list = element.getChildNodes(); for (int j = 0; j list.getLength(); j++) { -final org.w3c.dom.Node w3cNode = list.item(j); -if (w3cNode instanceof Element) +Node node = list.item(j); +if (node instanceof Element) { -child = (Element) w3cNode; +child = (Element) node; if (eName.equals(child.getTagName())) { break; @@ -290,7 +289,7 @@ if
DO NOT REPLY [Bug 29722] New: - [configuration] addProperty throws a NPE in DOMConfiguration
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29722. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29722 [configuration] addProperty throws a NPE in DOMConfiguration Summary: [configuration] addProperty throws a NPE in DOMConfiguration Product: Commons Version: Nightly Builds Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Configuration AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The method addProperty in DOMConfiguration throws a NullPointerException if the configuration file hasn't been loaded. java.lang.NullPointerException at org.apache.commons.configuration.DOMConfiguration.setXmlProperty(DOMConfiguration.java:254) at org.apache.commons.configuration.DOMConfiguration.addProperty(DOMConfiguration.java:225) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29484] - [net] Unable to initiate FTP send
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29484. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29484 [net] Unable to initiate FTP send --- Additional Comments From [EMAIL PROTECTED] 2004-06-21 17:04 --- Yes, it is Ant. I've just built a jar with Ant and am trying to ftp it to my ISP account. Here is the relevant section from my build.xml target name=ftp ftp server=ftp.xmission.com remotedir=public_html/java passive=yes userid=ommitted password=omitted fileset dir=${jar.dir} includes=ommitted.jar/ /ftp /target - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [DbUtils] ClassCastException
What does your DbUtil line 143 look like? When you set a breakpoint at that line and inspect it in your debugger what is the class being returned? David --- Anderson, James H [IT] [EMAIL PROTECTED] wrote: I'm getting a ClassCastException that I don't understand. I hope someone can help with this, because I'd very much like to be able to use DbUtil on my project! The stack trace: org.apache.commons.dbutils.BasicRowProcessor$CaseInsensitiveHashMap java.lang.ClassCastException: org.apache.commons.dbutils.BasicRowProcessor$CaseInsensitiveHashMap at com.ssmb.recom.aft.access.DbUtil.select(DbUtil.java:143) at com.ssmb.recom.aft.access.DbUtil.selectOneMapTrimmed(DbUtil.java:66) at com.ssmb.recom.aft.datamanager.AftRequests.nextBusinessDate(AftRequests.java:3454) at com.ssmb.recom.aft.datamanager.AftRequests.nextBusinessDateAfter(AftRequests.java:3489) at com.ssmb.recom.aft.datamanager.AftRequests.main(AftRequests.java:2920) The invoking code: java.sql.Date sqlDate = new java.sql.Date( date.getTime() ); String selectTradingDate = select trading_date from trade_days where trading_date = ? and banking_day = 'B'; Object[] params = { sqlDate }; boolean commit = true; Map h = null; try { h = (Map) DbUtil.selectOneMapTrimmed(selectTradingDate, params, commit); } catch (Exception e) { logger.error(No trade date = + date, e); throw new RuntimeException(e.getMessage()); } java.util.Date tradeDate = (java.util.Date) h.get(trading_date); My wrapper code as invoked in the code, above: package com.ssmb.recom.aft.access; import java.sql.*; import java.util.*; import org.apache.commons.dbutils.*; import org.apache.commons.dbutils.handlers.*; import org.apache.commons.dbutils.wrappers.*; import org.apache.commons.beanutils.BeanUtils; import com.ssmb.recom.datamgr.RecomDataSource; public class DbUtil { [...] /** select one row, set param=null to avoid parameter substitution */ public static Object selectOneMapTrimmed(String query, Object[] param, boolean commit) throws Exception { MapHandler h = new MapHandler() { public Object handle (ResultSet rs) throws SQLException { StringTrimmedResultSet wrapped = new StringTrimmedResultSet(rs); rs = ProxyFactory.instance().createResultSet(wrapped); Object returnVal = null; try { returnVal = super.handle(rs); } catch (SQLException e) { System.out.println(e.getMessage()); throw e; } return returnVal; } }; if (param == null) { return select(query, h, commit); } else { return select(query, param, h, commit); } } [...] } The table being queried: table database creatorcreated -- -- -- -- trade_days db2tst08 vimdbat06/20/2000 column type length scale nulls -- -- - - trading_date date 4 0 y trading_daychar 1 0 y trading_dowsmallint 2 0 y banking_daychar 1 0 y Note: When I execute this query using vanilla JDBC, everything works fine. Any help appreciated, jim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29663] - [dbcp] about preparestatement
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29663. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29663 [dbcp] about preparestatement [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Additional Comments From [EMAIL PROTECTED] 2004-06-21 17:39 --- Driver problem so I'm marking this issue invalid. reference: http://support.microsoft.com/default.aspx?scid=kb%3BEN-US%3BQ313181 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs] VfsTask
vfs-manager id=default class=StandardFileSystemManager vfs-option but this is to specify and implement later ../ /vfs-manager vfs-manager id=special class=MyHyperVFSFileSystemManager / vfs-copy manager=default toDir=path vfs-fileset dir=path include name=*.b?t/ /vfs-fileset /vfs-copy vfs-copy manager=special toDir=path vfs-fileset dir=pathXX include name=*.b?t/ /vfs-fileset /vfs-copy Yes, looks very good. vfs-manager is here a data-type that sets a reference to itself to project project.addReference(String name, Object value); Then when vfs-copy sees manager attribute it asks an object from project that is registered with the given refid. And expects it to be vfs-manager datatype. The same task can also accept that type nested inside, in which case the type definition is local to the task. - rami - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/configuration/xdocs changes.xml
ebourg 2004/06/21 10:45:29 Modified:configuration/src/java/org/apache/commons/configuration BasePropertiesConfiguration.java PropertiesConfiguration.java configuration/xdocs changes.xml Log: Added a save() method to PropertiesConfiguration and save(Writer out), save(OutputStream out), save(OutputStream out, String encoding) to BasePropertiesConfiguration. Revision ChangesPath 1.12 +86 -44 jakarta-commons/configuration/src/java/org/apache/commons/configuration/BasePropertiesConfiguration.java Index: BasePropertiesConfiguration.java === RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/BasePropertiesConfiguration.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- BasePropertiesConfiguration.java 16 Jun 2004 18:13:53 - 1.11 +++ BasePropertiesConfiguration.java 21 Jun 2004 17:45:29 - 1.12 @@ -16,14 +16,17 @@ package org.apache.commons.configuration; -import java.io.File; import java.io.FileWriter; +import java.io.FilterWriter; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.LineNumberReader; +import java.io.OutputStream; +import java.io.OutputStreamWriter; import java.io.Reader; import java.io.UnsupportedEncodingException; +import java.io.Writer; import java.util.Date; import java.util.Iterator; import java.util.List; @@ -139,8 +142,7 @@ * * @throws ConfigurationException */ -public void load(InputStream input) -throws ConfigurationException +public void load(InputStream input) throws ConfigurationException { load(input, null); } @@ -165,7 +167,7 @@ } catch (UnsupportedEncodingException e) { -throw new ConfigurationException(Should look up and use default encoding.,e); +throw new ConfigurationException(Should look up and use default encoding., e); } } @@ -174,7 +176,8 @@ reader = new PropertiesReader(new InputStreamReader(input)); } -try { +try +{ while (true) { String line = reader.readProperty(); @@ -214,58 +217,98 @@ } } } -catch (IOException ioe){ +catch (IOException ioe) +{ throw new ConfigurationException(Could not load configuration from input stream.,ioe); } } /** - * save properties to a file. - * properties with multiple values are saved comma seperated. + * Save the configuration to a file. Properties with multiple values are + * saved on multiple lines, one value per line. * - * @param filename name of the properties file + * @param filename the name of the properties file * * @throws ConfigurationException */ public void save(String filename) throws ConfigurationException { -PropertiesWriter out = null; -File file = new File(filename); -try { - out = new PropertiesWriter(file); - - out.writeComment(written by PropertiesConfiguration); - out.writeComment(new Date().toString()); - - for (Iterator i = this.getKeys(); i.hasNext();) - { - String key = (String) i.next(); -Object value = getProperty(key); +FileWriter writer = null; -if (value instanceof List) -{ -out.writeProperty(key, (List) value); -} -else -{ -out.writeProperty(key, value); -} - } - out.flush(); - out.close(); +try +{ +writer = new FileWriter(filename); +save(writer); } -catch (IOException ioe) +catch (IOException e) { -try { -if (out != null){ -out.close(); + throw new ConfigurationException(Could not save to file + filename, e); +} +finally +{ +// close the writer +try +{ +if (writer != null) +{ +writer.close(); } } -catch (IOException ioe2){ +catch (IOException ioe2) { } +} +} + +/** + * Save the configuration to the specified stream.
cvs commit: jakarta-commons-sandbox/chain/xdocs chapter-chain.xml
husted 2004/06/21 10:48:12 Removed: chain/xdocs chapter-chain.xml Log: Move to default sdocbook directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/chain/sdocbook - New directory
husted 2004/06/21 10:48:23 jakarta-commons-sandbox/chain/sdocbook - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/chain project.properties
husted 2004/06/21 10:50:49 Modified:chainproject.properties Log: Add properties for sdocbook plugin. Several JARs have to be downloaded manually, making the sdocbook plugin a pain to install. Revision ChangesPath 1.4 +35 -2 jakarta-commons-sandbox/chain/project.properties Index: project.properties === RCS file: /home/cvs/jakarta-commons-sandbox/chain/project.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- project.properties30 May 2004 21:02:21 - 1.3 +++ project.properties21 Jun 2004 17:50:49 - 1.4 @@ -16,7 +16,7 @@ # Properties that override Maven build defaults # $Id$ ## - +maven.repo.remote=http://www.ibiblio.org,http://maven-plugins.sf.net/maven ## @@ -76,4 +76,37 @@ compile.debug = on compile.optimize = off compile.deprecation = off + + +# --- +# Default Maven properties for the SDOCBOOK plugin +# --- + +maven.sdocbook.src.dir = ${basedir}/sdocbook + +maven.sdocbook.generated.html = ${maven.build.dir}/generated-docbooks/html +maven.sdocbook.generated.fo = ${maven.build.dir}/generated-docbooks/fo +maven.sdocbook.generated.pdf = ${maven.build.dir}/generated-docbooks/pdf + +maven.sdocbook.target.dir = ${maven.build.dir}/docs/docbook + +# the root dir of the stylesheet to use (defaults to plugin-internal version) +maven.sdocbook.stylesheets.dir = ${plugin.dir}/plugin-resources + +# the resources which are to be copied from maven.sdocbook.src.dir +maven.sdocbook.resources.include = **/*.png, **/*.gif + +# can be set to the -param ... which user can use to parameterize the html stylesheets +maven.sdocbook.html.params = + +# can be set to the -param ... which user can use to parameterize the fo stylesheets +maven.sdocbook.fo.params = + + +# set this to true if you want to use xml-commons-resolver for resolving the dtd elements +maven.sdocbook.use.entityresolver=false + +# Set to point to configuration file of xml-commons-resolver +# (NOTE: if you set maven.sdocbook.use.entityresolver to true, you must set this too) +maven.sdocbook.catalogmanager.properties= - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29720] - [configuration] save(OutputStream) for PropertiesConfiguration
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29720. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29720 [configuration] save(OutputStream) for PropertiesConfiguration [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2004-06-21 17:55 --- Done ! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[configuration] DOM vs DOM4J
Is there a good reason to keep the configurations using DOM4J instead of their DOM based equivalent ? If there is no difference between the two I'm tempted to remove DOM4JConfiguration and HierarchicalDOM4JConfiguration (or to move them to a contrib directory), and then merge DOMConfiguration into XMLConfiguration and HierarchicalDOMJConfiguration into HierarchicalConfiguration. What do you think ? Emmanuel Bourg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/configuration/src/java/org/apache/commons/configuration HierarchicalDOM4JConfiguration.java
ebourg 2004/06/21 11:42:39 Modified:configuration/src/java/org/apache/commons/configuration HierarchicalDOM4JConfiguration.java Log: added exception chaining Revision ChangesPath 1.6 +14 -12 jakarta-commons/configuration/src/java/org/apache/commons/configuration/HierarchicalDOM4JConfiguration.java Index: HierarchicalDOM4JConfiguration.java === RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/HierarchicalDOM4JConfiguration.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- HierarchicalDOM4JConfiguration.java 2 Jun 2004 16:42:24 - 1.5 +++ HierarchicalDOM4JConfiguration.java 21 Jun 2004 18:42:39 - 1.6 @@ -1,5 +1,3 @@ -package org.apache.commons.configuration; - /* * Copyright 2004 The Apache Software Foundation. * @@ -16,6 +14,8 @@ * limitations under the License. */ +package org.apache.commons.configuration; + import java.net.MalformedURLException; import java.net.URL; import java.util.Iterator; @@ -35,9 +35,7 @@ * * @version $Id$ */ -public class HierarchicalDOM4JConfiguration -extends HierarchicalConfiguration -implements BasePathLoader +public class HierarchicalDOM4JConfiguration extends HierarchicalConfiguration implements BasePathLoader { /** Stores the file name of the document to be parsed.*/ private String file; @@ -102,11 +100,13 @@ */ public void load() throws ConfigurationException { - try { + try +{ load(ConfigurationUtils.getURL(getBasePath(), getFileName())); } - catch (MalformedURLException mue){ - throw new ConfigurationException(Could not load from + getBasePath() + , + getFileName()); + catch (MalformedURLException e) +{ + throw new ConfigurationException(Could not load from + getBasePath() + , + getFileName(), e); } } @@ -118,11 +118,13 @@ */ public void load(URL url) throws ConfigurationException { - try { + try +{ initProperties(new SAXReader().read(url)); } - catch (DocumentException de){ - throw new ConfigurationException(Could not load from + url); + catch (DocumentException e) +{ + throw new ConfigurationException(Could not load from + url, e); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/configuration/src/java/org/apache/commons/configuration HierarchicalDOMConfiguration.java
ebourg 2004/06/21 11:44:30 Modified:configuration/src/java/org/apache/commons/configuration HierarchicalDOMConfiguration.java Log: Removed the javax.naming.ConfigurationException Removed the final keywords Revision ChangesPath 1.2 +33 -28 jakarta-commons/configuration/src/java/org/apache/commons/configuration/HierarchicalDOMConfiguration.java Index: HierarchicalDOMConfiguration.java === RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/HierarchicalDOMConfiguration.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HierarchicalDOMConfiguration.java 1 Apr 2004 18:43:04 - 1.1 +++ HierarchicalDOMConfiguration.java 21 Jun 2004 18:44:30 - 1.2 @@ -1,5 +1,3 @@ -package org.apache.commons.configuration; - /* * Copyright 2004 The Apache Software Foundation. * @@ -16,10 +14,11 @@ * limitations under the License. */ +package org.apache.commons.configuration; + import java.net.MalformedURLException; import java.net.URL; -import javax.naming.ConfigurationException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -37,15 +36,15 @@ * contained properties can be accessed using all methods supported by * the base class codeHierarchicalConfiguration/code. * This class is a direct adaption of the - * codeHierarchicalDOM4JConfiguration/code. + * codeHierarchicalDOM4JConfiguration/code. + * + * @since commons-configuration 1.0 + * * @author Jouml;rg Schaible - * @since commons-configuragtion 1.0 + * @version $Revision$, $Date$ */ -public class HierarchicalDOMConfiguration -extends HierarchicalConfiguration -implements BasePathLoader +public class HierarchicalDOMConfiguration extends HierarchicalConfiguration implements BasePathLoader { - /** Stores the file name of the document to be parsed.*/ private String file; @@ -74,7 +73,7 @@ * Sets the name of the file to be parsed by this object. * @param file the file to be parsed */ -public void setFileName(final String file) +public void setFileName(String file) { this.file = file; } @@ -93,7 +92,7 @@ * this path. * @param path the base path; this can be a URL or a file path */ -public void setBasePath(final String path) +public void setBasePath(String path) { basePath = path; } @@ -109,7 +108,8 @@ { load(ConfigurationUtils.getURL(getBasePath(), getFileName())); } -catch (MalformedURLException mue) { +catch (MalformedURLException mue) +{ throw new ConfigurationException( Could not load from + getBasePath() + , + getFileName()); @@ -119,6 +119,7 @@ /** * Loads and parses the specified XML document. * @param url the URL to the XML document + * * @throws ConfigurationException Thrown if an error occurs */ public void load(URL url) throws ConfigurationException @@ -129,7 +130,7 @@ DocumentBuilderFactory.newInstance().newDocumentBuilder(); initProperties(builder.parse(url.toExternalForm())); } -catch (Exception de) +catch (Exception e) { throw new ConfigurationException(Could not load from + url); } @@ -137,9 +138,10 @@ /** * Initializes this configuration from an XML document. + * * @param document the document to be parsed */ -public void initProperties(final Document document) +public void initProperties(Document document) { constructHierarchy(getRoot(), document.getDocumentElement()); } @@ -147,30 +149,32 @@ /** * Helper method for building the internal storage hierarchy. The XML * elements are transformed into node objects. + * * @param node the actual node * @param element the actual XML element */ -private void constructHierarchy(final Node node, final Element element) +private void constructHierarchy(Node node, Element element) { -final StringBuffer buffer = new StringBuffer(); -final NodeList list = element.getChildNodes(); -for (int i = 0; i list.getLength(); i++) { -final org.w3c.dom.Node w3cNode = list.item(i); +StringBuffer buffer = new StringBuffer(); +NodeList list = element.getChildNodes(); +for (int i = 0; i list.getLength(); i++) +{ +org.w3c.dom.Node w3cNode = list.item(i); if
Re: [lang] Equalator?
Edelson, Justin wrote: I'm writing a few classes that currently implement Comparator, but I really don't care about comparisons - I just want to use an object to test equality, ergo Equalator. Does such an interface exist somewhere in lang (I can't find anything similar). We have a simiar interface in [configuration], that's ConfigurationComparator, it defines a simple compare(conf1, conf2) method returning a boolean. I'm not quite satisfied with the name since it leads to think it inherits the java.util.Comparator interface. An Equalator interface in [lang] could be a good replacement. Emmanuel Bourg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DO NOT REPLY [Bug 29689] - [net] Unix parser does not handle special files.
In message [EMAIL PROTECTED], [EMAIL PROTECTED] .org writes: a listing. Assuming it's implemented, it would also make sense to have FTPFi le return the type as being UNKNOWN_TYPE for these other cases. I haven't kept up with all of the parser changes, but that's why FTPFile.UNKNOWN_TYPE exists. Anything that's not obviously (as determined by the listing format) a regular file, a directory, or a symbolic link (which could point to a directory or to a file) should be treated as unknown, but be included in the listing (and let the client decide what to do with it). At least that was the original intent. daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [configuration] DOM vs DOM4J
Emmanuel Bourg wrote: Is there a good reason to keep the configurations using DOM4J instead of their DOM based equivalent ? If there is no difference between the two I'm tempted to remove DOM4JConfiguration and HierarchicalDOM4JConfiguration (or to move them to a contrib directory), and then merge DOMConfiguration into XMLConfiguration and HierarchicalDOMJConfiguration into HierarchicalConfiguration. What do you think ? +1 -- Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [configuration] DOM vs DOM4J
On 21-Jun-04, at 20:17 Uhr, Emmanuel Bourg wrote: Is there a good reason to keep the configurations using DOM4J instead of their DOM based equivalent ? If there is no difference between the two I'm tempted to remove DOM4JConfiguration and HierarchicalDOM4JConfiguration (or to move them to a contrib directory), and then merge DOMConfiguration into XMLConfiguration and HierarchicalDOMJConfiguration into HierarchicalConfiguration. What do you think ? Although I'm not involved in configuration I would warn about speed and memory differences. I haven't used dom4j intensively but did, at the time use jdom quite much. They are very similar in memory and speed. And this from a migration from Xerces DOM. Basically it went as follow: - time to build with Xerces DOM 100% - time to build with Xerces SAX on JDOM 50% - time to build with Saxon's Aelfred SAX on JDOM 25% Also, using dom4j might, if you do this well for it, offer you weak xml-loading using XPP... (at least in theory). my 2p paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [logging] after 1.0.4: unfinished business
[snip] memory log -- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27663 i quite like this idea but it's not really a major feature. i'm inclined to try to keep the core jar small by creating another optional jar called loggers containing loggers which are less likely to be used. the distribution would contain both jars. maybe avalon log could be moved there too. [snip] From our product's POV, I've always used CL as a thin wrapper to log4j with the remote possibility that we will switch to JDK 1.4 logging when we move from Java 1.3 to 1.4. I have no pb with useful stuff being the jar but it sounds like some of these are new features that are not in the wrapper dept, which argues to me for putting it in a separate jar. Then there are questions like: should the memory log really be in CL as opposed to logj4? Gary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [logging] after 1.0.4: unfinished business
On 21 Jun 2004, at 21:47, Gary Gregory wrote: [snip] memory log -- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27663 i quite like this idea but it's not really a major feature. i'm inclined to try to keep the core jar small by creating another optional jar called loggers containing loggers which are less likely to be used. the distribution would contain both jars. maybe avalon log could be moved there too. [snip] From our product's POV, I've always used CL as a thin wrapper to log4j with the remote possibility that we will switch to JDK 1.4 logging when we move from Java 1.3 to 1.4. I have no pb with useful stuff being the jar but it sounds like some of these are new features that are not in the wrapper dept, which argues to me for putting it in a separate jar. Then there are questions like: should the memory log really be in CL as opposed to logj4? that's a good question :) the binary distribution is now quite large (due to the improved, mavenized documentation). so, as long as the actual core jar stays small, i'm a lot happier adding new loggers to an optional jar if there's a good chance that people would find them useful but i'd be interested to hear other people's opinions on this one... - robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [testutils][logging] after 1.0.4: unfinished business
On 21 Jun 2004, at 07:03, Jörg Schaible wrote: Hi Robert, robert burrell donkin wrote on Sunday, June 20, 2004 11:19 PM: when i was cutting 1.0.4, i proposed leaving some unresolved issues until after the release. so, now seems like a good time to get on top of them. please feel free to dive in and comment (that's why i've left space :) memory log -- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27663 i quite like this idea but it's not really a major feature. i'm inclined to try to keep the core jar small by creating another optional jar called loggers containing loggers which are less likely to be used. the distribution would contain both jars. maybe avalon log could be moved there too. Meanwhile I proposed this class also to Alex' latest commons-testutils effort (http://www.mail-archive.com/[EMAIL PROTECTED]/ msg43461.html), but since I have no commit rights, I cannot do much about. you're still a developer (if not a committer) and by adding to the debate you're are doing something :) IMHO one of the hardest things about having responsibility for a well-used, mature library is having to leave good stuff out when it's in the best interests of the library. So I am not sure now, where to put this class in best place. If you have other additional loggers, commons-logging might be still the best idea, but otherwise the commons-testutils might also be appropriate. i'd like to move the avalon log into the optional loggers package and there's the servlet logger as well. IMHO that's probably enough but i'd like to hear other people's thoughts on this one... - robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [logging] after 1.0.4: unfinished business
Gary Gregory wrote: Then there are questions like: should the memory log really be in CL as opposed to logj4? Well, see the focus of the class. It targets especially unit tests in combination with coverage tools. Personally I can live perfectly with the jdk logger (unless someone wants more sophisticated possibilities and is willing to pay the price in the increased project size for L4J). CL allows me to use the most lightweight implementation during development and using the MemoryLogger I can assure, that the logger code does not have impact on runtime behaviour (still using CL). -- Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: Betwixt
Date: 2004-06-21T14:40:56 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: Betwixt URL: http://wiki.apache.org/jakarta-commons/Betwixt Added link to new integration page Change Log: -- @@ -10,6 +10,7 @@ It's only in alpha but already people are demanding that the design be improved. This refactoring should make the design easier to understand - and so make it easier for people to contribute. (And yes, it'll hopefully make the life of the existing committers that much easier as well ;) * BetwixtDesignNextGeneration + * XDocletIntegration - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: Betwixt
Date: 2004-06-21T14:42:34 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: Betwixt URL: http://wiki.apache.org/jakarta-commons/Betwixt no comment Change Log: -- @@ -10,7 +10,7 @@ It's only in alpha but already people are demanding that the design be improved. This refactoring should make the design easier to understand - and so make it easier for people to contribute. (And yes, it'll hopefully make the life of the existing committers that much easier as well ;) * BetwixtDesignNextGeneration - * XDocletIntegration + * [:/XDocletIntegration] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] New: Betwixt/XDocletIntegration
Date: 2004-06-21T14:50:03 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: Betwixt/XDocletIntegration URL: http://wiki.apache.org/jakarta-commons/Betwixt/XDocletIntegration Created XDoclet integration design page New Page: = XDoclet Integration = The XDoclet family ([XDoclet http://xdoclet.sourceforge.net/xdoclet/index.html] and XDoclet2) are generation engines used for attribute oriented programming. They process meta data (in the form of javadocs tags). The interest for Betwixt is that java doc tags are nice way to mark up mappings. = Design Ideas = Up to [:Betwixt] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: Betwixt/XDocletIntegration
Date: 2004-06-21T14:50:24 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: Betwixt/XDocletIntegration URL: http://wiki.apache.org/jakarta-commons/Betwixt/XDocletIntegration no comment Change Log: -- @@ -1,6 +1,6 @@ = XDoclet Integration = -The XDoclet family ([XDoclet http://xdoclet.sourceforge.net/xdoclet/index.html] and XDoclet2) are generation engines used for attribute oriented programming. They process meta data (in the form of javadocs tags). +The XDoclet family ([http://xdoclet.sourceforge.net/xdoclet/index.html XDoclet] and XDoclet2) are generation engines used for attribute oriented programming. They process meta data (in the form of javadocs tags). The interest for Betwixt is that java doc tags are nice way to mark up mappings. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: Betwixt/XDocletIntegration
Date: 2004-06-21T14:50:45 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: Betwixt/XDocletIntegration URL: http://wiki.apache.org/jakarta-commons/Betwixt/XDocletIntegration no comment Change Log: -- @@ -2,7 +2,7 @@ The XDoclet family ([http://xdoclet.sourceforge.net/xdoclet/index.html XDoclet] and XDoclet2) are generation engines used for attribute oriented programming. They process meta data (in the form of javadocs tags). -The interest for Betwixt is that java doc tags are nice way to mark up mappings. +The interest for Betwixt is that java doc tags are a very nice way to mark up mappings. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [betwixt] XDoclet Integration
On 21 Jun 2004, at 09:45, Konstantin Priblouda wrote: the wiki might be good for this purpose (since it's easier to post code up than by attachment to an email). your place or our place? we need more content so http://wiki.apache.org/jakarta-commons/Betwixt/XDocletIntegration :) it can be easily moved somewhere else later. i've create the basic page but please everyone just dive in with ideas (and please correct anything i've got wrong). (another reason is that we might just be able to coral some more volunteers into joining the effort.) this would mean that there'd be no reason why we couldn't have implementations for both versions (provided that there are developers keen to write them). It's OK to have 2 versions. From my point of view, I stopped to use xdoclet-1.2 adn moved everything to 2.0 ( but EJB people would have hard time, as nobody from xdoclet 2 plugin developers uses EJB anymore ) so there are oeople whoi is going to stay with 1.2 for a while... I think ( for xdoclet 2 ) betwixt plugin shall be located in xdoclet repository , because of dependency to qtags plugin. fair enough. we'd probably want to put a link on our website. what's your preferred mailing list? (just in case people get round to feeding patches for extra mappings through.) - robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [general] commons standard for release notes and Maven?
I plan on migrating [codec] to use changes.xml for version 1.3. Is there a feature which will generate an old school RELEASE-NOTES.txt *text* file from a changes.xml? Thank you, Gary -Original Message- From: Dion Gillard [mailto:[EMAIL PROTECTED] Sent: Monday, June 21, 2004 17:21 To: Jakarta Commons Developers List Subject: Re: [general] commons standard for release notes and Maven? Maven has an announcement plugin that generates a release announcement from the xdocs/changes.xml files, if that helps. On Mon, 21 Jun 2004 20:19:22 -0400, Gary Gregory [EMAIL PROTECTED] wrote: Hello, It seems there is no standard in commons/maven for providing release notes on the generated web sites. Each component provides a RELEASE-NOTES.txt and some projects link to it from their xdocs. It seems to me that having a Release Notes link generated by Maven would be nice. The particular issue I want to address is to find out, without downloading a component and digging, what has changed between the current release and the release I am using. Gary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [general] commons standard for release notes and Maven?
Not AFAIK. On Mon, 21 Jun 2004 22:03:57 -0400, Gary Gregory [EMAIL PROTECTED] wrote: I plan on migrating [codec] to use changes.xml for version 1.3. Is there a feature which will generate an old school RELEASE-NOTES.txt *text* file from a changes.xml? Thank you, Gary -Original Message- From: Dion Gillard [mailto:[EMAIL PROTECTED] Sent: Monday, June 21, 2004 17:21 To: Jakarta Commons Developers List Subject: Re: [general] commons standard for release notes and Maven? Maven has an announcement plugin that generates a release announcement from the xdocs/changes.xml files, if that helps. On Mon, 21 Jun 2004 20:19:22 -0400, Gary Gregory [EMAIL PROTECTED] wrote: Hello, It seems there is no standard in commons/maven for providing release notes on the generated web sites. Each component provides a RELEASE-NOTES.txt and some projects link to it from their xdocs. It seems to me that having a Release Notes link generated by Maven would be nice. The particular issue I want to address is to find out, without downloading a component and digging, what has changed between the current release and the release I am using. Gary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: [Validator] 1.1.3 release plan
I checked out the branch and tried to apply the three tickets in question. None of the patches fully succeeded, I guess because they were written against the HEAD. These are all enhancements, and could just as well wait for 1.2.0. I'm not aware of any burning issues in regard to the 1.1.2 branch, and will plan on rolling a 1.1.3 release tomorrow night. My window of opportunity to do this is very small, as I'll be away again next week. So, if there are issues, and no one else is willing or able to resolve them, then the release will have to wait until July. I hope this will not be the case, since the Struts release has been blocked for almost three months now, in anticipation of Validator 1.1.3. -Ted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [general] commons standard for release notes and Maven?
I've been using changes on osjava projects for a bit. It's a very nice, focused report. I love it. Am upgrading to maven-rc3 merely to get a changes report that will easily link into my JIRA. Hen On Mon, 21 Jun 2004, Gary Gregory wrote: I plan on migrating [codec] to use changes.xml for version 1.3. Is there a feature which will generate an old school RELEASE-NOTES.txt *text* file from a changes.xml? Thank you, Gary -Original Message- From: Dion Gillard [mailto:[EMAIL PROTECTED] Sent: Monday, June 21, 2004 17:21 To: Jakarta Commons Developers List Subject: Re: [general] commons standard for release notes and Maven? Maven has an announcement plugin that generates a release announcement from the xdocs/changes.xml files, if that helps. On Mon, 21 Jun 2004 20:19:22 -0400, Gary Gregory [EMAIL PROTECTED] wrote: Hello, It seems there is no standard in commons/maven for providing release notes on the generated web sites. Each component provides a RELEASE-NOTES.txt and some projects link to it from their xdocs. It seems to me that having a Release Notes link generated by Maven would be nice. The particular issue I want to address is to find out, without downloading a component and digging, what has changed between the current release and the release I am using. Gary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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]
cvs commit: jakarta-commons/validator/src/share/org/apache/commons/validator/util ValidatorUtils.java
husted 2004/06/21 19:24:38 Modified:validator/src/share/org/apache/commons/validator Tag: VALIDATOR_1_1_2_BRANCH Field.java Form.java ValidatorResources.java ValidatorUtil.java validator/src/share/org/apache/commons/validator/util Tag: VALIDATOR_1_1_2_BRANCH ValidatorUtils.java Log: Document that the use of FastHashMap is deprecated. Revision ChangesPath No revision No revision 1.31.2.1 +7 -4 jakarta-commons/validator/src/share/org/apache/commons/validator/Field.java Index: Field.java === RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Field.java,v retrieving revision 1.31 retrieving revision 1.31.2.1 diff -u -r1.31 -r1.31.2.1 --- Field.java21 Feb 2004 17:10:29 - 1.31 +++ Field.java22 Jun 2004 02:24:38 - 1.31.2.1 @@ -33,7 +33,7 @@ import java.util.StringTokenizer; import org.apache.commons.beanutils.PropertyUtils; -import org.apache.commons.collections.FastHashMap; +import org.apache.commons.collections.FastHashMap; // DEPRECATED import org.apache.commons.validator.util.ValidatorUtils; /** @@ -41,6 +41,9 @@ * message information and variables to perform the validations and generate * error messages. Instances of this class are configured with a * lt;fieldgt; xml element. + * + * The use of FastHashMap is deprecated and will be replaced in a future + * release. * * @see org.apache.commons.validator.Form */ 1.14.2.1 +8 -5 jakarta-commons/validator/src/share/org/apache/commons/validator/Form.java Index: Form.java === RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Form.java,v retrieving revision 1.14 retrieving revision 1.14.2.1 diff -u -r1.14 -r1.14.2.1 --- Form.java 21 Feb 2004 17:10:29 - 1.14 +++ Form.java 22 Jun 2004 02:24:38 - 1.14.2.1 @@ -28,7 +28,7 @@ import java.util.List; import java.util.Map; -import org.apache.commons.collections.FastHashMap; +import org.apache.commons.collections.FastHashMap; // DEPRECATED /** * p @@ -36,7 +36,10 @@ * contained in a list of codeField/code objects. Instances of this class are * configured with a lt;formgt; xml element. * /p - * + * p + * The use of FastHashMap is deprecated and will be replaced in a future + * release. + * /p */ public class Form implements Serializable { 1.30.2.2 +9 -4 jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorResources.java Index: ValidatorResources.java === RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorResources.java,v retrieving revision 1.30.2.1 retrieving revision 1.30.2.2 diff -u -r1.30.2.1 -r1.30.2.2 --- ValidatorResources.java 13 Apr 2004 05:50:11 - 1.30.2.1 +++ ValidatorResources.java 22 Jun 2004 02:24:38 - 1.30.2.2 @@ -32,7 +32,7 @@ import java.util.Locale; import java.util.Map; -import org.apache.commons.collections.FastHashMap; +import org.apache.commons.collections.FastHashMap; // DEPRECATED import org.apache.commons.digester.Digester; import org.apache.commons.digester.xmlrules.DigesterLoader; import org.apache.commons.logging.Log; @@ -50,6 +50,11 @@ * pstrongNote/strong - Classes that extend this class * must be Serializable so that instances may be used in distributable * application server environments./p + * + * p + * The use of FastHashMap is deprecated and will be replaced in a future + * release. + * /p */ public class ValidatorResources implements Serializable { 1.14.2.1 +4 -4 jakarta-commons/validator/src/share/org/apache/commons/validator/Attic/ValidatorUtil.java Index: ValidatorUtil.java === RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Attic/ValidatorUtil.java,v retrieving revision 1.14 retrieving revision 1.14.2.1 diff -u -r1.14 -r1.14.2.1 --- ValidatorUtil.java21 Feb 2004 17:10:29 - 1.14 +++ ValidatorUtil.java22 Jun 2004 02:24:38 - 1.14.2.1 @@ -21,7 +21,7 @@ package org.apache.commons.validator; -import org.apache.commons.collections.FastHashMap; +import org.apache.commons.collections.FastHashMap; // DEPRECATED import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; No revision No revision 1.7.2.1
cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser UnixFTPEntryParser.java
scohen 2004/06/21 19:30:33 Modified:net/src/java/org/apache/commons/net/ftp/parser UnixFTPEntryParser.java Log: PR: 29689 add support for special file types, those identified in directory listings with a type code (first character) of s, S, m, or p. Revision ChangesPath 1.17 +8 -3 jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java Index: UnixFTPEntryParser.java === RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- UnixFTPEntryParser.java 22 Apr 2004 03:27:19 - 1.16 +++ UnixFTPEntryParser.java 22 Jun 2004 02:30:33 - 1.17 @@ -57,7 +57,7 @@ *state) */ private static final String REGEX = -([bcdlf-]) +([bcdlfmpSs-]) + (((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-])))\\s+ + (\\d+)\\s+ + (\\S+)\\s+ @@ -115,6 +115,7 @@ String name = group(25); String endtoken = group(26); +// bcdlfmpSs- switch (typeStr.charAt(0)) { case 'd': @@ -127,8 +128,12 @@ case 'c': isDevice = true; // break; - fall through +case 'f': +case '-': + type = FTPFile.FILE_TYPE; + break; default: -type = FTPFile.FILE_TYPE; +type = FTPFile.UNKNOWN_TYPE; } file.setType(type); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/validator project.xml
husted 2004/06/21 19:31:28 Modified:validator Tag: VALIDATOR_1_1_2_BRANCH project.xml Log: Website changes in anticipation of 1.1.3 release. Revision ChangesPath No revision No revision 1.40.2.2 +8 -2 jakarta-commons/validator/project.xml Index: project.xml === RCS file: /home/cvs/jakarta-commons/validator/project.xml,v retrieving revision 1.40.2.1 retrieving revision 1.40.2.2 diff -u -r1.40.2.1 -r1.40.2.2 --- project.xml 13 Apr 2004 05:52:15 - 1.40.2.1 +++ project.xml 22 Jun 2004 02:31:28 - 1.40.2.2 @@ -1,4 +1,4 @@ -?xml version=1.0 encoding=UTF-8? +?xml version=1.0 encoding=UTF-8? !-- Copyright 2003-2004 The Apache Software Foundation @@ -19,7 +19,7 @@ extend../commons-build/project.xml/extend nameValidator/name idcommons-validator/id - currentVersion1.1.3-dev/currentVersion + currentVersion1.1.3/currentVersion inceptionYear2002/inceptionYear packageorg.apache.commons.validator/package @@ -67,6 +67,12 @@ email[EMAIL PROTECTED]/email organization/organization /developer + developer +nameTed Husted/name +idhusted/id +email[EMAIL PROTECTED]/email +organization/organization + /developer /developers contributors - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/validator/xdocs downloads.xml
husted 2004/06/21 19:31:46 Modified:validator/xdocs Tag: VALIDATOR_1_1_2_BRANCH downloads.xml Log: Website changes in anticipation of 1.1.3 release. Revision ChangesPath No revision No revision 1.1.2.1 +7 -3 jakarta-commons/validator/xdocs/downloads.xml Index: downloads.xml === RCS file: /home/cvs/jakarta-commons/validator/xdocs/downloads.xml,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -u -r1.1 -r1.1.2.1 --- downloads.xml 28 Mar 2004 00:12:04 - 1.1 +++ downloads.xml 22 Jun 2004 02:31:46 - 1.1.2.1 @@ -27,9 +27,13 @@ lia href=http://jakarta.apache.org/site/binindex.cgi#commons-validator;1.0.2 Binary/a/li lia href=http://jakarta.apache.org/site/sourceindex.cgi#commons-validator;1.0.2 Source/a/li /ul - - br/ - + + pstrongLatest Development Release/strong/p + ul +lia href=http://www.apache.org/~martinc/validator/v1.1.2/commons-validator-1.1.2.zip;1.1.2 Binary/a/li +lia href=http://www.apache.org/~martinc/validator/v1.1.2/commons-validator-1.1.2-src.zip;1.1.2 Source/a/li + /ul + !-- p strongArchived Releases/strong - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29689] - [net] Unix parser does not handle special files.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29689. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29689 [net] Unix parser does not handle special files. [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2004-06-22 02:34 --- fixed in accordance with above suggestions. Type of s, S, m, and p now supported. All are indentified as being of UNKNOWN_TYPE but they will parse. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mon, 21 Jun 2004 21:44:10 -0600
Here is a casino giving away $25 Free when you sign up an account. No credit card required http://ace.casino.cls2.org/iwin.html James
DO NOT REPLY [Bug 29484] - [net] Unable to initiate FTP send
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29484. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29484 [net] Unable to initiate FTP send [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Additional Comments From [EMAIL PROTECTED] 2004-06-22 02:58 --- Without knowing the details of the server you're connecting to and how it identifies itself to the outside world, I have to think that this is not a bug and that the code is working as it was intended to. There is a public method FTPClient.setRemoteVerificationEnabled() that can be called to change the default value for this variable to false, and thereby disable the verification. But this code has been stable for many years without getting this complaint. Is it possible the server is misconfigured? Since you're working from Ant, if you can demonstrate that your use case is valid and that there is a vailid reason to be able to turn off the verification, perhaps the Ant FTP task can be revised to take another parameter for this. But that is a matter for Ant. Commons-net does provide a way to change the default if necessary. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[net][vote] Steve Cohen to manage release of commons-net-1.2.2
There have been a few bugs fixed in the past week, one of which causes significant problems for Ant. See http://issues.apache.org/bugzilla/show_bug.cgi?id=25668 . The Ant team has asked us whether we can do a release to fix this bug and I would like us to do so. Also fixed has been http://issues.apache.org/bugzilla/show_bug.cgi?id=29689 which concerns the UnixFTPEntryParser and special file types. VOTE [ } +1 - Steve Cohen should proceed with release of commons-net 1.2.2 [ ] -1 - no 1.2.2 release should be done at this time. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [general] commons standard for release notes and Maven?
FYI, I am doing the same thing but with the links pointing to Bugzilla. I wonder: Is providing a HTML version of changes.xml good enough or should a text file *also* be provided. Thank you, Gary -Original Message- From: Henri Yandell [mailto:[EMAIL PROTECTED] Sent: Monday, June 21, 2004 19:21 To: Jakarta Commons Developers List Subject: RE: [general] commons standard for release notes and Maven? I've been using changes on osjava projects for a bit. It's a very nice, focused report. I love it. Am upgrading to maven-rc3 merely to get a changes report that will easily link into my JIRA. Hen On Mon, 21 Jun 2004, Gary Gregory wrote: I plan on migrating [codec] to use changes.xml for version 1.3. Is there a feature which will generate an old school RELEASE-NOTES.txt *text* file from a changes.xml? Thank you, Gary -Original Message- From: Dion Gillard [mailto:[EMAIL PROTECTED] Sent: Monday, June 21, 2004 17:21 To: Jakarta Commons Developers List Subject: Re: [general] commons standard for release notes and Maven? Maven has an announcement plugin that generates a release announcement from the xdocs/changes.xml files, if that helps. On Mon, 21 Jun 2004 20:19:22 -0400, Gary Gregory [EMAIL PROTECTED] wrote: Hello, It seems there is no standard in commons/maven for providing release notes on the generated web sites. Each component provides a RELEASE-NOTES.txt and some projects link to it from their xdocs. It seems to me that having a Release Notes link generated by Maven would be nice. The particular issue I want to address is to find out, without downloading a component and digging, what has changed between the current release and the release I am using. Gary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: ValidatorWishList
Date: 2004-06-21T20:24:13 Editor: 216.220.165.214 Wiki: Jakarta Commons Wiki Page: ValidatorWishList URL: http://wiki.apache.org/jakarta-commons/ValidatorWishList no comment Change Log: -- @@ -23,5 +23,33 @@ +== Validator Integration with Frameworks Other Than Struts == + +I have written an adapter of the Commons-Validator for the [http://www.springframework.org Spring] project. While considering if the adapter could be released (moved out of the sandbox), it was determined that there were two classes that were outside the scope of Spring that should be maintained as part of the Commons-Validator project. The following suggestions provide an outline of how this can be done without breaking backward compatibility. Both of the classes mentioned below can be found in the Spring sandbox as well as the Struts source code (customized respectively for each framework). + +'''Commons-Validator should maintain the FieldChecks class.''' Currently FieldChecks is a class that Spring (as well as Struts and any other framework that wants to support Commons-Validator out of the box) must provide to connect Validator to the specific framework's error handling mechanism. It would be nice if the Validator project would abstract the framework-specific part of the FieldChecks class out to a simple interface something like this: + +{{{ +public interface ValidationErrorPublisher { +/** + * Framework-specific error message publisher. + * + * @param field The field to be validated. + * @param va The ValidatorAction for which the error occurred. + * @param parameters Parameters passed to the Validator via setParameter(). + */ +void publishError(Field field, ValidatorAction va, Map parameters); +} +}}} + +Then any framework could simply maintain an implementation of this interface instead of the entire FieldChecks class with all of its validation specific code. As a side benefit, a standard version of validation-rules.xml could be provided by Validator because frameworks would no longer have to tell Validator how to call each validation rule. + +'''JavascriptValidatorTag should be maintained with Commons-Validator.''' Validator should at least provide a version of this class with abstract dependency retrieval methods (getValidatorResources and getMessage) so that a framework could simply extend the abstract class to provide this tag. Ideally, Validator would have its own tag library, but I can't think of how this would be implemented easily. + +Thanks, +[mailto:millerd_AT_paonline_DOT_com Daniel Miller] + + + Up to [:Validator] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [general] commons standard for release notes and Maven?
Gary, maven announcement actually does generate a text file from changes.xml (with other stuff in there like download links and so on) It won't expand your links though (feel free to file a JIRA request for this, it's probably a good idea to footnote them). Cheers, Brett Quoting Gary Gregory [EMAIL PROTECTED]: FYI, I am doing the same thing but with the links pointing to Bugzilla. I wonder: Is providing a HTML version of changes.xml good enough or should a text file *also* be provided. Thank you, Gary -Original Message- From: Henri Yandell [mailto:[EMAIL PROTECTED] Sent: Monday, June 21, 2004 19:21 To: Jakarta Commons Developers List Subject: RE: [general] commons standard for release notes and Maven? I've been using changes on osjava projects for a bit. It's a very nice, focused report. I love it. Am upgrading to maven-rc3 merely to get a changes report that will easily link into my JIRA. Hen On Mon, 21 Jun 2004, Gary Gregory wrote: I plan on migrating [codec] to use changes.xml for version 1.3. Is there a feature which will generate an old school RELEASE-NOTES.txt *text* file from a changes.xml? Thank you, Gary -Original Message- From: Dion Gillard [mailto:[EMAIL PROTECTED] Sent: Monday, June 21, 2004 17:21 To: Jakarta Commons Developers List Subject: Re: [general] commons standard for release notes and Maven? Maven has an announcement plugin that generates a release announcement from the xdocs/changes.xml files, if that helps. On Mon, 21 Jun 2004 20:19:22 -0400, Gary Gregory [EMAIL PROTECTED] wrote: Hello, It seems there is no standard in commons/maven for providing release notes on the generated web sites. Each component provides a RELEASE-NOTES.txt and some projects link to it from their xdocs. It seems to me that having a Release Notes link generated by Maven would be nice. The particular issue I want to address is to find out, without downloading a component and digging, what has changed between the current release and the release I am using. Gary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Resend: disable httpclient logging
additional info: 1. this is a standalone java program, 2. the script to launch the java process as follows: - #!/bin/sh CDS_HOME=/opt/cvm CDS_RUNTIME=$CDS_HOME/deployment/cvm echo CDS_HOME =$CDS_HOME echo CDS_RUNTIME=$CDS_RUNTIME #classpath for CDS_RUNTIME CLASSPATH=../.:$CDS_HOME/enhancements/lib/commons-httpclient-2.0.jar:$CDS_RUNTIM E/lib/struts-plus-apache-commons.jar:$CDS_RUNTIME/lib/log4j-1.2.8.jar:$CDS_RUNTI ME/lib/cdslib/cdsapi.jar:$CDS_RUNTIME/lib/cdslib/foundation.jar:$CDS_RUNTIME/ser vice/postpaidservice/lib/postpaidservice.jar:$CDS_HOME/enhancements/lib/infranet /cdk.jar:$CDS_HOME/enhancements/lib/infranet/pcm.jar:$CDS_HOME/enhancements/lib/ infranet/pcmext.jar:$CDS_HOME/enhancements/enhancements.jar:$CDS_HOME/enhancemen ts #classpath for deactive Account /cancel subscription CLASSPATH=$CLASSPATH:$CDS_RUNTIME/lib/classes12.zip:$CDS_RUNTIME/lib/xerces.jar: $CDS_RUNTIME/lib/xalan.jar echo $CLASSPATH $JAVA_HOME/bin/java -Djava.util.logging.config.file=/opt/cvm/enhancements/BatchL og.properties -cp $CLASSPATH com.telstra.cvm.cancellation.BatchMain $1 3. in its classpath, it contains both httpclient-20.jar and struts-plus-apache-commons.jar 4. I change the last line to be one of the following: a) log4j.logger.org.apache.commons=ERROR b) log4j.category.org.apache.commons=ERROR c) log4j.logger.org.apache.commons.httpclient=ERROR NONE of them works! ANYONE CAN THINK OF THE REASON? many thanks! Darren Jiang darren jiang wrote: hello all, I want to disable the httpclient logging. but failed to do so, anyone has the same issue with me? my program uses log4j and also org.apache.commons packages. I have my own logging.properties as following: jdap.log.dir=/var/opt/SUNWappserver7/domains/cvmdomain/cvminstance/logs log4j.rootCategory=DEBUG, ae, debug, metrics log4j.appender.ae=org.apache.log4j.FileAppender log4j.appender.ae.layout=org.apache.log4j.PatternLayout log4j.appender.ae.layout.ConversionPattern=%d{-MM-dd HH:mm:ss.SSS}; ${jdap. hostname}; %x; %C -%m%n log4j.appender.ae.Threshold=ERROR log4j.appender.ae.ImmediateFlush=true log4j.appender.ae.File=${jdap.log.dir}/${jdap.hostname}CVM_JdapBatchAe.log log4j.appender.ae.Append=true log4j.appender.debug=org.apache.log4j.FileAppender log4j.appender.debug.layout=org.apache.log4j.PatternLayout log4j.appender.debug.layout.ConversionPattern=%d{-MM-dd HH:mm:ss.SSS}; ${jd ap.hostname}; %x; %l -%m%n log4j.appender.debug.Threshold=DEBUG log4j.appender.debug.ImmediateFlush=true log4j.appender.debug.File=${jdap.log.dir}/${jdap.hostname}CVM_JdapBatchDebug.lo g log4j.appender.debug.Append=true log4j.appender.metrics=org.apache.log4j.FileAppender log4j.appender.metrics.layout=org.apache.log4j.PatternLayout log4j.appender.metrics.layout.ConversionPattern=%d{-MM-dd HH:mm:ss.SSS}; ${ jdap.hostname}; %x; %l -%m%n log4j.appender.metrics.Threshold=INFO log4j.appender.metrics.ImmediateFlush=true log4j.appender.metrics.File=${jdap.log.dir}/${jdap.hostname}CVM_JdapBatchMetric s.log log4j.appender.metrics.Append=true # HttpClient logging set to be ERROR log4j.category.org.apache.commons=ERROR the all httpclient logging still go to my logging files. I tried to change log4j.category to be log4j.logger. but that does not help. many thanks darren jiang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question regarding Bug 20744
Marius Barbulescu wrote: I see a strange '--' in each part but I don't know if it correct or not. They are not strange but conform to RFC-2046. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Resend: disable httpclient logging
darren jiang wrote: additional info: 1. this is a standalone java program, 2. the script to launch the java process as follows: - #!/bin/sh CDS_HOME=/opt/cvm CDS_RUNTIME=$CDS_HOME/deployment/cvm echo CDS_HOME =$CDS_HOME echo CDS_RUNTIME=$CDS_RUNTIME #classpath for CDS_RUNTIME CLASSPATH=../.:$CDS_HOME/enhancements/lib/commons-httpclient-2.0.jar:$CDS_RUNTIM E/lib/struts-plus-apache-commons.jar:$CDS_RUNTIME/lib/log4j-1.2.8.jar:$CDS_RUNTI ME/lib/cdslib/cdsapi.jar:$CDS_RUNTIME/lib/cdslib/foundation.jar:$CDS_RUNTIME/ser vice/postpaidservice/lib/postpaidservice.jar:$CDS_HOME/enhancements/lib/infranet /cdk.jar:$CDS_HOME/enhancements/lib/infranet/pcm.jar:$CDS_HOME/enhancements/lib/ infranet/pcmext.jar:$CDS_HOME/enhancements/enhancements.jar:$CDS_HOME/enhancemen ts The classpath contains Log4J. So Log4J will be used by commons-logging. #classpath for deactive Account /cancel subscription CLASSPATH=$CLASSPATH:$CDS_RUNTIME/lib/classes12.zip:$CDS_RUNTIME/lib/xerces.jar: $CDS_RUNTIME/lib/xalan.jar echo $CLASSPATH $JAVA_HOME/bin/java -Djava.util.logging.config.file=/opt/cvm/enhancements/BatchL og.properties -cp $CLASSPATH com.telstra.cvm.cancellation.BatchMain $1 The java.util.logging property will be ignored, since Log4J is preferred over JDK1.4 logging. 3. in its classpath, it contains both httpclient-20.jar and struts-plus-apache-commons.jar I think HttpClient is not shipped with Struts. No problem here. 4. I change the last line to be one of the following: In which file? The default config file for Log4J is log4j.properties and is expected on the top level of the classpath. If you want to use a different filename or location you must configure Log4J manually from within your application. a) log4j.logger.org.apache.commons=ERROR b) log4j.category.org.apache.commons=ERROR c) log4j.logger.org.apache.commons.httpclient=ERROR NONE of them works! ANYONE CAN THINK OF THE REASON? many thanks! Darren Jiang -- _ NOSE applied intelligence ag ortwin glück [www] http://www.nose.ch software engineer hardturmstrasse 171 [pgp id] 0x81CF3416 8005 zürich [office] +41-1-277 57 35 switzerland [fax] +41-1-277 57 12 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29704] New: - [Doc] List MIME in Standards Compliance list
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29704. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29704 [Doc] List MIME in Standards Compliance list Summary: [Doc] List MIME in Standards Compliance list Product: Commons Version: 2.0 Final Platform: All URL: http://jakarta.apache.org/commons/httpclient/features.ht ml OS/Version: All Status: NEW Severity: Enhancement Priority: Other Component: HttpClient AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] RFC-2045, RFC-2046, RFC-2047 and RFC-2049 in the list. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
getConectionsInUse Question
Hello. Testing the MultiThreadedHttpConnectionManager, I have realized that the number retrieved by calling the getConnectionsInUse methods is independent whether the HTTP connection is actually opened or not. So it's seems to be a counter for the number of connections in pool instead of a counter of really opened connections. Is this true? Is there any way to know the number of really opened connections? I tested this by setting the HTTP header Connection: close. I could see that HttpConnection.close() and HttpConnection.closeSockedAndStreams are called, so I guess connections in pool are really closed. Thank you very much. Juan Pedro Lopez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29588] - Allow polymorphic use of addParameter
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29588. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29588 Allow polymorphic use of addParameter [EMAIL PROTECTED] changed: What|Removed |Added Severity|Normal |Enhancement Target Milestone|--- |4.0 --- Additional Comments From [EMAIL PROTECTED] 2004-06-21 18:43 --- Sounds reasonable. I am afraid this will have to wait until the complete redesign targeted for the release 4.0, though Oleg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29636] - Setting different MAX_HOST_CONNECTION values per host using a single MultiThreadedHttpConnectionManager
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29636. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29636 Setting different MAX_HOST_CONNECTION values per host using a single MultiThreadedHttpConnectionManager [EMAIL PROTECTED] changed: What|Removed |Added Target Milestone|--- |3.0 Alpha 2 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: getConectionsInUse Question
Hi Juan, Yes, you are correct. getConnectionsIsUse() is slightly misleading. Please take a look at bug #29383 http://issues.apache.org/bugzilla/show_bug.cgi?id=29383 for some more details on this one. This bug contains a patch that should resolve the problem. Please let us know if you have any other thoughts, and if this patch fixes the problem for you. Mike On Jun 21, 2004, at 11:05 AM, Juan Pedro López Sáez wrote: Hello. Testing the MultiThreadedHttpConnectionManager, I have realized that the number retrieved by calling the getConnectionsInUse methods is independent whether the HTTP connection is actually opened or not. So it's seems to be a counter for the number of connections in pool instead of a counter of really opened connections. Is this true? Is there any way to know the number of really opened connections? I tested this by setting the HTTP header Connection: close. I could see that HttpConnection.close() and HttpConnection.closeSockedAndStreams are called, so I guess connections in pool are really closed. Thank you very much. Juan Pedro Lopez - 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: Resend: disable httpclient logging
Hello Ortwin, thank you for your help to indentify the reason for this. I did a configuration in my program to use the passed in logging.properties file. I put my code here. - public static void main(String[] args) { if(!checkParameters(args)) { System.out.println(parameter error:); System.out.println(parameter: ALL|RENEWSUB|CANCELSUB); System.exit(-1); } // prepare the system properties String logFile = System.getProperty(log.file); String logConfigFile = System.getProperty(java.util.logging.config.file); System.out.println(log File = + logFile); System.out.println(log ConfigFile = + logConfigFile); // config log4j system PropertyConfigurator.configure(logConfigFile); //use NDC to format log4 entries NDC.clear(); NDC.push(Constants.APPLICATION_DEBUG); - so the program should use log4j logging API in my program, and the configuration parameters is in my passed in BatchLog.properties then the program should disable the debug logging for org.apache.commons package and sub package. but it did not stop the debugging, particular the WIRE package. many thanks! Darren Jiang Ortwin Glück wrote: darren jiang wrote: additional info: 1. this is a standalone java program, 2. the script to launch the java process as follows: - #!/bin/sh CDS_HOME=/opt/cvm CDS_RUNTIME=$CDS_HOME/deployment/cvm echo CDS_HOME =$CDS_HOME echo CDS_RUNTIME=$CDS_RUNTIME #classpath for CDS_RUNTIME CLASSPATH=../.:$CDS_HOME/enhancements/lib/commons-httpclient-2.0.jar:$CDS_RUNTIM E/lib/struts-plus-apache-commons.jar:$CDS_RUNTIME/lib/log4j-1.2.8.jar:$CDS_RUNTI ME/lib/cdslib/cdsapi.jar:$CDS_RUNTIME/lib/cdslib/foundation.jar:$CDS_RUNTIME/ser vice/postpaidservice/lib/postpaidservice.jar:$CDS_HOME/enhancements/lib/infranet /cdk.jar:$CDS_HOME/enhancements/lib/infranet/pcm.jar:$CDS_HOME/enhancements/lib/ infranet/pcmext.jar:$CDS_HOME/enhancements/enhancements.jar:$CDS_HOME/enhancemen ts The classpath contains Log4J. So Log4J will be used by commons-logging. #classpath for deactive Account /cancel subscription CLASSPATH=$CLASSPATH:$CDS_RUNTIME/lib/classes12.zip:$CDS_RUNTIME/lib/xerces.jar: $CDS_RUNTIME/lib/xalan.jar echo $CLASSPATH $JAVA_HOME/bin/java -Djava.util.logging.config.file=/opt/cvm/enhancements/BatchL og.properties -cp $CLASSPATH com.telstra.cvm.cancellation.BatchMain $1 The java.util.logging property will be ignored, since Log4J is preferred over JDK1.4 logging. 3. in its classpath, it contains both httpclient-20.jar and struts-plus-apache-commons.jar I think HttpClient is not shipped with Struts. No problem here. 4. I change the last line to be one of the following: In which file? The default config file for Log4J is log4j.properties and is expected on the top level of the classpath. If you want to use a different filename or location you must configure Log4J manually from within your application. a) log4j.logger.org.apache.commons=ERROR b) log4j.category.org.apache.commons=ERROR c) log4j.logger.org.apache.commons.httpclient=ERROR NONE of them works! ANYONE CAN THINK OF THE REASON? many thanks! Darren Jiang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RESULT: possible bugs:( Re: Resend: disable httpclient logging)
Hello Ortwin and all, I fixed this problem and found that maybe a bug in HttpClient.java I fixed the logging problem using the following: #set error for commons package: log4j.category.org.apache.commons.httpclient=ERROR this can only disable the logging for all package except HttpClient.class. going to the source code, and found following in HttpClient.java -- private static final Log LOG=LogFactory.getLog(HttpClient.class) --- that is why I can not disable the logging for HttpClient.wire I am using following to disable org.apache.commons debugging: log4j.category.org.apache.commons=ERROR, debug, metrics log4j.category.httpclient=ERROR, debug, metrics - this makes the log4j works for my program. so, I 'd like to raise the the bug in HttpClient, the log object should use its package org.apache.commons.httpclient.HttpClient, rather than HttpClient many thanks! Darren Jiang Ortwin Glück wrote: darren jiang wrote: additional info: 1. this is a standalone java program, 2. the script to launch the java process as follows: - #!/bin/sh CDS_HOME=/opt/cvm CDS_RUNTIME=$CDS_HOME/deployment/cvm echo CDS_HOME =$CDS_HOME echo CDS_RUNTIME=$CDS_RUNTIME #classpath for CDS_RUNTIME CLASSPATH=../.:$CDS_HOME/enhancements/lib/commons-httpclient-2.0.jar:$CDS_RUNTIM E/lib/struts-plus-apache-commons.jar:$CDS_RUNTIME/lib/log4j-1.2.8.jar:$CDS_RUNTI ME/lib/cdslib/cdsapi.jar:$CDS_RUNTIME/lib/cdslib/foundation.jar:$CDS_RUNTIME/ser vice/postpaidservice/lib/postpaidservice.jar:$CDS_HOME/enhancements/lib/infranet /cdk.jar:$CDS_HOME/enhancements/lib/infranet/pcm.jar:$CDS_HOME/enhancements/lib/ infranet/pcmext.jar:$CDS_HOME/enhancements/enhancements.jar:$CDS_HOME/enhancemen ts The classpath contains Log4J. So Log4J will be used by commons-logging. #classpath for deactive Account /cancel subscription CLASSPATH=$CLASSPATH:$CDS_RUNTIME/lib/classes12.zip:$CDS_RUNTIME/lib/xerces.jar: $CDS_RUNTIME/lib/xalan.jar echo $CLASSPATH $JAVA_HOME/bin/java -Djava.util.logging.config.file=/opt/cvm/enhancements/BatchL og.properties -cp $CLASSPATH com.telstra.cvm.cancellation.BatchMain $1 The java.util.logging property will be ignored, since Log4J is preferred over JDK1.4 logging. 3. in its classpath, it contains both httpclient-20.jar and struts-plus-apache-commons.jar I think HttpClient is not shipped with Struts. No problem here. 4. I change the last line to be one of the following: In which file? The default config file for Log4J is log4j.properties and is expected on the top level of the classpath. If you want to use a different filename or location you must configure Log4J manually from within your application. a) log4j.logger.org.apache.commons=ERROR b) log4j.category.org.apache.commons=ERROR c) log4j.logger.org.apache.commons.httpclient=ERROR NONE of them works! ANYONE CAN THINK OF THE REASON? many thanks! Darren Jiang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]