Re: MalformedPatternException seen with OROMatcher regular expression library

"Daniel F. Savarese" <[email protected]> Mon, 06 Sep 2004 14:56:23 -0400
Newsgroups gmane.comp.jakarta.oro.user
Message-ID <[email protected]>
In message <000601c493db$bb9101e0$8e6ec80a@ec1t2121981>, "Prasad Ramisetti" wri
tes:
>Actually I was using only one instance of PatternCompiler, and multiple
>threads 
>were trying to compile regular expression using the same instance of
>PatternCompiler.

Since you've already figured it out, I'm just reiterating for the general
good.  The library is designed with the intent that you use a dedicated
PatternCompiler and PatternMatcher instance per thread.  If you want to
share a PatternCompiler or PatternMatcher instance between multiple threads,
you must protect against concurrent access to its methods.  You may
concurrently use a single instance of Perl5Pattern with multiple instances
of Perl5Matcher in different threads only if it is compiiled with
Perl5Compiler.READ_ONLY_MASK.

All of this info is littered throughout the API docs, but it would be
more obvious if added to a user's guide.

daniel