In https://stackoverflow.com/a/166269/2/16/16/16/16/16/index.php?p=blogs/viewstory/?id=12590, in placer.site/questions/1753372 / ..., a poster implies that you can set zeroDateTimeBehavior="convertToNull"a tag as an attribute <Resource>.
Does anyone know if this is possible? All the documents I looked at say that you can only add this property to the database connection URL.
I'm really looking for a way to set this property in a DataSource from a Spring context, so that we don’t need to go around and update all of our different environments or risk losing the property, this should someone need to change the connection URL.
A Spring configured DataSource makes this very simple:
<bean id="propsDataSource" class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
<property name="url" value="${connection.url}"/>
<property name="user" value="${connection.username}"/>
<property name="password" value="${connection.password}"/>
<property name="zeroDateTimeBehavior" value="convertToNull"/>
</bean>
Does anyone know how to do this through a configured JNDI DataSource?
Thank,