You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/08/29 18:55:00 UTC

[jira] [Updated] (CAY-2469) Allow validationQuery to be set in domain.xml

     [ https://issues.apache.org/jira/browse/CAY-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated CAY-2469:
--------------------------------
    Labels: pull-request-available  (was: )

> 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
>            Priority: Minor
>              Labels: pull-request-available
>
> 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)