Re: [vfs] Adding list children ability to Http provider

2004-06-24 Thread Mario Ivankovits
Gary Gregory wrote:
I would say the HTML parsing should be split out from the HTTP class
since in general the HTTP body could be something else than HTML, XHTML,
DHTML, etc.
 

The ListChildrenStrategy is responsible for
parsing
   

IMHO this is exactly what Eric tries to do.
--
Mario
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: documentation or site (was Re: [all] site generation)

2004-06-24 Thread Paul Libbrecht
This raises the problem of documentation vs site... maven has happily 
brought this together whereas this is indeed a problem.

The case where this was observed was: jelly when checked-out over cvs, 
can't perform the dist goal, because it needs resources of 
commons-build as this is needed to build the site. However, a dist goal 
should be able to actually produce an amount of document on the version 
downloaded...

Moreover, the documentation available through the web should, I 
believe, also be made in several versions, at least it's the case for 
major things like Tomcat.

So... should we not try to separate the two ?
paul
On 23-Jun-04, at 22:21 Uhr, Stephen Colebourne wrote:
Usually you run Maven locally and upload the site manually. I'm not 
sure
anyone is running a cron for it, and I'd recommend not doing so 
because
the published site ends up in line with CVS and not with your latest
stable release. User's then get very confused.
You are right, only the developpement pages should be refreshed then
(changes, commits, activity, tests...). The documentation should stick
to the latest stable release. I have no idea how to achieve this with
Maven though ;)
See [collections]. The maven.xml has a full script for building 
javadoc of
old versions (tested on Maven RC1). The navigation.xml has explicit 
links to
each of the generated javadocs.

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


Re: [all] site generation

2004-06-24 Thread Paul Libbrecht
On 23-Jun-04, at 15:03 Uhr, Mark R. Diggory wrote:
'maven site' run on your local machine will first generate the site 
locally, then tar it up, scp it to minotaur and untar it into your 
sites directory. It has two stages 'site-generate' and 'site-deploy'.

it is wise to run first 'site-generate' and look at the local copy 
generated to verify it was built correctly, then run 'site-deploy' to 
do the copying over to the actual site.
One thing that bothers me in this system is the steps of site-upload, 
doing tar, scp, untar on the server...

The big drawback is that this never cares about removing the previous 
versions... and that means that some pages may stay there unattended 
and some people might have or distribute URLs to it...
I do all my uploads with rsync over ssh (which is also more economic in 
disk-space and bandwidth).  Using the --delete option is exactly what 
you want: it deletes the files that are not in the source. Something 
which you only do when you trust your upload, of course.

This completely replaces site-upload (and we should have a maven plugin 
or ant task for rsync).

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


Re: [all] site generation

2004-06-24 Thread Dion Gillard
This would be a good option to add to the site plugin.

On Thu, 24 Jun 2004 10:54:05 +0200, Paul Libbrecht [EMAIL PROTECTED] wrote:
 
 
 On 23-Jun-04, at 15:03 Uhr, Mark R. Diggory wrote:
  'maven site' run on your local machine will first generate the site
  locally, then tar it up, scp it to minotaur and untar it into your
  sites directory. It has two stages 'site-generate' and 'site-deploy'.
 
  it is wise to run first 'site-generate' and look at the local copy
  generated to verify it was built correctly, then run 'site-deploy' to
  do the copying over to the actual site.
 
 One thing that bothers me in this system is the steps of site-upload,
 doing tar, scp, untar on the server...
 
 The big drawback is that this never cares about removing the previous
 versions... and that means that some pages may stay there unattended
 and some people might have or distribute URLs to it...
 I do all my uploads with rsync over ssh (which is also more economic in
 disk-space and bandwidth).  Using the --delete option is exactly what
 you want: it deletes the files that are not in the source. Something
 which you only do when you trust your upload, of course.
 
 This completely replaces site-upload (and we should have a maven plugin
 or ant task for rsync).
 
 paul
 
 
 
 
 -
 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] FileSystemManager construction rethought

2004-06-24 Thread Rami Ojares
Hi Mario,

Here I have listed my current understanding of VFS in connection with
the configuration issues. Could you please correct any mistakes you find.

- Manager contains FileProviders
- Manager supports all schemas for which it has configured a provider
- FileProviders create a FileSystem the first time a file is resolved against
them
- FileProviders create a new FileSystem everytime a new FileSystemOptions is
encountered
- FileSystem is in a way active meaning that it contains a live connection over
some protocol if that is needed to access the files on the filesystem.
- User can create layered filesystems on top of originating filesystems
- User can create virtual filesystems and add junctions to them

So if these points are correct the configuration data stucture contains the
following:
- Manager specific configuration independent of providers
Q: What are these?
- Provider specific default configuration (manager instantiates and configures the
providers it supports)
- ad hoc configuration when resolveFile is called

And then my understanding of the current configuration mechanism

- StandardFileSystemManager configures the manager and providers from xml
- resolveFile method provides FileSystemOptions that results in creation of
FileSystem if the options were never given before.
- every invocation of resolveFile can potentially result in creation of a
FileSystem
- FileSystemConfigBuilders provide type safety to FileSystemOptions
- FileProvider must provide a FileSystemConfigBuilder that is used to create
FileSystemOptions suitable for that provider's filesystems

== FileSystemOptions are the only configuration data structure in place at the
moment and it is the duty of FileSystemManager and FileProvider implementations
to provide for their own configuration.

Let's consider configuration of a logger to FileSystemManager.
setLogger() is a method in DefaultFileSystemManager.
Further it utilizes setLogger method in VfsComponent interface that is
implemented by FileProviders and FileSystems (among others).

So from the point of view of ant task that wants to set a logger
to the manager it uses, there should be setLogger() in FileSystemManager
interface. Because if it can choose manager implementation then it would
have to use introspection to find setLogger() and it would have no guarentee
that such method exists in the implementation.

This might not be seen as problem. But let's take it further.

Consider ant fragment

vfs-manager refid=mymanager class=MyManager configuration=path/to/conf/

vfs-copy todir=sftp://host/usr/local/var;
vfs-manager ref=mymanager/
/vfs-copy

In the configuration file there would already be pointers to knownHosts and
privateKey files so one would not have to tell them inside the uri.
But if one would tell them for example
sftp://id=/path/to/.private.key;knownHosts=some/[EMAIL PROTECTED]/usr/local/var
then that would just override the providers defaults set from the configuration
file.

Now the configuration (file) can be passed as path, File, FileObject, DOM or
whatever. But it would be nice if FileSystemManager interface would dictate at
least some kind of configuration framework so the ant tasks would not have to
mention any implementations.

- Rami Ojares

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



Re: [vfs] FileSystemManager construction rethought

2004-06-24 Thread Rami Ojares

 Now the configuration (file) can be passed as path, File, FileObject, DOM or
 whatever. 

Here the word Now does not mean that now the implementation is ...
It means In general it is possible ...

- rami

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



cvs commit: jakarta-commons-sandbox/transaction/src/java/org/apache/commons/transaction/util FileHelper.java

2004-06-24 Thread ozeigermann
ozeigermann2004/06/24 03:06:19

  Modified:transaction/src/java/org/apache/commons/transaction/util
