activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Persistence Adaptor Design
Date Wed, 23 May 2007 08:33:03 GMT
On 5/22/07, Anthrope <pn@anthrope.com> wrote:
>
> All,
>     I've finished writing a persistence adaptor to Berkeley DB and am
> beginning to test it out.

Awesome! Am looking forward to seeing how well it performs compared to
AMQStore/Kaha

> My design is largely based on that of the existing
> adaptors (JDBC, Kaha and Memory in particular). Things are working quite
> nicely, with the exception that the beginTransaction(), commitTransaction()
> and abortTransaction() methods on my persistence adaptor do not ever get
> called!
>
>      Can someone shed any light on when these methods get called?

>From looking at the code, it seems these methods are only used right
now if the journal is used with some PersistenceAdapter as a long term
store (i.e. to batch stuff up). If you are not using the journal with
your BDB PersistenceAdapter then I guess these methods won't be
called.


> (FWIW, I
> am using the MemoryTransaction store as my Transaction store). The other
> question I have is the invocation of the shutdown hook. Since I am in
> development, I have to continually kill the activemq process, and notice
> that the shutdown hook doesn't always get called, which can be a bit
> problematic. Is there some logic that determines whether or not the shutdown
> hooks get invoked?

The shutdown hook is a JVM thing which usually gets called, but AFAIK
its not guarrenteed. (e.g. if you ctrl-c a process the hook won't fire
usually). Certainly you need to deal with the case where the hook is
never called.

-- 
James
-------
http://macstrac.blogspot.com/

Mime
View raw message