title: Persistence Strategy for Standalone Desktop Java Application
body: <p>(Only managed to find one other question on this - <a href="https://stackoverflow.com/questions/393948/object-persistence-strategy-for-desktop-application">Object persistence strategy for desktop application</a>)</p>
  
  <p>I have a basic Java Swing application - which needs to access / persist a few thousand POJOs.  I may need to run basic queries on these.</p>
  
  <p>Originally I looked at JPA-Hibernate + HSQLDB, but this slows app start-up time and I figured it was overkill for my query requirements.</p>
  
  <p>I simplified my data model and started looking at Document DBs - mongodb is great but it isnt really suited for non-server environments; starting up and shutting down the mongod process from Java (using ProcessBuilder) is fiddly and I really want an embedded solution.</p>
  
  <p>I really want a fast, lightweight persistence tool with basic query functions that can be embedded in a Java app.  </p>
  
  <p>Are these the only options?</p>
  
  <ul>
  <li><a href="http://prevayler.org/" rel="nofollow noreferrer">http://prevayler.org/</a></li>
  <li>Java Embedded Database (HSQL) without ORM</li>
  <li>Java Serialization to filesystem</li>
  <li>JSON persisted to flat files?</li>
  <li>XStream (and XBird? - <a href="http://code.google.com/p/xbird/" rel="nofollow noreferrer">http://code.google.com/p/xbird/</a>)</li>
  <li>OODB</li>
  <li>JCR Implementation ?</li>
  </ul>
  
  <p>Can anyone offer any other advice / suggestions?  At what point would serializing a large List of POJO's start to really hurt performance?</p>
  
  <p>Thanks</p>
  
  <p>edit: Just found this post - <a href="https://stackoverflow.com/questions/2825491/are-there-any-embeddable-document-database-engines-for-java-something-similar-t">https://stackoverflow.com/questions/2825491/are-there-any-embeddable-document-database-engines-for-java-something-similar-t</a> recommending Orient - <a href="http://code.google.com/p/orient/" rel="nofollow noreferrer">http://code.google.com/p/orient/</a></p>