Commons-transaction abandoned?

2010-02-10 Thread John Ericksen
Hello,

I came across the file transaction capabilities in commons-transaction today
which was exactly what I was looking for.  To my disapointment, however, it
looks like there hasn't been an update to the project for over 2 years.  The
home page says the current version is a SNAPSHOT and from my search of the
mailing list, it looks like 2.0 is upcoming (in 2007?).

My question is, is the commons-transaction project abandoned, is there a
better library out there for transactional file system operations?

Thanks for your reply.

John


[Collections] Generics Support

2010-02-10 Thread Russell Collins
Are there any plans for the Collections library to support generics in the 
future?  If so, when can we expect that?



Russell Collins
Sr. Software Engineer
McLane Advanced Technology



CONFIDENTIALITY NOTICE: The information contained in this electronic mail 
(email) transmission (including attachments), is intended by MCLANE ADVANCED 
TECHNOLOGIES for the use of the named individual or entity to which it is 
addressed and may contain information that is privileged, confidential and/or 
protected as a trade secret. It is not intended for transmission to, or receipt 
by, any individual or entity other than the named addressee(s). If you have 
received this email in error, please delete it (including attachments) and any 
copies thereof without printing, copying or forwarding it, and notify the 
sender of the error by email reply immediately.


Re: [Collections] Generics Support

2010-02-10 Thread Matt Benson
Much work has been done on the [collections] trunk; however noone has  
had time to finish it all up for a release.  Searching the  
d...@commons.apache.org archives may give you an idea of what remains  
(off the top of my head, I can only think of the task of addressing  
all JIRA issues filed for v4.0).


HTH,
Matt

On Feb 10, 2010, at 2:15 PM, Russell Collins wrote:

Are there any plans for the Collections library to support generics  
in the future?  If so, when can we expect that?




Russell Collins
Sr. Software Engineer
McLane Advanced Technology



CONFIDENTIALITY NOTICE: The information contained in this  
electronic mail (email) transmission (including attachments), is  
intended by MCLANE ADVANCED TECHNOLOGIES for the use of the named  
individual or entity to which it is addressed and may contain  
information that is privileged, confidential and/or protected as a  
trade secret. It is not intended for transmission to, or receipt  
by, any individual or entity other than the named addressee(s). If  
you have received this email in error, please delete it (including  
attachments) and any copies thereof without printing, copying or  
forwarding it, and notify the sender of the error by email reply  
immediately.



-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



[validator] Trouble using global constants in variable values

2010-02-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

Hello, we've been using commons-validator 1.3.1 along with Struts 1.3.8
to do form validation to great success for quite some time (thanks!).

I was recently asked to change our password complexity requirements and
I realized that we had the same mask in several different validator
files (we have validator_role1.xml, validator_role2.xml, etc. along with
a global-validator.xml file that contains a custom global validator for
things other than pattern matching).

After a bit of searching, and reading the validator DTD, I saw that one
can define constant elements within the global element and then use
those constants later in the validators.

Here are the relevant configuration files I have:

global-validator.xml
- 
-//Apache Software Foundation//DTD Commons Validator Rules
Configuration 1.3.0//EN
http://jakarta.apache.org/commons/dtds/validator_1_3_0.dtd;

form-validation
global
  validator ... /

!-- Define constants for the password rules to be used all over --
constant
  !-- Requires a letter (\p{L} is any unicode letter),
requires a number --
  constant-namepassword-regexp/constant-name

constant-value^.*(([0-9]+.*\p{L}+)|(\p{L}+.*[0-9]+)).*$/constant-value
/constant
constant
  constant-namepassword-minlength/constant-name
  constant-value8/constant-value
/constant
constant
  constant-namepassword-maxlength/constant-name
  constant-value4096/constant-value
/constant
/global
/form-validation

validate_user.xml
- --
?xml version=1.0 ?
!DOCTYPE form-validation PUBLIC
-//Apache Software Foundation//DTD Commons Validator Rules
Configuration 1.3.0//EN
http://jakarta.apache.org/commons/dtds/validator_1_3_0.dtd;

