Mike M Pestorich created CAY-2469: ------------------------------------- Summary: Allow validationQuery to be set in domain.xml Key: CAY-2469 URL: https://issues.apache.org/jira/browse/CAY-2469 Project: Cayenne Issue Type: Improvement Components: Core Library Reporter: Mike M Pestorich
I have not been able to figure out an easy way to setup a validationQuery using a standard cayenne project file. I would expect to be able to specify it along side the connection pool min and max connections. {code:xml} <?xml version="1.0" encoding="utf-8"?> <domain xmlns="http://cayenne.apache.org/schema/10/domain" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cayenne.apache.org/schema/10/domain http://cayenne.apache.org/schema/10/domain.xsd" project-version="10"> <node name="DataNode" adapter="..." factory="o.a.c.c.s.XMLPoolingDataSourceFactory" schema-update-strategy="..."> <map-ref name="..."/> <data-source> <driver value="..."/> <url value="..."/> <login userName="..." password="..."/> <connectionPool min="1" max="10" validationQuery="SELECT 1 AS VALIDATE"/> </data-source> </node> </domain> {code} But validationQuery is neither defined in the domain.xsd or used when creating the data source connection pool. I submitted a pull request that does that. Pretty sure this all makes sense.... thoughts? Not sure if this is related in anyway to CAY-1462, which was filed quite awhile ago. -- This message was sent by Atlassian JIRA (v7.6.3#76005)