You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Tuomas Kiviaho <tu...@iki.fi> on 2008/08/22 11:59:04 UTC

Kaha vs AMQ persistence adapter.

I'd like to get some sort of confirmation that I'm (not) "doing it wrong"
before posting this to JIRA, since I'm just a beginner with AMQ (5.1.0). 

I started having trouble with kaha persistence and after banging my head to
the wall couple of times I re-read the documentation.

I think default amq persistence adapter is enough but there is still
<http://activemq.apache.org/kaha-persistence.html> that I stumbled upon
first and after wards noticed that kaha is provided by default
<http://activemq.apache.org/amq-message-store.html>. 

If I configure amq persistence adapter via spring as per document above it
too will miss some of the configuration.

--
Tuomas

* * * KahaPersistenceAdapter via spring missing brokerName etc. ***

KahaPersistenceAdapter configured via Spring XBean support...

<amq:persistenceAdapter>
  <amq:kahaPersistenceAdapter />
</amq:persistenceAdapter>

...doesn't get seem to get itself fully configured as does
AMQPersistenceAdapter by default via
org.apache.activemq.broker.BrokerService.createPersistenceFactory(). Here
are broker name and data directory plus task runner factory derived from
broker (service) as default values. Actual configuration is done by the
AMQPersistenceAdapterFactory itself some more default values to the
persistence adapter. 

What kaha persistence adapter is missing first is the broker name.

LOG.info("Using Persistence Adapter: " + getPersistenceAdapter()); ->

Caused by: java.lang.NullPointerException
        at
org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter.getStoreName(KahaPersistenceAdapter.java:285)
        at
org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter.toString(KahaPersistenceAdapter.java:294)
        at java.lang.String.valueOf(String.java:2827)
        at java.lang.StringBuilder.append(StringBuilder.java:115)
        at
org.apache.activemq.broker.BrokerService.start(BrokerService.java:435)


-- 
View this message in context: http://www.nabble.com/Kaha-vs-AMQ-persistence-adapter.-tp19104488p19104488.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Kaha vs AMQ persistence adapter.

Posted by Rob Davies <ra...@gmail.com>.
The default in 5.1 is the AMQ Message Store - which we recommend for  
general purpose message persistence.
So it would be easier not to set any persistence adaptor in your  
configuration to get started ;)

cheers,

Rob

Rob Davies
http://rajdavies.blogspot.com/

On 22 Aug 2008, at 10:59, Tuomas Kiviaho wrote:

>
> I'd like to get some sort of confirmation that I'm (not) "doing it  
> wrong"
> before posting this to JIRA, since I'm just a beginner with AMQ  
> (5.1.0).
>
> I started having trouble with kaha persistence and after banging my  
> head to
> the wall couple of times I re-read the documentation.
>
> I think default amq persistence adapter is enough but there is still
> <http://activemq.apache.org/kaha-persistence.html> that I stumbled  
> upon
> first and after wards noticed that kaha is provided by default
> <http://activemq.apache.org/amq-message-store.html>.
>
> If I configure amq persistence adapter via spring as per document  
> above it
> too will miss some of the configuration.
>
> --
> Tuomas
>
> * * * KahaPersistenceAdapter via spring missing brokerName etc. ***
>
> KahaPersistenceAdapter configured via Spring XBean support...
>
> <amq:persistenceAdapter>
>  <amq:kahaPersistenceAdapter />
> </amq:persistenceAdapter>
>
> ...doesn't get seem to get itself fully configured as does
> AMQPersistenceAdapter by default via
> org.apache.activemq.broker.BrokerService.createPersistenceFactory().  
> Here
> are broker name and data directory plus task runner factory derived  
> from
> broker (service) as default values. Actual configuration is done by  
> the
> AMQPersistenceAdapterFactory itself some more default values to the
> persistence adapter.
>
> What kaha persistence adapter is missing first is the broker name.
>
> LOG.info("Using Persistence Adapter: " + getPersistenceAdapter()); ->
>
> Caused by: java.lang.NullPointerException
>        at
> org 
> .apache 
> .activemq 
> .store 
> .kahadaptor 
> .KahaPersistenceAdapter.getStoreName(KahaPersistenceAdapter.java:285)
>        at
> org 
> .apache 
> .activemq 
> .store 
> .kahadaptor 
> .KahaPersistenceAdapter.toString(KahaPersistenceAdapter.java:294)
>        at java.lang.String.valueOf(String.java:2827)
>        at java.lang.StringBuilder.append(StringBuilder.java:115)
>        at
> org.apache.activemq.broker.BrokerService.start(BrokerService.java:435)
>
>
> -- 
> View this message in context: http://www.nabble.com/Kaha-vs-AMQ-persistence-adapter.-tp19104488p19104488.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>