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

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

Github user clebertsuconic commented on the issue:

    https://github.com/apache/activemq-artemis/pull/771
  
    @jmesnil Can you take a look into  
org.apache.activemq.artemis.tests.integration.client.LargeMessage
    
    If you run any JDBC test, there's a NPE happening:
    
    
    ```java
    [main] 15:27:39,377 WARN  [org.apache.activemq.artemis.core.server] 
AMQ222010: Critical IO Error, shutting down the server. file=NULL, 
message=null: java.lang.NullPointerException
        at 
org.apache.activemq.artemis.core.persistence.impl.journal.JDBCJournalStorageManager.init(JDBCJournalStorageManager.java:89)
 [:]
        at 
org.apache.activemq.artemis.core.persistence.impl.journal.AbstractJournalStorageManager.<init>(AbstractJournalStorageManager.java:208)
 [:]
        at 
org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager.<init>(JournalStorageManager.java:97)
 [:]
        at 
org.apache.activemq.artemis.core.persistence.impl.journal.JDBCJournalStorageManager.<init>(JDBCJournalStorageManager.java:47)
 [:]
        at 
org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.createStorageManager(ActiveMQServerImpl.java:1799)
 [:]
        at 
org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.initialisePart1(ActiveMQServerImpl.java:1930)
 [:]
        at 
org.apache.activemq.artemis.core.server.impl.LiveOnlyActivation.run(LiveOnlyActivation.java:61)
 [:]
        at 
org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.start(ActiveMQServerImpl.java:447)
 [:]
        at 
org.apache.activemq.artemis.tests.integration.client.LargeMessageTest.testBufferMultipleLargeMessages(LargeMessageTest.java:1655)
 [:]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
[rt.jar:1.8.0_73]
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
[rt.jar:1.8.0_73]
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 [rt.jar:1.8.0_73]
        at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_73]
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
 [junit-4.11.jar:]
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
 [junit-4.11.jar:]
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
 [junit-4.11.jar:]
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
 [junit-4.11.jar:]
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) 
[junit-4.11.jar:]
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) 
[junit-4.11.jar:]
        at 
org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48) 
[junit-4.11.jar:]
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55) 
[junit-4.11.jar:]
        at 
org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48) 
[junit-4.11.jar:]
        at 
org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48) 
[junit-4.11.jar:]
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55) 
[junit-4.11.jar:]
        at org.junit.rules.RunRules.evaluate(RunRules.java:20) [junit-4.11.jar:]
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) 
[junit-4.11.jar:]
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
 [junit-4.11.jar:]
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
 [junit-4.11.jar:]
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) 
[junit-4.11.jar:]
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) 
[junit-4.11.jar:]
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) 
[junit-4.11.jar:]
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) 
[junit-4.11.jar:]
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) 
[junit-4.11.jar:]
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309) 
[junit-4.11.jar:]
        at org.junit.runners.Suite.runChild(Suite.java:127) [junit-4.11.jar:]
        at org.junit.runners.Suite.runChild(Suite.java:26) [junit-4.11.jar:]
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) 
[junit-4.11.jar:]
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) 
[junit-4.11.jar:]
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) 
[junit-4.11.jar:]
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) 
[junit-4.11.jar:]
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) 
[junit-4.11.jar:]
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309) 
[junit-4.11.jar:]
        at org.junit.runner.JUnitCore.run(JUnitCore.java:160) [junit-4.11.jar:]
        at 
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
 [junit-rt.jar:]
        at 
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
 [junit-rt.jar:]
        at 
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74) 
[junit-rt.jar:]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
[rt.jar:1.8.0_73]
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
[rt.jar:1.8.0_73]
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 [rt.jar:1.8.0_73]
        at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_73]
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) 
[idea_rt.jar:]
    ```
    
    
    I tried to fix it myself but I couldn't figure out your intention here. I 
guess you can fix it faster than I could.
    
    
    I found this running the whole testsuite. The tests will hang after this 
failure.


> 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)

Reply via email to