You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by clebertsuconic <gi...@git.apache.org> on 2018/01/16 23:17:53 UTC

[GitHub] activemq-artemis pull request #1781: ARTEMIS-1613 Integrating JDBC into CLI ...

GitHub user clebertsuconic opened a pull request:

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

    ARTEMIS-1613 Integrating JDBC into CLI (create print-data and exp)

    

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

    $ git pull https://github.com/clebertsuconic/activemq-artemis jdbc

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

    https://github.com/apache/activemq-artemis/pull/1781.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 #1781
    
----
commit 59e506621592614733a0848de0850f5085449461
Author: Clebert Suconic <cl...@...>
Date:   2018-01-12T19:07:23Z

    ARTEMIS-1613 Integrating JDBC into CLI (create print-data and exp)

----


---

[GitHub] activemq-artemis issue #1781: ARTEMIS-1613 Integrating JDBC into CLI (create...

Posted by jbertram <gi...@git.apache.org>.
Github user jbertram commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1781
  
    I think it's worth clarifying the specific purpose of Derby in the documentation.  My understanding here is that Derby is being packaged for demonstration purposes only and shouldn't be used as a production JDBC implementation.


---

[GitHub] activemq-artemis pull request #1781: ARTEMIS-1613 Integrating JDBC into CLI ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---

[GitHub] activemq-artemis pull request #1781: ARTEMIS-1613 Integrating JDBC into CLI ...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1781#discussion_r162479786
  
    --- Diff: artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java ---
    @@ -557,6 +592,25 @@ public Object run(ActionContext context) throws Exception {
              filters.put("${global-max-section}", readTextFile(ETC_GLOBAL_MAX_SPECIFIED_TXT, filters));
           }
     
    +      if (jdbc) {
    +         if (jdbcURL == null) {
    +            jdbcURL = "jdbc:derby:" + getInstance().getAbsolutePath() + "/data/derby/db;create=true";
    --- End diff --
    
    Nope.. .lets not complicate things even further? :)
    
    The config will be defaulted to Derby if no parameters.. then the user can install derby. it's a nice experience out of box. easy to install. easy to run.


---

[GitHub] activemq-artemis pull request #1781: ARTEMIS-1613 Integrating JDBC into CLI ...

Posted by jbertram <gi...@git.apache.org>.
Github user jbertram commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1781#discussion_r162473145
  
    --- Diff: artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java ---
    @@ -423,8 +423,8 @@ public static String getDefaultHapolicyBackupStrategy() {
        // Default database url.  Derby database is used by default.
        private static String DEFAULT_DATABASE_URL = null;
     
    -   // Default JDBC Driver class name
    -   private static String DEFAULT_JDBC_DRIVER_CLASS_NAME = null;
    +   // Default JDBC Driver class name, derby by default just for demo purposes
    +   private static String DEFAULT_JDBC_DRIVER_CLASS_NAME = "org.apache.derby.jdbc.EmbeddedDriver";
    --- End diff --
    
    Should this be null since we won't be packaging Derby?


---

[GitHub] activemq-artemis pull request #1781: ARTEMIS-1613 Integrating JDBC into CLI ...

Posted by jbertram <gi...@git.apache.org>.
Github user jbertram commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1781#discussion_r162473338
  
    --- Diff: artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java ---
    @@ -557,6 +592,25 @@ public Object run(ActionContext context) throws Exception {
              filters.put("${global-max-section}", readTextFile(ETC_GLOBAL_MAX_SPECIFIED_TXT, filters));
           }
     
    +      if (jdbc) {
    +         if (jdbcURL == null) {
    +            jdbcURL = "jdbc:derby:" + getInstance().getAbsolutePath() + "/data/derby/db;create=true";
    --- End diff --
    
    Should this be left null as well rather than defaulting to Derby?


---

[GitHub] activemq-artemis pull request #1781: ARTEMIS-1613 Integrating JDBC into CLI ...

Posted by jbertram <gi...@git.apache.org>.
Github user jbertram commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1781#discussion_r162472842
  
    --- Diff: artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/database-store.txt ---
    @@ -0,0 +1,18 @@
    +      <store>
    +         <database-store>
    +            <!-- The most efficient persistent layer for Artemis is the file-store,
    +                 however if you require a database please refer to your database provider
    +                 for any database specific questions.
    +                 We don't endorse any specific JDBC provider. Derby is provided by default for demonstration purposes. -->
    --- End diff --
    
    Change this comment since we won't package Derby?


---

[GitHub] activemq-artemis pull request #1781: ARTEMIS-1613 Integrating JDBC into CLI ...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1781#discussion_r162491865
  
    --- Diff: artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java ---
    @@ -557,6 +592,25 @@ public Object run(ActionContext context) throws Exception {
              filters.put("${global-max-section}", readTextFile(ETC_GLOBAL_MAX_SPECIFIED_TXT, filters));
           }
     
    +      if (jdbc) {
    +         if (jdbcURL == null) {
    +            jdbcURL = "jdbc:derby:" + getInstance().getAbsolutePath() + "/data/derby/db;create=true";
    --- End diff --
    
    @jbertram I want to keep this as is.. with some default to be used.


---