You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by mmpestorich <gi...@git.apache.org> on 2018/08/29 18:54:11 UTC

[GitHub] cayenne pull request #314: CAY-2469 Allow validationQuery to be set in domai...

GitHub user mmpestorich opened a pull request:

    https://github.com/apache/cayenne/pull/314

    CAY-2469 Allow validationQuery to be set in domain.xml

    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.
    ```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>
    ```
    But validationQuery is neither defined in the domain.xsd or used when creating the data source connection pool. This 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.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/swarmbox/cayenne cay-2469

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cayenne/pull/314.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #314
    
----
commit df8f5669277ffd8f24bc5c85ae44fb85f8cc0440
Author: Mike M Pestorich <mi...@...>
Date:   2018-08-29T18:49:32Z

    CAY-2469 Allow validationQuery to be set in domain.xml

----


---