You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2015/05/19 11:16:59 UTC
[jira] [Closed] (CAY-2010) DataSourceBuilder to help users create
pooling and non-pooling DataSources
[ https://issues.apache.org/jira/browse/CAY-2010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrus Adamchik closed CAY-2010.
--------------------------------
Resolution: Fixed
> DataSourceBuilder to help users create pooling and non-pooling DataSources
> --------------------------------------------------------------------------
>
> Key: CAY-2010
> URL: https://issues.apache.org/jira/browse/CAY-2010
> Project: Cayenne
> Issue Type: Task
> Reporter: Andrus Adamchik
> Assignee: Andrus Adamchik
> Fix For: 4.0.M3
>
>
> The new connection pool has a bunch of config parameters. Need a builder to allow users (and Cayenne internal code) to build it from parts. E.g.:
> {noformat}
> // build non-pooling DataSource
> DataSource nonPooling = DataSourceBuilder.url(url)
> .driver(driver)
> .userName(user)
> .password(password)
> .build();
> // build pooling DataSource
> DataSource ds = DataSourceBuilder.url(url)
> .driver(driver)
> .userName(user)
> .password(password)
> .pool(5, 10)
> .validationQuery("select * from artist")
> .build();
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)