FileHelper.java
  Log:
  Appied patch contributed by Marcelo Maciel Liberato
  
  Revision  ChangesPath
  1.3   +11 -4 
jakarta-commons-sandbox/transaction/src/java/org/apache/commons/transaction/util/FileHelper.java
  
  Index: FileHelper.java
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/transaction/src/java/org/apache/commons/transaction/util/FileHelper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FileHelper.java   12 Jun 2004 13:39:25 -  1.2
  +++ FileHelper.java   24 Jun 2004 10:06:19 -  1.3
  @@ -131,6 +131,13 @@
   }
   }
   sourceDir.delete();
  +} else {
  +throw new IOException(
  +sourceDir '
  ++ sourceDir.getCanonicalPath()
  ++ ' and targetDir '
  ++ targetDir.getCanonicalPath()
  ++ ' must be directories and exist to perform a move);
   }
   }
   
  
  
  

-
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

2004-06-24 Thread Rami Ojares
Daniel wrote:

 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.

Very true. It is also obvious that java has followed in the footsteps
of Perl that has much longer history with regexes. The reason they are not
compatible is the lack of standardisation on the perl side.
Since Java folks have always put much effort on internationalization
I think Java regexes have made extra effort with handling of Unicode.

If regexes would be standardized then Perl deserves to have the biggest word
in that committee.

However for that standard I feel that all the aspects of the language should be
encoded inside the language rather than outside (like embedded sql or quotemeta()
in regexes) Else the language will never be defined exactly but will have loose 
boundaries.

 In general, most regular expressions you see in the wild can be
 simplified and don't require unusual constructs.  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)?

I am using quoting with dynamic input so I need the feature.
Now I have been told that I need to support JAVA, PERL5 and POSIX syntaxes.
So in case of Java I have to use \\Q and \\E
In case of PERL5 I have to use quotemeta()
And in case of POSIX I have no clue !

 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)?

Thanks for the tip! I am an occasional regex user :=)

  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.

Thank you for understanding my intention so well !

 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).
(And from above)
 There has to be a user driver for these small things to happen.

I think there is a user driver for the fact that users could read one
well written documentation about regexes and use them worry free.
Don't you think?

- rami

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



Re: [vfs] FileSystemManager construction rethought

2004-06-24 Thread Mario Ivankovits
Rami Ojares wrote:
All you have written seems right - hard work ;-)
But if one would tell them for example
sftp://id=/path/to/.private.key;knownHosts=some/[EMAIL PROTECTED]/usr/local/var
then that would just override the providers defaults set from the configuration
file.
 

But i have to say i dont like to add all those configuration stuff to 
the uri - maybe this might be a handy place, but adding e.g. path 
elements like those in your example might be a real pain. It might be 
really hard to construct a correct uri.

Now the configuration (file) can be passed as path, File, FileObject, DOM or
whatever. But it would be nice if FileSystemManager interface would dictate at
least some kind of configuration framework so the ant tasks would not have to
mention any implementations.
 

I can second this too, and i see not discrepance to the current system.
vfs-manager refid=mymanager class=MyManager configuration=path/to/conf/
vfs-options id=options1
vfs-option scheme=http name=proxyHost value=yourProxyHost /
vfs-option scheme=sftp name=userInfo className=yourUserInfoImplementation 
/
vfs-option scheme=sftp name=knownHosts value=/path/to /
vfs-option scheme=sftp name=identities
valuepath/to/ident1/value
valuepath/to/ident2/value
/vfs-options
/vfs-options
vfs-options id=options2
vfs-option ... some other configuration ... /
/vfs-options
Now there could be a class e.g. GeneralFileSystemConfigBuilder with
(vfs-options name= value=)
setConfigValue(String scheme, String name, String value)
(vfs-options name= value/value)
setConfigValue(String scheme, String name, String[] values)
(vfs-options name= className=)
setConfigClass(String scheme, String name, String className)
Which tries to locate the correct *FileSystemConfigBuilder, tries to 
convert the given value/class to the expected parameter and calls the 
method.
All this can be done using reflection and a configuration mistake is 
fastly shown.
I will implement this class if we find a consent.

Now there is the problem how to connect the options to a given uri.
Maybe, if we do not connect them to the uri we could use a construct 
like this.

vfs-copy todir=sftp://host/usr/local/var;
   vfs-manager ref=mymanager/
   vfs-options ref=options1/
/vfs-copy
Or i can think about an easy implementation like this:
vfs-copy todir=[EMAIL PROTECTED]://host/usr/local/var
   vfs-manager ref=mymanager/
/vfs-copy
Then the ant task should strip the @options1 and lookup a table to find 
the FileSystemOptions for resolvFile()

To do the same with the FileSystemManager - as you have said - we have 
to create a separate data structure first.
I will have a look at it, but for now we can stick on the xml file.

Might this find your acceptance?
--
Mario
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [vfs] FileSystemManager construction rethought

2004-06-24 Thread Rami Ojares

 But i have to say i dont like to add all those configuration stuff to 
 the uri - maybe this might be a handy place, but adding e.g. path 
 elements like those in your example might be a real pain. It might be 
 really hard to construct a correct uri.

I agree. It was just an example.

 Now there could be a class e.g. GeneralFileSystemConfigBuilder with
 
 (vfs-options name= value=)
 setConfigValue(String scheme, String name, String value)
 (vfs-options name= value/value)
 setConfigValue(String scheme, String name, String[] values)
 (vfs-options name= className=)
 setConfigClass(String scheme, String name, String className)
 
 
 Which tries to locate the correct *FileSystemConfigBuilder, tries to 
 convert the given value/class to the expected parameter and calls the 
 method.
 All this can be done using reflection and a configuration mistake is 
 fastly shown.
 I will implement this class if we find a consent.

Nice. Very nice.

 Now there is the problem how to connect the options to a given uri.

Ant can always call resolveFile(String name, FileSystemOptions fileSystemOptions)
to resolve files if the task or datatype has been provided with some
options.

 vfs-copy todir=[EMAIL PROTECTED]://host/usr/local/var
 
 vfs-manager ref=mymanager/
 
 /vfs-copy
 Then the ant task should strip the @options1 and lookup a table to find 
 the FileSystemOptions for resolvFile()

Maybe not. :)

 To do the same with the FileSystemManager - as you have said - we have 
 to create a separate data structure first.
 I will have a look at it, but for now we can stick on the xml file.

The addition that I was thinking would be minor.
Keep XML configuration the way it is but add
configure(File/FileObject/InputStream) to FileSystemManager interface.

And document the syntax of the xml file that is used to configure
manager and providers.
 
 Might this find your acceptance?

Full acceptance with satisfaction guaranteed.

- rami


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



Re: [Validator] 1.1.3 ALPHA release available

2004-06-24 Thread David Graham
I downloaded the binary distro and everything looked in order.

David

--- Ted Husted [EMAIL PROTECTED] wrote:
 I've tagged the 1.1.2 branch, and rolled the Validator 1.1.3 alpha
 release. It is posted in my Apache home directory for review:
 
 - http://www.apache.org/~husted/validator/v1.1.3/
 
 Please review the release and advise whether you believe we should
 promote the release to Beta or General Release quality.
 
 I'm still reviewing the signing procedures, and should this release past
 the Alpha stage, I will sign and mirror it as appropriate.
 
 -Ted.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



