Skip to content

Commit

Permalink
Fixed JNDI name for pool when there's already prefixed name
Browse files Browse the repository at this point in the history
- then we remove the prefix from the second part.

Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
  • Loading branch information
dmatej committed Nov 14, 2022
1 parent fb99b75 commit 7496a9f
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -83,9 +83,9 @@ public static ResourcePrincipalDescriptor getDefaultResourcePrincipal(PoolInfo p
private static SimpleJndiName getReservePrefixedJNDIName(String prefix, Comparable<?> resourceName) {
return new SimpleJndiName(prefix + resourceName);
}

public static SimpleJndiName getReservePrefixedJNDINameForPool(PoolInfo poolInfo) {
SimpleJndiName name = getReservePrefixedJNDIName(ConnectorConstants.POOLS_JNDINAME_PREFIX, poolInfo.getName());
SimpleJndiName jndiName = poolInfo.getName().removePrefix();
SimpleJndiName name = getReservePrefixedJNDIName(POOLS_JNDINAME_PREFIX, jndiName);
return getScopedName(poolInfo, name);
}

Expand Down

0 comments on commit 7496a9f

Please sign in to comment.