the only issue I can think of here is it overrides what the user might have set as system properties/config file.

maybe: 
props = jdbcPropertyManager.getJDBCEnvironmentBean().getJndiProperties()
props.addAll(new InitialContext().getEnvironment())
jdbcPropertyManager.getJDBCEnvironmentBean().setJndiProperties(props)

Though its possible they could conflict I suppose. Maybe:
if (jdbcPropertyManager.getJDBCEnvironmentBean().getJndiProperties().size() == 0) {
jdbcPropertyManager.getJDBCEnvironmentBean().setJndiProperties(new InitialContext().getEnvironment());