javax.xml.xpath in JDK1.5

2004-06-24 Thread Davanum Srinivas
Looks javax.xml.xpath is a TraX/commons-logging type of layer which in
turn uses the repackaged version of xalan for the default impl.

-- dims

C:\junkjava -Djaxp.debug=true x
JAXP: find factoryId =javax.xml.parsers.DocumentBuilderFactory
JAXP: loaded from fallback value:
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
JAXP: created new instance of class
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
using ClassLoader: [EMAIL PROTECTED]
JAXP: using thread context class loader
([EMAIL PROTECTED]) for search
JAXP: Looking up system property
'javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom'
JAXP: The property is undefined.
JAXP: Tried to read C:\JDK15\jre\lib\jaxp.properties, but it doesn't exist.
JAXP: no META-INF/services/javax.xml.xpath.XPathFactory file was found
JAXP: attempting to use the platform default W3C DOM XPath lib
JAXP: instanciating com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl
JAXP: loaded it from
jar:file:/C:/JDK15/jre/lib/rt.jar!/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.class
JAXP: factory 'com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl'
was found for http://java.sun.com/jaxp/xpath/dom
[EMAIL PROTECTED]

-- dims

On Tue, 22 Jun 2004 12:59:11 -0400, Norman Walsh [EMAIL PROTECTED] wrote:
 
 / Davanum Srinivas [EMAIL PROTECTED] was heard to say:
 | on com.sun.org.apache.xalan???
 
 Uhm. No, I think javax.xml.XPath imports/uses/extends
 org.apache.xalan. But I'm not sure so don't quote me :-/ I haven't
 really had time to look closely at the RI.
 
 Be seeing you,
   norm
 
 --
 Norman Walsh [EMAIL PROTECTED] | It is seldom that any liberty is lost
 http://nwalsh.com/| all at once.--David Hume
 
 
 
 noname - 1K
 




-- 
Davanum Srinivas - http://webservices.apache.org/~dims/

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



RE: [vfs] Adding list children ability to Http provider

2004-06-24 Thread Gary Gregory
I have not looked a VFS code in a while, I am suggesting that the class
names need to reflect this HTML vs HTTP split.

Thank you,
Gary 

 -Original Message-
 From: Mario Ivankovits [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 23, 2004 23:17
 To: Jakarta Commons Developers List
 Subject: Re: [vfs] Adding list children ability to Http provider
 
 Gary Gregory wrote:
 
 I would say the HTML parsing should be split out from the HTTP class
 since in general the HTTP body could be something else than HTML,
XHTML,
 DHTML, etc.
 
 
 The ListChildrenStrategy is responsible for
 parsing
 
 
 IMHO this is exactly what Eric tries to do.
 
 --
 Mario
 
 
 -
 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 29787] - Emailvalidation doesn't accept umlauts and the new generic top level domain names

2004-06-24 Thread bugzilla
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=29787.
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=29787

Emailvalidation doesn't accept umlauts and the new generic top level domain names





--- Additional Comments From [EMAIL PROTECTED]  2004-06-24 17:43 ---
Despite the acceptance of IDN, email address format is still governed by
RFC 821
http://www.ietf.org/rfc/rfc0821.txt
and it requires an email address (mailbox) composed of strictly ASCII
characters only.  

Also note that the IDN only addresses the domain name portion.  It does not
apply to the user id portion of the email address of [EMAIL PROTECTED]

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



[DBCP] DriverConnectionFactory example in docs won't compile

2004-06-24 Thread Tim Rapp

The first code block in
http://jakarta.apache.org/commons/dbcp/apidocs/org/apache/commons/dbcp/package-summary.html#package_description
 has two compilation errors with DBCP 1.2.1.

Here is the code block:
GenericObjectPool connectionPool = new
GenericObjectPool(null);
DriverManagerConnectionFactory connectionFactory = new
DriverConnectionFactory(jdbc:some:connect:string,null);
PoolableConnectionFactory poolableConnectionFactory =
new
PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,true);
PoolingDataSource dataSource = new
PoolingDataSource(connectionPool);


and here is the compilation error:

compile:
 [echo] Compiling with java version 1.4 using
jikes
[javac] 50. DriverManagerConnectionFactory
connectionFactory = new
DriverConnectionFactory(jdbc:some:connect:string,null);
[javac]   
^--^
[javac] *** Semantic Error: The type of the right
sub-expression,
org.apache.commons.dbcp.DriverConnectionFactory, is
not assignable to the variable, of type
org.apache.commons.dbcp.DriverManagerConnectionFactory.


[javac] 50. DriverManagerConnectionFactory
connectionFactory = new
DriverConnectionFactory(jdbc:some:connect:string,null);
[javac]   
   
^--^
[javac] *** Semantic Error: No applicable overload
was found for a constructor of type
org.apache.commons.dbcp.DriverConnectionFactory.
Perhaps you wanted the overloaded version
DriverConnectionFactory(java.sql.Driver $1,
java.lang.String $2, java.util.Properties $3);
instead?


The source for this javadoc is at
src/java/org/apache/commons/dbcp/package.html

I'd fix it myself, but since I'm brand new to DBCP it
would be better to have someone more experienced fix
it.


Thanks,

Tim



__
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail

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



DO NOT REPLY [Bug 29791] New: - DriverManagerConnectionFactory: blank username/password handling

2004-06-24 Thread bugzilla
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=29791.
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=29791

DriverManagerConnectionFactory: blank username/password handling

   Summary: DriverManagerConnectionFactory: blank username/password
handling
   Product: Commons
   Version: 1.2 Final
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Minor
  Priority: Other
 Component: Dbcp
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Mail from Maxwell Grender-Jones (on commons-dev 24 june 2004)
-
If you supply a username but not a password, or a password but not a
username, dbcp ignores these values, and simply uses the URL to connect
to your database (even when defaults exist for the null values). This
means if I create a DriverManagerConnectionFactory with url, user and
pass of mydburl, myusername, null, it will try connect to mydburl using
default username and default password rather than myusername and default
password.

The solution:
Allow the default username and password values to be used when one is
present but the other is not, as provided by the patch. Now I realise
default usernames/passwords are not ideal, but at the same time there's
no need to prevent this functionality from working (imho).

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



DO NOT REPLY [Bug 29791] - DriverManagerConnectionFactory: blank username/password handling

2004-06-24 Thread bugzilla
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=29791.
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=29791

DriverManagerConnectionFactory: blank username/password handling





--- Additional Comments From [EMAIL PROTECTED]  2004-06-24 18:30 ---
Created an attachment (id=11943)
patch from Maxwell Grender-Jones

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



cvs commit: jakarta-commons/dbcp/src/java/org/apache/commons/dbcp DriverManagerConnectionFactory.java

2004-06-24 Thread dirkv
dirkv   2004/06/24 11:32:53

  Modified:dbcp/src/java/org/apache/commons/dbcp
DriverManagerConnectionFactory.java
  Log:
  Bugzilla Bug 29791: DriverManagerConnectionFactory: blank username/password handling
  - issue report  fix provided by Maxwell Grender-Jones
  
  Revision  ChangesPath
  1.9   +2 -2  
jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/DriverManagerConnectionFactory.java
  
  Index: DriverManagerConnectionFactory.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/DriverManagerConnectionFactory.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DriverManagerConnectionFactory.java   28 Feb 2004 12:18:17 -  1.8
  +++ DriverManagerConnectionFactory.java   24 Jun 2004 18:32:53 -  1.9
  @@ -42,7 +42,7 @@
   
   public Connection createConnection() throws SQLException {
   if(null == _props) {
  -if((_uname == null) || (_passwd == null)) {
  +if((_uname == null)  (_passwd == null)) {
   return DriverManager.getConnection(_connectUri);
   } else {
   return DriverManager.getConnection(_connectUri,_uname,_passwd);
  
  
  

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



DO NOT REPLY [Bug 29791] - DriverManagerConnectionFactory: blank username/password handling

2004-06-24 Thread bugzilla
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=29791.
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=29791

DriverManagerConnectionFactory: blank username/password handling

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2004-06-24 18:36 ---
Patch applied

DriverManagerConnectionFactory.java   Revision : 1.9   Date : 2004/6/24 18:32:53

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



cvs commit: jakarta-commons/betwixt/xdocs tasks.xml

2004-06-24 Thread rdonkin
rdonkin 2004/06/24 11:36:02

  Modified:betwixt/xdocs tasks.xml
  Log:
  Added empty tag rendering to done tasks list.
  
  Revision  ChangesPath
  1.30  +1 -0  jakarta-commons/betwixt/xdocs/tasks.xml
  
  Index: tasks.xml
  ===
  RCS file: /home/cvs/jakarta-commons/betwixt/xdocs/tasks.xml,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- tasks.xml 13 Jun 2004 21:32:49 -  1.29
  +++ tasks.xml 24 Jun 2004 18:36:02 -  1.30
  @@ -402,6 +402,7 @@
/li
/ul
   /li
  +listrongImproved empty element rendering/strong/li
   /ul
   /subsection
   /section
  
  
  

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



Re: [dbcp] [PATCH] Fix for blank username/password handling

2004-06-24 Thread Dirk Verbeeck
Patch applied
Thanks
Dirk
Maxwell Grender-Jones wrote:
The problem (in DriverManagerConnectionFactory.java):
If you supply a username but not a password, or a password but not a
username, dbcp ignores these values, and simply uses the URL to connect
to your database (even when defaults exist for the null values). This
means if I create a DriverManagerConnectionFactory with url, user and
pass of mydburl, myusername, null, it will try connect to mydburl using
default username and default password rather than myusername and default
password.
The solution:
Allow the default username and password values to be used when one is
present but the other is not, as provided by the patch. Now I realise
default usernames/passwords are not ideal, but at the same time there's
no need to prevent this functionality from working (imho).
Regards,
Max

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


cvs commit: jakarta-commons/betwixt/xdocs/guide output.xml

2004-06-24 Thread rdonkin
rdonkin 2004/06/24 11:36:30

  Modified:betwixt/xdocs/guide output.xml
  Log:
  Added documentation for empty tag rendering.
  
  Revision  ChangesPath
  1.3   +14 -0 jakarta-commons/betwixt/xdocs/guide/output.xml
  
  Index: output.xml
  ===
  RCS file: /home/cvs/jakarta-commons/betwixt/xdocs/guide/output.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- output.xml11 Apr 2004 10:53:49 -  1.2
  +++ output.xml24 Jun 2004 18:36:30 -  1.3
  @@ -39,6 +39,20 @@
   Note that only document fragments are created so you may need to append any
   prologs before writing the bean.
   /p
  +subsection name='Rendering Empty Tags'
  +p
  +Empty tags (ones containing no body content and no child nodes) can be rendered 
  +in two ways: as a single closed tag (for example codelt;element/gt;/code) or 
as a 
  +pair of tags (codelt;elementgt;lt;/elementgt;/code). By default, Betwixt
  +renders empty tags as a single close tag but setting the codeBeanWriter/code
  +codeendTagForEmptyElement/code to true will ensures that all empty elements are 
  +rendered as a pair of tags. For example:
  +/p
  +source
  +BeanWriter writer = new BeanWriter(out);
  +writer.setEndTagForEmptyElement(true);
  +/source
  +/subsection
   subsection name='Content Encoding'
   p
   When writing character data (the content between markup tags) to a textual stream,
  
  
  

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



cvs commit: jakarta-commons/dbcp/src/java/org/apache/commons/dbcp package.html

2004-06-24 Thread dirkv
dirkv   2004/06/24 11:57:29

  Modified:dbcp/src/java/org/apache/commons/dbcp package.html
  Log:
  fix DriverManagerConnectionFactory example in javadoc
  
  Revision  ChangesPath
  1.3   +3 -3  
jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/package.html
  
  Index: package.html
  ===
  RCS file: 
/home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/package.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- package.html  22 Aug 2003 16:59:11 -  1.2
  +++ package.html  24 Jun 2004 18:57:29 -  1.3
  @@ -96,7 +96,7 @@
 /pp
In code, that might look like this:
   preGenericObjectPool connectionPool = new GenericObjectPool(null);
  -DriverManagerConnectionFactory connectionFactory = new 
DriverConnectionFactory(jdbc:some:connect:string,null);
  +ConnectionFactory connectionFactory = new 
DriverManagerConnectionFactory(jdbc:some:connect:string, username, password);
   PoolableConnectionFactory poolableConnectionFactory = new 
PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,true);
   PoolingDataSource dataSource = new PoolingDataSource(connectionPool);/pre
 /pp
  @@ -105,7 +105,7 @@
we create a [EMAIL PROTECTED] org.apache.commons.dbcp.PoolingDriver}, and 
register the
ttconnectionPool/tt with it.  E.g.,:
   preGenericObjectPool connectionPool = new GenericObjectPool(null);
  -DriverManagerConnectionFactory connectionFactory = new 
DriverConnectionFactory(jdbc:some:connect:string,null);
  +ConnectionFactory connectionFactory = new 
DriverManagerConnectionFactory(jdbc:some:connect:string, username, password);
   PoolableConnectionFactory poolableConnectionFactory = new 
PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,true);
   PoolingDriver driver = new PoolingDriver();
   driver.registerPool(example,connectionPool);/pre
  
  
  

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



Re: [DBCP] DriverConnectionFactory example in docs won't compile

2004-06-24 Thread Dirk Verbeeck
Hi Tim,
I have updated the javadoc.
More examples can be found here:
http://cvs.apache.org/viewcvs/jakarta-commons/dbcp/doc/
Cheers
Dirk
Tim Rapp wrote:
The first code block in
http://jakarta.apache.org/commons/dbcp/apidocs/org/apache/commons/dbcp/package-summary.html#package_description
 has two compilation errors with DBCP 1.2.1.
Here is the code block:
snip
The source for this javadoc is at
src/java/org/apache/commons/dbcp/package.html
I'd fix it myself, but since I'm brand new to DBCP it
would be better to have someone more experienced fix
it.
Thanks,
Tim


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


cvs commit: jakarta-commons/betwixt/xdocs tasks.xml

2004-06-24 Thread rdonkin
rdonkin 2004/06/24 12:42:13

  Modified:betwixt/xdocs tasks.xml
  Log:
  Sorted tasks in those that had been done for 0.5 and those which were done 
afterwards.
  
  Revision  ChangesPath
  1.31  +73 -63jakarta-commons/betwixt/xdocs/tasks.xml
  
  Index: tasks.xml
  ===
  RCS file: /home/cvs/jakarta-commons/betwixt/xdocs/tasks.xml,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- tasks.xml 24 Jun 2004 18:36:02 -  1.30
  +++ tasks.xml 24 Jun 2004 19:42:13 -  1.31
  @@ -184,7 +184,23 @@
   /subsection
   /section
   section name='Completed'
  -subsection name='Since 1.0-Alpha 1 Release'
  +subsection name='Since 0.5'
  +listrongImproved empty element rendering/strong/li
  +li
  +strongExtended betwixt file/strong by adding two new properties 
  +to lt;addDefaultsgt; that allow matching properties or adders to be
  +supressed.
  +/li
  +li
  +strongSimpleTypeMapper strategy/strong for finely grained control over simple 
type (primitive) 
  +binding.
  +/li
  +li
  +strongImproved support for reading arrays./strong In particular added code to 
support
  +reading of array valued property setters and for array valued adders.
  +/li
  +/subsection
  +subsection name='0.5'
   ul
   li
   strongAdded support for CDATA encoding/strong through strategy
  @@ -291,24 +307,41 @@
   strongCDATA encoding support/strong add support for flexible coding of body 
text as CDATA
   sections (in addition to character escaping).
   /li
  -li
  -strongExtended betwixt file/strong by adding two new properties 
  -to lt;addDefaultsgt; that allow matching properties or adders to be
  -supressed.
  -/li
  -li
  -strongSimpleTypeMapper strategy/strong for finely grained control over simple 
type (primitive) 
  -binding.
  -/li
  -li
  -strongImproved support for reading arrays./strong In particular added code to 
support
  -reading of array valued property setters and for array valued adders.
  -/li
   /ul
   /subsection
   /section
   section name='Deprecated'
  -subsection name='Since 1.0-Alpha 1 Release'
  +subsection name='Since 0.5'
  +ul
  +listrongRefactoring (more declarative descriptors)/strong
  + ul
  + listrongElementDescriptor/strong
  + ul
  + licodeWrapCollectionsInElement/code 
property removed/li
  + licodePrimitiveType/code property 
removed/li
  + /ul
  + /li
  + listrongXMLIntrospectorHelper/strong this will be 
deprecated./li
  + /ul
  +/li
  +listrongRefactored introspection configuration into separate 
class/strong
  + ul
  + listrongXMLIntrospector/strong
  + ul
  + liuseBeanInfoSearchPath property/li
  + liAttributeNameMapper property/li
  + liElementNameMapper property/li
  + liPluralStemmer property/li
  + liWrapCollectionsInElement property/li
  + liAttributesForPrimitives property/li
  + liClassNormalizer property/li
  + /ul
  + /li
  + /ul
  +/li
  +/ul
  +/subsection
  +subsection name='0.5'
   ul
   listrongAdding context parameter to SAX style API/strong
   ul
  @@ -376,44 +409,40 @@
   /li
   /ul
   /li
  -listrongRefactoring (more declarative descriptors)/strong
  - ul
  - listrongElementDescriptor/strong
  - ul
  - licodeWrapCollectionsInElement/code 
property removed/li
  - licodePrimitiveType/code property 
removed/li
  - /ul
  - /li
  - listrongXMLIntrospectorHelper/strong this will be 
deprecated./li
  - /ul
  -/li
  -listrongRefactored introspection configuration into separate 
class/strong
  - ul
  - listrongXMLIntrospector/strong
  - ul
  - 

cvs commit: jakarta-commons/math build.xml

2004-06-24 Thread brentworden
brentworden2004/06/24 13:45:04

  Modified:math build.xml
  Log:
  regenerated Ant script using relative paths.
  
  Revision  ChangesPath
  1.18  +7 -7  jakarta-commons/math/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-commons/math/build.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- build.xml 23 Jun 2004 13:43:23 -  1.17
  +++ build.xml 24 Jun 2004 20:45:04 -  1.18
  @@ -1,20 +1,20 @@
   ?xml version=1.0 encoding=UTF-8?
   
   !--build.xml generated by maven from project.xml version 1.0-dev
  -  on date June 23 2004, time 0841--
  +  on date June 24 2004, time 1543--
   
   project default=jar name=commons-math basedir=.
  -  property name=defaulttargetdir 
value=C:\files\projects\apache\jakarta-commons\math/target
  +  property name=defaulttargetdir value=target
 /property
  -  property name=libdir 
value=C:\files\projects\apache\jakarta-commons\math/target/lib
  +  property name=libdir value=target/lib
 /property
  -  property name=classesdir 
value=C:\files\projects\apache\jakarta-commons\math/target/classes
  +  property name=classesdir value=target/classes
 /property
  -  property name=testclassesdir 
value=C:\files\projects\apache\jakarta-commons\math/target/test-classes
  +  property name=testclassesdir value=target/test-classes
 /property
  -  property name=testclassesdir 
value=C:\files\projects\apache\jakarta-commons\math/target/test-classes
  +  property name=testclassesdir value=target/test-classes
 /property
  -  property name=testreportdir 
value=C:\files\projects\apache\jakarta-commons\math/target/test-reports
  +  property name=testreportdir value=target/test-reports
 /property
 property name=distdir value=dist
 /property
  
  
  

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



cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient Wire.java ConnectMethod.java WireLogInputStream.java WireLogOutputStream.java HttpMethodBase.java HttpConnection.java

2004-06-24 Thread mbecke
mbecke  2004/06/24 14:39:53

  Modified:httpclient/src/java/org/apache/commons/httpclient Wire.java
ConnectMethod.java WireLogInputStream.java
WireLogOutputStream.java HttpMethodBase.java
HttpConnection.java
  Log:
  Split wire log into header and body parts.
  
  PR: 29549
  Submitted by: Michael Becke
  Reviewed by: Oleg Kalnichevski
  
  Revision  ChangesPath
  1.9   +28 -24
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Wire.java
  
  Index: Wire.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Wire.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Wire.java 18 Apr 2004 23:51:35 -  1.8
  +++ Wire.java 24 Jun 2004 21:39:52 -  1.9
  @@ -44,10 +44,18 @@
*/
   class Wire {
   
  +public static Wire HEADER_WIRE = new 
Wire(LogFactory.getLog(httpclient.wire.header));
  +
  +public static Wire CONTENT_WIRE = new 
Wire(LogFactory.getLog(httpclient.wire.content));
  +
   /** Log for any wire messages. */
  -private static final Log WIRE_LOG = LogFactory.getLog(httpclient.wire);
  -
  -private static void wire(String header, InputStream instream)
  +private Log log;
  +
  +private Wire(Log log) {
  +this.log = log;
  +}
  +
  +private void wire(String header, InputStream instream)
 throws IOException {
   StringBuffer buffer = new StringBuffer();
   int ch;
  @@ -58,7 +66,7 @@
   buffer.append([\\n]\);
   buffer.insert(0, \);
   buffer.insert(0, header);
  -WIRE_LOG.debug(buffer.toString());
  +log.debug(buffer.toString());
   buffer.setLength(0);
   } else if ((ch  32) || (ch  127)) {
   buffer.append([0x);
  @@ -72,20 +80,16 @@
   buffer.append(\);
   buffer.insert(0, \);
   buffer.insert(0, header);
  -WIRE_LOG.debug(buffer.toString());
  +log.debug(buffer.toString());
   }
   }
   
   
  -public static final boolean enabled() {
  -return WIRE_LOG.isDebugEnabled();
  -}
  -
  -public static final boolean traceEnabled() {
  -return WIRE_LOG.isTraceEnabled();
  +public boolean enabled() {
  +return log.isDebugEnabled();
   }
   
  -public static final void output(InputStream outstream)
  +public void output(InputStream outstream)
 throws IOException {
   if (outstream == null) {
   throw new IllegalArgumentException(Output may not be null); 
  @@ -93,7 +97,7 @@
   wire( , outstream);
   }
   
  -public static final void input(InputStream instream)
  +public void input(InputStream instream)
 throws IOException {
   if (instream == null) {
   throw new IllegalArgumentException(Input may not be null); 
  @@ -101,7 +105,7 @@
   wire( , instream);
   }
   
  -public static final void output(byte[] b, int off, int len)
  +public void output(byte[] b, int off, int len)
 throws IOException {
   if (b == null) {
   throw new IllegalArgumentException(Output may not be null); 
  @@ -109,7 +113,7 @@
   wire( , new ByteArrayInputStream(b, off, len));
   }
   
  -public static final void input(byte[] b, int off, int len)
  +public void input(byte[] b, int off, int len)
 throws IOException {
   if (b == null) {
   throw new IllegalArgumentException(Input may not be null); 
  @@ -117,7 +121,7 @@
   wire( , new ByteArrayInputStream(b, off, len));
   }
   
  -public static final void output(byte[] b)
  +public void output(byte[] b)
 throws IOException {
   if (b == null) {
   throw new IllegalArgumentException(Output may not be null); 
  @@ -125,7 +129,7 @@
   wire( , new ByteArrayInputStream(b));
   }
   
  -public static final void input(byte[] b)
  +public void input(byte[] b)
 throws IOException {
   if (b == null) {
   throw new IllegalArgumentException(Input may not be null); 
  @@ -133,17 +137,17 @@
   wire( , new ByteArrayInputStream(b));
   }
   
  -public static final void output(int b)
  +public void output(int b)
 throws IOException {
   output(new byte[] {(byte) b});
   }
   
  -public static final void input(int b)
  +public void input(int b)
 throws IOException {
   input(new byte[] {(byte) b});
   }
   
  -public static final void output(final String s)
  +public void output(final String s)
 throws IOException {
   

Re: documentation or site (was Re: [all] site generation)

2004-06-24 Thread Brett Porter
Quoting Paul Libbrecht [EMAIL PROTECTED]:

 This raises the problem of documentation vs site... maven has happily 
 brought this together whereas this is indeed a problem.

I'd like to follow this discussion from a general point of view as this is
something we've long wanted to resolve in Maven itself. I see there are a few
more responses which I'll have to read through later, but generally I think that
site should = documentation (although different formats should be available),
but that release-dependant doco (eg release notes, javadocs and other reports)
needs to be separated from release-independant doco (eg FAQ). This means that
you can maintain differing websites for the last release versus up to date
information.

One trick is that some things are not clearly one or the other (eg installation
instructions are not really release dependant, but can change over time). I'd be
inclined to keep such things as release-independant and start adding notes to
the document about features only in version X or things that are deprecated and
will soon be removed.

If you have any ideas about this where Maven can help - shoot them across to the
Maven dev list.

Cheers,
Brett


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



DO NOT REPLY [Bug 29794] New: - Add convenience format(long) methods to FastDateFormat

2004-06-24 Thread bugzilla
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=29794.
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=29794

Add convenience format(long) methods to FastDateFormat

   Summary: Add convenience format(long) methods to FastDateFormat
   Product: Commons
   Version: 2.0 Final
  Platform: All
OS/Version: Other
Status: NEW
  Severity: Enhancement
  Priority: Other
 Component: Lang
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


it is sometimes necessary to format based on a long timeInMillis [for instance 
either directly from System.currentTimeInMillis or from a File.lastModified()].

I have an extension of FastDateFormat that adds the following methods to 
support this:

/**
 * pFormats a codelong/code timeInMillis. Useful if you don't 
want 
 * to create a Date or don't have a Calendar intance/p
 * 
 * @param date the new time in UTC milliseconds from the epoch 
(1/1/1970).
 * @return the formatted string
 */
public String format(long timeInMillis) {
return format(timeInMillis, new StringBuffer
(mMaxLengthEstimate)).toString();
}

/**
 * pFormats a codelong/code timeInMillis. Useful if you don't 
want 
 * to create a Date or don't have a Calendar intance/p
 * 
 * @param date the new time in UTC milliseconds from the epoch 
(1/1/1970).
 * @return the formatted string
 */
public StringBuffer format(long timeInMillis, StringBuffer buf) {
class UtilGregorianCalendar extends GregorianCalendar {
UtilGregorianCalendar(TimeZone timeZone) {
super(timeZone);
}

public void setTimeInMillis(long timeInMillis) {
super.setTimeInMillis(timeInMillis);
}
}

UtilGregorianCalendar c = new UtilGregorianCalendar(mTimeZone);
c.setTimeInMillis(timeInMillis);
return applyRules(c, buf);
}

and a minor change to format(Object, StringBuffer, FieldPosition:

else if (obj instanceof Long) {
return format(((Long) obj).longValue(), toAppendTo);
}

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



cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient ConnectMethod.java WireLogInputStream.java HttpMethodBase.java HttpConnection.java WireLogOutputStream.java Wire.java

2004-06-24 Thread mbecke
mbecke  2004/06/24 20:27:40

  Modified:httpclient/src/java/org/apache/commons/httpclient Tag:
HTTPCLIENT_2_0_BRANCH ConnectMethod.java
WireLogInputStream.java HttpMethodBase.java
HttpConnection.java WireLogOutputStream.java
Wire.java
  Log:
  Split wire log into header and body parts.
  
  PR: 29549
  Submitted by: Michael Becke
  Reviewed by: Oleg Kalnichevski
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.18.2.3  +7 -7  
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ConnectMethod.java
  
  Index: ConnectMethod.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ConnectMethod.java,v
  retrieving revision 1.18.2.2
  retrieving revision 1.18.2.3
  diff -u -r1.18.2.2 -r1.18.2.3
  --- ConnectMethod.java22 Feb 2004 18:21:13 -  1.18.2.2
  +++ ConnectMethod.java25 Jun 2004 03:27:40 -  1.18.2.3
  @@ -39,7 +39,7 @@
   /**
* pWraps another method to tunnel through a proxy./p
*
  - * @author Ortwin Glück
  + * @author Ortwin Gl�ck
* @author dIon Gillard
* @author a href=mailto:[EMAIL PROTECTED]Mike Bowler/a
* @author a href=mailto:[EMAIL PROTECTED]Oleg Kalnichevski/a
  @@ -230,8 +230,8 @@
   buffer.append( HTTP/1.1); 
   String line = buffer.toString();
   conn.printLine(line);
  -if (Wire.enabled()) {
  -Wire.output(line);
  +if (Wire.HEADER_WIRE.enabled()) {
  +Wire.HEADER_WIRE.output(line);
   }
   }
   
  
  
  
  1.12.2.2  +14 -9 
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/WireLogInputStream.java
  
  Index: WireLogInputStream.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/WireLogInputStream.java,v
  retrieving revision 1.12.2.1
  retrieving revision 1.12.2.2
  diff -u -r1.12.2.1 -r1.12.2.2
  --- WireLogInputStream.java   22 Feb 2004 18:21:13 -  1.12.2.1
  +++ WireLogInputStream.java   25 Jun 2004 03:27:40 -  1.12.2.2
  @@ -38,7 +38,7 @@
   /**
* Logs all data read to the wire LOG.
*
  - * @author Ortwin Glück
  + * @author Ortwin Gl�ck
* @author a href=mailto:[EMAIL PROTECTED]Mike Bowler/a
* @author a href=mailto:[EMAIL PROTECTED]Oleg Kalnichevski/a
* 
  @@ -48,15 +48,20 @@
   class WireLogInputStream extends FilterInputStream {

   /** Original input stream. */
  -private InputStream in;
  +private InputStream in;
   
  +/** The wire log to use for writing. */
  +private Wire wire;
  +
   /**
* Create an instance that wraps the specified input stream.
* @param in The input stream.
  + * @param wire The wire log to use.
*/
  -public WireLogInputStream(InputStream in) {
  +public WireLogInputStream(InputStream in, Wire wire) {
   super(in);
   this.in = in;
  +this.wire = wire;
   }
   /**
* 
  @@ -65,7 +70,7 @@
   public int read(byte[] b, int off, int len) throws IOException {
   int l = this.in.read(b,  off,  len);
   if (l  0) {
  -Wire.input(b, off, l);
  +wire.input(b, off, l);
   }
   return l;
   }
  @@ -77,7 +82,7 @@
   public int read() throws IOException {
   int l = this.in.read();
   if (l  0) { 
  -Wire.input(l);
  +wire.input(l);
   }
   return l;
   }
  @@ -89,7 +94,7 @@
   public int read(byte[] b) throws IOException {
   int l = this.in.read(b);
   if (l  0) {
  -Wire.input(b, 0, l);
  +wire.input(b, 0, l);
   }
   return l;
   }
  
  
  
  1.159.2.29 +18 -18
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java
  
  Index: HttpMethodBase.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v
  retrieving revision 1.159.2.28
  retrieving revision 1.159.2.29
  diff -u -r1.159.2.28 -r1.159.2.29
  --- HttpMethodBase.java   13 Jun 2004 20:24:48 -  1.159.2.28
  +++ HttpMethodBase.java   25 Jun 2004 03:27:40 -  1.159.2.29
  @@ -2012,8 +2012,8 @@
   
   responseBody = null; // is this desired?
   InputStream is = conn.getResponseInputStream();
  -if (Wire.traceEnabled()) {
  -is = new WireLogInputStream(is);
  +if (Wire.CONTENT_WIRE.enabled()) {
  +is = new WireLogInputStream(is, Wire.CONTENT_WIRE);
   }
   InputStream result = null;
   

cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestLocalHostBase.java TestHttpConnection.java TestHttpConnectionManager.java

2004-06-24 Thread mbecke
mbecke  2004/06/24 20:34:56

  Modified:httpclient/src/java/org/apache/commons/httpclient
HttpMethodDirector.java
MultiThreadedHttpConnectionManager.java
HttpConnection.java
   httpclient/src/test/org/apache/commons/httpclient
TestLocalHostBase.java TestHttpConnection.java
TestHttpConnectionManager.java
  Log:
  Adds MultiThreadedHttpConnectionManager.deleteClosedConnections() and 
HttpConnection.closeIfStale().
  
  PR: 29383
  Submitted by: Michael Becke and Oleg Kalnichevski
  Reviewed by: Oleg Kalnichevski, Michael Becke and Roland Weber
  
  Revision  ChangesPath
  1.27  +7 -4  
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodDirector.java
  
  Index: HttpMethodDirector.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodDirector.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- HttpMethodDirector.java   12 Jun 2004 22:47:23 -  1.26
  +++ HttpMethodDirector.java   25 Jun 2004 03:34:56 -  1.27
  @@ -351,6 +351,9 @@
   if (LOG.isTraceEnabled()) {
   LOG.trace(Attempt number  + execCount +  to process 
request);
   }
  +if (this.conn.getParams().isStaleCheckingEnabled()) {
  +this.conn.closeIfStale();
  +}
   if (!this.conn.isOpen()) {
   // this connection must be opened before it can be used
   // This has nothing to do with opening a secure tunnel
  @@ -414,7 +417,7 @@
   releaseConnection = true;
   throw e;
   } catch (RuntimeException e) {
  -if (this.conn.isOpen()) {
  +if (this.conn.isOpen) {
   LOG.debug(Closing the connection.);
   this.conn.close();
   }
  
  
  
  1.40  +106 -28   
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java
  
  Index: MultiThreadedHttpConnectionManager.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- MultiThreadedHttpConnectionManager.java   13 May 2004 04:03:25 -  1.39
  +++ MultiThreadedHttpConnectionManager.java   25 Jun 2004 03:34:56 -  1.40
  @@ -527,30 +527,72 @@
   }
   
   /**
  + * Gets the total number of pooled connections for the given host 
configuration.  This 
  + * is the total number of connections that have been created and are still in 
use 
  + * by this connection manager for the host configuration.  This value will
  + * not exceed the [EMAIL PROTECTED] #getMaxConnectionsPerHost() maximum number 
of connections per
  + * host}.
  + * 
  + * @param hostConfiguration The host configuration
  + * @return The total number of pooled connections
  + */
  +public int getConnectionsInPool(HostConfiguration hostConfiguration) {
  +synchronized (connectionPool) {
  +HostConnectionPool hostPool = 
connectionPool.getHostPool(hostConfiguration);
  +return hostPool.numConnections;
  +}
  +}
  +
  +/**
  + * Gets the total number of pooled connections.  This is the total number of 
  + * connections that have been created and are still in use by this connection 
  + * manager.  This value will not exceed the [EMAIL PROTECTED] 
#getMaxTotalConnections() 
  + * maximum number of connections}.
  + * 
  + * @return the total number of pooled connections
  + */
  +public int getConnectionsInPool() {
  +synchronized (connectionPool) {
  +return connectionPool.numConnections;
  +}
  +}
  +
  +/**
* Gets the number of connections in use for this configuration.
*
* @param hostConfiguration the key that connections are tracked on
* @return the number of connections in use
  + * 
  + * @deprecated Use [EMAIL PROTECTED] #getConnectionsInPool(HostConfiguration)}
*/
   public int getConnectionsInUse(HostConfiguration hostConfiguration) {
  -synchronized (connectionPool) {
  -HostConnectionPool hostPool = 
connectionPool.getHostPool(hostConfiguration);
  -return hostPool.numConnections;
  -}
  +return getConnectionsInPool(hostConfiguration);
   }
   
   /**
* Gets the total number of connections in use.
* 
* @return the total number of connections in use
  + 

DO NOT REPLY [Bug 29787] - Emailvalidation doesn't accept umlauts and the new generic top level domain names

2004-06-24 Thread bugzilla
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=29787.
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=29787

Emailvalidation doesn't accept umlauts and the new generic top level domain names





--- Additional Comments From [EMAIL PROTECTED]  2004-06-25 04:17 ---
Actually, RFC 821 has been obsoleted by RFC 2821, but essentially you're right, 
the domain name restrictions have not been extended to allow for IDN in e-mail 
addresses.

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



DO NOT REPLY [Bug 29787] - Emailvalidation doesn't accept umlauts and the new generic top level domain names

2004-06-24 Thread bugzilla
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=29787.
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=29787

Emailvalidation doesn't accept umlauts and the new generic top level domain names





--- Additional Comments From [EMAIL PROTECTED]  2004-06-25 04:20 ---
As for problem number 2, the email validator javascript has already been 
patched to support domain names that contain more than three characters.

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



RE: Logging Problem

2004-06-24 Thread Kalnichevski, Oleg

Tim,

* What is the exact JRE version that you are using?
* Are you running HttpClient in a container (servlet container, EJB container)?
* What other libraries do you have on the JRE's classpath?
* Have you tried setting those system properties upon the JRE startup using -D 
directive?

Oleg

-Original Message-
From: Tim Patton [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 24, 2004 19:06
To: [EMAIL PROTECTED]
Subject: Logging Problem


I've been trying to get logging output to debug a cookie problem but no luck
so far.  As far as I can tell from the docs, I just need these 4 lines of
code in my progrma somewhere:


System.setProperty(org.apache.commons.logging.simplelog.defaultlog,debug
);
  System.setProperty(org.apache.commons.logging.Log,
org.apache.commons.logging.impl.SimpleLog);
  System.setProperty(org.apache.commons.logging.simplelog.showdatetime,
true);

System.setProperty(org.apache.commons.logging.simplelog.log.httpclient.wire
, debug);

System.setProperty(org.apache.commons.logging.simplelog.log.org.apache.comm
ons.httpclient, debug);


Am I missing something else?  I get no logging output, but my program can
connect to a site and grab a page no problem.  I do not have Log4J anywhere
on my machine as far as I can tell.  I made a short test program to see what
was going on, I can send that to the list if it will help.

Tim


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


***
The information in this email is confidential and may be legally privileged.  Access 
to this email by anyone other than the intended addressee is unauthorized.  If you are 
not the intended recipient of this message, any review, disclosure, copying, 
distribution, retention, or any action taken or omitted to be taken in reliance on it 
is prohibited and may be unlawful.  If you are not the intended recipient, please 
reply to or forward a copy of this message to the sender and delete the message, any 
attachments, and any copies thereof from your system.
***

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



Re: Logging Problem

2004-06-24 Thread Tim Patton
Nevermind, I am dumb, I didn't know I had to set all the properties before I
created a Client object.  I don't think the docs mentioned that.

Tim
- Original Message - 
From: Kalnichevski, Oleg [EMAIL PROTECTED]
To: Commons HttpClient Project [EMAIL PROTECTED]
Sent: Thursday, June 24, 2004 1:15 PM
Subject: RE: Logging Problem



Tim,

* What is the exact JRE version that you are using?
* Are you running HttpClient in a container (servlet container, EJB
container)?
* What other libraries do you have on the JRE's classpath?
* Have you tried setting those system properties upon the JRE startup
using -D directive?

Oleg

-Original Message-
From: Tim Patton [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 24, 2004 19:06
To: [EMAIL PROTECTED]
Subject: Logging Problem


I've been trying to get logging output to debug a cookie problem but no luck
so far.  As far as I can tell from the docs, I just need these 4 lines of
code in my progrma somewhere:


System.setProperty(org.apache.commons.logging.simplelog.defaultlog,debug
);
  System.setProperty(org.apache.commons.logging.Log,
org.apache.commons.logging.impl.SimpleLog);
  System.setProperty(org.apache.commons.logging.simplelog.showdatetime,
true);

System.setProperty(org.apache.commons.logging.simplelog.log.httpclient.wire
, debug);

System.setProperty(org.apache.commons.logging.simplelog.log.org.apache.comm
ons.httpclient, debug);


Am I missing something else?  I get no logging output, but my program can
connect to a site and grab a page no problem.  I do not have Log4J anywhere
on my machine as far as I can tell.  I made a short test program to see what
was going on, I can send that to the list if it will help.

Tim


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



***
The information in this email is confidential and may be legally privileged.
Access to this email by anyone other than the intended addressee is
unauthorized.  If you are not the intended recipient of this message, any
review, disclosure, copying, distribution, retention, or any action taken or
omitted to be taken in reliance on it is prohibited and may be unlawful.  If
you are not the intended recipient, please reply to or forward a copy of
this message to the sender and delete the message, any attachments, and any
copies thereof from your system.

***

-
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 29383] - MultiThreadedConnectionManager Accounting Problems

2004-06-24 Thread bugzilla
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=29383.
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=29383

MultiThreadedConnectionManager Accounting Problems





--- Additional Comments From [EMAIL PROTECTED]  2004-06-24 21:48 ---
Oleg,

I think this one is ready to be applied.  Do you want to take care of it or should I?

Mike

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



DO NOT REPLY [Bug 29730] - [Doc] Improve logging guide

2004-06-24 Thread bugzilla
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=29730.
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=29730

[Doc] Improve logging guide

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE



--- Additional Comments From [EMAIL PROTECTED]  2004-06-24 21:49 ---
This one is being covered by #29549.

Mike

*** This bug has been marked as a duplicate of 29549 ***

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



DO NOT REPLY [Bug 29549] - Split the wire log into header and content parts.

2004-06-24 Thread bugzilla
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=29549.
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=29549

Split the wire log into header and content parts.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2004-06-24 21:49 ---
*** Bug 29730 has been marked as a duplicate of this bug. ***

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



DO NOT REPLY [Bug 29549] - Split the wire log into header and content parts.

2004-06-24 Thread bugzilla
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=29549.
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=29549

Split the wire log into header and content parts.





--- Additional Comments From [EMAIL PROTECTED]  2004-06-24 21:51 ---
+1 from me.

Oleg

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



DO NOT REPLY [Bug 29383] - MultiThreadedConnectionManager Accounting Problems

2004-06-24 Thread bugzilla
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=29383.
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=29383

MultiThreadedConnectionManager Accounting Problems





--- Additional Comments From [EMAIL PROTECTED]  2004-06-24 21:57 ---
Mike, it's been all your work. Go ahead, commit it. 

Oleg

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



DO NOT REPLY [Bug 29549] - Split the wire log into header and content parts.

2004-06-24 Thread bugzilla
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=29549.
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=29549

Split the wire log into header and content parts.





--- Additional Comments From [EMAIL PROTECTED]  2004-06-25 03:28 ---
Patch applied to 2.0.

Mike

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