You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/09/12 09:38:21 UTC

[jira] [Commented] (ARTEMIS-714) JDBC Store improvement

    [ https://issues.apache.org/jira/browse/ARTEMIS-714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15483647#comment-15483647 ] 

ASF GitHub Bot commented on ARTEMIS-714:
----------------------------------------

GitHub user jmesnil opened a pull request:

    https://github.com/apache/activemq-artemis/pull/771

    ARTEMIS-714 Improve JDBC Store

    add DataSource and SQLProvider.Factory properties to DataStorageConfiguration to externalize the configuration of the communication with the JDBC data store instead of relying on global class path to load the SQL connection and hard-coded values for the SQL provider choice
    
    JIRA: https://issues.apache.org/jira/browse/ARTEMIS-714

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

    $ git pull https://github.com/jmesnil/activemq-artemis ARTEMIS-714_JDBC_store

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

    https://github.com/apache/activemq-artemis/pull/771.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 #771
    
----
commit c2113b018177c3806c7dbad1f5ca8d2a0d383469
Author: Jeff Mesnil <jm...@gmail.com>
Date:   2016-09-08T15:46:09Z

    ARTEMIS-714 Improve JDBC Store
    
    add DataSource property to DatabaseStorageConfiguration to be able to
    communicate with the data store using this DataSource instance instead
    of relying on the creation the SQL connnection using the JDBC connection
    URL/driver class name tuple.
    
    JIRA: https://issues.apache.org/jira/browse/ARTEMIS-714

commit 84328f070b928d353ce81153c1b86a4f287db6cc
Author: Jeff Mesnil <jm...@gmail.com>
Date:   2016-09-09T14:47:03Z

    ARTEMIS-714 Improve JDBC store
    
    bindingsJournal and messageJournal are already started in the start()
    method. Remove redundant calls that were creating unused JDBC
    connections that are never closed.
    
    JIRA: https://issues.apache.org/jira/browse/ARTEMIS-714

commit 94dc242d5374e51a3ee854faaaa305df399ed9c3
Author: Jeff Mesnil <jm...@gmail.com>
Date:   2016-09-12T09:17:53Z

    ARTEMIS-714 Improve JDBC store
    
    add SQLProvider.Factory property to DatabaseStorageConfiguration to
    externalize the choice of the SQLProvider instead of relying on
    hard-coded choices. If the property is null, the current behaviour will
    be used (determing the SQLProvider based on the driver class name)
    
    JIRA: https://issues.apache.org/jira/browse/ARTEMIS-714

----


> JDBC Store improvement
> ----------------------
>
>                 Key: ARTEMIS-714
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-714
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 1.1.0
>            Reporter: Jeff Mesnil
>
> We plan to integrate with Artemis JDBC store in our application server.
> After a code review, we saw 2 main improvements that would make the code more flexible and easier to maintain.
> First, in our app server, we have our sophisticated way to configure access to databases. We would like to be able to pass a DataSource instance to Artemis JDBC store instead of a (driver class name / URL) tuple. 
> If the DataSource object is set, we create a Connection from it, otherwise we use the current code to create the connection from a class name + URL. This will introduce no changes to use of standalone Artemis broker.
> The second improvement is to make the SQLProvider injectable instead of relying on hard-coded class provided by Artemis jars.
> We would create an instance of the SQLProvider in our integration code and pass it to Artemis JDBC store. This will make it simpler to support new types of databases (or fix issues in the SQLProvider implementations) without requiring a new release of Artemis for that.
> If the SQLProvider instance injected in the JDBC store is null, the current code will be executed.
> Does these improvements sound correct?



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