If you use spring, you can use the spring property-placeholder-configurer mechanism to do this. Just add the EclipseLink provider adapter:
public class ExtendedJpaVendorAdapter extends XJpaVendorAdapter { private Map<String, Object> vendorProperties; @Override public Map<String, Object> getJpaPropertyMap() { Map<String, Object> properties = super.getJpaPropertyMap(); properties.putAll(vendorProperties); return properties; } public Map<String, Object> getVendorProperties() { return vendorProperties; } public void setVendorProperties(Map<String, Object> vendorProperties) { this.vendorProperties = vendorProperties; } }
And then you can customize them in the spring xml file.
Bozho source share