Skip to content

Conversation

@jcflack
Copy link
Contributor

@jcflack jcflack commented Mar 13, 2025

The DDRProcessor creates an implied dependency of an implementor name on the SQLAction carrying a matching provides string. An implementor name, per ISO SQL/JRT, is an SQL identifier, case-insensitive unless quoted. But a PL/Java provides string is just a string, with only case-sensitive exact matching. The DDRProcessor was using a surprising and undocumented rule, matching only if the provides string was identical to the implementor name's lower-case-folded form.

The results could be especially puzzling because the 'weak' nature of the implementor/provides dependency meant there was no error or warning of the failure to match. The dependency simply wasn't created, leading possibly to an incorrectly-ordered deployment descriptor.

Rather than some more general and complicated solution, simply change the rule so the provides string is matched to the non-folded implementor name as it was spelled in the source annotation. Thus as long as the programmer does the expected thing and spells them the same in the source, the right thing happens.

Addresses issue #515.

jcflack added 2 commits March 13, 2025 10:02
The DDRProcessor creates an implied dependency of an 'implementor'
name on the SQLAction carrying a matching 'provides' string. An
implementor name, per ISO SQL/JRT, is an SQL identifier,
case-insensitive unless quoted. But a PL/Java 'provides' string is just
a string, with only case-sensitive exact matching. The DDRProcessor was
using a surprising and undocumented rule, matching only if the provides
string was identical to the implementor name's lower-case-folded form.

The results could be especially puzzling because the 'weak' nature of
the implementor/provides dependency meant there was no error or warning
of the failue to match. The dependency simply wasn't created, leading
possibly to an incorrectly-ordered deployment descriptor.

Rather than some more general and complicated solution, simply change
the rule so the provider string is matched to the non-folded implementor
name as it was spelled in the source annotation. Thus as long as the
programmer does the expected thing and spells them the same in the
source, the right thing happens.

Addresses #515.
This had never been well documented. The javadoc of the ConditionalDDR
example code was about the best there was.
@jcflack jcflack merged commit 37c9da0 into REL1_6_STABLE Mar 14, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants