Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anyone know of a generic transactional Map | Set | List

The only real available library i could find was the Apache Commons Transaction Library.

Problems w/ Apache Commons Transctions

  • Last release 2008 (3years)
  • not generic
  • dependency on a logging f/w - do we need a logger for a Map !?!
  • i think i saw somewhere (prolly the doco) that it was not XA.

Features id like

  • available collections should be generic
  • changes should be batched until a rollback ( forget all changes) or commit.
  • dirty reads etc should also be a feature.
  • thread independent, different threads should be able to participate in different txs.
  • views should also be transaction - e.g. Map.entrySet()
  • XA would be nice just so the collection instance can participate in a two phase commit.
like image 302
mP. Avatar asked Jan 17 '11 11:01

mP.


3 Answers

Infinispan is a full XA enabled Cache that also implements a ConcurrentMap since version 4.

like image 78
Luciano Avatar answered Oct 23 '22 22:10

Luciano


Maybe JDBM fits your bill? It has transactional disk-backed collection implementations.

like image 38
Steven Schlansker Avatar answered Oct 23 '22 21:10

Steven Schlansker


I guess the, somewhat frustrating, but obvious, answer is:

If you require database functionality, why not use a database?

If you use an in-memory solution like HyperSonic (HSQL) you have almost no setup to do and you have transactions and many other features built-in

like image 39
Sean Patrick Floyd Avatar answered Oct 23 '22 20:10

Sean Patrick Floyd