form-validation
  formset
form name=profileForm
  field property=newPassword
 depends=minlength,maxlength,mask
arg position=0 key=form.profile.newPassword.prompt
bundle=User /
arg position=1 name=minlength key=${var:minlength}
resource=false /
arg position=2 name=maxlength key=${var:maxlength}
resource=false /
msg name=mask bundle=User key=error.invalid.password
/!-- Specific error message for this one --

varvar-nameminlength/var-namevar-value${password-minlength}/var-value/var

varvar-namemaxlength/var-namevar-value${password-maxlength}/var-value/var
var
  var-namemask/var-name
  var-value${password-regexp}/var-value
/var
  /field
/form
  /formset
/form-validation

I don't see any errors during startup, and I also don't see any at
runtime (but I did while configuring them in the first place, with typos
and stuff like that showing up in the error logs, so I know that I can
see errors when they /do/ occur). I can see the following messages in my
stdout log during startup:

2010-02-10 18:07:02,899 [main] INFO
org.apache.struts.validator.ValidatorPlugIn- Loading validation rules
file from '/WEB-INF/global-validator.xml'
2010-02-10 18:07:02,899 [main] INFO
org.apache.struts.validator.ValidatorPlugIn- Loading validation rules
file from '/WEB-INF/validate_user.xml'

No errors are displayed afterward, so I assume that everything is copacetic.

Unfortunately for me, when attempting to validate my form using this new
setup, the validation fails and I am presented with the error message
associated with error.invalid.password, indicating that the mask
validation has failed.

I have verified that, if I fail to enter the requisite number of
characters, I'll get a message that says The field password cannot be
less than 8 characters, which comes from a parameterized message so I
know the 8 is being correctly substituted, here.

Finally, I have checked that my regular expression shown above matches a
variety of inputs that I expect to work (including, say, Password1,
and 1) by writing a simple program that checks against that
expression (the only difference being that each backslash has been
doubled in the source code to that class).

It looks like I have everything right, here, and yet it's not working
for me. Can anyone shed any light on what the problem might be? I'm not
even sure how I can debug this, since I don't know how to dump-out the
regexp that the validator is eventually using.

Any help would be greatly appreciated.

Thanks,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktzQOQACgkQ9CaO5/Lv0PB4wACgsy1tN3zW0AX/qQ++w46mXeQP
GvMAoLOJJthTVkVtKGk6ijVeqk92LfJU
=1y0w
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [validator] Trouble using global constants in variable values

2010-02-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

On 2/10/2010 6:27 PM, Christopher Schultz wrote:
 constant-value^.*(([0-9]+.*\p{L}+)|(\p{L}+.*[0-9]+)).*$/constant-value
Okay, something must be wrong with my regular expression, or now I'm
expressing it in the XML, because when I set it to

  constant-value^[a]+$/constant-value

...it will allow me to enter a series of a's and validator will succeed.

If the use of the constant documented anywhere? I couldn't find
anything on the website, in the wiki, etc. I was only lucky that I
thought of looking in the DTD to see that it was possible, and that the
Constant class from way back in version 1.0.1 has been indexed by
Google to see what the syntax was supposed to be.

I'd be happy to contribute some documentation if I know what form is best.

Thanks,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktzRVAACgkQ9CaO5/Lv0PCYSACghCjAIztuaV2nYDAmRLH6+BCA
T6EAn0uy/QAAUYTErT65o2k9gpAowbH4
=z0bC
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Commons-Pool : BasePoolableObjectFactory - generification in the roadmap ?

2010-02-10 Thread Kay Kay
In Commons-Pool :  o.a.commons.pool.BasePoolableObjectFactory and 
similar classes seem like good candidates for a generic api .  Any idea 
, if the generification is in the roadmap of this package ?



-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [validator] Trouble using global constants in variable values

