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 10:49:01 UTC

[jira] [Updated] (CAY-2010) DataSourceBuilder to help users to use Cayenne connection pool explicitly

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

Andrus Adamchik updated CAY-2010:
---------------------------------
    Description: 
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}
DataSource ds = DataSourceBuilder.url(url)
        .driver(driver)
        .userName(user)
        .password(password)
        .minConnections(5)
        .maxConnections(10)
        .build();
{noformat}


  was:
As we are adding more parameters to Cayenne DataSource (validation query, etc.), it would make sense to split DataSource builder methods from ServerRuntimeBuilder, and use a separate builder instead. So the new code may look like this:

DataSource ds = DataSourceBuilder.bla(..).build();
ServerRuntimeBuilder.builder().dataSource(ds).build();

In fact the builder was already committed per CAY-2008, CAY-2009. So here we'll just clean up ServerRuntimeBuilder.

        Summary: DataSourceBuilder to help users to use Cayenne connection pool explicitly  (was: Splitting DataSourceBuilder from ServerRuntimeBuilder)

changing the focus of this jira to a standalone builder (as opposed to the initial idea of messing up ServerRuntimeBuilder).

> DataSourceBuilder to help users to use Cayenne connection pool explicitly
> -------------------------------------------------------------------------
>
>                 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}
> DataSource ds = DataSourceBuilder.url(url)
>         .driver(driver)
>         .userName(user)
>         .password(password)
>         .minConnections(5)
>         .maxConnections(10)
>         .build();
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)