2010-02-10 Thread Niall Pemberton
On Wed, Feb 10, 2010 at 11:46 PM, Christopher Schultz
ch...@christopherschultz.net wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 All,

 On 2/10/2010 6:27 PM, Christopher Schultz wrote:
 constant-value^.*(([0-9]+.*\p{L}+)|(\p{L}+.*[0-9]+)).*$/constant-value
 Okay, something must be wrong with my regular expression, or now I'm
 expressing it in the XML, because when I set it to

  constant-value^[a]+$/constant-value

 ...it will allow me to enter a series of a's and validator will succeed.

You could try testing you're expression directly using
GenericValidator.matchRegexp() until you're happy it works.

http://tinyurl.com/yhe66nm

If it seems correct, but still doesn't seem to work in your Struts app
then perhaps you could write a Struts plugin to retrieve the validator
resources and display the values for the forms/fields/arguments:

http://svn.apache.org/repos/asf/struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/ValidatorPlugIn.java

 If the use of the constant documented anywhere? I couldn't find
 anything on the website, in the wiki, etc. I was only lucky that I
 thought of looking in the DTD to see that it was possible, and that the
 Constant class from way back in version 1.0.1 has been indexed by
 Google to see what the syntax was supposed to be.

 I'd be happy to contribute some documentation if I know what form is best.

Struts has documentation on using validator:

http://struts.apache.org/1.3.10/faqs/validator.html#ConstantsVariables

Niall

 Thanks,
 - -chris

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [validator] Trouble using global constants in variable values

2010-02-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Niall,

On 2/10/2010 7:21 PM, Niall Pemberton wrote:
 You could try testing you're expression directly using
 GenericValidator.matchRegexp() until you're happy it works.

That's good to know.

After dinner and a few drinks, I realized something: commons-validator
uses jakarta-oro as it's pattern matcher, right? Well, then my use of
the java.util.regex.Pattern pattern descriptors does me no good, then,
does it?

I'm looking for jakarta-oro's pattern syntax, but I can't seem to find a
reference to it, other than that it is Perl 5 compatible. Perl 5 says
stuff like \p{...} works, but I'll have to look at it in more detail.
It's also possible that ORO doesn't really provide the Unicode portion
of the Perl 5 regexp pattern syntax. The project is somewhat stale...

 If it seems correct, but still doesn't seem to work in your Struts app
 then perhaps you could write a Struts plugin to retrieve the validator
 resources and display the values for the forms/fields/arguments:

I may also just write my own validator that uses java.util.regex and
replace the one that ships with commons-validator. I can see that in the
trunk there is such a class, but it hasn't gone into a release, yet.

 Struts has documentation on using validator:
 
 http://struts.apache.org/1.3.10/faqs/validator.html#ConstantsVariables

I should have thought of that, what with using it with Struts and all...
but I decided to go right to the source instead. I'll check the
validator FAQs on Struts and see how they look.

Thanks,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktzY5MACgkQ9CaO5/Lv0PBLbwCgxFH0JCuFlS8NKvCEiVS9D2pQ
bnQAn0EdvLZEQuJeFCHVIvqr8ywvkX0u
=al4E
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [validator] Trouble using global constants in variable values

2010-02-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

On 2/10/2010 8:55 PM, Christopher Schultz wrote:
 I'm looking for jakarta-oro's pattern syntax, but I can't seem to find a
 reference to it, other than that it is Perl 5 compatible. Perl 5 says
 stuff like \p{...} works, but I'll have to look at it in more detail.
 It's also possible that ORO doesn't really provide the Unicode portion
 of the Perl 5 regexp pattern syntax. The project is somewhat stale...

I tried the pattern /^.*\\p{IsAlpha}.*$/ in ORO and it can't
successfully match simple stuff like abc, so I think support for \p
constructs for Unicode isn't supported in ORO.

I think I'll try my luck with a custom validator.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktzclsACgkQ9CaO5/Lv0PDRfACeKbqWSfDKeiPxHOShWN+scWbd
AzkAoJP1nhXkUoQmiWhxwl58s1d5QkMl
=df+c
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org